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
OK .. I broke it again.
I unplugged everything to reorganize wiring . Pi was shut off. I had forgotten some of the Connectors gpio numbers so i started the pi , Started reef-pi and nothing was showing in any tab . I went to settings and every update button was in red. When i tried to click on one nothing would happen.
So I wiped the pi . reinstalled fresh ..
Complete new setup . Went into settings to change user name and Same thing..

here is the error log.
Apr 21 18:53:38 raspberrypi systemd[1]: reef-pi.service: Service hold-off time over, scheduling restart.
Apr 21 18:53:38 raspberrypi systemd[1]: Stopped raspberry pi based reef tank controller.
Apr 21 18:53:38 raspberrypi systemd[1]: Started raspberry pi based reef tank controller.
Apr 21 18:53:38 raspberrypi reef-pi[3160]: 2018/04/21 18:53:38 DB: reef-pi.db
Apr 21 18:53:38 raspberrypi reef-pi[3160]: 2018/04/21 18:53:38 ERROR: Failed to initialize pca9685 driver
Apr 21 18:53:38 raspberrypi reef-pi[3160]: 2018/04/21 18:53:38 ERROR: Failed to initialize controller. Error:remote I/O error
Apr 21 18:53:38 raspberrypi systemd[1]: reef-pi.service: Main process exited, code=exited, status=1/FAILURE
Apr 21 18:53:38 raspberrypi systemd[1]: reef-pi.service: Unit entered failed state.
Apr 21 18:53:38 raspberrypi systemd[1]: reef-pi.service: Failed with result 'exit-code'.

Now if i try to log in i get this from browser

This site cant be reached.
I am not sure what i am doing to break it.. But i assume installing everything again would do the same...


Please help...
do you have pca9685 wired ? i2c configured ?
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
do you have pca9685 wired ? i2c configured ?
Not at all. Nothing was connected to the pi except the relay gpio wires.

This morning i did have pca9685 wired and working perfectly. Testing it with 10w rgb leds on 3 channels...

This all started when i unhooked things... Apparently it was looking for something i unplugged.. So i just wiped and started over.. Wiping sd card and all..
when it rebooted into reef-pi after fresh install I went into settings to change username and It crashed out... no connectors or jacks was configured
 
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
Not at all. Nothing was connected to the pi except the relay gpio wires.
Did you enable the pca9685 by any chance ? From the error it looks like reef-pi is trying to initialize the pca9685 driver and failing on that. I would suggest nuke the db and start over
 
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
Did you enable the pca9685 by any chance ? From the error it looks like reef-pi is trying to initialize the pca9685 driver and failing on that. I would suggest nuke the db and start over
Or enable i2c, connect pca9685 and then restart reef-pi service
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
Or enable i2c, connect pca9685 and then restart reef-pi service
I tried the db refresh from the troubleshooting .

sudo systemctl stop reef-pi.service
sudo rm -rf /var/lib/reef-pi/reef-pi.dbsudo
sudo systemctl start reef-pi.service

with no luck..
then i tried this
sudo apt-get remove reef-pi -y -f --purge

then reinstalled and same thing....

is there a file to see what is turned on and not ... ?
 
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
I tried the db refresh from the troubleshooting .

sudo systemctl stop reef-pi.service
sudo rm -rf /var/lib/reef-pi/reef-pi.dbsudo
sudo systemctl start reef-pi.service

with no luck..
then i tried this
sudo apt-get remove reef-pi -y -f --purge

then reinstalled and same thing....

is there a file to see what is turned on and not ... ?
all those settings are store in db. So if the db is gone all settings are gone too, and that should return things to normal settings.
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
all those settings are store in db. So if the db is gone all settings are gone too, and that should return things to normal settings.
I feel really stupid.... The issue was a bad jumper pin to ground on the servo board . when reef-pi was loading its driver of course if the board is not powered on its not going to ..

Thank you again
I am going to try and post a pic or so of my so far setup .
 

jcmental

Active Member
View Badges
Joined
Jan 25, 2018
Messages
114
Reaction score
137
Rating - 0%
0   0   0
Morning chaps/etts
I have finally got around to installing my pi on to my new setup. I am using a RP 7" touch screen as my interface but I have a slight problem. the only place I could mount it was on the side panel of the tank cupboard. this is right next to the settee (Couch in US I think) this leaves it exposed to possible elbow touching or worse still the kids playing with it.
Is there a way to lock the pi so you need to put a password in to log on to it. like say on a pc where you need to enter a password after a shutdown or it comes out of sleep? Please
 

James Golden

Community Member
View Badges
Joined
Apr 8, 2018
Messages
44
Reaction score
55
Rating - 0%
0   0   0
Ok, for iPhone, iPad users(sorry android users don’t know if there is an app like this) just found an app for the pi that is pretty cool and helps with Reef -Pi! It is called SimplePi and it is a paid app, not much. I already hav it setup to update, then upgrade the pi with two clicks. If needed, stop reef pi service erase db then start it again with one click. There is also one to remove reef pi for an upgrade then another to download and install the new one(you do have to put in the current version). It’s a time saver for me. Next I will try using the api commands to re-install the relay etc after a dB wipe and see how that goes.
Ok, using the CURL commands and this works great. Made a test outlet, then test equipment and it worked perfectly, @Ranjib you are the boss man! The api and curl commands work great! Since the outlets will stay the same on my system, after a dB wipe no more typing in and trying to remember what went where. Just a few clicks and that will be all done now!!!!
 
Last edited:

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
Morning chaps/etts
I have finally got around to installing my pi on to my new setup. I am using a RP 7" touch screen as my interface but I have a slight problem. the only place I could mount it was on the side panel of the tank cupboard. this is right next to the settee (Couch in US I think) this leaves it exposed to possible elbow touching or worse still the kids playing with it.
Is there a way to lock the pi so you need to put a password in to log on to it. like say on a pc where you need to enter a password after a shutdown or it comes out of sleep? Please
I done a quick search to get this product.. They make them in different sizes

https://www.amazon.com/Honeywell-CG...TF8&qid=1524403812&sr=8-6&keywords=lock+cover

This will protect the software and the display from physical damage
 
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
Morning chaps/etts
I have finally got around to installing my pi on to my new setup. I am using a RP 7" touch screen as my interface but I have a slight problem. the only place I could mount it was on the side panel of the tank cupboard. this is right next to the settee (Couch in US I think) this leaves it exposed to possible elbow touching or worse still the kids playing with it.
Is there a way to lock the pi so you need to put a password in to log on to it. like say on a pc where you need to enter a password after a shutdown or it comes out of sleep? Please
Pi is same as a PC. You can do a screen saver with password protection, that will auto kick in if no one is using it. You can also explicitly log out after you are done.
I dont know if you can configure it to show the dashboard but locked , i have to research a bit on that
 
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, for iPhone, iPad users(sorry android users don’t know if there is an app like this) just found an app for the pi that is pretty cool and helps with Reef -Pi! It is called SimplePi and it is a paid app, not much. I already hav it setup to update, then upgrade the pi with two clicks. If needed, stop reef pi service erase db then start it again with one click. There is also one to remove reef pi for an upgrade then another to download and install the new one(you do have to put in the current version). It’s a time saver for me. Next I will try using the api commands to re-install the relay etc after a dB wipe and see how that goes.
Ok, using the CURL commands and this works great. Made a test outlet, then test equipment and it worked perfectly, @Ranjib you are the boss man! The api and curl commands work great! Since the outlets will stay the same on my system, after a dB wipe no more typing in and trying to remember what went where. Just a few clicks and that will be all done now!!!!
The entire UI is driven by API. reef-pi is API first system (UI second) :) . You should be able to control it from anything that allows making http calls
 

jcmental

Active Member
View Badges
Joined
Jan 25, 2018
Messages
114
Reaction score
137
Rating - 0%
0   0   0
DE355319-D901-41EA-9016-84DA008DC370.jpeg
I done a quick search to get this product.. They make them in different sizes

https://www.amazon.com/Honeywell-CG...TF8&qid=1524403812&sr=8-6&keywords=lock+cover

This will protect the software and the display from physical damage
Thanks for going to all that trouble but not what I’m after. As you can see by the dodgy picture I need to keep it flush mounted.
 

jcmental

Active Member
View Badges
Joined
Jan 25, 2018
Messages
114
Reaction score
137
Rating - 0%
0   0   0
S
Pi is same as a PC. You can do a screen saver with password protection, that will auto kick in if no one is using it. You can also explicitly log out after you are done.
I dont know if you can configure it to show the dashboard but locked , i have to research a bit on that
Sounds like just what I’m after. Can you point me in the right direction to make said changes. Is it in user setting/security or something like that?
 

James Golden

Community Member
View Badges
Joined
Apr 8, 2018
Messages
44
Reaction score
55
Rating - 0%
0   0   0
There should be some place to turn on a screen saver and require a password to unlock the screen. Let me do some looking
 

jcmental

Active Member
View Badges
Joined
Jan 25, 2018
Messages
114
Reaction score
137
Rating - 0%
0   0   0
There should be some place to turn on a screen saver and require a password to unlock the screen. Let me do some looking
I had to install something called xscreensaver i got it working but now I need a keyboard to put in my PW as the touch screen needs a keyboard app that I have to manually open. So that’s a bit of a bummer. On the plus side I’ve got every thing hooked up n running for 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

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
I have got the following working and Tested ..

1. 8 channel relay Mains side GFCI between house and Outlets . Logic side uln2803 between relay and Pi .. Powered with its own 5v power supply.
2. DS 18B Temp sensor . controller Heater and Cooling outlet
3.Analog Float switch . Controlling a ATO Outlet
4.Adafruit pca 9685 Running led lights thru msfets irf520 testing with high power rgb led powered by 10v ps
5. running 3 12 v fans thru a second on pca 9685 powered by 12v ps to test a second light channel of 3 devices
6 . 4 port dosing pumps running thru pca9685 with a uln2830 between dosing pumps and pca9685
the only thing being powered thru the pi is the pi itself.

The dosing pump outlets. and a few other things will be broke out into separate boxes . Next step i think.
Here is the mess
Reef-pi controller Build .jpg
 

Algae invading algae: Have you had unwanted algae in your good macroalgae?

  • I regularly have unwanted algae in my macroalgae.

    Votes: 43 35.0%
  • I occasionally have unwanted algae in my macroalgae.

    Votes: 27 22.0%
  • I rarely have unwanted algae in my macroalgae.

    Votes: 9 7.3%
  • I never have unwanted algae in my macroalgae.

    Votes: 9 7.3%
  • I don’t have macroalgae.

    Votes: 31 25.2%
  • Other.

    Votes: 4 3.3%
Back
Top