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

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
DHT22 is in my plan as well. I prefer i2c because it requires no additional circuit and software logic beyond the sensor's protocol. The price is generally not an issue if its only 5-10$ difference. If its more precise, its better (within 5-10$ margin). When I integrate a new thing my general goal is to get an end to end flow going first. In this case getting to see humidity trend, correlating it with other signals to make sure this makes sense.,. check general stability (software wise) etc. I find i2c based sensor pretty handy. They are generally better quality and software, electronics requirements are lesser. i have my eyes on the platinum temp probe as well.
If you are looking at platinum probes for temp...i.e pt100 it may pay to look at pid loops for control!!! If you want precision may as well go full out! You could use a solid state relay on pwm to pulse heaters with a pid loop and practically keep a tank precisely where you want.
That being said, my 75 generally stays within +-.1 degrees with the good drok sensors I got, checking the temp every 60 seconds with hysteresis set at .2.
 

drbogger

Active Member
View Badges
Joined
Apr 24, 2019
Messages
165
Reaction score
126
Location
Ballston Spa, New York
Rating - 0%
0   0   0
Here's an example I was shown from @Des Westcott, he's the macro specialist and teaching me. :)

I'll try and explain as I understand it. This example uses a low/high level sensor to control separate pumps just like you're after. It also has an ATO sensor that gets disabled but you can ignore that.

I assume you setup your two sensors in the ATO tab, in this example that is 'AWC Out' (low level) and 'AWC in' (high level). When you setup these 'ATO' sensors have the low level set to control the drain pump and the high level should control the fill pump.

Sounds like you have your pumps setup correctly.

Now you need to create a 'Macro' to control everything. You might want to create two, call one 'Manual AWC' and the other 'Auto AWC'. There's a slight "glitch" with macros, if you want to use a timer to trigger the macro you need to setup the 'Steps' in reverse and set the 'Reversible' drop down box to 'Yes'. This is why you need 2 macros so you can better test it and run the AWC manually.

Let's go through each 'Steps' in the macro.
  1. The first step is optional and sounds like it doesn't apply to you but if you did have an ATO sensor you would first need to disable this sensor while the AWC runs.
  2. Now you want to enable the low level sensor (AWC Out) which will be sensing water. As soon as you 'Turn On' this sensor the pump it's controlling should turn on and water will start draining. If your sensor turns the pump on when no water is sensed, aka backwards, you need to go to the sensors 'Connector' and change the 'Reverse' option.
  3. Now you add a 'Wait' period to your macro, this is the longest you want you drain pump to run and should turn off your pump even if the lower sensor fails. The idea is the macro allows the drain system to run for a maximum of 300 seconds or whatever you choose. The next step won't run until this 'Wait' period expires.
  4. Now you 'Turn Off' the AWC Out sensor as it's no longer needed as your water has been drained. You could insert an extra step after this to turn off the actual drain pump, basically a make sure its off kind of thing.
  5. Now you 'Turn On' the AWC In sensor which is the high level sensor. Once this turns on it will startup the refill pump as it's not sensing any water. If your sensor turns the pump on when water is sensed, aka backwards, you need to go to the sensors 'Connector' and change the 'Reverse' option.
  6. Now you add another 'Wait' period, again this is the maximum you want the refill pump to run and should be set longer than it typically takes to refill your tank as you want the sensor to turn the pump off but obviously not long enough to cause a flood if the high level sensor failed. The next step won't run until this 'Wait' period expires.
  7. Now you can add a 'Step' to 'Turn Off' the high level sensor as the water change is complete. You could insert an extra step after this step to turn off the actual refill pump, basically a make sure its off kind of thing.
  8. And finally if you do have an ATO sensor setup as well you can turn this back on so your ATO will run as normal again.
macro_AWC.jpg

Hope this helps, you might have to read it a few times as I typically need to rewrite things about 3 times before others can understand my gibberish. :)

The important thing to remember is the above represents running the macro manually. To run this macro via a timer you need to create the 'Steps' in reverse and set 'Reversible' to 'Yes', don't forget this or you will be chasing your tail.

Awesome! Thanks!
Worked like a charm!
 

Nicolas Sabrun

Active Member
View Badges
Joined
May 23, 2016
Messages
191
Reaction score
89
Location
Petaluma CA
Rating - 0%
0   0   0
@Ranjib

This may sounds as a dumb question but how can I connect the ph board.

My Pi setup is using the lighting controller for 3 mars aqua as per adafruit guides. However, the PCA9685 breakout board is connected to SCL and SDA pin of the Pi.

I want to add ph monitoring to my reefpi but before getting the specific board, I want to make sure I can actually connect it.

It is my understanding that the ph board connect to SDA/SCL pin on the pi as well. How can I do this since they are already used by the PCA9685? Can I use the SDA/SCL on the opposite side of the PCA? or split the connection on the Pi pin?

Thank you
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,679
Reaction score
2,227
Location
Columbia MD
Rating - 0%
0   0   0
Is there a way I can disable ssl from the command line? I have been having tons of issues accessing my reefpi. Some days it works flawlessly and other days I cannot access it. Several reboots and it will eventually come up. I can access and log in with putty with no problems. In IE I can get to the point where it says it’s not a secure site but continue anyway but it won’t load. I can read the cert details and everything. Firefox and chrome just spin. I get the same in both windows and Apple environment.
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,679
Reaction score
2,227
Location
Columbia MD
Rating - 0%
0   0   0
I dug the hole deeper :) I managed to get logged in like mentioned after several reboots. Went to the admin console and changed the drop down from https to http. Reboot and now can’t get back in again. I think maybe I did not put a :80 after the 0.0.0.0. I backed up the database and reinstalled reefpi which worked great until I restored the database and it brought back my old IP settings. So I’m back to everything running but can’t access it. Any ideas to get back into the web console so I can fix my ip settings?
 

cnidus

Community Member
View Badges
Joined
Mar 19, 2020
Messages
67
Reaction score
79
Rating - 0%
0   0   0
Having some issues with HS300.

I had the HS300 setup and Reef-pi controlling a single plug as a test. Then I powered off the HS300 to mount it, now I get errors in reef-pi when trying to add the other plugs and control the previously working plug.

I tried restarting the reef-pi and also checked the IP is the same on the hs300.

screenshots attached:

EEB27AF4-68D9-43DE-ABED-78EA995A1142.png 9CB1D46D-1CF2-4373-84B9-45A4CC367D39.png E4EFBAE5-DD64-4A8A-9584-9D9AE12C8540.png
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib

This may sounds as a dumb question but how can I connect the ph board.

My Pi setup is using the lighting controller for 3 mars aqua as per adafruit guides. However, the PCA9685 breakout board is connected to SCL and SDA pin of the Pi.

I want to add ph monitoring to my reefpi but before getting the specific board, I want to make sure I can actually connect it.

It is my understanding that the ph board connect to SDA/SCL pin on the pi as well. How can I do this since they are already used by the PCA9685? Can I use the SDA/SCL on the opposite side of the PCA? or split the connection on the Pi pin?

Thank you
I2c is a bus you can connect multiple devices on the same soda/scl pins. Adafruit pca9685 breakout has i2c pin as well as 5v/gnd pins on the other end, connect ph probe with those pins
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Is there a way I can disable ssl from the command line? I have been having tons of issues accessing my reefpi. Some days it works flawlessly and other days I cannot access it. Several reboots and it will eventually come up. I can access and log in with putty with no problems. In IE I can get to the point where it says it’s not a secure site but continue anyway but it won’t load. I can read the cert details and everything. Firefox and chrome just spin. I get the same in both windows and Apple environment.
Yes.. you can use the reef-pi dB command against system bucket to update the ssl settings, check troubleshooting docs for details. It will involve stopping reef-pi and editing Json file.

Https shou,d not be troublesome, may be we can debug that bit,
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I dug the hole deeper :) I managed to get logged in like mentioned after several reboots. Went to the admin console and changed the drop down from https to http. Reboot and now can’t get back in again. I think maybe I did not put a :80 after the 0.0.0.0. I backed up the database and reinstalled reefpi which worked great until I restored the database and it brought back my old IP settings. So I’m back to everything running but can’t access it. Any ideas to get back into the web console so I can fix my ip settings?
When you reload reef-pi it will log what port and ip it’s using . That should give you clue on how to access it,
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Having some issues with HS300.

I had the HS300 setup and Reef-pi controlling a single plug as a test. Then I powered off the HS300 to mount it, now I get errors in reef-pi when trying to add the other plugs and control the previously working plug.

I tried restarting the reef-pi and also checked the IP is the same on the hs300.

screenshots attached:

EEB27AF4-68D9-43DE-ABED-78EA995A1142.png 9CB1D46D-1CF2-4373-84B9-45A4CC367D39.png E4EFBAE5-DD64-4A8A-9584-9D9AE12C8540.png
If you restart pi, the hs300 driver get wedged due to reef-pi starting before network, just reload reef-pi (not restart pi) and thing should get back to normal,
You can add a line in reef-pi systemd unit file to ensure it’s started after network , to avoid this issue .
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Awesome! Thanks!
Worked like a charm!
Let us know how you like the macro system, I plan to improve it over the course of this year and future, going forward macro will become the foundation of many high level automation and it’s very important we sort out all the bugs and make it stable
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
If you are looking at platinum probes for temp...i.e pt100 it may pay to look at pid loops for control!!! If you want precision may as well go full out! You could use a solid state relay on pwm to pulse heaters with a pid loop and practically keep a tank precisely where you want.
That being said, my 75 generally stays within +-.1 degrees with the good drok sensors I got, checking the temp every 60 seconds with hysteresis set at .2.
That will be nice :-)
I am also pretty happy with the current temp sensor performance , I think it’s more than enough for my tanks . But it’s always good to have better sensor and logic support
 

Soulreefer

Community Member
View Badges
Joined
Aug 16, 2018
Messages
44
Reaction score
67
Location
Jakarta, Indonesia
Rating - 0%
0   0   0
Here's an example I was shown from @Des Westcott, he's the macro specialist and teaching me. :)

I'll try and explain as I understand it. This example uses a low/high level sensor to control separate pumps just like you're after. It also has an ATO sensor that gets disabled but you can ignore that.

I assume you setup your two sensors in the ATO tab, in this example that is 'AWC Out' (low level) and 'AWC in' (high level). When you setup these 'ATO' sensors have the low level set to control the drain pump and the high level should control the fill pump.

Sounds like you have your pumps setup correctly.

Now you need to create a 'Macro' to control everything. You might want to create two, call one 'Manual AWC' and the other 'Auto AWC'. There's a slight "glitch" with macros, if you want to use a timer to trigger the macro you need to setup the 'Steps' in reverse and set the 'Reversible' drop down box to 'Yes'. This is why you need 2 macros so you can better test it and run the AWC manually.

Let's go through each 'Steps' in the macro.
  1. The first step is optional and sounds like it doesn't apply to you but if you did have an ATO sensor you would first need to disable this sensor while the AWC runs.
  2. Now you want to enable the low level sensor (AWC Out) which will be sensing water. As soon as you 'Turn On' this sensor the pump it's controlling should turn on and water will start draining. If your sensor turns the pump on when no water is sensed, aka backwards, you need to go to the sensors 'Connector' and change the 'Reverse' option.
  3. Now you add a 'Wait' period to your macro, this is the longest you want you drain pump to run and should turn off your pump even if the lower sensor fails. The idea is the macro allows the drain system to run for a maximum of 300 seconds or whatever you choose. The next step won't run until this 'Wait' period expires.
  4. Now you 'Turn Off' the AWC Out sensor as it's no longer needed as your water has been drained. You could insert an extra step after this to turn off the actual drain pump, basically a make sure its off kind of thing.
  5. Now you 'Turn On' the AWC In sensor which is the high level sensor. Once this turns on it will startup the refill pump as it's not sensing any water. If your sensor turns the pump on when water is sensed, aka backwards, you need to go to the sensors 'Connector' and change the 'Reverse' option.
  6. Now you add another 'Wait' period, again this is the maximum you want the refill pump to run and should be set longer than it typically takes to refill your tank as you want the sensor to turn the pump off but obviously not long enough to cause a flood if the high level sensor failed. The next step won't run until this 'Wait' period expires.
  7. Now you can add a 'Step' to 'Turn Off' the high level sensor as the water change is complete. You could insert an extra step after this step to turn off the actual refill pump, basically a make sure its off kind of thing.
  8. And finally if you do have an ATO sensor setup as well you can turn this back on so your ATO will run as normal again.
macro_AWC.jpg

Hope this helps, you might have to read it a few times as I typically need to rewrite things about 3 times before others can understand my gibberish. :)

The important thing to remember is the above represents running the macro manually. To run this macro via a timer you need to create the 'Steps' in reverse and set 'Reversible' to 'Yes', don't forget this or you will be chasing your tail.
thank you @robsworld78 , I have followed your thread for a long time, since from iAqua in the planted tank forum https://www.plantedtank.net/forums/...ch-interface-aquarium-controller-arduino.html, which until now my controller is still running well.
 

Kurtzisa

Community Member
View Badges
Joined
Mar 21, 2020
Messages
90
Reaction score
73
Location
Parma, Italy
Rating - 0%
0   0   0
Hello, I need a help to properly configure Reef-pi

on https://github.com/reef-pi/drivers I can found the PH-DRIVER to use ADS1115 for my PH probe.

i follow these steps:

Adding the ADS1115
ads1115.png

Adding the Analog input (i can use only the 0 input on the board)
analog input.png

Adding the inputs in the PH tab
adding ph.png

But i have only the 404 error
error.png


there is something i miss? there are other documentations I cannot found? @Ranjib any suggestion?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hello, I need a help to properly configure Reef-pi

on https://github.com/reef-pi/drivers I can found the PH-DRIVER to use ADS1115 for my PH probe.

i follow these steps:

Adding the ADS1115
ads1115.png

Adding the Analog input (i can use only the 0 input on the board)
analog input.png

Adding the inputs in the PH tab
adding ph.png

But i have only the 404 error
error.png


there is something i miss? there are other documentations I cannot found? @Ranjib any suggestion?
Did you reload reef-pi after enabling ph capability ?
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Yes.. you can use the reef-pi dB command against system bucket to update the ssl settings, check troubleshooting docs for details. It will involve stopping reef-pi and editing Json file.

Https shou,d not be troublesome, may be we can debug that bit,

Eh it still doesn't work properly from linux using any chrome based browser, I did a little digging the other night and it appears chrome wants to have the subject alternate name set in the certificate. It's on my list to troubleshoot a little more and figure out the issue, FF works fine but I get a cert error in any chrome based browser, e.g., opera, chromium, chrome etc...It's an interesting thing since it will connect via android on chrome, its just the linux clients that are different.
 

greyduck-reef

New Member
View Badges
Joined
Apr 12, 2020
Messages
14
Reaction score
33
Rating - 0%
0   0   0
New here, but want to say I really appreciate all the info and guidance provided on this thread. Just built my first pi controller (build thread coming) and so far the process is going well! Looking for input on a next possible step - I have one of the new kessil 360x lights which (unfortunately for diy) uses USB-C rather than the old 10-v input to control the intensity and spectrum signals. I'd love to figure out a way to build a pwm light controller for it, maybe by using an adafruit usb-c breakout board, but maybe this is a task for an engineer.

I emailed Kessil and they said "At this moment this is confidential and the pin layout and control schema for K-Link is not open to the public. I have passed this feedback on to our engineering team for consideration"
 

cnidus

Community Member
View Badges
Joined
Mar 19, 2020
Messages
67
Reaction score
79
Rating - 0%
0   0   0
New here, but want to say I really appreciate all the info and guidance provided on this thread. Just built my first pi controller (build thread coming) and so far the process is going well! Looking for input on a next possible step - I have one of the new kessil 360x lights which (unfortunately for diy) uses USB-C rather than the old 10-v input to control the intensity and spectrum signals. I'd love to figure out a way to build a pwm light controller for it, maybe by using an adafruit usb-c breakout board, but maybe this is a task for an engineer.

I emailed Kessil and they said "At this moment this is confidential and the pin layout and control schema for K-Link is not open to the public. I have passed this feedback on to our engineering team for consideration"

thanks for confirming my choice on getting an older WE Kessil instead of the x :) At this point I want to make everything work with Reef-Pi if I can :)

@Ranjib any thoughts on how to tackle wavemakers? I don’t mind getting my hands dirty in some code, but also don’t want to reinvent the wheel/tread on toes if you guys already have plans/have it sorted already.
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 27.3%
  • 100% dry rock + 100% live sand

    Votes: 47 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 30 21.6%
  • 75% live rock, 25% live sand

    Votes: 14 10.1%
  • 25% live rock, 75% live sand

    Votes: 10 7.2%
Free Phyto Promo
Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed
Shop Now Code: FREEPHYTO
Back
Top