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

OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
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,825
Reaction score
17,041
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,825
Reaction score
17,041
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,123
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.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0

bala murugan 00500

Community Member
View Badges
Joined
Oct 16, 2018
Messages
34
Reaction score
90
Location
coimbatore ,India
Rating - 0%
0   0   0
Finally, i spend some time on the pi pwm frequency issue with 2.4 release. There was a nasty bug that i had overlooked, I feel really sorry about the users as 2.4 is was supposed to fix pwm issues on pi. I'll publish a bug fix 2.5 version as soon as possible. probably tonight

any update on 2.5 version
 

PaulJ2303

Community Member
View Badges
Joined
Sep 30, 2018
Messages
76
Reaction score
172
Rating - 0%
0   0   0
It can definitely be all on the same pi. Just apply the doser steps to the pi that's already set up.
Thanks Michael, although i'm enjoying this build I'm coming at it from a complete beginner to electronics so please bear with me.
I've only got as far as setting up the temperature sensor on a pi 3b+ using the perma proto hat.
Looking at the fritzing diagrams for the power controller and the dosing pumps side by side there doesn't seems to be enough room to fit both ? or am i looking at it wrong (likely)

apologies for the really newb questions.

also can i use 3 dosing pumps instead of the stated 2?
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Thanks Michael, although i'm enjoying this build I'm coming at it from a complete beginner to electronics so please bear with me.
I've only got as far as setting up the temperature sensor on a pi 3b+ using the perma proto hat.
Looking at the fritzing diagrams for the power controller and the dosing pumps side by side there doesn't seems to be enough room to fit both ? or am i looking at it wrong (likely)

apologies for the really newb questions.

also can i use 3 dosing pumps instead of the stated 2?
reef-pi can definitely handle temperature and 3 dosing pumps. I'm using 3 dosing pumps and 5 channels of LEDs along with temperature, pH, and 16 outlets all on one reef-pi. I'm going to add 4 more dosing pumps soon.

It might help if you start a separate thread for your reef-pi build. That way things won't get lost in the sea of this thread. If you start a thread, feel free to tag me and I can help with specific advice.
 

PaulJ2303

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

Mad_Deuce

New Member
View Badges
Joined
Sep 16, 2014
Messages
16
Reaction score
9
Rating - 0%
0   0   0
Hi all I'm in the plan to build a DC only pico tank pi control. My think will be using the below equipment. The goal is to keep the control board as clean and plug and play as possible. I have selected some parts and need some help to see if it will work?

Tank equipment:

On/off and PWM control equipments
Light: Kessil A80 24v, 16w, 0 - 10v pwm
Return pump: Jabeo DC 650 Nano 24v, 8W, 0-5 PWM (I think) control

On/Off only
Filter pump: Mini DC pump 12v, 6w
Heater: DC Heating pad 24v, 15w
Peltier chiller: 12v, 100w, I have an stand alone tec PID controller.
Peltier Fan 2x: 12v, 0.15w total
Couple of mini Led indicator: 5v to 12v

Sensor:
3x Temperature probe (1 tank, 1 hot side of peltier, 1 ambient)
1 mini float switch SMD Fluid Controls FS25 (I'm manually do ato so I just need the float switch to turn on an led once it reach the level)

Power supply:
12v 195w meanwell waterproof power supply

PI equipments:
PI 4 Or Pi zero W
2x LM2596 (5v and 10v convertion)
1x Single power relay for the peltier
1x Pimoroni automation hat (for all 24v and 5 to 12v equipments)
1x Adafruit 16-Channel PWM / Servo HAT (no sure if both of these hat will stack will together yet or not)

Since everything is low voltage I'm not planning using AC outlet. All equipment will be directly connected to the controller board.

Other optional features:
2x Kamoer x1 doser running awc. I not looking to control it but if I can build something in to read the current draw when it's on will be nice. I know the dosing time per cycle. My thinking is put an time limiter on it for backup just in case the doser malfunction.
 

A worm with high fashion and practical utility: Have you ever kept feather dusters in your reef aquarium?

  • I currently have feather dusters in my tank.

    Votes: 71 37.8%
  • Not currently, but I have had feather dusters in my tank in the past.

    Votes: 63 33.5%
  • I have not had feather dusters, but I hope to in the future.

    Votes: 25 13.3%
  • I have no plans to have feather dusters in my tank.

    Votes: 28 14.9%
  • Other.

    Votes: 1 0.5%
Back
Top