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,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,075
Location
Gambrills
Rating - 0%
0   0   0
I calibrated against tank water directly , you can try ph 4, and 7 or 7 and 10. Any two known sample at the same temperature as your tank
Ok. I'll need the commands for calibration as well since I don't believe its built into the UI that works with the pico boards.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I tried updating the jack for the pwm light control and got this message, "{"error":"Failed to update. Error: write /sys/class/pwm/pwmchip0/pwm0/period: invalid argument"} | HTTP 500".

I think I had this same problem when I first installed reef-pi and I deleted the database to start over and didn't get the message the 2nd time but now it's showing up again.

EDIT:
Deleting database and starting over again.

EDIT 2:
Deleted database but still get same error when setting up jack. I selected rpi and tried to use pins "0,1".

EDIT:
Deleted database and re-installed with "sudo dpkg -i reef-pi-2.3-pi0.deb", same error. If I use pca9685 with "0,1" then I get no error.
If you are using the raspberry pi pins then install reef pi 2.2, if using the pca9685 use 2.3.

There was a frequency issue fixed for the pca9685 in 2.3 but the consensus is it broke the rasp pi pwm.
 

T-MIKE

Active Member
View Badges
Joined
Apr 4, 2019
Messages
152
Reaction score
84
Rating - 0%
0   0   0
If you are using the raspberry pi pins then install reef pi 2.2, if using the pca9685 use 2.3.

There was a frequency issue fixed for the pca9685 in 2.3 but the consensus is it broke the rasp pi pwm.

Ah thanks! I did not see that post. By the way, do you know if the frequency on the UI is in Hz or kHz?
 

T-MIKE

Active Member
View Badges
Joined
Apr 4, 2019
Messages
152
Reaction score
84
Rating - 0%
0   0   0
The light arrived today and it is actually PWM controlled so it will work much easier with reef-pi. The PWM signal is generated by a NE555 chip.

The WiFi version is $40 more which I think is worth the money but I already got it so will be using reef-pi with it.

8BB3E8E7-30A8-405C-A33F-24AAD7A38CFC.jpeg
1A591EDA-11EA-436A-BE37-ABDCDE8DA621.jpeg
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ok. I'll need the commands for calibration as well since I don't believe its built into the UI that works with the pico boards.
Sure. Here is the rundown of calibration:
1) Setup the ph probe by creating a new driver in configuration -> drivers, specify ph-board as type and number of channels 0, i2c address 64. Create an analog input under Configuration -> connectors and associate the new driver, pin 0 with it. Create a new ph monitor and associate the analog input with it. Enable it. At this point you'll start seeing ph readings, usually in the range of -8K.
2) Keep your probe in reference solution(s) and note down the reading. Create a file named calibration.json with observed and expected values. For me it was like this:
Code:
[
 {"expected":8.21, "observed": -8768},
 {"expected":8.12, "observed": -8189}
]
Note: i used my tanks water (i.e. probe hooked up to tank) and hanna ph checker for my calibration. All we need is one or two set of points each specifying expected vs observed value
3) Disable the probe. Apply calibration using api. Since reef-pi uses cookie for session based authentication, first we'll signin and save the cookie via api, and then use the cookie to make calibration api request with the json file
Code:
curl -c cookie.txt -X POST -d '{"user":"reef-pi","password":"reef-pi"}' http://<IP>/auth/signin
curl -b cookie.txt -X POST -d @calibration.json http://<IP>/api/phprobes/1/calibrate
4) Enable the ph monitor via ui

you'll need a build from master. You know how to do that? or want me to publish one?
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,075
Location
Gambrills
Rating - 0%
0   0   0
Sure. Here is the rundown of calibration:
1) Setup the ph probe by creating a new driver in configuration -> drivers, specify ph-board as type and number of channels 0, i2c address 64. Create an analog input under Configuration -> connectors and associate the new driver, pin 0 with it. Create a new ph monitor and associate the analog input with it. Enable it. At this point you'll start seeing ph readings, usually in the range of -8K.
2) Keep your probe in reference solution(s) and note down the reading. Create a file named calibration.json with observed and expected values. For me it was like this:
Code:
[
 {"expected":8.21, "observed": -8768},
 {"expected":8.12, "observed": -8189}
]
Note: i used my tanks water (i.e. probe hooked up to tank) and hanna ph checker for my calibration. All we need is one or two set of points each specifying expected vs observed value
3) Disable the probe. Apply calibration using api. Since reef-pi uses cookie for session based authentication, first we'll signin and save the cookie via api, and then use the cookie to make calibration api request with the json file
Code:
curl -c cookie.txt -X POST -d '{"user":"reef-pi","password":"reef-pi"}' http://<IP>/auth/signin
curl -b cookie.txt -X POST -d @calibration.json http://<IP>/api/phprobes/1/calibrate
4) Enable the ph monitor via ui

you'll need a build from master. You know how to do that? or want me to publish one?
We may need to pursue that. I probably won't be the only pico board user who needs help with this. Going to purchase calibration solution and a probe now.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
We may need to pursue that. I probably won't be the only pico board user who needs help with this. Going to purchase calibration solution and a probe now.
you are using pico board? My instruction was for ph board.
I'll update the pico board thread with ph probe specific instruction, we can cross post here :)
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,075
Location
Gambrills
Rating - 0%
0   0   0
you are using pico board? My instruction was for ph board.
I'll update the pico board thread with ph probe specific instruction, we can cross post here :)
Super. Yes, I'm using a pico board, and I have the board with the updated driver on it.
 

T-MIKE

Active Member
View Badges
Joined
Apr 4, 2019
Messages
152
Reaction score
84
Rating - 0%
0   0   0
The above frequencies I got with the rpi hardware pwm output. I had trouble composing a reply earlier but the frequency setting goes in the wrong direction.

@Ranjib I installed drive and it works with my google account now but I'm still getting the drive is not in path error. Could you show me how to fix that? It's odd because I can run drive from other directories but reef-pi can't it seems. Thank you.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,345
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
We have had bad storms and tornadoes come through last night, not sure if power glitched but this morning I am getting bombarded with temp sensor emails. I have three probes and I am getting the same message for all three.

Code:
Temperature sensor failure. Error:open /sys/bus/w1/devices/28-00000a9aeb40/w1_slave: no such file or directory

Unfortunately I do not always look at my email before leaving and was already at work when I noticed the emails. I guess on the bright side if I am getting emails reef-pi is up but not sure why or how all the temp sensors went sideways. Thinking of having the wife reboot reef-pi but would probably like to see the state it's in before doing that. It's really warm so I don't have to worry about the heaters but have no failsafe since the probes are down.

Any suggestions on looking at post mortem besides logging etc to figure out what happened let me know.

Thanks :)
 

T-MIKE

Active Member
View Badges
Joined
Apr 4, 2019
Messages
152
Reaction score
84
Rating - 0%
0   0   0
@Ranjib Does the go path have to be "\home\pi\gopath"? I have it set to "\home\pi\go" but reef-pi can't find drive for some reason even though I can run it anywhere else it seems.

I tried running the command that it says it was having an error:

drive push -quiet -destination reef-pi-images -files /var/lib/reef-pi/images/08-32-19-Thu-May-23-2019.png

no drive context found; run `drive init` or go into one of the directories (sub directories) that you performed `drive init`

I did "drive about" and it shows my gdrive information but it still gives me that error.

Update:
It seems you need the -m option then it will work, like "pi@reef-pi:~/gdrive $ drive push -m /var/lib/reef-pi/images/08-32-19-Thu-May-23-2019.png".

I also tried drive init in /var/lib/reef-pi/images but it says permission denied so I tried sudo drive init but then it says sudo: drive: command not found.

Update 2:
So the root didn't have the path for go. Fixed that by running "sudo ~/go/bin/drive init" in /var/lib/reef-pi/images. Then I had to change the folder permissions by running "sudo chown -R $USER images" in /var/lib/reef-pi.
 
Last edited:

T-MIKE

Active Member
View Badges
Joined
Apr 4, 2019
Messages
152
Reaction score
84
Rating - 0%
0   0   0
OK, don't perform the second part of update 2 if anyone else is having this problem. You will still most likely need to run "drive init" in /var/lib/reef-pi/images but you do not need to change the permissions.

The way to fix this is when you declare the go path to not set it only for your profile. So just run something like this: "echo 'export GOPATH=$HOME/go'" and echo 'PATH="$HOME/go/bin:$PATH"'.

Well, after all that and a reboot I still get the same error that it can't find the executable.

sudo echo $PATH
/home/pi/go/bin:/home/pi/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin
 
Last edited:

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 41 16.3%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 15 6.0%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.4%
  • I wear reef gear primarily to relax where I live.

    Votes: 30 12.0%
  • I don’t wear gear from reef brands.

    Votes: 145 57.8%
  • Other.

    Votes: 19 7.6%
Back
Top