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

OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,479
Reaction score
16,437
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Printed Reef - Custom Reef Accessories

iLMaRiO

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Jun 24, 2020
Messages
343
Reaction score
70
Review score
+0 /0 /-0
@Ranjib can I set a doser to dose in milliseconds ? Or in seconds with a decimal value, like 68.124 seconds.
The error message shown if no duration is set is saying "An integer number >= 1 is required!" so I think i can't use float values. (but they are accepted, but converted from dot to comma ie 12.345 => 12,345 strange for an english app, as decimal part is delimited with dot in english)

To be short, setting 58.812 is converted to 58,812, will I dose for 58 seconds and 812 milliseconds or 58812 seconds ?
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,479
Reaction score
16,437
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
@Ranjib can I set a doser to dose in milliseconds ? Or in seconds with a decimal value, like 68.124 seconds.
The error message shown if no duration is set is saying "An integer number >= 1 is required!" so I think i can't use float values. (but they are accepted, but converted from dot to comma ie 12.345 => 12,345 strange for an english app, as decimal part is delimited with dot in english)

To be short, setting 58.812 is converted to 58,812, will I dose for 58 seconds and 812 milliseconds or 58812 seconds ?
This is for dc or stepper based doser? for dc motor based doser that uses pwm, it s 58812 seconds
 
Top Shelf Aquatics

iLMaRiO

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Jun 24, 2020
Messages
343
Reaction score
70
Review score
+0 /0 /-0
This is for dc or stepper based doser? for dc motor based doser that uses pwm, it s 58812 seconds

It's a DC doser, I need to dose a fraction of second, is this possible in some way ?

Other question: i've noticed that when reef-pi shuts down, all dosing pumps start to dose, is anything wrong in my configuration or my controller ? (i'm using Robo-Tank). I did a simple raspberry reboot and all dosing started, forcing me to unplug the cables.
 

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
866
Reaction score
1,322
Review score
+0 /0 /-0
Location
Missouri
Can you be specific which part is unclear from this guide: https://learn.adafruit.com/reef-pi-lighting-controller?view=all

you can use pi pwm directly instead of pca9685
Yeah its the 10v going through a resistor then we peel off the pwm connection going to the Kessil. I do not understand how that signal is being adjusted since its not going through the NPN, the pwm signal from the PI comes through the NPN and somehow switches the pwm signal to the kessil I just do not understand how its doing it.

I'm using pca9685, @Michael Lane hat or will be once I get the circtui soldered up.
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
798
Reaction score
1,070
Review score
+0 /0 /-0
Location
Edmonton, Canada
It's a DC doser, I need to dose a fraction of second, is this possible in some way ?

Other question: i've noticed that when reef-pi shuts down, all dosing pumps start to dose, is anything wrong in my configuration or my controller ? (i'm using Robo-Tank). I did a simple raspberry reboot and all dosing started, forcing me to unplug the cables.
That doesn't sound good, has this happened before? I can't see reef-pi turning on the outputs and the DC ports have a pulldown resistor so they are forced off if no signal is present.
 
AS

Atrumblood

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 10, 2021
Messages
190
Reaction score
230
Review score
+0 /0 /-0
Location
Salt Lake City, Utah
Something changed with build 5.1 or 5.2 where setting up the dosing timers will not longer accept */4 to run every 4 hours. I get the error.

[ An integer, a range (e.g. 1-5) or * is required! ]

I am having issues figuring out the new requirements for scheduling. It used to be in cronjob format, now it's not?
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,479
Reaction score
16,437
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Something changed with build 5.1 or 5.2 where setting up the dosing timers will not longer accept */4 to run every 4 hours. I get the error.

[ An integer, a range (e.g. 1-5) or * is required! ]

I am having issues figuring out the new requirements for scheduling. It used to be in cronjob format, now it's not?
this is a UI validation bug :-( . I'll fix it by next release
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,479
Reaction score
16,437
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Getting some work done on the hardware side. Due to the supply chain shortage, I am out of supply for new pi. That means no pi zero w specifically. While strategically I am paying some attention to other boards (risc v in particularly ), tactically I need to increase the bench strength (of reef-pi controllers ) for backup and new tanks .

with that goal in mind, I started working on the older pi 3, 2 even model B . I had stopped using them in lieu of zero or 3a due to their smaller form factor and power consumption .

anyhow, this is one of the styles I settled with. This 3D printed enclosure houses a pi 3/4/2 , a temp sensor, a ph sensor and a ato sensor . It has recessed holes at the back and stand-off inside to mount the pi. This means the m2.5 steel screws are almost flat to the surface . Two less extra standoff required as well (compared to the previous ones). The wall is 3mm , feels very solid :). I used to stick to 2mm due to the smaller wall thickness required to mount the 3.5 mm female jacks . I addressed it by creating a small beveled segment in the bottom wall which has only 2mm wall thickness, with mounting holes for two 3.5 mm connectors . All corners are beveled and the lid + enclosure is designed for minimal exposed are , but all pi ports (usb, audio, hdmi etc) are still accessible . I’m very happy with the result . It’s captures my learning from past 3 years . If you check out my very first housing , you’ll know what I mean .
FBAC9B79-0A13-4AD9-B69A-BA6E169652BF.jpeg

Back side
01D7CD43-E417-4C2B-8BBD-9F7FC7FF7B47.jpeg

notice I moved from nylon screws to steel screws.
bottom side with all the connectors
DB3148E3-09D0-4D51-B3EF-55591B7DE8A4.jpeg


side view , all pi ports are accessible
7184C34B-9632-46CA-BE3E-F5B2DDD90EAD.jpeg

Here is how internally parts are arranged
D50198EA-9EDA-4558-B2E5-43B50628B712.jpeg

All circuitry is on a perm proto hat with right angled male headers for smaller profile (I plan to switch to screw terminals ).
449DA6DD-FF8E-4FA0-8BA7-8DB73D73D7C7.jpeg


got two of these done, configured and tested. The idea is to just swap the db files from backup in case any of the existing controller dies. One more to go.
EEBE646D-D9DD-4741-974A-4792279578D3.jpeg
 
BRS

Atrumblood

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 10, 2021
Messages
190
Reaction score
230
Review score
+0 /0 /-0
Location
Salt Lake City, Utah

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
107
Reaction score
126
Review score
+0 /0 /-0
Location
Germany
Hi everybody, as a noob to practically all things aquarium, Pi and reef-Pi I would like to mention that the reef-Pi documentation lacks a good overview for starters, in my oppinion. The guides are very helpfull in building something, but what is missing is an overview on capabilities so you can make a plan according to personal goals.

A suggestion from my persepctive: make/link a short overview on the main page:
  • list of available Interfaces
    • number of GPIO pins
    • (software PWM pins ?)
    • number of hardware PWM pins
    • number of I2C Pins
    • UART and SPI (no idea about those)
  • short List of what each of these interfaces can be used for (maybe with links to the guides)
    • GPIO:
      • switching relays/equipment on/off
      • reading on/off information
      • single pin communication
    • PWM:
      • controlling/dimming equipment
      • reading PWM encoded information ?
    • I2C:
      • digital communication protocol
      • used to add expansions, like more PWM channels, Analog-digital-converter (ADC) channels for voltage measurement, etc.
    • UART + SPI
      • probably similar to I2C
  • short List on reef-PI's tabs and their usage:
    • I can't find that in the documentation. If it's there it is probably somewhat hidden/not obvious
    • Sensor Tab:
      • declare analog and digital sensor input
      • can be used to trigger equipment
        • just on/off ?
        • dose adjustment ?
        • PID control loop behavior possible ?
    • Equipment:
      • turn equipment on/off
      • dimm equipment, like LEDs by hand ?
    • timers
      • how flexible are those ?
      • what can they trigger ?
    • Dosers:
      • same here
      • only via PWM ?
      • can a doser be controlled by Pin and use a common PWM speed with all dosing pumps ?
    • Journal (!!)
      • I was wondering about that, only found it in the reef-PI 5.0 announcement in this forum
    • I'm mostly concerned about those dosers, because I want to run a regulateable BIO CO2 plant, however I have no idea how much of the adjustment I have to do manually and how much reef Pi can handle itself (by PID control on pH level/Temperature/etc. for example).
If I have missed something, please correct me. However, that goes to show how usefull such a short overview would be. I have gathered most of that by reading forum posts, all of the guides and searching in the net, but that is just an unnecessary obstacle.

Another point to this: on the from page of this forum are quite a few people (saw at least 2) asking whether x, y or z is possible with reef-Pi. That goes to show that there isn't a good documentation an what reef-Pi can actually do.
 
Last edited:
Coral Mania

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
866
Reaction score
1,322
Review score
+0 /0 /-0
Location
Missouri
Getting some work done on the hardware side. Due to the supply chain shortage, I am out of supply for new pi. That means no pi zero w specifically. While strategically I am paying some attention to other boards (risc v in particularly ), tactically I need to increase the bench strength (of reef-pi controllers ) for backup and new tanks .

with that goal in mind, I started working on the older pi 3, 2 even model B . I had stopped using them in lieu of zero or 3a due to their smaller form factor and power consumption .

anyhow, this is one of the styles I settled with. This 3D printed enclosure houses a pi 3/4/2 , a temp sensor, a ph sensor and a ato sensor . It has recessed holes at the back and stand-off inside to mount the pi. This means the m2.5 steel screws are almost flat to the surface . Two less extra standoff required as well (compared to the previous ones). The wall is 3mm , feels very solid :). I used to stick to 2mm due to the smaller wall thickness required to mount the 3.5 mm female jacks . I addressed it by creating a small beveled segment in the bottom wall which has only 2mm wall thickness, with mounting holes for two 3.5 mm connectors . All corners are beveled and the lid + enclosure is designed for minimal exposed are , but all pi ports (usb, audio, hdmi etc) are still accessible . I’m very happy with the result . It’s captures my learning from past 3 years . If you check out my very first housing , you’ll know what I mean .
FBAC9B79-0A13-4AD9-B69A-BA6E169652BF.jpeg

Back side
01D7CD43-E417-4C2B-8BBD-9F7FC7FF7B47.jpeg

notice I moved from nylon screws to steel screws.
bottom side with all the connectors
DB3148E3-09D0-4D51-B3EF-55591B7DE8A4.jpeg


side view , all pi ports are accessible
7184C34B-9632-46CA-BE3E-F5B2DDD90EAD.jpeg

Here is how internally parts are arranged
D50198EA-9EDA-4558-B2E5-43B50628B712.jpeg

All circuitry is on a perm proto hat with right angled male headers for smaller profile (I plan to switch to screw terminals ).
449DA6DD-FF8E-4FA0-8BA7-8DB73D73D7C7.jpeg


got two of these done, configured and tested. The idea is to just swap the db files from backup in case any of the existing controller dies. One more to go.
EEBE646D-D9DD-4741-974A-4792279578D3.jpeg
Ya know I have some @Michael Lane hats available if you want to get out of the protoboard building, you may enjoy it etc but just letting you know. Still have a few left. :)
 

Simonv92

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Oct 21, 2014
Messages
66
Reaction score
50
Review score
+0 /0 /-0
Location
Italy
Hi all! I'm trying to configure MQTT on Reef-Pi to send metrics to Home Assistant.
I've created a broker on Home Assistant and now I'm trying to configure Reef-Pi.
I've inserted Server IP, Username, Password but I always have this error:
{"error":"json: cannot unmarshal string into Go struct field MQTTConfig.mqtt.retained of type bool"} | HTTP 400
What can I do?
Thank you!
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,479
Reaction score
16,437
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Hi all! I'm trying to configure MQTT on Reef-Pi to send metrics to Home Assistant.
I've created a broker on Home Assistant and now I'm trying to configure Reef-Pi.
I've inserted Server IP, Username, Password but I always have this error:
{"error":"json: cannot unmarshal string into Go struct field MQTTConfig.mqtt.retained of type bool"} | HTTP 400
What can I do?
Thank you!
which version you are using? we had a bug in 5.1.
Let us know if this is happening with 5.2, i'll fix it if thats the case
 
Printed Reef - Custom Reef Accessories
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,479
Reaction score
16,437
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Hi everybody, as a noob to practically all things aquarium, Pi and reef-Pi I would like to mention that the reef-Pi documentation lacks a good overview for starters, in my oppinion. The guides are very helpfull in building something, but what is missing is an overview on capabilities so you can make a plan according to personal goals.

A suggestion from my persepctive: make/link a short overview on the main page:
  • list of available Interfaces
    • number of GPIO pins
    • (software PWM pins ?)
    • number of hardware PWM pins
    • number of I2C Pins
    • UART and SPI (no idea about those)
  • short List of what each of these interfaces can be used for (maybe with links to the guides)
    • GPIO:
      • switching relays/equipment on/off
      • reading on/off information
      • single pin communication
    • PWM:
      • controlling/dimming equipment
      • reading PWM encoded information ?
    • I2C:
      • digital communication protocol
      • used to add expansions, like more PWM channels, Analog-digital-converter (ADC) channels for voltage measurement, etc.
    • UART + SPI
      • probably similar to I2C
  • short List on reef-PI's tabs and their usage:
    • I can't find that in the documentation. If it's there it is probably somewhat hidden/not obvious
    • Sensor Tab:
      • declare analog and digital sensor input
      • can be used to trigger equipment
        • just on/off ?
        • dose adjustment ?
        • PID control loop behavior possible ?
    • Equipment:
      • turn equipment on/off
      • dimm equipment, like LEDs by hand ?
    • timers
      • how flexible are those ?
      • what can they trigger ?
    • Dosers:
      • same here
      • only via PWM ?
      • can a doser be controlled by Pin and use a common PWM speed with all dosing pumps ?
    • Journal (!!)
      • I was wondering about that, only found it in the reef-PI 5.0 announcement in this forum
    • I'm mostly concerned about those dosers, because I want to run a regulateable BIO CO2 plant, however I have no idea how much of the adjustment I have to do manually and how much reef Pi can handle itself (by PID control on pH level/Temperature/etc. for example).
If I have missed something, please correct me. However, that goes to show how usefull such a short overview would be. I have gathered most of that by reading forum posts, all of the guides and searching in the net, but that is just an unnecessary obstacle.

Another point to this: on the from page of this forum are quite a few people (saw at least 2) asking whether x, y or z is possible with reef-Pi. That goes to show that there isn't a good documentation an what reef-Pi can actually do.
Love it :)
you can send pull request directly for the official documentation: https://github.com/reef-pi/reef-pi.github.io
or create a ticket and link this post , and i'll pick it up
thank you for taking the time to write this down, really appreciate it
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
107
Reaction score
126
Review score
+0 /0 /-0
Location
Germany
Love it :)
you can send pull request directly for the official documentation: https://github.com/reef-pi/reef-pi.github.io
or create a ticket and link this post , and i'll pick it up
thank you for taking the time to write this down, really appreciate it
Alright, time to train my git skills ^^
Not sure if that List is complete though, but it is a start.
 
Tidal Gardens 4th Sale 3

mpoltorak7

New Member
Review score
+0 /0 /-0
View Badges
Joined
May 6, 2022
Messages
5
Reaction score
3
Review score
+0 /0 /-0
Location
Chicago
1) enable Prometheus metrics under configuration -> settings , and reload reef-pi
2) configure Prometheus to scrape reef-pi, and reload. Your configuration looks correct. I’ll highly encourage running prom and grafana in separate server.
You can cross check that reef-pi is exposing the metrics correctly by hitting pi ip /x/metrics in your browser, it should reveal all the metrics (temperate , ato usage etc) in plain text, with each metric in individual line
When i try to enable prometheus the setting does not stick, even though I update and reload. Has anyone seen this issue or know of any logs i can reference?
 

mpoltorak7

New Member
Review score
+0 /0 /-0
View Badges
Joined
May 6, 2022
Messages
5
Reaction score
3
Review score
+0 /0 /-0
Location
Chicago
1) enable Prometheus metrics under configuration -> settings , and reload reef-pi
2) configure Prometheus to scrape reef-pi, and reload. Your configuration looks correct. I’ll highly encourage running prom and grafana in separate server.
You can cross check that reef-pi is exposing the metrics correctly by hitting pi ip /x/metrics in your browser, it should reveal all the metrics (temperate , ato usage etc) in plain text, with each metric in individual line
When I try to enable prometheous the setting does not stick even after an update/reload. Has anyone run into this issue or know of any logs I can reference?
 

How close to perfect, for you, is your reef aquarium?

  • IT'S PERFECT NOW

    Votes: 18 3.6%
  • It's getting close

    Votes: 68 13.7%
  • It's about half way there

    Votes: 93 18.7%
  • It's slow but progressing

    Votes: 152 30.6%
  • It's not even close

    Votes: 152 30.6%
  • Other (please explain)

    Votes: 14 2.8%
JASON FOX SIGNATURE CORALS
Top