This is what's in the calibration file
[/LIST]
[
{"expected":10.01, "observed": -9284},
{"expected":7.01, "observed": -170}
]
@Ranjib , what am I missing here?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
This is what's in the calibration file
[/LIST]
[
{"expected":10.01, "observed": -9284},
{"expected":7.01, "observed": -170}
]
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
And it will return all the ph probe and their id, name etc. You can use the id returned by this command to calibrate,Code:curl -b cookie.txt http://<IP>/api/phprobes/
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
Oops. my apologies, thank you @trackerit for you spanish tranlation :-) . Much appreciatedyou forgot me, my little contribution
Dont worry, it was a joke...Oops. my apologies, thank you @trackerit for you spanish tranlation :-) . Much appreciated
I just ran this same data with my development setup and it worked just fine.Nothing i can spot, let me try it out on my end, your signin is working, the data looks corret (it will be easier if you can cat the file and share the screenshot, instead), calibration should work
curl -c cookie.txt -X POST -d '{"user":"reef-pi", "password":"reef-pi"}' http://127.0.0.1/auth/signin
# returns null
curl -b cookie.txt http://127.0.0.1/api/phprobes
# returns the probes, notice my test probe id is 1: [{"id":"1","name":"Foo","enable":false,"period":60,"analog_input":"1","control":false,"notify":{"enable":false,"min":0,"max":0}}]
curl -b cookie.txt -X POST -d @calibration.json http://127.0.0.1/api/phprobes/1/calibrate
BTW @DirtDiggler2823 your second calibration point is way off i think :-/ , we'll seeI just ran this same data with my development setup and it worked just fine.
Code:curl -c cookie.txt -X POST -d '{"user":"reef-pi", "password":"reef-pi"}' http://127.0.0.1/auth/signin # returns null curl -b cookie.txt http://127.0.0.1/api/phprobes # returns the probes, notice my test probe id is 1: [{"id":"1","name":"Foo","enable":false,"period":60,"analog_input":"1","control":false,"notify":{"enable":false,"min":0,"max":0}}] curl -b cookie.txt -X POST -d @calibration.json http://127.0.0.1/api/phprobes/1/calibrate
@ranjib the [ \list] is an error? I calibrate my pico board but i was delete [\list] of my json fileBTW @DirtDiggler2823 your second calibration point is way off i think :-/ , we'll see
That's what I got after sitting in the calibration fluid for about 20 minutes. I have more fluid to test with, but I need to get this process down first.BTW @DirtDiggler2823 your second calibration point is way off i think :-/ , we'll see
Going to give that a shot tomorrow@ranjib the [ \list] is an error? I calibrate my pico board but i was delete [\list] of my json file
I follow the instruccion: curl -d to get the cookie. Txt, an later curl - X Post, its work fine for my![]()
I think so, I am not sure if this is just formatting or typo issue with posting it in reef2reef thread or its actual file content. Hence I suggested cat and screenshot . Whatever it is, if we persevere we’ll pin it down@ranjib the [ \list] is an error? I calibrate my pico board but i was delete [\list] of my json file
I follow the instruccion: curl -d to get the cookie. Txt, an later curl - X Post, its work fine for my![]()
It’s so hard to guess that from online posts :/)Dont worry, it was a joke...
Awesome . So you got your ph setup calibrated ?@ranjib the [ \list] is an error? I calibrate my pico board but i was delete [\list] of my json file
I follow the instruccion: curl -d to get the cookie. Txt, an later curl - X Post, its work fine for my![]()
Yeah, its working fineAwesome . So you got your ph setup calibrated ?
Sweet :-) . Would love to see the ph graph if you can share, later sometimeYeah, its working fine
Awesome . So you got your ph setup calibrated ?
Yeah, its working fine
That will be awesome!Just got my tp-link smart plug working with some prototype code :) . Its been a much desired thing that i want to support, and a couple of other folks were trying to get it done as well. So if you are want to try it out, with next version of reef-pi 3.x release you should be able to use these
![]()
Got around to doing some tests. Here is the test setup.
2 x stepper pumps for fill and reagent, 1 x std dosing pump for drain. pH probe with atlas pH circuit, diy stirrer.
![]()
Set it to do 7 test over 5 hours. Testing natural seawater. Results in dKH:
6.991
6.949
6.894
6.910
6.891
6.883
6.889
Not to bad.
There is trend that when the test isn't run for 12 hours or more the first couple tests seem to read a little higher. Need to look into that a little further.
Very small sample size but looks promising.
Chris