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

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,241
Location
Columbia MD
Rating - 0%
0   0   0
Here's some images I made up a while ago showing how to do it. You can use any logic level mosfet, the green line in 1st image goes to any I/O pin on the Pi. The blue line is what solders to the Eheim PCB.

To run in Reef-pi add an 'outlet' connector for that pin and setup the feeder as a piece of 'equipment'. Then setup a timer and set it to turn off after 1 second. This will be the same as you pressing the manual feed button for one second.

Base = Gate
Collector = Drain
Emitter = Source

Feeder_NPN.jpg

feeder1.jpg

feeder2.jpg

this is perfect! I already have the transistor in place powering some relays I don’t use any more so all I need to do is run the wires.
 

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
209
Reaction score
163
Rating - 0%
0   0   0
Ranjib I have found it under home/pi not under var/lib/reef-pi..
This are commands I used for my and others future reference:

sudo systemctl stop reef-pi.service
sudo reef-pi db list ato
reef-pi db -output reef-pi.db show ato_usage 1 | jq . > usage.json

Then modify file under home/pi

cat usage.json | sudo reef-pi db update ato_usage 1
sudo systemctl start reef-pi.service




Capture.PNG
 
Last edited:

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,384
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Getting quite a bit of these messages:


Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:29:56
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Getting quite a bit of these messages:


Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:29:56
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

Mar 22 14:26:55
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}
This is normal if you have alot of things set up in reef pi. You get 10 free feeds with a free adafruit io account and so many feeds per minute. If you go over this amount adafruit ignores the feeds and may not accept them.
As of this time there is no way to decide which feeds get sent as reef pi sets them up automatically. one thing you can do is not set up monitoring with small intervals which would cause you to exceed the number of feeds per minute.
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
Hello everyone. I have a question with the hs300. If power goes out it will not reconnect with reef-pi. I can still use my phone to operate it just fine. I locked the IP address on the hs300 but every time I power the PI off then back on it gives me a connector error in reef-pi when I try and turn the equipment on. I have to delete the whole thing working backwards if I dont first delete the equipment then the connectors then the driver it locks me out of the connectors screen and I get this error. Has anyone else had this issue and knows of a fix? Thanks for the help

20200322_202708.jpg
 

NeonRabbit221B

2500 Club Member
View Badges
Joined
Jun 21, 2019
Messages
3,037
Reaction score
5,610
Location
Richmond, Va
Rating - 0%
0   0   0
Question... Was working on getting my ph sensor working after combining my dosing reef-pi build with my first reef-pi build. I got it to work, calibrated it and connected my dosing setup and pca9685 when I wasn't able to set my dosing working. I found a missing connection in my soldering ( can't remember which one) , resoldered it and got the dosing setup working. Now my pH probe isn't found by i2cdetect.

I checked wiring and completely redid it twice... (5V to 5V, SDA to SDA, SCL to SCL and Gnd to Gnd) using the isolator board. It seems I have continuity between all connections (0 ohms) and when plugged in the standby blue led it always on, voltages across ground and 5V check out and my SDA and SCL were around 3.6V. Still can't see it on reef-pi or through console on i2cdetect... Any ides on what I should try?
 

Badfish2too

Community Member
View Badges
Joined
Nov 12, 2018
Messages
83
Reaction score
66
Rating - 0%
0   0   0
Question... Was working on getting my ph sensor working after combining my dosing reef-pi build with my first reef-pi build. I got it to work, calibrated it and connected my dosing setup and pca9685 when I wasn't able to set my dosing working. I found a missing connection in my soldering ( can't remember which one) , resoldered it and got the dosing setup working. Now my pH probe isn't found by i2cdetect.

I checked wiring and completely redid it twice... (5V to 5V, SDA to SDA, SCL to SCL and Gnd to Gnd) using the isolator board. It seems I have continuity between all connections (0 ohms) and when plugged in the standby blue led it always on, voltages across ground and 5V check out and my SDA and SCL were around 3.6V. Still can't see it on reef-pi or through console on i2cdetect... Any ides on what I should try?
What version are you running?
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Question... Was working on getting my ph sensor working after combining my dosing reef-pi build with my first reef-pi build. I got it to work, calibrated it and connected my dosing setup and pca9685 when I wasn't able to set my dosing working. I found a missing connection in my soldering ( can't remember which one) , resoldered it and got the dosing setup working. Now my pH probe isn't found by i2cdetect.

I checked wiring and completely redid it twice... (5V to 5V, SDA to SDA, SCL to SCL and Gnd to Gnd) using the isolator board. It seems I have continuity between all connections (0 ohms) and when plugged in the standby blue led it always on, voltages across ground and 5V check out and my SDA and SCL were around 3.6V. Still can't see it on reef-pi or through console on i2cdetect... Any ides on what I should try?
What address is the pca board? And what address is the ph isolator board? If they are the same you may not see one on the bus.
Also try one thing at a time...disconnect the pca and try the ph board alone...does it show up? Do the same with the pca9685. Are you feeding the i2c thru the pca9685? Maybe something on the feed thru is messed up.
 

NeonRabbit221B

2500 Club Member
View Badges
Joined
Jun 21, 2019
Messages
3,037
Reaction score
5,610
Location
Richmond, Va
Rating - 0%
0   0   0
What version are you running?

3.3.1

What address is the pca board? And what address is the ph isolator board? If they are the same you may not see one on the bus.
Also try one thing at a time...disconnect the pca and try the ph board alone...does it show up? Do the same with the pca9685. Are you feeding the i2c thru the pca9685? Maybe something on the feed thru is messed up.
Disconnecting the PCA and dosing setup I do not see any address from the ph board.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
3.3.1


Disconnecting the PCA and dosing setup I do not see any address from the ph board.
If its not showing in i2c detect that sounds like an external wiring issue or the ph board is not working correctly. Check over everything carefully...make sure an errant blob of solder didnt go somewhere it shouldnt have or something similar
 

NeonRabbit221B

2500 Club Member
View Badges
Joined
Jun 21, 2019
Messages
3,037
Reaction score
5,610
Location
Richmond, Va
Rating - 0%
0   0   0
So decided to check if my dosing system was still able to be detected on i2c and kabam the pH board can be detected now. Still can't get it showing up on reef-pi. I2c shows it at the address 0x70 which is 112 in decimal. Changed the address and rebooted but still nothing.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
So decided to check if my dosing system was still able to be detected on i2c and kabam the pH board can be detected now. Still can't get it showing up on reef-pi. I2c shows it at the address 0x70 which is 112 in decimal. Changed the address and rebooted but still nothing.
Address 0x70 is the pca9685...it has 2 i2c addresses. One is normal use and the 0x70 address is an address used to call commands to all the 16 channels at once

So you still dont have a ph address.
 

NeonRabbit221B

2500 Club Member
View Badges
Joined
Jun 21, 2019
Messages
3,037
Reaction score
5,610
Location
Richmond, Va
Rating - 0%
0   0   0
Address 0x70 is the pca9685...it has 2 i2c addresses. One is normal use and the 0x70 address is an address used to call commands to all the 16 channels at once

So you still dont have a ph address.
Weird that the 0x70 address didn't show up before this... Double checked my wiring and I don't see anything. If using the isolator board are the 4.7K pull ups needed for sda and scl? Based on the datasheet i thought they are included but maybe not. I appreciate your help!
 
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
Hello everyone. I have a question with the hs300. If power goes out it will not reconnect with reef-pi. I can still use my phone to operate it just fine. I locked the IP address on the hs300 but every time I power the PI off then back on it gives me a connector error in reef-pi when I try and turn the equipment on. I have to delete the whole thing working backwards if I dont first delete the equipment then the connectors then the driver it locks me out of the connectors screen and I get this error. Has anyone else had this issue and knows of a fix? Thanks for the help

20200322_202708.jpg
I think i know whats happening. When you reboot, reef-pi starts before network is online, as a result when reef-pi starts and connects to hs300 it fails (since network is not up yet). If you reload reef-pi without pi rebooting, it should fix it. If you want to make it full proof , i.e. when reboot happens reef-pi does not start before network comes online, update /lib/systemd/system/reef-pi.service like this (notice the after and wants directive). This will ensure reef-pi is started only after network is up. Reboot your pi to verify this works. Note, this also mean if by any chance your network is down, and pi reboots, reef-pi will not start. This is the reason we dont ship with this settings. I am working on to make things like this (configurations beyond reef-pi, but related to the underlying pi itself) user configurable in near future,.

Code:
[Unit]
Description=raspberry pi based reef tank controller
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/bin/reef-pi daemon -config /etc/reef-pi/config.yml
WorkingDirectory=/var/lib/reef-pi
Restart=always
RestartSec=90
StartLimitInterval=400
StartLimitBurst=10

[Install]
WantedBy=multi-user.target
 
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
Ranjib I have found it under home/pi not under var/lib/reef-pi..
This are commands I used for my and others future reference:

sudo systemctl stop reef-pi.service
sudo reef-pi db list ato
reef-pi db -output reef-pi.db show ato_usage 1 | jq . > usage.json

Then modify file under home/pi

cat usage.json | sudo reef-pi db update ato_usage 1
sudo systemctl start reef-pi.service




Capture.PNG
so your issue was resolved ?
 
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
IPv6 is disabled on the pi and have never been turned on my router as my provider does not support it.
Hmm.. i dont know what next step should be. This is not something related to reef-pi, its the underlying networking setup. If I had physical access i would do some network troubleshooting. Are you running stock raspbian? Any changes you made. Whats the output of `ip a s` ?
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Nice.

This is what I hoped to accomplish with my Juwel feeder, but with that you can't turn off the feeding schedule, so my only work-around was to turn the unit on and off.

I can't find the post, but there was someone (from Europe I think) that posted about setting up a reef-pi for his setup (I think it was a freshwater setup) and he got an autofeeder to work as well. I think it was an Eheim and and he got reef-pi to activate the manual button.

The signal connection on the Eheim goes to the manual button, when pressed it bridges a ground which starts the feeder. It's the same as touching the switch with a ground wire momentarily. I'm guessing any feeder with a manual button works the same, volt meter will tell. A long time ago I had the Eheim basically turn on/off until someone pointed this out to me which is better but yeah guess it won't work for you.

this is perfect! I already have the transistor in place powering some relays I don’t use any more so all I need to do is run the wires.

Nice, that'll make life easier.
 

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
The signal connection on the Eheim goes to the manual button, when pressed it bridges a ground which starts the feeder. It's the same as touching the switch with a ground wire momentarily. I'm guessing any feeder with a manual button works the same, volt meter will tell. A long time ago I had the Eheim basically turn on/off until someone pointed this out to me which is better but yeah guess it won't work for you.



Nice, that'll make life easier.

Yip. The manual button on the Juwel works exactly the same way, and is how I was hoping to use it, but the Juwel being a "cheaper"-type unit doesn't have the more complex programming functions of the Eheim.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Yip. The manual button on the Juwel works exactly the same way, and is how I was hoping to use it, but the Juwel being a "cheaper"-type unit doesn't have the more complex programming functions of the Eheim.

Is it this one? I see they have two. When you power it up does it spin?

 

Making aqua concoctions: Have you ever tried the Reef Moonshiner Method?

  • I currently use the moonshiner method.

    Votes: 39 19.7%
  • I don’t currently use the moonshiner method, but I have in the past.

    Votes: 3 1.5%
  • I have not used the moonshiner method.

    Votes: 147 74.2%
  • Other.

    Votes: 9 4.5%
Back
Top