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

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
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,408
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,876
Reaction score
16,680
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,876
Reaction score
16,680
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,876
Reaction score
16,680
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

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
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,025
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

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
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?

 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Is it this one? I see they have two. When you power it up does it spin?


That's the one. Yes, it does one cycle on startup, then every 24 hours after that (Mode1) or a second feed 6 hours later (Mode 2).

So I control the on/off button and do a feed by turning on and then off and utilising this first "spin"
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
That's the one. Yes, it does one cycle on startup, then every 24 hours after that (Mode1) or a second feed 6 hours later (Mode 2).

So I control the on/off button and do a feed by turning on and then off and utilising this first "spin"

That makes it easier to use with controller than Eheim? Is it a good feeder? I'm guessing so. :)
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
That makes it easier to use with controller than Eheim. Is it a good feeder? I'm guessing so. :)

As far as "good" goes, I'm really not sure. I was given two of them of indeterminate age and the one I hacked seems to work just fine. The second one is for spares if I ever need them.
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
As far as "good" goes, I'm really not sure. I was given two of them of indeterminate age and the one I hacked seems to work just fine. The second one is for spares if I ever need them.

It's nice to have alternatives, this could be wired same way too so I guess not easier but one less wire.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
It's nice to have alternatives, this could be wired same way too so I guess not easier but one less wire.

I had the 4-core wire, so I decided to use 2 to power the unit and the other 2 bridge the switch and go to a spare relay. That way the relay doesn't actually supply power, just makes and breaks the switch connection.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,321
Location
Coatesville, Indiana
Rating - 0%
0   0   0
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` ?

I got that sorted.

Still not able to add "lights" to my dashboard though.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
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
It sounds like we need to implement a retry algorithm in reef-pi for network based drivers. Or maybe we need to check if the network is available prior to registering certain drivers.
 

NeonRabbit221B

2500 Club Member
View Badges
Joined
Jun 21, 2019
Messages
3,037
Reaction score
5,408
Location
Richmond, Va
Rating - 0%
0   0   0
I am still having issues with my ph circuit... I move the actually ezo chip to my other project and it was immediately found on i2c. I rewired the circuit again to rule out accidental grounds or other issues and it still doesn't show up on i2c. I still only have that stupid blue standby light... Could the isolator board be the culprit? Should I just wire it up as shown in the original guide?
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
148
Rating - 0%
0   0   0
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
Thanks for the help reloading works fine. I will just do that in the future as needed the wifi power strip only runs my mixing station and fan so I would rather not fail to boot pi because the network is down. The DJ power strips run everything else.
Thanks again
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 37 27.2%
  • 100% dry rock + 100% live sand

    Votes: 46 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 30 22.1%
  • 75% live rock, 25% live sand

    Votes: 13 9.6%
  • 25% live rock, 75% live sand

    Votes: 10 7.4%
Back
Top