CLI returning null is ok and as expected . It means it’s working
ok, so what's the next step?
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.
CLI returning null is ok and as expected . It means it’s working
Null is ok . That’s not errror, you should see some text with cookie details in the cookie.txt file
now run the calibrationok, so what's the next step?
curl -X POST -d @calibration.json -b cookie.txt http://192.168/api/phprobes/1/calibrate
now run the calibration
Code:curl -X POST -d @calibration.json -b cookie.txt http://192.168/api/phprobes/1/calibrate
cat calibration.json
curl -X POST -d '{"user":"....", "password":"..."}' -c cookie.txt http://127.0.0.1/auth/signin
curl -X POST -d @calibration.json -b cookie.txt http://127.0.0.1/api/phprobes/1/calibrate
x.x.3.187 is the reef-pi, and 127.0.0.1 is local host from the reef-pi. x.x.3.229 is my PC.I see two different IPs, 192.168.3.187 and 192.168.3.229 , and only one of them is working 192.168.3.187 . Which one is correct? Lets not try both and test with only one . I notice 127.0.0.1 is working as well. These are all good signs. It means the API calls are wrong, lets fix that,
Can you share the content of the calibration file, it seems it has some bad data
Once the data is validated (i can audit it for you, just share it here), here is the command (change username/password)Code:cat calibration.json
Code:curl -X POST -d '{"user":"....", "password":"..."}' -c cookie.txt http://127.0.0.1/auth/signin curl -X POST -d @calibration.json -b cookie.txt http://127.0.0.1/api/phprobes/1/calibrate
I see two different IPs, 192.168.3.187 and 192.168.3.229 , and only one of them is working 192.168.3.187 . Which one is correct? Lets not try both and test with only one . I notice 127.0.0.1 is working as well. These are all good signs. It means the API calls are wrong, lets fix that,
Can you share the content of the calibration file, it seems it has some bad data
Once the data is validated (i can audit it for you, just share it here), here is the command (change username/password)Code:cat calibration.json
Code:curl -X POST -d '{"user":"....", "password":"..."}' -c cookie.txt http://127.0.0.1/auth/signin curl -X POST -d @calibration.json -b cookie.txt http://127.0.0.1/api/phprobes/1/calibrate
Just loaded 2.4 and all works, pwm bug gone!Hello friends,
I have just published two set of releases with few bug fixes, namely
- Disable ATO pump when alert level is breached
- Light charts on dashboard in auto-mode
- 0 & 100% pwm behavior when using pca9685 mnodules
The 2.4 release is a stable public release, and will not impact any existing 2.x installation, while the 3.0.0-alpha-2 is a pre-release not thoroughly field tested, but provides all the 3.0 intended features (ph driver, calibration, multiple pca9685 etc etc).
Releases can be found here: https://github.com/reef-pi/reef-pi/releases/
If you have saved the dB you had with 3.0 prereleases , you can use it with the new 3.0 prerelease without any issue . It should work out as wellJust loaded 2.4 and all works, pwm bug gone!
Lighting graphs now appear!
Now to save my 2.4 database just in case and load 3.0 again! If that tests out good, time to get a ph probe on the way!!!
Great job!!!
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