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
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
 
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
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

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
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.
 

mpoltorak7

New Member
View Badges
Joined
May 6, 2022
Messages
5
Reaction score
3
Location
Chicago
Rating - 0%
0   0   0
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
View Badges
Joined
May 6, 2022
Messages
5
Reaction score
3
Location
Chicago
Rating - 0%
0   0   0
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?
 
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
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?
The capabilities ui checkbox has a glitch. Once you click selected, save it and reload it. The checkbox might look unselected (for few seconds ) , but it should still enable the metric handler that you can confirm by directly accessing the /x/metrics end point. Is that not working ? We are working to fix the ui glitch. There was some update ‘ change went in that caused a bunch of minor ui issues like this and bogus calibration errors.
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
145
Reaction score
105
Location
Italy
Rating - 0%
0   0   0
Hi! I've tried a macro to turn off a light.. I think that something isn't working because lights doesn't react to macro trigger.. Is that a bug? Will it be possibile to run a macro to set a light to a selectable % value?

@Ranjib can you please help me about configuring mqtt? I can't figure it out :face-with-tears-of-joy:
Thank you!
 

mpoltorak7

New Member
View Badges
Joined
May 6, 2022
Messages
5
Reaction score
3
Location
Chicago
Rating - 0%
0   0   0
The capabilities ui checkbox has a glitch. Once you click selected, save it and reload it. The checkbox might look unselected (for few seconds ) , but it should still enable the metric handler that you can confirm by directly accessing the /x/metrics end point. Is that not working ? We are working to fix the ui glitch. There was some update ‘ change went in that caused a bunch of minor ui issues like this and bogus calibration errors.
Thanks, I was able to get the telemetry form the metrics page. This is great, it already helped me figure out I had an issue with my cron expersion on my dosing pump timers and when I did something stupid that cause my PH to fluctuate. Do do need to create more graphs but this is what I have for now. On a side note I see there is not data being scraped for the Journal or at least I do not see it, is there a posibility for this?
1652253135404.png
 

dmsc2fs

Well-Known Member
View Badges
Joined
Dec 29, 2021
Messages
502
Reaction score
583
Location
Charleston
Rating - 0%
0   0   0
I am having trouble figuring out how to add new charts to the dashboard. The UI Overview guide alludes to dashboard charts will be added automatically when new sensors are added? I have two temp probes and a ph probem. All 3 work and I can review the graph from inside of each device. i.e. from the temp or ph screens. How can I get the same graphs into the dashboard?

I also don't have a "customize" button on the bottom right of my dashboard. I only have a "configure".

secondary question. When I first added the PH probe it took a reading on the graph. It has not since. I have it configured to take a reading every 60 seconds. I am not sure this is working. I assume that the device can be monitored from the command line? Does anyone have a quick reference on how to find the PH probe from cmd and/or how to verify it is working.

When I hit the calibrate button I get the following error.
{"error":"strconv.ParseFloat: parsing \"3.\\xb8\\xb9\\xb8\\x80\\x00\\x80\\x80\\x00\\x00\\x80\\x00\\x80\\x80\\x00\\x80\\x80\\x00\\x00\\x00\\x80\\x80\\x80\\x00\\x00\\x00\\x80\": invalid syntax"} | HTTP 404
 
Last edited:

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
I am having trouble figuring out how to add new charts to the dashboard. The UI Overview guide alludes to dashboard charts will be added automatically when new sensors are added? I have two temp probes and a ph probem. All 3 work and I can review the graph from inside of each device. i.e. from the temp or ph screens. How can I get the same graphs into the dashboard?

I also don't have a "customize" button on the bottom right of my dashboard. I only have a "configure".

secondary question. When I first added the PH probe it took a reading on the graph. It has not since. I have it configured to take a reading every 60 seconds. I am not sure this is working. I assume that the device can be monitored from the command line? Does anyone have a quick reference on how to find the PH probe from cmd and/or how to verify it is working.

When I hit the calibrate button I get the following error.
{"error":"strconv.ParseFloat: parsing \"3.\\xb8\\xb9\\xb8\\x80\\x00\\x80\\x80\\x00\\x00\\x80\\x00\\x80\\x80\\x00\\x80\\x80\\x00\\x00\\x00\\x80\\x80\\x80\\x00\\x00\\x00\\x80\": invalid syntax"} | HTTP 404
Is the wiring to your pH probe, let's say "temporary" ? That' error or similar ones is what i get with bad connections and/or interference from power lines.

As for the first question, at the bottom of the dashboard, there's a configure button. Add a line for each sensor and select Temperature (recent) or Temperature(historical) and then select one of the sensors in the submenu, hit update after that
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
I am having trouble figuring out how to add new charts to the dashboard. The UI Overview guide alludes to dashboard charts will be added automatically when new sensors are added? I have two temp probes and a ph probem. All 3 work and I can review the graph from inside of each device. i.e. from the temp or ph screens. How can I get the same graphs into the dashboard?

I also don't have a "customize" button on the bottom right of my dashboard. I only have a "configure".

secondary question. When I first added the PH probe it took a reading on the graph. It has not since. I have it configured to take a reading every 60 seconds. I am not sure this is working. I assume that the device can be monitored from the command line? Does anyone have a quick reference on how to find the PH probe from cmd and/or how to verify it is working.

When I hit the calibrate button I get the following error.
{"error":"strconv.ParseFloat: parsing \"3.\\xb8\\xb9\\xb8\\x80\\x00\\x80\\x80\\x00\\x00\\x80\\x00\\x80\\x80\\x00\\x80\\x80\\x00\\x00\\x00\\x80\\x80\\x80\\x00\\x00\\x00\\x80\": invalid syntax"} | HTTP 404
I don't know but any chance you're using one of my pH circuits? That error looks like it could be from mine. If so you need to add the following line to the /boot/config.txt file on the Pi. This will slow down the I2C bus so it can handle I2C stretching.

dtparam=i2c_arm_baudrate=10000
 

dmsc2fs

Well-Known Member
View Badges
Joined
Dec 29, 2021
Messages
502
Reaction score
583
Location
Charleston
Rating - 0%
0   0   0
I don't know but any chance you're using one of my pH circuits? That error looks like it could be from mine. If so you need to add the following line to the /boot/config.txt file on the Pi. This will slow down the I2C bus so it can handle I2C stretching.

dtparam=i2c_arm_baudrate=10000
Thank you. That fixed the issue.
 

dmsc2fs

Well-Known Member
View Badges
Joined
Dec 29, 2021
Messages
502
Reaction score
583
Location
Charleston
Rating - 0%
0   0   0
Is the wiring to your pH probe, let's say "temporary" ? That' error or similar ones is what i get with bad connections and/or interference from power lines.

As for the first question, at the bottom of the dashboard, there's a configure button. Add a line for each sensor and select Temperature (recent) or Temperature(historical) and then select one of the sensors in the submenu, hit update after that
Thank you. I couldn't figure out how to add a line. No add button, or + like in other menus. simply incrementing the number for rows or columns did it.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
It’s a nice idea, might use those myself, now that you showed it !
They are however, less flexible with pin placement and the laterally exiting cables might obscure other parts of the circuit. I’ll get a few and see if I like the look of the circuit :)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Lets talk Dosers...:)

Just thought I would post what I am using and think they are well made and a lot better than most of the stuff out there but thats just my opinion. I have nano tanks and I had the PWM feature to drive dosers but have had some issues when I lost power and just decided that I did not like that option since I felt like I couldnt make it as fail safe as I wanted so I went with some BRS AC dosers and control them with reef-pi with timers, in that way I can control and make sure I have off timers in case of power outages etc. The BRS dosers work fine but are noisy at least to me I can hear them every time they kick off and just an annoyance so I started looking into alternatives. BRS also carries something called a drews doser and started researching that, not a lot out there but came across some old threads that stated the dosers were made by APT Instruments. I do not know this for a fact but it does appear to be one in the same, they even state that they can make OEM dosers to your spec etc. Here is the website - APT Instruments seem to make things for industrial applications which bodes well for a reef tank. I will say that they are not the cheapest dosers out there you can get some really cheap like on alixexpress etc but these appear to be made really well and at least the AC versions are rated for continuous duty.

These are the ones I went with - SP100FO Fixed-Flow OEM Peristaltic Pumps it all depends on how much ml per min you are after, the SP200 version has much higher flow rates so it would depend on your tank size etc. What I really like about these is you can see from the information page is that you can mix and match RPM and tubing size to target the flow rate that you need here is a screenshot:

Screenshot_20220516-163511.png

so for the 36rpm motor (they haven't updated the chart for the new motors) with 3mm tubing you can go 5.6ml per min, 1.6mm is 1.5ml/min etc. By lowering the rpm it lowers it accordingly based on the chart. When I tested for the 3mm tubing I was getting 7ml/min and again if you need or want higher flow rates you can look at the SP200 versions.

I ended up going with 2 dosers and ordered a 36rpm and an 18rpm and have mine setup with 3mm tubing on the 36rpm one and .8mm tubing on the 18rpm one, giving me about 7ml/min on one and .4ml/min on the other one. For my frag tank I use the 7ml/min for ATO and the .4 will be for dosing all for reef which are very small doses due to the tank size. I really like the AC dosers and think with timers they are more bulletproof vs a lot of the stuff out there but again that is just my opinion, thought I would pass this along. Here are mine assembled with my 3d printed enclosures, if anyone needs the stl files just let me know.

PXL_20220517_133118849.jpg

PXL_20220517_133209076.jpg

PXL_20220517_133136927.jpg

PXL_20220517_133127396.jpg


:)
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
Lets talk Dosers...:)

Just thought I would post what I am using and think they are well made and a lot better than most of the stuff out there but thats just my opinion. I have nano tanks and I had the PWM feature to drive dosers but have had some issues when I lost power and just decided that I did not like that option since I felt like I couldnt make it as fail safe as I wanted so I went with some BRS AC dosers and control them with reef-pi with timers, in that way I can control and make sure I have off timers in case of power outages etc. The BRS dosers work fine but are noisy at least to me I can hear them every time they kick off and just an annoyance so I started looking into alternatives. BRS also carries something called a drews doser and started researching that, not a lot out there but came across some old threads that stated the dosers were made by APT Instruments. I do not know this for a fact but it does appear to be one in the same, they even state that they can make OEM dosers to your spec etc. Here is the website - APT Instruments seem to make things for industrial applications which bodes well for a reef tank. I will say that they are not the cheapest dosers out there you can get some really cheap like on alixexpress etc but these appear to be made really well and at least the AC versions are rated for continuous duty.

These are the ones I went with - SP100FO Fixed-Flow OEM Peristaltic Pumps it all depends on how much ml per min you are after, the SP200 version has much higher flow rates so it would depend on your tank size etc. What I really like about these is you can see from the information page is that you can mix and match RPM and tubing size to target the flow rate that you need here is a screenshot:

Screenshot_20220516-163511.png

so for the 36rpm motor (they haven't updated the chart for the new motors) with 3mm tubing you can go 5.6ml per min, 1.6mm is 1.5ml/min etc. By lowering the rpm it lowers it accordingly based on the chart. When I tested for the 3mm tubing I was getting 7ml/min and again if you need or want higher flow rates you can look at the SP200 versions.

I ended up going with 2 dosers and ordered a 36rpm and an 18rpm and have mine setup with 3mm tubing on the 36rpm one and .8mm tubing on the 18rpm one, giving me about 7ml/min on one and .4ml/min on the other one. For my frag tank I use the 7ml/min for ATO and the .4 will be for dosing all for reef which are very small doses due to the tank size. I really like the AC dosers and think with timers they are more bulletproof vs a lot of the stuff out there but again that is just my opinion, thought I would pass this along. Here are mine assembled with my 3d printed enclosures, if anyone needs the stl files just let me know.

PXL_20220517_133118849.jpg

PXL_20220517_133209076.jpg

PXL_20220517_133136927.jpg

PXL_20220517_133127396.jpg


:)
Now that's some proper heavy duty stuff
 
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
Lets talk Dosers...:)

Just thought I would post what I am using and think they are well made and a lot better than most of the stuff out there but thats just my opinion. I have nano tanks and I had the PWM feature to drive dosers but have had some issues when I lost power and just decided that I did not like that option since I felt like I couldnt make it as fail safe as I wanted so I went with some BRS AC dosers and control them with reef-pi with timers, in that way I can control and make sure I have off timers in case of power outages etc. The BRS dosers work fine but are noisy at least to me I can hear them every time they kick off and just an annoyance so I started looking into alternatives. BRS also carries something called a drews doser and started researching that, not a lot out there but came across some old threads that stated the dosers were made by APT Instruments. I do not know this for a fact but it does appear to be one in the same, they even state that they can make OEM dosers to your spec etc. Here is the website - APT Instruments seem to make things for industrial applications which bodes well for a reef tank. I will say that they are not the cheapest dosers out there you can get some really cheap like on alixexpress etc but these appear to be made really well and at least the AC versions are rated for continuous duty.

These are the ones I went with - SP100FO Fixed-Flow OEM Peristaltic Pumps it all depends on how much ml per min you are after, the SP200 version has much higher flow rates so it would depend on your tank size etc. What I really like about these is you can see from the information page is that you can mix and match RPM and tubing size to target the flow rate that you need here is a screenshot:

Screenshot_20220516-163511.png

so for the 36rpm motor (they haven't updated the chart for the new motors) with 3mm tubing you can go 5.6ml per min, 1.6mm is 1.5ml/min etc. By lowering the rpm it lowers it accordingly based on the chart. When I tested for the 3mm tubing I was getting 7ml/min and again if you need or want higher flow rates you can look at the SP200 versions.

I ended up going with 2 dosers and ordered a 36rpm and an 18rpm and have mine setup with 3mm tubing on the 36rpm one and .8mm tubing on the 18rpm one, giving me about 7ml/min on one and .4ml/min on the other one. For my frag tank I use the 7ml/min for ATO and the .4 will be for dosing all for reef which are very small doses due to the tank size. I really like the AC dosers and think with timers they are more bulletproof vs a lot of the stuff out there but again that is just my opinion, thought I would pass this along. Here are mine assembled with my 3d printed enclosures, if anyone needs the stl files just let me know.

PXL_20220517_133118849.jpg

PXL_20220517_133209076.jpg

PXL_20220517_133136927.jpg

PXL_20220517_133127396.jpg


:)
They look solid . Thank you for sharing. Let us know how it’s working in few months
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Hey @Ranjib would it be possible to add a delay timer to the equipment configuration something similar that you did with the option on reboot or power outage to not turn on? I would like the ability on a power reboot to delay certain equipment from turning back on for a period of time, like ATO, skimmer, wave pumps etc. I want them to turn on but id like to be able to specify a timer to run when things come back on and then turn them on when the timer expires.

I might have mentioned this in the past but right now we have the ability leave things off and I am looking for something in between. Use case, for my nano tanks with a sump it drains down with power outage and takes a few minutes to fill back up and the drain to flush the air etc, it can cause ATO to kick on not to mention having wave pumps kick back on before things are full etc. Wasn't sure if anyone else had requested something similar and thought I would throw it out.
:)
 
Last edited:

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top