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

Yup. Prometheus is a persistent storage. You just have to tune the retention time per your requirements
Yup finally found the option and where I needed to make it. How long are you setting the retention period for? I upped it to 1y but just curious on what you are using.

:)
 
Wanted to use some of the probes I have on my old Apex until I can replace them with native ones, so I enabled 'Open XML Access' and wrote this python3 script. You might also find it useful. It just writes the value of each probe to a file named the same as that probe's name. This might exist somewhere else, but I couldn't find it in ten minutes, so...

How can I actually use these values, though? I've tried adding the file-analog and file-digital drivers, but I'm not sure where to go from there. I tried adding the file-analog driver as an analog input and then adding it on the temperature tab, but that doesn't seem to work, I can't select it as an input.

Python:
#sudo apt-get install libxml2-dev libxslt-dev python-dev
#pip install requests
#pip install bs4
#pip install lxml

import requests
from bs4 import BeautifulSoup

#put the address for your apex here. 
#you probably don't have a DNS entry for it
#so you should set a static IP and enter it here
#See your apex's configuration > network setup section
apexAddress = "apex"

#Get the data from the Apex. You need to enable "Open XML Access"
#See your apex's configuration > network setup section
apexData = requests.get("http://" + apexAddress + "/cgi-bin/status.xml")
xml_soup = BeautifulSoup(apexData.content, 'xml')

#Write the data into files for reef-pi to ingest
for probe in xml_soup.find_all('probe'):
    name = probe.find("name").contents[0]
    value = probe.find("value").contents[0]
    probeType = probe.find("type").contents[0]

    filename = name + ".txt"
    f = open(filename, "w")
    f.write(value)
    f.close()
 
hi

Ranjib can you add a diagram like the one for ATO to see when one of my Equipment turned on or off? one exemple is I want to know when my heater turned on or off​

 
Wanted to use some of the probes I have on my old Apex until I can replace them with native ones, so I enabled 'Open XML Access' and wrote this python3 script. You might also find it useful. It just writes the value of each probe to a file named the same as that probe's name. This might exist somewhere else, but I couldn't find it in ten minutes, so...

How can I actually use these values, though? I've tried adding the file-analog and file-digital drivers, but I'm not sure where to go from there. I tried adding the file-analog driver as an analog input and then adding it on the temperature tab, but that doesn't seem to work, I can't select it as an input.

Python:
#sudo apt-get install libxml2-dev libxslt-dev python-dev
#pip install requests
#pip install bs4
#pip install lxml

import requests
from bs4 import BeautifulSoup

#put the address for your apex here.
#you probably don't have a DNS entry for it
#so you should set a static IP and enter it here
#See your apex's configuration > network setup section
apexAddress = "apex"

#Get the data from the Apex. You need to enable "Open XML Access"
#See your apex's configuration > network setup section
apexData = requests.get("http://" + apexAddress + "/cgi-bin/status.xml")
xml_soup = BeautifulSoup(apexData.content, 'xml')

#Write the data into files for reef-pi to ingest
for probe in xml_soup.find_all('probe'):
    name = probe.find("name").contents[0]
    value = probe.find("value").contents[0]
    probeType = probe.find("type").contents[0]

    filename = name + ".txt"
    f = open(filename, "w")
    f.write(value)
    f.close()
use file analog driver to associate this file with a driver. then create an analog input connector using the new driver. after than you can use the analog input connector under ph module to read it and control equipment/alert etc.
tldr,
file driver -> analog input connector -> ph module is the way to use this file to control/monitor things using reef-pi.
keep us posted
 
hi

Ranjib can you add a diagram like the one for ATO to see when one of my Equipment turned on or off? one exemple is I want to know when my heater turned on or off​

you mean equipment state chart? we can do that right now with prometheus metric. for a native chart inside reef-pi, i have to think about it. It will cost some memory to store the historical state. we do this for the control systems (ph, temperature, ato etc) and not just independent equipment
 
Pretty sure this has come up just not finding much with search, but is it possible to have power monitoring with the Kasa strips? I'd like to get notified if the power dips on the return pump, wasn't sure if possible and if so what did you need to do to enable it.
 
Pretty sure this has come up just not finding much with search, but is it possible to have power monitoring with the Kasa strips? I'd like to get notified if the power dips on the return pump, wasn't sure if possible and if so what did you need to do to enable it.
Yes. If you have hs300 or 110 units then the driver will provide analog input connectors (pin 0-5 for hs300, and only 0 for hs110) to read the current draw, that you can use in ph module to monitor and control other things
 
This sounds great, on behalf of many thanks for your hard work.

This isn't a bug but yesterday I got a sad email where someone's dosing pump didn't turn off, thankfully no harm was done. He restarted things which immediately turned off the pump. The control for the pump was coming from the pca9685, my guess is reef-pi sent out the command to turn off the pump but that command didn't make it to the pca9685 in tact. Unfortunately this is the problem with I2C, it'll never be 100% perfect as it has no acknowledge system.

I didn't think it was possible to read the current value of a specific pca9685 pin as I've looked into this in the past however after hearing this I thought I would try again. I stumbled across a new c++ Arduino based library from Rob Tillaart last updated early this year. Again it looks like he did what few could and added a function to read the set value of a pin. I've tested it out and it works perfectly. You're able to set the value normally then immediately check and verify if it in fact changed.

So now I'm wondering if you're able to incorporate a verification on mainly the dosing pumps as they are critical. When reef-pi turns on/off the pump it could check the pin to verify it's set proper and move on, if not try again.

The function is call getPWM and is located in the PCA9685.cpp file here.



Unfortunately I'm still not comfortable poking in the code yet, would be great if you could start adding comments, that's my feature request. :)

If it helps any I can convert this function to work with pure c++ and drop the Arduino based libraries.
I agree with @robsworld78 on the need to verify if the dosing pumps are on and off when using pca9685. Dosing pumps failures are scary; having the peace of mind they are working appropriately would be wonderful.

Hopefully this can be incorporated into a future release.
 
For the 0-10v controller, if I have a light set to 100%, what should the voltage be? 50? 25%?

I feel like I must have gotten something backwards, I'm getting 0v at 100%, 5v at 50%, 7.5v at 25%, 10v at 0%.

is that the expected value? I can reverse the pin in software and it flips around, I'm just not sure which is expected.
 
For the 0-10v controller, if I have a light set to 100%, what should the voltage be? 50? 25%?

I feel like I must have gotten something backwards, I'm getting 0v at 100%, 5v at 50%, 7.5v at 25%, 10v at 0%.

is that the expected value? I can reverse the pin in software and it flips around, I'm just not sure which is expected.
Depends how you've wired it but if you have the version where the output is connected through a resistor to 10v and through a transistor to ground then yeah that inverts the signal
 
Depends how you've wired it but if you have the version where the output is connected through a resistor to 10v and through a transistor to ground then yeah that inverts the signal
That's the one. And yeah, setting the jack to active high makes it behave the way I expected, so... cool. This is really coming together - I basically just need to select a housing at this point.
 
Happy Thanksgiving everyone.

Two reef-pi questions:
1) I started having a lot of latency with the telemetry warnings, 5-10 hours. Goes from gmail to my at&t cell (email to <my cell number>@txt.att.net). Has anybody else been having similar issues or a work around?

2) Every 2-3 months my heater relay doesn't click off when pi tells it to. If I find it and toggle it on/off via the equipment control, it does turn off, so I'm fairly certain it's a mechanical hang up. Either way, wondering how I can tell pi to toggle it on and off if it gets above a certain temp?
 
All the sudden today, I notice my tank is kinda cold while I was feeding. Checked my temp probes and the probes said 73.5 degrees. I'm like hmmm, worked fine the other day so I went down to switch on the heaters manually and they kept switching off even though the temp is set for 79.5 degrees. So now I have the probes cut off from operating any equipment and am waiting to see if it's the heaters. They all worked perfect up until I upgraded to 5.0 last night. Any thoughts?
 
All the sudden today, I notice my tank is kinda cold while I was feeding. Checked my temp probes and the probes said 73.5 degrees. I'm like hmmm, worked fine the other day so I went down to switch on the heaters manually and they kept switching off even though the temp is set for 79.5 degrees. So now I have the probes cut off from operating any equipment and am waiting to see if it's the heaters. They all worked perfect up until I upgraded to 5.0 last night. Any thoughts?
Hmm. Did you change anything ? Does the heater on off work from reef-pi ui? I checked my metrics, nothing look abnormal as of now
A21D27CC-9C46-48C7-BF67-07EA59A95944.jpeg
 
Hmm. Did you change anything ? Does the heater on off work from reef-pi ui? I checked my metrics, nothing look abnormal as of now
A21D27CC-9C46-48C7-BF67-07EA59A95944.jpeg
Only thing I did was upgrade to 5.0. When the temp is below the set temp for the heaters to cut on, they just won't cut on. I then cut the heaters on manually, and then they shut right back off. I have to cut then temp probes off under the Temp Tab and then cut the heaters on, then I have to manually cut them off because reef pi won't cut them off once the set temp is reached. They have worked fine for months up until last night when I upgraded to 5.0.
 
All the sudden today, I notice my tank is kinda cold while I was feeding. Checked my temp probes and the probes said 73.5 degrees. I'm like hmmm, worked fine the other day so I went down to switch on the heaters manually and they kept switching off even though the temp is set for 79.5 degrees. So now I have the probes cut off from operating any equipment and am waiting to see if it's the heaters. They all worked perfect up until I upgraded to 5.0 last night. Any thoughts?

I've had that happen a few times.. Turned out it was an IP address issue.

My heaters were controlled by a smart plug and the IP address on the smart plug got swapped with something else in the house resulting in my temp sensor not operating the smart plug, and it was being turned off by the smart plug software.

Check that first.. And if you can, set a static IP address for anything you are controlling with reefpi.
 
Only thing I did was upgrade to 5.0. When the temp is below the set temp for the heaters to cut on, they just won't cut on. I then cut the heaters on manually, and then they shut right back off. I have to cut then temp probes off under the Temp Tab and then cut the heaters on, then I have to manually cut them off because reef pi won't cut them off once the set temp is reached. They have worked fine for months up until last night when I upgraded to 5.0.
Can you share you temp controller settings ? Are you using Kasa outlets ?
 
I've had that happen a few times.. Turned out it was an IP address issue.

My heaters were controlled by a smart plug and the IP address on the smart plug got swapped with something else in the house resulting in my temp sensor not operating the smart plug, and it was being turned off by the smart plug software.

Check that first.. And if you can, set a static IP address for anything you are controlling with reefpi.
In that case reef-pi should show error under configuration section
 
In that case reef-pi should show error under configuration section

No error.. Because the IP address that should have been on the smart plug had moved to a Kaza light switch.. This is how I knew there was an issue.. I would turn on that light and a few seconds later it would turn back off.. Happened a few times and annoyed me sufficiently to investigate..

I have since assigned persistent IP addresses in my DHCP server for those plugs.
 

ARE YOU READY TO CONFESS TO CRAZIEST, DUMBEST, FUNNIEST THING YOU’VE EVER DONE IN REEFING?

  • Yeah, I'll confess! (Share your story in the comments!)

    Votes: 26 63.4%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 15 36.6%
Back
Top
Home
Post thread…
Market
What's new