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

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Just to repair my first Q: i2cdetect is working now BUT i got 3 addresses 0x40 ,0x70 ,and 5x45, how to figure out what is what?Thank you for your time and help.
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
It may help something:

Screenshot from 2019-08-01 09-43-56.png
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
Just to repair my first Q: i2cdetect is working now BUT i got 3 addresses 0x40 ,0x70 ,and 5x45, how to figure out what is what?Thank you for your time and help.

0x40 - pca9685 PWM chip normal address
0x70 - pca9685 PWM chip "All Call" address
0x45 - probably pH board with both jumpers connected [post edited for correction]

Addresses are usually specified in data sheets, but it's often easier to figure out by disconnecting components when working with modules.
 
Last edited:

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Thank you Michael i do not have 0x75 ,but on the PH board both jumper is on.What i have
0x40
0x70
and not sure 0x45 but the 45 is in the 5th line.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Testing out the new tplink drivers. Here is the chart for current draw from the heater that I used during new saltwater mix.

The resident current draw is 0.0169A, without any device attached to the outlet,
Screen Shot 2019-08-03 at 12.39.00 AM.png


when on the heater is drawing 0.111A .
Screen Shot 2019-08-03 at 12.33.25 AM.png


If I zoom in on the data, I can see some variation,
Screen Shot 2019-08-03 at 12.32.51 AM.png


At this point, I don't know how to interpret the data other than computing raw wattage and cross-check if that matches with the heater rating. I have a kill a watt, and I plan to do some cross-check with that as well. Being an analog input (exposed as ph probe) I should be able to apply one or two-point calibration if needed.
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Hi to all,why do i got unauthorized when i try to calibrate with curl? Thank you and this is the log:
03/08/2019, 18:48:40UIERROR{"error":"json: cannot unmarshal object into Go value of type []hal.Measurement"} | HTTP 400

Screenshot from 2019-08-03 18-45-56.png Screenshot from 2019-08-03 18-10-59.png
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi to all,why do i got unauthorized when i try to calibrate with curl? Thank you and this is the log:
03/08/2019, 18:48:40UIERROR{"error":"json: cannot unmarshal object into Go value of type []hal.Measurement"} | HTTP 400

Screenshot from 2019-08-03 18-45-56.png Screenshot from 2019-08-03 18-10-59.png
The error is confusing. You are not unauthorized, your request is failing because the api is wrong, theres no /api/calibrate , i think its /api/phprobes/{id}/calibrate (replace id with your phprobe id)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
The error is confusing. You are not unauthorized, your request is failing because the api is wrong, theres no /api/calibrate , i think its /api/phprobes/{id}/calibrate (replace id with your phprobe id)
For the non-existent /api/calibrate behavior, I just cross checked, with 2.4 I am not getting unuathorized error, I'm seeing 404 resource not found error, as expected
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Thank you Ranjib i try to copy paste everything from your earlier post and could not calibrate all day long.Deleted everything reinstalled and still not working. Followed your post and could not do.Could you redirect me to read something how to create that calibrate.json file? Why my try is always unauthorized ?
Screenshot from 2019-08-02 08-44-28.png
Screenshot from 2019-08-02 08-44-28.png
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
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/
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Why is the sign in is null,and the equipment []

Screenshot from 2019-08-03 21-04-50.png
"null" is ok. It does not mean anything is wrong, it means signin was successfull. [] stands for empty list in equipment, i.e. there is no equipment present yet
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Thank you Ranjib,so what is that mean?do i have the right setup for calibration?Where to save the calibration.json. Ask because when i try to calibrate i got error msg.:
TimeEmitterTypeContent
04/08/2019, 06:57:06UIERROR{"error":"json: cannot unmarshal object into Go value of type []hal.Measurement"} | HTTP 400

Screenshot from 2019-08-04 06-54-53.png
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
Thank you Ranjib,so what is that mean?do i have the right setup for calibration?Where to save the calibration.json. Ask because when i try to calibrate i got error msg.:
TimeEmitterTypeContent
04/08/2019, 06:57:06UIERROR{"error":"json: cannot unmarshal object into Go value of type []hal.Measurement"} | HTTP 400

Screenshot from 2019-08-04 06-54-53.png
I believe the unmarshal error is due to a typo in the original json example. [/LIST] should not be in the json.
Instead of
Code:
[/LIST]
[
 {"expected":8.21, "observed": -8768},
 {"expected":8.12, "observed": -8189}
]
Use this as a sample instead
Code:
[
 {"expected":8.21, "observed": -8768},
 {"expected":8.12, "observed": -8189}
]
 

PaulJ2303

Community Member
View Badges
Joined
Sep 30, 2018
Messages
76
Reaction score
172
Rating - 0%
0   0   0
Hello guy's

It's time i started to delve into the arcane world of dosing pumps.
I've seen some good individual 12v peristaltic pumps on ebay that i'd like to use.
does Reef-pi allow for the control of dosing pump's ? and if so is there a build guide anywhere

thanks for any help you guys can be.
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 26.6%
  • 100% dry rock + 100% live sand

    Votes: 48 33.6%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 32 22.4%
  • 75% live rock, 25% live sand

    Votes: 15 10.5%
  • 25% live rock, 75% live sand

    Votes: 10 7.0%
Back
Top