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
Hi all.
second post... first question:
Is it possible to connect the BS18B20 temperature sensor to the raspberry? which jumpers?
Check out the temperature controller guide in adafruit
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
PSA:
I've been fighting my temperature control on reef-pi for months. couldn't figure it out. It almost always would start working again after I power cycled the pi, but for an unknown amount of time; sometimes several seconds, others for hours. But within a day or two (most often an hour or two), all three sensors would crap the bed, getting errors in the admin tab that the file didn't exist. the chart would have a zero point at the end and stop tracking temperature data. When I'd go look, the dropdown to pick the sensor would be empty as if nothing was plugged in. Then I'd reboot and they'd (almost always) come back, but not for long.

I saw someone recently on this thread with somewhat similar issues and they found one sensor was bad (the issue went away with one unplugged). I pulled two yesterday and... lo and behold, it was still reading today. I turned it off tonight and plugged in one more. Within a few minutes, the old problem was back. I swapped the 'new' one for the third one and I'm still going well a few hours later.

So...if you have temp sensor issues in your reef-pi, it's likely a bad sensor and you can diagnose by pulling one at a time.

FYI: all using the @Michael Lane HAT
@Ranjib just FYI
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
In other news...I've never got email working with reef-pi. Currently getting this error when I try to send a test message after configuring as well as I can think to:
{"error":"Failed to delete. Error: 534 5.7.9 Application-specific password required. Learn more at\n5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor o73sm12993889pje.7 - gsmtp"} | HTTP 500

I copied the password out of lastpass, so I don't think it's that. port? config in my email account? I really want to do it with a '+reefpi' in the email address to help filter it, but I'll settle for almost anything...thoughts?

emailConfig.png
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
In other news...I've never got email working with reef-pi. Currently getting this error when I try to send a test message after configuring as well as I can think to:
{"error":"Failed to delete. Error: 534 5.7.9 Application-specific password required. Learn more at\n5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor o73sm12993889pje.7 - gsmtp"} | HTTP 500

I copied the password out of lastpass, so I don't think it's that. port? config in my email account? I really want to do it with a '+reefpi' in the email address to help filter it, but I'll settle for almost anything...thoughts?

emailConfig.png

If using Gmail with two-step verification on, you might need to use an App-specific password which you generate in your Google account Security Settings.
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
this
If using Gmail with two-step verification on, you might need to use an App-specific password which you generate in your Google account Security Settings.
looks like it's the story. It took a reboot of the pi after setting it, which was weird. but now I got my test message. Thanks!
 
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
If using Gmail with two-step verification on, you might need to use an App-specific password which you generate in your Google account Security Settings.
Yup, thats what the error is all about. Use application-specific password (link is in the adafruit first guide)
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
Yup, thats what the error is all about. Use application-specific password (link is in the adafruit first guide)
Kinda like the 'personal access token' you can use in GitHub and others, I suppose. Makes sense, I probably should have thought of it
 
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
PSA:
I've been fighting my temperature control on reef-pi for months. couldn't figure it out. It almost always would start working again after I power cycled the pi, but for an unknown amount of time; sometimes several seconds, others for hours. But within a day or two (most often an hour or two), all three sensors would crap the bed, getting errors in the admin tab that the file didn't exist. the chart would have a zero point at the end and stop tracking temperature data. When I'd go look, the dropdown to pick the sensor would be empty as if nothing was plugged in. Then I'd reboot and they'd (almost always) come back, but not for long.

I saw someone recently on this thread with somewhat similar issues and they found one sensor was bad (the issue went away with one unplugged). I pulled two yesterday and... lo and behold, it was still reading today. I turned it off tonight and plugged in one more. Within a few minutes, the old problem was back. I swapped the 'new' one for the third one and I'm still going well a few hours later.

So...if you have temp sensor issues in your reef-pi, it's likely a bad sensor and you can diagnose by pulling one at a time.

FYI: all using the @Michael Lane HAT
@Ranjib just FYI
Ack. Its kinda expected, since they are sharing one common bus, one bad sensor can impact the rest. I'll also search if we can safeguard this with some circuit modification
 

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
209
Reaction score
163
Rating - 0%
0   0   0
Hi all! Can I get calibration values from gui for ph probe exported? like in calibration json file. So if I delete ph, I can put callibration numbers in with command and using this json modified file? I recently recallibrated ph probe and now it goes from -3600, so graph is linear.. I would copy somehow this numbers and past them in json file... tnx
 
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
Hi all! Can I get calibration values from gui for ph probe exported? like in calibration json file. So if I delete ph, I can put callibration numbers in with command and using this json modified file? I recently recallibrated ph probe and now it goes from -3600, so graph is linear.. I would copy somehow this numbers and past them in json file... tnx
The ui directly don’t expose this value (something we should fix). You can get it via command line using api or if you use the JavaScript console in your web browser, under the network tab you’ll see the probe details (including calibration details) in reopened values when you click on ph tab
 

Freccialata

Community Member
View Badges
Joined
Jan 31, 2020
Messages
53
Reaction score
98
Location
Rome (Italy)
Rating - 0%
0   0   0
The DS18B20 connects to the Raspberry Pi using 3 of the pins: 3.3V (pin #1, top left. Only pin with a square solder pad on the back), ground (pin # 6, 9, 14, 20, 25, 30, 34, or 39, just pick one), & any of the GPIO pins. You only have to use one GPIO pin to connect as many sensors as you want, as they use the 1-wire interface.

Thank you for your answer. I will start playing with one temperature sensor next week. I will use 1-6-3.

So, If I would like to use another one sensor, I should connect it in 17-9-5... is it right?

Ph sensor needs 3.3V or 5V pin?
 
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
Thank you for your answer. I will start playing with one temperature sensor next week. I will use 1-6-3.

So, If I would like to use another one sensor, I should connect it in 17-9-5... is it right?

Ph sensor needs 3.3V or 5V pin?
5v
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,527
Reaction score
1,811
Location
RVA
Rating - 100%
1   0   0
So it's been about a week since pH calibration....now that I look at it, does it really stay this steady? Is this because I have an empty tank? Or is there something up...?

Screenshot_20200201-204721_Brave.jpg


The little spike was from having probe out of water to recolate. Otherwise it's between 8.36-8.41.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
So it's been about a week since pH calibration....now that I look at it, does it really stay this steady? Is this because I have an empty tank? Or is there something up...?

Screenshot_20200201-204721_Brave.jpg


The little spike was from having probe out of water to recolate. Otherwise it's between 8.36-8.41.
If nothings in the tank to change things it would stay that steady. My tank has a steady rise of .2 ph and a fall from the plants using co2. But the graph is still very steady with a slow rise as the light ramps up and a slow fall as it ramps bacl down.
 
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
Its not steady. its varying.. but the old values is making the chart y axis so large that the new calibrated values are not being visualized correctly. Bare with me, I'll list down the steps to use reef-pi db command to get rid of the old values,

  1. Stop reef-pi (sudo systemctl stop reef-pi.service)
  2. Use reef-pi db command to list the ph probes (sudo reef-pi db list phprobes). Obtain the probe id from here. For me it shows something like this
    Code:
    {
    "1": {
    "id": "1",
    "name": "TestPH",
    "enable": true,
    "period": 2,
    "analog_input": "1",
    "control": false,
    "notify": {
    "enable": false,
    "min": 0,
    "max": 0
    },
    "upper_eq": "",
    "downer_eq": "",
    "min": 0,
    "max": 0,
    "hysteresis": 0,
    "is_macro": false
    }
    }
  3. Notice my phprobe id is 1. Next use this id to obtain the ph readings values
    Code:
    sudo reef-pi db show ph_readings 1 > readings.json
    . This should dump the readings in readings.json file, edit to and remove all the bogus values (you'll see values in the range of 1000s (way outside 0-14), delete those.
  4. The reupload the file like this:
    Code:
     cat readings.json | sudo reef-pi db update ph_readings 1
  5. Start reef-pi again (sudo systemctl start reef-pi.service)
Thats it. your old data is gone now.. and the graph should automatically reset and show you the new values which should be in 5.5-10 range at worst, but with daily cycle.

For ease of editing i pass the reef-pi db output via jq command, it indents the json file , making it easy to read/edit.
To install jq command
Code:
sudo apt-get install jq
Then to use it execute the 3rd step like this:
Code:
sudo reef-pi db show ph_readings 1 | jq . | readings.json

Sorry for your trouble. Let me know if you try this and if it worked. Happy to helo you through this...
 
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
Its not steady. its varying.. but the old values is making the chart y axis so large that the new calibrated values are not being visualized correctly. Bare with me, I'll list down the steps to use reef-pi db command to get rid of the old values,

  1. Stop reef-pi (sudo systemctl stop reef-pi.service)
  2. Use reef-pi db command to list the ph probes (sudo reef-pi db list phprobes). Obtain the probe id from here. For me it shows something like this
    Code:
    {
    "1": {
    "id": "1",
    "name": "TestPH",
    "enable": true,
    "period": 2,
    "analog_input": "1",
    "control": false,
    "notify": {
    "enable": false,
    "min": 0,
    "max": 0
    },
    "upper_eq": "",
    "downer_eq": "",
    "min": 0,
    "max": 0,
    "hysteresis": 0,
    "is_macro": false
    }
    }
  3. Notice my phprobe id is 1. Next use this id to obtain the ph readings values
    Code:
    sudo reef-pi db show ph_readings 1 > readings.json
    . This should dump the readings in readings.json file, edit to and remove all the bogus values (you'll see values in the range of 1000s (way outside 0-14), delete those.
  4. The reupload the file like this:
    Code:
     cat readings.json | sudo reef-pi db update ph_readings 1
  5. Start reef-pi again (sudo systemctl start reef-pi.service)
Thats it. your old data is gone now.. and the graph should automatically reset and show you the new values which should be in 5.5-10 range at worst, but with daily cycle.

For ease of editing i pass the reef-pi db output via jq command, it indents the json file , making it easy to read/edit.
To install jq command
Code:
sudo apt-get install jq
Then to use it execute the 3rd step like this:
Code:
sudo reef-pi db show ph_readings 1 | jq . | readings.json

Sorry for your trouble. Let me know if you try this and if it worked. Happy to helo you through this...
@AbjectMaelstroM This was for you.. or anyone planning to remove bogus un-calibrated data. or sometimes bogus connectors/equipment with non-existing driver etc.. like the macro issue surfaced before. Definitely reef-pi should do a better job validating this and providing first-class user experience to address common issues (like the uncalibrated data), but that will take time (to implement and to detect) . The db command, on the other hand, is a general-purpose surgical tool to help us in such occasions, lets put it to test if possible.
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,527
Reaction score
1,811
Location
RVA
Rating - 100%
1   0   0
Its not steady. its varying.. but the old values is making the chart y axis so large that the new calibrated values are not being visualized correctly. Bare with me, I'll list down the steps to use reef-pi db command to get rid of the old values,

  1. Stop reef-pi (sudo systemctl stop reef-pi.service)
  2. Use reef-pi db command to list the ph probes (sudo reef-pi db list phprobes). Obtain the probe id from here. For me it shows something like this
    Code:
    {
    "1": {
    "id": "1",
    "name": "TestPH",
    "enable": true,
    "period": 2,
    "analog_input": "1",
    "control": false,
    "notify": {
    "enable": false,
    "min": 0,
    "max": 0
    },
    "upper_eq": "",
    "downer_eq": "",
    "min": 0,
    "max": 0,
    "hysteresis": 0,
    "is_macro": false
    }
    }
  3. Notice my phprobe id is 1. Next use this id to obtain the ph readings values
    Code:
    sudo reef-pi db show ph_readings 1 > readings.json
    . This should dump the readings in readings.json file, edit to and remove all the bogus values (you'll see values in the range of 1000s (way outside 0-14), delete those.
  4. The reupload the file like this:
    Code:
     cat readings.json | sudo reef-pi db update ph_readings 1
  5. Start reef-pi again (sudo systemctl start reef-pi.service)
Thats it. your old data is gone now.. and the graph should automatically reset and show you the new values which should be in 5.5-10 range at worst, but with daily cycle.

For ease of editing i pass the reef-pi db output via jq command, it indents the json file , making it easy to read/edit.
To install jq command
Code:
sudo apt-get install jq
Then to use it execute the 3rd step like this:
Code:
sudo reef-pi db show ph_readings 1 | jq . | readings.json

Sorry for your trouble. Let me know if you try this and if it worked. Happy to helo you through this...

Good deal! I'll give it a go tomorrow.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Thank you for your answer. I will start playing with one temperature sensor next week. I will use 1-6-3.

So, If I would like to use another one sensor, I should connect it in 17-9-5... is it right?

That would work! Just keep in mind when you're configuring Reef-Pi, that you need to enter the GPIO number, not the physical pin number. So your first sensor on pin 3 will be GPIO 2 (you'll enter 2 into Reef-Pi's configuration) & your second sensor will be GPIO 3 (you'll enter 3 into Reef-Pi's configuration).

1580617690801.png
 

stefanm

Active Member
View Badges
Joined
Oct 11, 2017
Messages
360
Reaction score
397
Location
Sweden
Rating - 0%
0   0   0
I've got my Reef-pi back up and running on v3.0 yesterday, my dosers are programmed to pump for 1 second every two hours, which they do. However the statistics on the dash board is telling a different story.

Screenshot_2020-02-01-18-29-17-398_com.android.chrome.jpg


Any solution for this?
 

Just grow it: Have you ever added CO2 to your reef tank?

  • I currently use a CO2 with my reef tank.

    Votes: 8 6.6%
  • I don’t currently use CO2 with my reef tank, but I have in the past.

    Votes: 5 4.1%
  • I have never used CO2 with my reef tank, but I plan to in the future.

    Votes: 5 4.1%
  • I have never used CO2 with my reef tank and have no plans to in the future.

    Votes: 98 80.3%
  • Other.

    Votes: 6 4.9%
Back
Top