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

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,077
Location
Gambrills
Rating - 0%
0   0   0
Got the probe working, which is nice, but the calibration part is kicking my behind. I have my values, but no idea how to get them into the reef-pi as I created the .json on my PC desktop, but the instructions are telling me it has to be downloaded from somewhere into the reef-pi. When I tried to use a json hosting site, the site told me the json was invalid, so I'm not sure how I'm supposed to complete this part of the build. If anyone knows how to do this, please let me/us know.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib @theatrus ,this .json file, where is it supposed to go once created? I created one on my desktop using notepad++, but I have no idea how to apply it to the reef-pi.
You need these commands to apply the calibration data:
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
I have described the process here
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Got the probe working, which is nice, but the calibration part is kicking my behind. I have my values, but no idea how to get them into the reef-pi as I created the .json on my PC desktop, but the instructions are telling me it has to be downloaded from somewhere into the reef-pi. When I tried to use a json hosting site, the site told me the json was invalid, so I'm not sure how I'm supposed to complete this part of the build. If anyone knows how to do this, please let me/us know.
Create the json file with notepad or anything you like. And use the curl command to apply it using the API, as i mentioned above. Keep me posted, happy to walk you through. Since this part is still not supported in UI, its bit tricky
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Any plans to give more options for the lighting part of this? i.e. 1hr / 30 min time slots - Storm mode etc etc :D :D
yes, but only after I fix the pwm frequency / 0-100 dimming issues. But this is on my next to do in terms of feature. We'll have this before the cluster manager
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
yes, but only after I fix the pwm frequency / 0-100 dimming issues. But this is on my next to do in terms of feature. We'll have this before the cluster manager
Did you look at what I found in the pca driver code...it was written backwards(full on and full off)...i think thats the bug

My tests show 1 to 99 percent work great,, frequency was good as well, it was just the full on and off which worked, but backwards. 0 was full on and 100 was full off
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
yes, but only after I fix the pwm frequency / 0-100 dimming issues. But this is on my next to do in terms of feature. We'll have this before the cluster manager
Storm mode is neat, but the finer control of the light takes the cake. Since I put my lighting on the pi and have a real sunrise and sunset, you can see fish behaviors that you never seen before, and dont startle the fish.
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,077
Location
Gambrills
Rating - 0%
0   0   0
Create the json file with notepad or anything you like. And use the curl command to apply it using the API, as i mentioned above. Keep me posted, happy to walk you through. Since this part is still not supported in UI, its bit tricky

I created the json, and I assume the IP is the IP for the machine the file is stored on? Where should the json be placed for the pi to fetch it?

cal fail 2.JPG
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I created the json, and I assume the IP is the IP for the machine the file is stored on? Where should the json be placed for the pi to fetch it?

cal fail 2.JPG
do you have creds.json file in the same place? whats the output of
Code:
ls -alh
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I created the json, and I assume the IP is the IP for the machine the file is stored on? Where should the json be placed for the pi to fetch it?

cal fail 2.JPG
the last command is correct, we'll use that one to apply your calibration data, lets just figure out why its empty or absent.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Did you look at what I found in the pca driver code...it was written backwards(full on and full off)...i think thats the bug

My tests show 1 to 99 percent work great,, frequency was good as well, it was just the full on and off which worked, but backwards. 0 was full on and 100 was full off
I read through your PM, but yet to look at the code,
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,077
Location
Gambrills
Rating - 0%
0   0   0
do you have creds.json file in the same place? whats the output of
Code:
ls -alh

I did not create any creds.json file. The calibration.json file is located on the desktop of my PC, not my raspberry pi. Do I need to place the json on the pi for this to work?

cal fail 3.JPG
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I did not create any creds.json file. The calibration.json file is located on the desktop of my PC, not my raspberry pi. Do I need to place the json on the pi for this to work?

cal fail 3.JPG
yes create the calibration file in raspberry pi, or run the command to update calibration from your laptop, where you have the file, it does not matter, the command and the file needs to be invoked from the same place
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,077
Location
Gambrills
Rating - 0%
0   0   0
yes create the calibration file in raspberry pi, or run the command to update calibration from your laptop, where you have the file, it does not matter, the command and the file needs to be invoked from the same place

I've been doing all of the work from my desktop PC using putty, and transferring files using filezilla. I am missing the knowledge on how to do this beyond copying and pasting your commands. From reading the commands, I can see that the pi is looking for an IP address, so I used the address of the PC I'm doing all the work from where the files are on my desktop. I created what I believe to be a creds file to use alongside the calibration file, but the error is the same. I've copied the files into the downloads folder on my pi for good measure.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I've been doing all of the work from my desktop PC using putty, and transferring files using filezilla. I am missing the knowledge on how to do this beyond copying and pasting your commands. From reading the commands, I can see that the pi is looking for an IP address, so I used the address of the PC I'm doing all the work from where the files are on my desktop. I created what I believe to be a creds file to use alongside the calibration file, but the error is the same. I've copied the files into the downloads folder on my pi for good measure.
Oops . my mistake., I confused the creds file with calibration file. Try this
Code:
curl -d '{"user":"reef-pi", "password":"reef-pi"}'  -X POST http://<IP>/auth/signin -c cookie.txt

Use the correct usename password, and use the exact quoting scheme. This is a simpler version of the same command, here instead of passing the json data from a file, we are just typing it out.
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,077
Location
Gambrills
Rating - 0%
0   0   0
Oops . my mistake., I confused the creds file with calibration file. Try this
Code:
curl -d '{"user":"reef-pi", "password":"reef-pi"}'  -X POST http://<IP>/auth/signin -c cookie.txt

Use the correct usename password, and use the exact quoting scheme. This is a simpler version of the same command, here instead of passing the json data from a file, we are just typing it out.

Connection is timing out. I'm putting the IP address of my PC into this command. That's the proper way, yes?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Connection is timing out. I'm putting the IP address of my PC into this command. That's the proper way, yes?
yes, so for you it should be
Code:
curl -X POST -d '{"user":"reef-pi", "password":"reef-pi"}'  http://192.168.3.229/auth/signin -c cookie.txt

if you are running from same pi, this should work as well
Code:
curl -X POST -d '{"user":"reef-pi", "password":"reef-pi"}'  http://127.0.0.1/auth/signin -c cookie.txt
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,077
Location
Gambrills
Rating - 0%
0   0   0
yes, so for you it should be
Code:
curl -X POST -d '{"user":"reef-pi", "password":"reef-pi"}'  http://192.168.3.229/auth/signin -c cookie.txt

if you are running from same pi, this should work as well
Code:
curl -X POST -d '{"user":"reef-pi", "password":"reef-pi"}'  http://127.0.0.1/auth/signin -c cookie.txt

Trying to retrieve from the pi gives me a null error, and trying to retrieve from the PC times out. Is there a specific location the files should be put in order for this to work? I apologize, but I am truly lost on this one.
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,077
Location
Gambrills
Rating - 0%
0   0   0
Trying to retrieve from the pi gives me a null error, and trying to retrieve from the PC times out. Is there a specific location the files should be put in order for this to work? I apologize, but I am truly lost on this one.

I will get back to this tomorrow
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Trying to retrieve from the pi gives me a null error, and trying to retrieve from the PC times out. Is there a specific location the files should be put in order for this to work? I apologize, but I am truly lost on this one.
dont worry, i'll guide you through this. you never have to apologize, im thankful that you are giving this a try. The first command, does not involve any file, can you share a screenshot of the output of this:
Code:
curl -X POST -d '{"user":"reef-pi", "password":"reef-pi"}'  http://192.168.3.229/auth/signin -c cookie.txt
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I will get back to this tomorrow
Ack. Lets do it as and when you have time. You should start observing the daily ph cycle irrespective of the calibration
 
Back
Top