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

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 can test these as well. I have a couple of use cases. Would we be able to tie them to equipment and into macros and timers? I can build an automatic water change system with these...... maybe.
Yes :)
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
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
So is the smart plug driver TP link specific?
Yes. There’s no common protocol that we can use to support multiple vendor. Tplink was something others had brought up earlier, it’s available in us , uk and Australia, which is why I went with this. They have energy monitoring version as well ...
 
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
Is there any manual or schematic and installation instructions that you could give me im interested in building one for my tank and I would appreciate it if you had anything that coul help me to understand it a little better. That site that says calkulate is hard to understand but if I had a little guadiance i think I could figure it out. Thanks in advance.

Also
Ranjib, I cannot get my ATO to work but I didn't really follow the adafruit build instructions. Instead I have a water valve solenoid and an electric float switch with two wires coming out of it and i was thinking that I could use reef pi to activate the solenoid (it only needs 5 VDC 100ma on the gate of a mosfet) from the reading that the two wire float sensor gives off. If sensor Low on water (open circuit) or once water reaches high level it would be a closed circuit. Then set it to activate 5 volts on an outlet in turn using the pi to activate the gate of a mosfet to complete the circuit of the RO solenoid? I feel like it should work just fine. The way I configured it it wont activate the mosfet or it activates it and wont turn it off. Its not reading the inlet. I even tried to set a jack and set to RPI driving on pin 5 and reading on pin 23 but still no luck. any help would be great and also do you have a link to a cheap but good Pico PH probe?
Thanks for the Welcome ill be around for a while until I get this working. Im very determine.LOL
There’s lot going on here :) . Can you start a thread? The solenoid thing should work , I need the details of sensor circuit. I’m using Milwaukee , American marine and atlas scientific probes . They are all around 34-50$ on amazon
 
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
Some tank updates
My acros showing new growth spurt
CF0B47D4-2BEB-417C-9944-216D6BC5EA34.jpeg

Green slimer and red dragon continues to grow . I have to trim the green slimer but don’t know what to do with the frags and I don’t want to dump it in the toilet :-(
FE3D805A-7B27-4362-B63E-9A1F8BB6D3A1.jpeg


Rest of the softies and lps are doing ok
26E7C7F9-02B3-491C-9643-110EA00AE9AB.jpeg

405E85D6-B2EC-4502-A741-FBEBEE50CEA8.jpeg

1EC43084-93D0-435B-A918-CA5CCBA456E0.jpeg

D51FE9A3-7C62-465D-964E-253BFCB75023.jpeg

80C0E399-7029-4E39-84AA-030616E5BAD7.jpeg

CF0B47D4-2BEB-417C-9944-216D6BC5EA34.jpeg


Fts
F195FE40-19C2-45F0-8FE8-E5E347AEC3D5.jpeg

Side view
D0DAA2C2-92C9-416C-A35C-76E3AE5E93D0.jpeg
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Yeah. They use a RESTful API to interact with the controller..I can post a link in a bit..

Here's a quick look at their API: https://www.digital-loggers.com/rest.html

Really all we'd care about are what these examples show (turn on/off and status):

Outlet/relay control examples. Relays are zero based (0-7).

Switch relay 3 on. (true=on false=off)
curl -u admin:1234 -X PUT -H "X-CSRF: x" --data "value=true" --digest "http://192.168.0.100/restapi/relay/outlets/2/state/" .


Turn all relays on.
curl -u admin:1234 -X PUT -H "X-CSRF: x" --data "value=true" --digest "http://192.168.0.100/restapi/relay/outlets/all;/state/"

Turn relays 1 and 5 on.
curl -u admin:1234 -X PUT -H "X-CSRF: x" --data "value=true" --digest "http://192.168.0.100/restapi/relay/outlets/=0,4/state/"

Get the status of relay/outlet 1
curl -k -u admin:1234 -H "Accept:application/json" --digest https://192.168.0.100/restapi/relay/outlets/2/state/


Get the status of all relays
curl -k -u admin:1234 -H "Accept:application/json" --digest https://192.168.0.100/restapi/relay/outlets/all;/state/


I have some python code for a simple app I wrote to control it here:
https://github.com/dmolavi/dlipower
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Reef-Pi may have saved my tank from a crash...

I was taking a look at my ATO monitoring graph on Adafruit IO yesterday and noticed it hadn't run in over 24hrs. I had topped off the reservoir the day before, so no issues there. When I got home from work, I took a look in my sump and it was about 3/4" low. Closer inspection of the optical sensor on my Osmolator showed that it had some buildup on it that was preventing it from operating properly. Cleaned it off and it turned the ATO on immediately.
 
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
Reef-Pi may have saved my tank from a crash...

I was taking a look at my ATO monitoring graph on Adafruit IO yesterday and noticed it hadn't run in over 24hrs. I had topped off the reservoir the day before, so no issues there. When I got home from work, I took a look in my sump and it was about 3/4" low. Closer inspection of the optical sensor on my Osmolator showed that it had some buildup on it that was preventing it from operating properly. Cleaned it off and it turned the ATO on immediately.
Nice :)
 
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
Here's a quick look at their API: https://www.digital-loggers.com/rest.html

Really all we'd care about are what these examples show (turn on/off and status):

Outlet/relay control examples. Relays are zero based (0-7).

Switch relay 3 on. (true=on false=off)
curl -u admin:1234 -X PUT -H "X-CSRF: x" --data "value=true" --digest "http://192.168.0.100/restapi/relay/outlets/2/state/" .


Turn all relays on.
curl -u admin:1234 -X PUT -H "X-CSRF: x" --data "value=true" --digest "http://192.168.0.100/restapi/relay/outlets/all;/state/"

Turn relays 1 and 5 on.
curl -u admin:1234 -X PUT -H "X-CSRF: x" --data "value=true" --digest "http://192.168.0.100/restapi/relay/outlets/=0,4/state/"

Get the status of relay/outlet 1
curl -k -u admin:1234 -H "Accept:application/json" --digest https://192.168.0.100/restapi/relay/outlets/2/state/


Get the status of all relays
curl -k -u admin:1234 -H "Accept:application/json" --digest https://192.168.0.100/restapi/relay/outlets/all;/state/


I have some python code for a simple app I wrote to control it here:
https://github.com/dmolavi/dlipower
I understand controlling this is easy, but my concern is this has the typical problem of being specific for this vendor. So, unless this is very popular, affordable and available across different regions, it won’t be be something we can recommend. It will be harder to maintain (test and improve) various drivers that I don’t personally use ... let’s see if there’s enough interest on this power bar
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I understand controlling this is easy, but my concern is this has the typical problem of being specific for this vendor. So, unless this is very popular, affordable and available across different regions, it won’t be be something we can recommend. It will be harder to maintain (test and improve) various drivers that I don’t personally use ... let’s see if there’s enough interest on this power bar
A more universal answer would to be control of Sonoff devices...there are outlets, relays, temp controls, humidity controls etc...the devices can be flashed easily with 3rd party firmware as well. Mostly based off esp 8266 hardware and Sonoff is universally available and used in a ton of smarthome applications and have a fairly easy API as well.

https://www.itead.cc/smart-home.html

Google tasmota and espeasy for alternative firmware and such
 
Last edited:
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
A more universal answer would to be control of Sonoff devices...there are outlets, relays, temp controls, humidity controls etc...the devices can be flashed easily with 3rd party firmware as well. Mostly based off esp 8266 hardware and Sonoff is universally available and used in a ton of smarthome applications and have a fairly easy API as well.

https://www.itead.cc/smart-home.html

Google tasmota and espeasy for alternative firmware and such
all of them has this. tplink, idevice .. all of them have whole range of sensors, outlets, garage door opener, sprinkler etc.. on top of that there are meta players like google home and apple home kit .. all of them has the same offering but little bit different. What I am looking for is what will cover most audience, meet the quality standard for us (10A for example, for outlets) and preferably opensource friendly (none that im aware of).
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Sonoff alternative firmwares are opensource...look up ESPeasy...and sonoff switch modules are rated 10 amps and 16 amps...before I found reef pi i was seriously considering using sonoffs...the best thing is with the alternative firmware allow you to control on your own network and not depend on some vendors "cloud" where you are tied to their app and servers

https://www.letscontrolit.com/wiki/index.php/ESPEasy

https://github.com/letscontrolit
 
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
Sonoff alternative firmwares are opensource...look up ESPeasy...and sonoff switch modules are rated 10 amps and 16 amps...before I found reef pi i was seriously considering using sonoffs...the best thing is with the alternative firmware allow you to control on your own network and not depend on some vendors "cloud" where you are tied to their app and servers
That is indeed good information. Let me read about it. I'll definitely do the necessary if this is a good choice for us
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Oh and the modules are inexpensive compared to the big players, which is always a plus

But i agree that there are way too many brands etc, to try and cover so the choice has to be one type to fold into reef pi. Picking the best universal solution is where we need to go so it does not get too complicated!
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
In other news the 2.4 release has been stable and working well for me, especially the pca9585 pwm.

3 temp probes, 2 controlling heaters, 4 channels of light dimming, 8 equipment outlets and several macros, along with adafruit io feeds and mem usage has been a steady 8 percent and cpu usage negligable.

Got called to work out of town and forgot to order my pH probe, so when it finally gets here I will load 3.0 alpha and test the acid range of pH driver in freshwater!
 
Last edited:
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
Meanwhile pwm profile enhancements are in progress... first stage is to have dedicated api for pwm profiles.. and implement the current features with new gears (similar to HAL overhaul). Here are some graphs of the diurnal, auto and fixed profile in action with different time period and min/max threshold

Screen Shot 2019-06-05 at 9.23.54 PM.png


One of the thing I pay attention to is if the min/max threshold is preserved across threshold, and in correct fashion. Here is an example of diurnal setting with min -max set to 9-77 . Seems like reef-pi is doing the right thing here...
Screen Shot 2019-06-05 at 9.53.28 PM.png


more to come.. this is the feature that will unlock fine grained light control (30 min or 15 interval settings), wave makers etc. If any of you have some information on how to generate those curves (reef crest for wave maker for example), please share those, it will be tremendously useful
 
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
In other news the 2.4 release has been stable and working well for me, especially the pca9585 pwm.

3 temp probes, 2 controlling heaters, 4 channels of light dimming, 8 equipment outlets and several macros, along with adafruit io feeds and mem usage has been a steady 8 percent and cpu usage negligable.

Got called to work out of town and forgot to order my pH probe, so when it finally gets here I will load 3.0 alpha and test the acid range of pH driver in freshwater!
:) Thats nice to here . I hope you got value for your money from this build. We (reef-pi comunity) certainly got a whole lotta help from your guidance.
 
Back
Top