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

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Update

Before checking Raspi-Config, I physically unplugged my sensors from the board. Rebooted and plugged back in. Reef-Pi now sees the sensors = win.

BUT because I deleted my "Tank Temp" from the Temperature tab, I needed to set that up again with Temp control. I can't save the settings because the UI tells me "The temperature settings cannot be saved due to validation errors. Please correct the errors and try again. " in the pink box. I also get the "hysteresis_less_than" notification in red under the Hysteresis box. I have tried various numbers for hysteresis.

Reef-Pi is measuring temp and plotting the graph now, but I can't add control.

Solution?

Discovered something.... When setting up Temperature control, you need to define Chiller Threshold as well as Chiller in addition to defining your heater, even if you have no chiller attached. If not, you get the "Hysteresis error" described above.
 

mk1scott

New Member
View Badges
Joined
Nov 13, 2019
Messages
10
Reaction score
9
Rating - 0%
0   0   0
Hey guys & gals, first time poster, long time reader. First and foremost, a huge thank you to everyone involved in developing this software! This is a game changer for me (just getting back into reefing after a 10 year hiatus).

I've been running Reef Pi flawlessly for a little over 4 months now running 3.0 alpha 2 (Pi zero w/ Pico board). However, just this week, I have seen my system load spike (max out) and crash the web UI twice. Both times requiring a power cycle to get back online. When the system load spikes and crashes the UI, Reef Pi continues to control my system as it should, but stops sending data to the web UI as well as adafruit IO. It first occurred Sunday afternoon (2:56pm typical load of 0.06; 3:13pm load jumped to 1.01) and then again this morning (7:38am load 0.06; 8:09am load 1.00).

I'll try pulling the logs tonight but wasn't sure if anyone else was experiencing any recent unexpected spikes.
 

Blaxkin

Community Member
View Badges
Joined
Oct 4, 2019
Messages
27
Reaction score
46
Rating - 0%
0   0   0
Now here is my Problem. After Restart i get some Errors from Temp Probes. But i only have to delete and recreate the Probes because they are always aviable to choose.
I hope you know what i mean.

95C920D8-4167-49DF-A249-E8652FFF8B44.png 5349DA60-3853-48B4-BB95-124850302BFD.png BD9300EA-F04C-448E-A560-0600A28358B9.png 40D45D1A-5459-473D-AF83-858CAAEB79F9.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
Now here is my Problem. After Restart i get some Errors from Temp Probes. But i only have to delete and recreate the Probes because they are always aviable to choose.
I hope you know what i mean.

95C920D8-4167-49DF-A249-E8652FFF8B44.png 5349DA60-3853-48B4-BB95-124850302BFD.png BD9300EA-F04C-448E-A560-0600A28358B9.png 40D45D1A-5459-473D-AF83-858CAAEB79F9.png
Thank you for reporting this. I think I understand the problem a bit better now. Can you confirm following:
- Does this only happen if you reboot? What if you just reload reef-pi ?
- When you next encounter this, instead of deleting /adding them, can you just wait few seconds and reload reef-pi, and see if that resolves this.
- FYI: those "error: stats not found" issues are benign and just side effect sensor not being detected or enabled. they are used for charting only. I'll see if we can suppress those
 

Blaxkin

Community Member
View Badges
Joined
Oct 4, 2019
Messages
27
Reaction score
46
Rating - 0%
0   0   0
Thank you for reporting this. I think I understand the problem a bit better now. Can you confirm following:
- Does this only happen if you reboot? What if you just reload reef-pi ?
- When you next encounter this, instead of deleting /adding them, can you just wait few seconds and reload reef-pi, and see if that resolves this.
- FYI: those "error: stats not found" issues are benign and just side effect sensor not being detected or enabled. they are used for charting only. I'll see if we can suppress those


-Yes it only happens after a reboot

-I tried a reload and the problem is the same

-but now i see when i only click edit on the sensor and save. they came up after about 5 minutes

-and now i see the problem is not only on the temp probes. its the same problem with the pca9685

-the only i2c device that's always without an error is the ph ego board
 
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
-Yes it only happens after a reboot

-I tried a reload and the problem is the same

-but now i see when i only click edit on the sensor and save. they came up after about 5 minutes

-and now i see the problem is not only on the temp probes. its the same problem with the pca9685

-the only i2c device that's always without an error is the ph ego board
I am postulating a theory that sensors and other i2c devices are being initilized after reef-pi starts, as a result when reef-pi starts it does not find them.. I dont know how to verify this, as im never encountered it, but i am aware of some trick on systemd level we can do to make sure reef-pi starts after those things are up and running, i 'll cross check how to get it done and what implications of this.
 
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 am postulating a theory that sensors and other i2c devices are being initilized after reef-pi starts, as a result when reef-pi starts it does not find them.. I dont know how to verify this, as im never encountered it, but i am aware of some trick on systemd level we can do to make sure reef-pi starts after those things are up and running, i 'll cross check how to get it done and what implications of this.
BTW, this is pi 4 or 3 or zero?
 

PaulJ2303

Community Member
View Badges
Joined
Sep 30, 2018
Messages
76
Reaction score
172
Rating - 0%
0   0   0
Thank you for reporting this. I think I understand the problem a bit better now. Can you confirm following:
- Does this only happen if you reboot? What if you just reload reef-pi ?
it still happens when i just reload

- When you next encounter this, instead of deleting /adding them, can you just wait few seconds and reload reef-pi, and see if that resolves this.
no it didn't resolve it.

mine is a pi 3

:)
 

PaulJ2303

Community Member
View Badges
Joined
Sep 30, 2018
Messages
76
Reaction score
172
Rating - 0%
0   0   0
Just to try and add to the knowledge about this I did notice that when I reloaded reef-pi the first time it lost one sensor then after I waited some time and reloaded it again to see if it resolved the issue it lost the second sensor.
 
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
One thing that's consistent across all the temp sensor issues is they are beneath reef-pi. i.e. none of the issues indicate any bug on reef-pi code directly, yet. Almost all of them are related to sensor detection.
 

hhaase

Active Member
View Badges
Joined
Nov 11, 2019
Messages
418
Reaction score
344
Rating - 0%
0   0   0
I'm starting to build up my component libraries to work on schematics, and the adafruit guides are all pretty clear and easy to follow. So I doubt I'll have any questions on following the designs exactly, but I'll probably start harassing people when I come to design questions I have.

First one is if you guys are beholden to the LM2596 buck converter? There are a few small switching regulators that are more board friendly, such as the PSU5A from EzSBC. Some of the reefpi designs have such low component count and draw that I'd wonder if just an LM7805 might work. These other regulators would also eliminate the need to adjust the output. Has the actual amperage draw been measured?

For my own build I think I'll go down that route on the smaller boards to see how it plays out. Would be easy enough to add some extra holes so that either method could be used.
 

MikeSpike

Community Member
View Badges
Joined
Jan 2, 2019
Messages
88
Reaction score
54
Rating - 0%
0   0   0
Hi @Ranjib presume v3 is going to be released soon? If so (or at least in the 3 beta) I believe third party wireless sockets are supported. Is there a guide on how to do this?
 

brandon clow

Active Member
View Badges
Joined
Oct 22, 2017
Messages
121
Reaction score
151
Rating - 0%
0   0   0
Tried the new release today (reef-pi-3.0.0-rc0-pi3.deb), temp sensors seem to be working better this go. I did notice that one of my lights instantly pegged to 100% across all channels (using a PCA9685 with ldd-H meanwells). The config I had works correctly on 3.0 alpha and the 2.x builds but the latest two 3.0 builds have behaved this way. I did attempt to see if the active high/low was the issue but flipping it to active low goes to light out. The other two changed when I edited the profile but did not modify an actual value. I caught this when viewing the systemctl for reef-pi. The start times are correct but the "15:04:05" time is unknown to me as any gui entry. The profiles are using diurnal and should be outputting a value in the 40's roughly (blues at least). Has anyone seen this on the latest build?


Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 ERROR: lighting subsystem. Profile value computation error. Light: RightLEDLight channel: Violets Error: Failed to parse start time. Error:parsing time "09:15" as "15:04:05":
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting subsystem: Setting Light: RightLEDLight Channel: Violets Value: 0
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting-subsystem: Setting PWM value: 0 at channel: 8
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 onTime 0 offTime 4095
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting-subsystem: Loading profile for channel Blues
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 ERROR: lighting subsystem. Profile value computation error. Light: RightLEDLight channel: Blues Error: Failed to parse start time. Error:parsing time "08:15" as "15:04:05": c
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting subsystem: Setting Light: RightLEDLight Channel: Blues Value: 0
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting-subsystem: Setting PWM value: 0 at channel: 6
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 onTime 0 offTime 4095

Rolled back to 3.0 alpha and lights restored to the correct values.
 
Last edited:

Tplummer

Community Member
View Badges
Joined
Oct 3, 2019
Messages
95
Reaction score
89
Rating - 0%
0   0   0
You t
Welcome to the development thread of reef-pi, an open-source, affordable, modular DIY reef-tank controller based on Raspberry Pi.

aio.jpg

If you are trying to build a reef-pi controller, please check out the build guides linked below. You can use this thread to seek help and to stay updated with the latest development.

Screen Shot 2018-11-04 at 8.38.50 PM.png



reef-pi provides following functionalities:
  • Equipment control or automated power strip (including digital timers to switch on/off equipment at periodic intervals)
  • LED light control (24 hour cycle), diurnal cycle, fixed dimmig
  • Auto Top Off (based on photoelectric water level sensor or float switch)
  • Temperature monitoring and control (switch on/off heater & chiller)
  • pH monitoring
  • Dosing automation
  • Macro (feed mode etc)
  • And several other features like camera controls (periodic image capture and upload on google drive), telemetry (dashboard and alerting based on sensor values using adafruit.io), mobile friendly UI etc.
A beginner friendly list of reef-pi build guides are available on adafruit.io, if you are planning to build a reef-pi controller start with them.
  1. Setup and installation
  2. Power controller
  3. Temperature controller
  4. Auto Top Off
  5. Light controller
  6. pH monitor
Since reef-pi is modular and customizable, the cost of individual builds varies. In our experience reef-pi controller are almost always cheaper than the commercial alternatives and costs anywhere between 100 to 550 USD. An example bill of materials can be found here as amazon list. If you are building a reef-pi controller, I highly encorage you start a build thread and tag it with #reefpi to seek help with your build


--------------------------- Original thread start ---------------------
Hello friends,
I am starting a master thread for a DIY reef tank controller that is based on all opensource software and hardware. I had started with this project with following goals:
- Build an opensource software and hardware based reeftank controller that anyone can use and hack
- Keep the controller well tested against a set of standard equipment I use, while make it possible for other equipment to be used
- Maintain my own tank build threads and their evolution, backed by this controller.
- Learn electronics and reef keeping along the way (I am biologist by education & software engineer by occupation)

Following are the details of what I have developed & tested till now:
Controller software:
- The main controller software is called reef-pi. It is written in go, its fast and performant. It used embd for hardware communication. It also runs a little web server which provides the UI for the controller. UI is written in React , and can be accessed from anything that has web browser. As of now, the reef-pi supports following things:
- AC 110/220 V socket on/off (uses optocoupled relays underneath). This is used to remotely switch on/off return pump, LED bulb, heater etc.
- 0-20 Volt DC PWM. This is used to control things like dimmable LEDs, DC pumps. I use it to control my Kessil A80, A360. As well as a 5V DC pump (i use it as wave maker in one of my pico with SPS). PWM is done using PCA9685 breakout board from adafruit. This board supports 16 channels. I am using only 5 at max, as of now.
- Analog sensor support using MCP3008 analog to digital converter. This supports 8 channels. i.e. I can use up to 8 sensors/probes. As of now, I have only tested temperature sensor with it.
Other than the following basic hardware/equipment support, the controller software provides following additional features:
- Setting up daily/weekly/monthly scheduled jobs. Like turning on/off certain equipment. I use this feature to run my AC20 HOB filter nightly.
- Setting up dusk-to-dawn like lighting using PWM. The UI gives 12 vertical slider based 0-24 hours (each slider representing 2 hours gaps). I combine two of these two control the kessil LEDs.
- Authentication using Google OAuth. Since the whole controller runs on raspberry pi and provides an web frontend, security of one of my concern. To mitigate this, I have added google authentication support, which when configured will allow only certain users to log in (email specified in the configuration value).

This is the summary of the core controller software and what features it has as of now. I am constantly writing/improving things around it. As of now, I have two reef tank powered by this. I 'll have seperate threads on the individual builds that will include the housing and ancillary hardware in nano-reef.com, as my tank build threads are there, but I'll share all the controller specific common bits here, including UI screen shots, and tank pics :)

20161115_081550.jpg

you take pull request?
 
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
Tried the new release today (reef-pi-3.0.0-rc0-pi3.deb), temp sensors seem to be working better this go. I did notice that one of my lights instantly pegged to 100% across all channels (using a PCA9685 with ldd-H meanwells). The config I had works correctly on 3.0 alpha and the 2.x builds but the latest two 3.0 builds have behaved this way. I did attempt to see if the active high/low was the issue but flipping it to active low goes to light out. The other two changed when I edited the profile but did not modify an actual value. I caught this when viewing the systemctl for reef-pi. The start times are correct but the "15:04:05" time is unknown to me as any gui entry. The profiles are using diurnal and should be outputting a value in the 40's roughly (blues at least). Has anyone seen this on the latest build?


Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 ERROR: lighting subsystem. Profile value computation error. Light: RightLEDLight channel: Violets Error: Failed to parse start time. Error:parsing time "09:15" as "15:04:05":
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting subsystem: Setting Light: RightLEDLight Channel: Violets Value: 0
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting-subsystem: Setting PWM value: 0 at channel: 8
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 onTime 0 offTime 4095
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting-subsystem: Loading profile for channel Blues
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 ERROR: lighting subsystem. Profile value computation error. Light: RightLEDLight channel: Blues Error: Failed to parse start time. Error:parsing time "08:15" as "15:04:05": c
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting subsystem: Setting Light: RightLEDLight Channel: Blues Value: 0
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 lighting-subsystem: Setting PWM value: 0 at channel: 6
Nov 13 18:39:44 raspberrypi reef-pi[14375]: 2019/11/13 18:39:44 onTime 0 offTime 4095

Rolled back to 3.0 alpha and lights restored to the correct values.
Thank you so much for reporting this. I think this is a driver bug :-( . I’ll start working on a fix
 

hhaase

Active Member
View Badges
Joined
Nov 11, 2019
Messages
418
Reaction score
344
Rating - 0%
0   0   0
Hmmmm, main board really isn't too bad at all. Even managed to get the level sensor circuits integrated into it, so won't need a breakout board.

If I can get a few things cleaned up I'll get some prototypes ordered tonight.
 
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'm starting to build up my component libraries to work on schematics, and the adafruit guides are all pretty clear and easy to follow. So I doubt I'll have any questions on following the designs exactly, but I'll probably start harassing people when I come to design questions I have.

First one is if you guys are beholden to the LM2596 buck converter? There are a few small switching regulators that are more board friendly, such as the PSU5A from EzSBC. Some of the reefpi designs have such low component count and draw that I'd wonder if just an LM7805 might work. These other regulators would also eliminate the need to adjust the output. Has the actual amperage draw been measured?

For my own build I think I'll go down that route on the smaller boards to see how it plays out. Would be easy enough to add some extra holes so that either method could be used.
I went with those because I didn’t know how the circuit will end up at the end. I can use them to feed 24/12/5v and get 10,12,5,3.3 out which I covers my entire range of use case. And their 3a rating helps as well. I definitely think you should tinker with better more appropriate converters. Unless we tinker we’ll never know. If you ask me , our current power circuitry is not good and I know for a fact things get dodgy (10v pwm) in all in one circuits.
My theory is that we need lots of passive (resistors and capacitors) to make things smooth , other than better converters . From power distribution perspective.

Any help in this regard will be tremendously useful
 
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
Hi @Ranjib presume v3 is going to be released soon? If so (or at least in the 3 beta) I believe third party wireless sockets are supported. Is there a guide on how to do this?
Yes , thanksgiving is the target date . I am in process of updating the adafruit guides for that reason. Expect those to go live around same time (may be couple of days before or after)
 

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%
Back
Top