Good morning from California,
I just release an early release of reef-pi 3.0.0. This release aimed to onboard ph sensors for ph board and pico board users. This is a very early beta release, and not as rigorously field tested as the other public releases, but I have been running it for a week at least without any issues across light, power, temperature and ph modules. Its in 3.x series and wont be compatible to 2.x database, users have to recreate their setup. This release brings a host of new things, notably HAL (hardware abstraction layer) , internationalization, ph/pico board drivers, calibration support etc. The newly introduced HAL layer means users have to create a driver first (under Configuration -> Drivers) which is then associated with connectors. On the plus side, this mean users can now add multiple pca9685 , ph sensor board etc. The new HAL layer also allows using pca9685 as standard outlet control, this enables user to overcome the Pi GPIO limits in terms of outlet control :0-). Release builds can be found in usual place:
https://github.com/reef-pi/reef-pi/releases/tag/3.0.0-pre-alpha-1
I am jotting down the ph board setup, to give you a glimpse of how this works. The calibration part is not yet supported via UI, we'll have to do it using the API.
- Wire up your ph board and power up your raspberry pi. Once up,you should see the ph board regisetered as i2c addres 0x40 (64 in decimal)
- Next download and install the 3.0 pre-alpha release. Make sure to delete the old database. Details can be found in the troubleshooting guide
- Once running , go ahead and create a new driver from the Configuration -> Drivers section, select phboard as type (pico board for pico base board users). Make sure to click on the drop down and select the type, even if the one shown in the UI by default is the one you are using (i.e. do an explicit selection). Set 64 as the driver address (for pico base board users, it will be 72, @theatrus can you verify this is uniform across all pico base board users?). Specify a name, keep it unique across different drivers.
- Next, create a connector under analog input section and associate it with the new driver, specify channel as "0" and give it a name.
- Next, create a pH monitor (if you dont see ph tab, then probably its not enabled, enable this module under Configuration -> Settings, and reload reef-pi). Associate the ph monitor with the newly created analog input. And thats it, you should see your ph sensors reading. Note, without calibration it will emit sensor values in raw milivolts, which for me is around -8K.
- Next, perform calibration. reef-pi allows one or two point calibration. Each calibration point is indicated by an expected and an observed value. If you are using reference solution (like ph 7 and 10), keep them in tank temperature and immerse probe in them and note down the reading from the dashboard. It will take a few minute to stabilize the reading. We'll be applying the calibration via API (due to UI still being worked on). Create a json file (calibration.json) containing the calibration data in this format. The example shows my two point calibration again my own tank water with reference reading taken from hanna ph checker.
Code:
[/LIST]
[
{"expected":8.21, "observed": -8768},
{"expected":8.12, "observed": -8189}
]
reef-pi requires authentication for api, we'll use one curl command to get the authentication token, and another to use the token to apply our calibration data. Remember to disable the ph monitor before applying calibration.
Code:
curl -d @creds.json -X POST http://<IP>/auth/signin -c cookie.txt
curl -X POST -d @calibration.json -b cookie.txt http://<IP>/api/phprobes/1/calibrate
Note, the last command assumes the ph monitor id is 1, which will be the case if you create a ph monitor first. If you delete and create another one it will be 2 and so on.. so if you are making a re-attempt then update the command accrodingly. Calibration details are specific to individual probes/ph monitors. You can always checkout your existing ph probes and their ids using this command
Code:
curl -b cookie.txt http://<IP>/api/phprobes/
And it will return all the ph probe and their id, name etc. You can use the id returned by this command to calibrate,
let me know how it goes,
thank you for testing out this early build, we are very excited to ship this
. Thanks to @Roberto_b @theatrus @Michael Lane @Zekth for all the awesome work they did.
p.s. we are still looking for help with translations, so if you want to see your favorite language supported in reef-pi or improve the existing translations, please get in touch with us