This is what i try all day long.
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/