reef-pi :: An opensource reef tank controller based on Raspberry Pi.

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,166
Location
Winchester, TN
Rating - 0%
0   0   0
Hey all. It's been a while. Just to update, my reef-pi had been running good then we had a few power events and I had to shut down via power pull to resolve a clogged drain because I couldn't access the system. Raspbian corrupted or something and i had zero boot activity. No activity light or anything. Kinda sucked. Reimaged the SD with a new version of raspbian and reloaded latest stable so I'm back up now thankfully. It's nice having a chart as to what is what. One of these days I'll get smart and make a SD clone.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I have power outtages and net outtages alot. To avoid raspbian corruption from timekeeping issues, i added a ds3231 real time clock. That addition has kept me up and running thru once or twice a week power interruptions since January
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hey all. It's been a while. Just to update, my reef-pi had been running good then we had a few power events and I had to shut down via power pull to resolve a clogged drain because I couldn't access the system. Raspbian corrupted or something and i had zero boot activity. No activity light or anything. Kinda sucked. Reimaged the SD with a new version of raspbian and reloaded latest stable so I'm back up now thankfully. It's nice having a chart as to what is what. One of these days I'll get smart and make a SD clone.
Let us know if you need help with anything
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
@Ranjib is having an input to trigger a macro something thats in the works?
Having a physical button to trigger my feed fish macro which turns off my pumps for 4 minutes would be sweet, so the wife unit could feed the fish without having to get on the UI ;)

This is wife unit 2.0 and I dont plan on doing an upgrade there...lol
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
@Ranjib is having an input to trigger a macro something thats in the works?
Having a physical button to trigger my feed fish macro which turns off my pumps for 4 minutes would be sweet, so the wife unit could feed the fish without having to get on the UI ;)

This is wife unit 2.0 and I dont plan on doing an upgrade there...lol
I'd like to see this feature as well and I've started working on it from time to time (partly as an excuse to understand chardev gpio). I'm porting libgpiod to go so we'll be able to use interrupts instead of polling to get the button changes. My day job has been insane lately, so it's slow going. I'm hoping to have it implemented in v3.0.
 

trackerit

Community Member
View Badges
Joined
Apr 11, 2019
Messages
71
Reaction score
137
Rating - 0%
0   0   0
I see the option for the pico-board driver...what 'address' do I use (and if it's not the default, how do I find it)?

Also, can it be used for inlets, outlets, etc?
sudo i2cdetect -y 1
adress is a hexadecimal, convert to decimal and use in reef-pi


example:

pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- 75 -- --


48hex = 72dec
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
@Ranjib - wrt the database, what's the format for it? obviously there are ASCII elements in the file,but it is binary mostly. Is it just a packed binary file of some sort, or is there a db reader that i can invoke to make a converter?
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Possible issue with alpha 2....I updated the temp chart with a new min/max, restarted reef-pi, but the change hasn't kicked in...

Screenshot from 2019-06-08 12-59-20.png
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib - wrt the database, what's the format for it? obviously there are ASCII elements in the file,but it is binary mostly. Is it just a packed binary file of some sort, or is there a db reader that i can invoke to make a converter?
It’s boltdb, an embedded database written in golang. It’s key value pair based, unlike relational database. All reef-pi data is serialized as json and stored there. It’s trivial to read/write it from other programs. Every key module (ato, temperature etc) as bucket (equivalent to tables in MySQL) and relevant entities are stored inside the relevant buckets
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
sudo i2cdetect -y 1
adress is a hexadecimal, convert to decimal and use in reef-pi


example:

pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- 75 -- --


48hex = 72dec
For pico board it will be 72
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
@Ranjib - wrt the database, what's the format for it? obviously there are ASCII elements in the file,but it is binary mostly. Is it just a packed binary file of some sort, or is there a db reader that i can invoke to make a converter?

Looks like the only change to the database is the addition of the 'driver' attribute to the inlets/outlets, along with the addition of the 'analog_inputs' bucket. Is that accurate? If so, an update script would be trivial...
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
Looks like the only change to the database is the addition of the 'driver' attribute to the inlets/outlets, along with the addition of the 'analog_inputs' bucket. Is that accurate? If so, an update script would be trivial...

Should be easy to even fix it up without a script.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib is having an input to trigger a macro something thats in the works?
Having a physical button to trigger my feed fish macro which turns off my pumps for 4 minutes would be sweet, so the wife unit could feed the fish without having to get on the UI ;)

This is wife unit 2.0 and I dont plan on doing an upgrade there...lol
After the pwm profile work i'll decide what to pick up next. My thoughts are around ph based action or some macro enhancements (timers and macro).

https://github.com/reef-pi/reef-pi/issues/729
https://github.com/reef-pi/reef-pi/issues/684

The feature you are asking can be done pretty easily with a simple script residing on the pi that gets triggered by a physical button. The required API is already present and we have an equivalent UI button (and i am assuming all you want is a physical button for your wife, something along the line of a spst button)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I'd like to see this feature as well and I've started working on it from time to time (partly as an excuse to understand chardev gpio). I'm porting libgpiod to go so we'll be able to use interrupts instead of polling to get the button changes. My day job has been insane lately, so it's slow going. I'm hoping to have it implemented in v3.0.
Take your time.. we are in no rush .. this is a hobby project, its critical you can do it as and when you are comfortable (and its ok if you cant), life and family first :)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
How do i get the tplink driver to appear? I cloned the latest repo, did a make/make install and it isn't showing on my dev setup, even though it's in controller/drivers/factories.go ...
you have to use the api to create the driver (since theres no UI yet). Once you have created the driver rest can be done via the UI. Do you know which model you want to test?
 
Back
Top