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

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
475
Reaction score
594
Location
Knoxville
Rating - 0%
0   0   0
I've been reading through this monster thread and am excited by the idea! I've ordered my first raspberry pi (a 4B) and a few things. I don't currently have a tank as we're in the market for buying a house, but have a few questions for planning purposes.

  1. Will this work with non kasa-brand smart outlets? Something similar to Amazon product
  2. If I use a Kasa brand strip that has power monitoring, can I set conditions for this? For instance, if the heater is supposed to be on but no power is being used, send an alert. That would be a huge help for equipment failure.

Current plans for tank include a 300-500 gallon tank (depending on available floor space in whatever house we get). It will be plumbed through to the basement where there will be something like 500-700 gallons of refugium, filtration, frag tanks, and the like.

From what I've read reef-pi will do exactly what I need, and I'm an inveterate tinkerer so it's right up my alley, although to be fair I've not done much with electronics since high school (when I was more active in ham radio). The main needs I see for my setup will be:
  • Temperature sensing with heater control based on results
  • pH sensing with control of either a reactor or dosing mechanism (haven't decided yet).
  • Auto top off of tank
  • Lighting control in all it's various and confusing forms :D
  • Power head control (possibly with wave maker functionality)
  • Feeding mode to shut off pumps for 30 mins and skimmer for another hour beyond that
  • API support so I can kludge together a UI for quick reading and touch screen control
  • Dosing of additives using dosing pumps
  • Ability to use an emergency shutoff switch to stop all pumps (i.e. toggle switch or the like to override everything else)

Cheers!


Sounds like you're thinking ahead!!

I can't help with the smart outlets, as I typically just build my own outlets powered by relays. But as far as all the features you listed:

  • Temperature sensing with heater control based on results
  • pH sensing with control of either a reactor or dosing mechanism (haven't decided yet).
  • Auto top off of tank
  • Lighting control in all it's various and confusing forms :D
  • Power head control (possibly with wave maker functionality)
    • Power head control is theoretically possible, but it's not really baked into Reef-Pi natively. If you're wanting a simple on/off, you can just set it on a schedule in the equipment control. If you're wanting to ramp up & down based on voltage, I'd say the easiest way to do that would to be set it up in Reef-Pi as a "dosing pump". Though these may not be the best work-arounds, as you'd probably have to schedule each ramp-up & down... @Ranjib , any ideas?
  • Feeding mode to shut off pumps for 30 mins and skimmer for another hour beyond that
    • Super easy, there's a macro tab that allows you to select groups of equipment to turn off/on for a specified amount of time that you can trigger with a single button.
  • API support so I can kludge together a UI for quick reading and touch screen control
  • Dosing of additives using dosing pumps
  • Ability to use an emergency shutoff switch to stop all pumps (i.e. toggle switch or the like to override everything else)
    • If you're wanting a software emergency switch, just set up a macro to turn off all pumps & such.
    • If you're wanting a hardware switch, it'd be pretty easy to install a power switch on your setup, like I've got below. Or, just pull the plug!
16 Outlet from front(Transparent BG, Shrunk).JPG


Glad you found the thread & hope it helps with what sounds like an awesome future setup!
 

thoeffe

Community Member
View Badges
Joined
Oct 6, 2018
Messages
80
Reaction score
26
Rating - 0%
0   0   0
at the settings page change the 80 to whatever you want. You will need to reboot the reef-pi. Do not change the 0.0.0.0 see the posts few pages back for more info.

BTW you can have more than web server running on port 80 as long as it is not on the same ip.

1578287236660.png
Ya I understand how to switch it and had done so in the past but when I updated the v3 both my webserver running on lighttpd and reef-pi we're on the same port 80 again so I couldn't access reef pi UI to change it back. So I was wondering if there was a way that I could access a config file for reef pi to configure outside of the web UI.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Does reef-pi have the ability to use a third party SSL certificate? If I go through the process of creating certificate and installing on the raspberry will reefpi automatically use it?
Yes.. generally the way it works is you enable the https option under settings section (and update the address to 0.0.0.0:443) and then reload reef-pi, and reef-pi creates a self signed certificate. After that you can just replace the certificate with the certs you have and reload reef-pi and that should be it. Let me know if you get into any issues.. happy to help
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ya I understand how to switch it and had done so in the past but when I updated the v3 both my webserver running on lighttpd and reef-pi we're on the same port 80 again so I couldn't access reef pi UI to change it back. So I was wondering if there was a way that I could access a config file for reef pi to configure outside of the web UI.
you can update the address to specify any port you want, for example this configuration makes reef-pi to run on port 8080, this is how we do it in development
Screen Shot 2020-01-06 at 10.36.09 AM.png
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
do you know if there is a way to access to settings so I can change the port from port 80 I have another server running on 80 and just reset now I cant get to the reef pi web ui. I would rather not have to turn the other server off.
let us know if you need any further help with this. This is possible as we have explained in other posts.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib what would you think of having a reef-pi Facebook group? It makes for a nice walk to have little conversations tracking in parallel. I'd be happy to help set it up and moderate
I just sent a request to join the group.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I've been reading through this monster thread and am excited by the idea! I've ordered my first raspberry pi (a 4B) and a few things. I don't currently have a tank as we're in the market for buying a house, but have a few questions for planning purposes.

  1. Will this work with non kasa-brand smart outlets? Something similar to Amazon product
  2. If I use a Kasa brand strip that has power monitoring, can I set conditions for this? For instance, if the heater is supposed to be on but no power is being used, send an alert. That would be a huge help for equipment failure.

Current plans for tank include a 300-500 gallon tank (depending on available floor space in whatever house we get). It will be plumbed through to the basement where there will be something like 500-700 gallons of refugium, filtration, frag tanks, and the like.

From what I've read reef-pi will do exactly what I need, and I'm an inveterate tinkerer so it's right up my alley, although to be fair I've not done much with electronics since high school (when I was more active in ham radio). The main needs I see for my setup will be:
  • Temperature sensing with heater control based on results
  • pH sensing with control of either a reactor or dosing mechanism (haven't decided yet).
  • Auto top off of tank
  • Lighting control in all it's various and confusing forms :D
  • Power head control (possibly with wave maker functionality)
  • Feeding mode to shut off pumps for 30 mins and skimmer for another hour beyond that
  • API support so I can kludge together a UI for quick reading and touch screen control
  • Dosing of additives using dosing pumps
  • Ability to use an emergency shutoff switch to stop all pumps (i.e. toggle switch or the like to override everything else)

Cheers!

This thread is more of history and what going on with reef-pi. And everything in between :-). Dont use it to learn or build reef-pi, you can use it to seek help if need be. Use the website and adafruit guides for that. Godspeed and welcome to reef2reef.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Having trouble with the ATO setting.
I am using a CQR Robot sensor. It has a 3.3 volt and 5 volt switch on it. It does trigger when wet or dry. Works fine for a while. Then it will just turn on the pump fill until it is completely submerged. And the equipment light is green. When I pull it out of the water and go back in looks like it is working OK.
It is intermittent.

I am using Pi Version 3.0. Any ideas ? I use a small ATO source so I have not had a big disaster yet.
Try to pinpoint if the problem is with the sensor itself, if so, i am afraid we cant do much from reef-pi side. Depending upon which GPIO (example assume 24) you are using you can check the sensor value
Code:
/sys/class/gpio/gpio24/value
you should see 1 or 0 depending upon whether the sensor is in or out of water. Its ok if the readings are reverses, as long as its consistent its good
 

MangroveCorals

New Member
View Badges
Joined
Jan 5, 2020
Messages
16
Reaction score
27
Rating - 0%
0   0   0
That will be awesome. We could use any and all the help across code, tests, documentation. We generally use the slack channel for development-related discussion, you are most welcome to join us there, link is one the very first post of this thread (or in the website)
Good afternoon Ranjib!
I signed into my Github and did some reading for development for reef-pi. In the next few days I’ll have the environment set up with go and reacton my MacBook and start tinkering around!
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
252
Location
Near Seattle
Rating - 0%
0   0   0
I just sent a request to join the group.
I sent an invite for you to be admin. I'll add some moderators as I see the conversations start and can get to know people better. I figure if it gets enough people, we should have a handful of moderators to help keep things civil. Happy to take your recommendations as it's getting started as long as we don't have too many mods
 

jhoop

Active Member
View Badges
Joined
Jan 10, 2014
Messages
158
Reaction score
181
Location
Cleveland Ohio
Rating - 0%
0   0   0
Try to pinpoint if the problem is with the sensor itself, if so, i am afraid we cant do much from reef-pi side. Depending upon which GPIO (example assume 24) you are using you can check the sensor value
Code:
/sys/class/gpio/gpio24/value
you should see 1 or 0 depending upon whether the sensor is in or out of water. Its ok if the readings are reverses, as long as its consistent its good
Thanks I will try that !
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Good afternoon Ranjib!
I signed into my Github and did some reading for development for reef-pi. In the next few days I’ll have the environment set up with go and reacton my MacBook and start tinkering around!
I keep missing the invite link lol Mind linking it again and I’ll get into the discussion thread as well as follow up with GitHub and direct me to the priority coding / documentation , etc.
Awesome :-) . Keep us posted and don’t hesitate to ask questions . I’ll try to organize the 4.0 release as projects and do a design /arch documentation , those two should help you and anyone interested in contribution . This has been pending, we’ll tackle this as deliverable in this year
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,682
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I keep missing the invite link lol Mind linking it again and I’ll get into the discussion thread as well as follow up with GitHub and direct me to the priority coding / documentation , etc.
Slack link is updated
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
199
Rating - 0%
0   0   0
Ya I understand how to switch it and had done so in the past but when I updated the v3 both my webserver running on lighttpd and reef-pi we're on the same port 80 again so I couldn't access reef pi UI to change it back. So I was wondering if there was a way that I could access a config file for reef pi to configure outside of the web UI.

config is contained in the db file. I am not sure if you can edit it. That would be a good question to Ranjib.
 

raketemensch

Ape That Likes Fish
View Badges
Joined
Oct 13, 2019
Messages
378
Reaction score
466
Location
Northwest CT
Rating - 0%
0   0   0
you can update the address to specify any port you want, for example this configuration makes reef-pi to run on port 8080, this is how we do it in development

I think what he's asking is where there's a config file on the filesystem that he can change that value in, because he can't get to that screen in the UI right now.

He could stop the other service on 80 for a few, as well, but maybe that's not possible or a good thing for some reason.

I can't check for the file right now, I don't have access to my pi from here.
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
199
Rating - 0%
0   0   0
Sounds like you're thinking ahead!!

I can't help with the smart outlets, as I typically just build my own outlets powered by relays. But as far as all the features you listed:

  • Temperature sensing with heater control based on results
  • pH sensing with control of either a reactor or dosing mechanism (haven't decided yet).
  • Auto top off of tank
  • Lighting control in all it's various and confusing forms :D
  • Power head control (possibly with wave maker functionality)
    • Power head control is theoretically possible, but it's not really baked into Reef-Pi natively. If you're wanting a simple on/off, you can just set it on a schedule in the equipment control. If you're wanting to ramp up & down based on voltage, I'd say the easiest way to do that would to be set it up in Reef-Pi as a "dosing pump". Though these may not be the best work-arounds, as you'd probably have to schedule each ramp-up & down... @Ranjib , any ideas?
  • Feeding mode to shut off pumps for 30 mins and skimmer for another hour beyond that
    • Super easy, there's a macro tab that allows you to select groups of equipment to turn off/on for a specified amount of time that you can trigger with a single button.
  • API support so I can kludge together a UI for quick reading and touch screen control
  • Dosing of additives using dosing pumps
  • Ability to use an emergency shutoff switch to stop all pumps (i.e. toggle switch or the like to override everything else)
    • If you're wanting a software emergency switch, just set up a macro to turn off all pumps & such.
    • If you're wanting a hardware switch, it'd be pretty easy to install a power switch on your setup, like I've got below. Or, just pull the plug!
16 Outlet from front(Transparent BG, Shrunk).JPG


Glad you found the thread & hope it helps with what sounds like an awesome future setup!


Just a comment, nice power distribution but little scary if you need to load all on a single feed of power. Typical house wiring 14/2 with maximum 15A panel breaker. Since it is very likely that this is not going to be plugged into a dedicated circuit and will be shared with some of the existing receptacles in the house very easy for cabling to overheat and spark a house fire. Just an FYI
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
199
Rating - 0%
0   0   0
Personally, I've never really liked the optical sensors. They're very finicky & I've had builds do the exact same. I've never truly been able to pin down what causes it, but one of my theories is that the level of light it receives & detects as a trigger depends on the light available when it receives power.

Try turning your setup on with the sensor in the lighting condition it will be installed in. There may be an issue with it getting "room light", then being placed in a dark area under the sump, something with trigger levels being set upon initialization possibly.

In order for optical to work you need to trigger on specific voltage. The output voltage will vary depending on how much reflected light makes it back trough refraction of source IR light inside the sensor. You can actually detect water if just touching the tip to fully submerged lens. Voltage does vary during this transition. I typically used them on arduino's analog inputs. Solid performance. They are completely immune to room light. they work on light refraction cased by the water hitting the plastic lens. Given that I always double up on any sensor and insert logic to handle the failure notification/protection of single sensor never had an issue and I've been using them for over 2 years now.
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
199
Rating - 0%
0   0   0
Hi everybody, a suggest if you want to implement any other sensor (digital or analogic) is to use an arduino connected via i2c ro the rpi. I'm succesfully using this technique to achieve a reading of both analog ph-meter and an ec-meter. I perform also value-based actions on these sensors. I have seen ranjib talking about the new feature homeostatis, THANK YOU for the great work, now im waiting for that being implemented to reduce the arduino tasks.

Can you share how you configured the RPI to talk to Arduino over i2c?
 

DO YOU THINK TECHNOLOGICAL ADVANCEMENTS ARE MORE HELPFUL OR HURTFUL TO REEFING?

  • More helpful.

    Votes: 59 42.1%
  • More hurtful.

    Votes: 5 3.6%
  • I think it depends mostly on the technology.

    Votes: 53 37.9%
  • I think it dependsmostly on the reefer behind the technology.

    Votes: 42 30.0%
Back
Top
Home
Post thread…
Market
What's new