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

Kremins

Community Member
View Badges
Joined
Dec 14, 2018
Messages
40
Reaction score
36
Rating - 0%
0   0   0
Pi zero ? Or pi 3 ?

It was a pi 3 A+ and it would run fine until I logged in remotely through VNC then everything would hang up. I hooked it back up to a monitor and keyboard with the same results as soon as I connected remotely it would start to hang at the desktop being unable to use the Remote viewer app or the native desktop of the pi. I tried both RealVNC and TightVNC servers they both did the same thing.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
It was a pi 3 A+ and it would run fine until I logged in remotely through VNC then everything would hang up. I hooked it back up to a monitor and keyboard with the same results as soon as I connected remotely it would start to hang at the desktop being unable to use the Remote viewer app or the native desktop of the pi. I tried both RealVNC and TightVNC servers they both did the same thing.

Keep in mind the 3A+ has half the memory of a 3b, I also run a 3A+ but do not run the desktop version. There are other options like x2go and NX (No Machine) that may work better but with only 512Mb of memory I would only connect via SSH, it will consume much less resources. If you want to test some more with remote desktop I would double your swap space, my guess is your running out of memory, but would have to look at the logs to verify what exactly is taking place.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Keep in mind the 3A+ has half the memory of a 3b, I also run a 3A+ but do not run the desktop version. There are other options like x2go and NX (No Machine) that may work better but with only 512Mb of memory I would only connect via SSH, it will consume much less resources. If you want to test some more with remote desktop I would double your swap space, my guess is your running out of memory, but would have to look at the logs to verify what exactly is taking place.
ooh, thats a good callout, i forgot that and assumed its same as pi3, except without the usb and rj45 ports..
 

Kremins

Community Member
View Badges
Joined
Dec 14, 2018
Messages
40
Reaction score
36
Rating - 0%
0   0   0
I did not realize that was the case and it makes since now. Reef-pi is working fine now and I am okay using ssh so I will just let it be. I have a pi zero on the way so I have something to play with and learn more about pi programming. Might swap the two pi out when it gets here.

Is there anyway to copy all my reef-pi settings between the two devices or should I just recreate everything when the zero comes in?
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I did not realize that was the case and it makes since now. Reef-pi is working fine now and I am okay using ssh so I will just let it be. I have a pi zero on the way so I have something to play with and learn more about pi programming. Might swap the two pi out when it gets here.

Is there anyway to copy all my reef-pi settings between the two devices or should I just recreate everything when the zero comes in?

Funny you should ask, I am working on something for just that, give me a couple of days and I should have something posted. Will try to cover a windoze process which will take me longer to documemt vs a pure Linux process.
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
So here are the two main files that you would need to copy to a remote system on a routine basis in order to restore reef-pi:

-rw------- 1 root root 1286144 Feb 27 21:19 /var/lib/reef-pi/reef-pi.db
-rwxr-xr-x 1 root root 1638 Jan 4 19:20 /boot/config.txt

Now a couple of questions are there any other files that would be beneficial in addition to these, if so let me know. The other question is I would like to keep things simple, the idea is we would like to have a cron type job that copies the files to a remote system. There are a lot of ways of doing this, I would assume that most users will be windows based, but I believe an easier target would be something like a pi zero or something similar. Open to suggestions for target destinations, with the idea of keeping it simple for anyone to setup. Let me here some suggestions and I will see what I can put together based on the input.

Thanks :)
 

Mendeln

Community Member
View Badges
Joined
Nov 21, 2017
Messages
27
Reaction score
64
Location
Germany
Rating - 0%
0   0   0
So here are the two main files that you would need to copy to a remote system on a routine basis in order to restore reef-pi:

-rw------- 1 root root 1286144 Feb 27 21:19 /var/lib/reef-pi/reef-pi.db
-rwxr-xr-x 1 root root 1638 Jan 4 19:20 /boot/config.txt

Now a couple of questions are there any other files that would be beneficial in addition to these, if so let me know. The other question is I would like to keep things simple, the idea is we would like to have a cron type job that copies the files to a remote system. There are a lot of ways of doing this, I would assume that most users will be windows based, but I believe an easier target would be something like a pi zero or something similar. Open to suggestions for target destinations, with the idea of keeping it simple for anyone to setup. Let me here some suggestions and I will see what I can put together based on the input.

Thanks :)
Target: NAS through SMB or SSH?
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Target: NAS through SMB or SSH?

Well that's one of the obstacles, since any remote connection will require passwords for login unless we use SSH keys. Not a fan of storing passwords in scripts or in files for execution.

Still mulling things in my head, the easiest would be to have an additional USB thumb drive and write the files locally. That would be easy for most of the pi's except the zeros since they are micro USB.

:)
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Well that's one of the obstacles, since any remote connection will require passwords for login unless we use SSH keys. Not a fan of storing passwords in scripts or in files for execution.

Still mulling things in my head, the easiest would be to have an additional USB thumb drive and write the files locally. That would be easy for most of the pi's except the zeros since they are micro USB.

:)
They make microusb thumb drives
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,244
Location
Columbia MD
Rating - 0%
0   0   0
My vote would be for a thumb drive. I was planning on coming up with a way to leave a thumb drive plugged in and have it auto backup every few months or coming up with a way to send it to google docs but then there is the authentication issue you mentioned. Its on my list of things to do and have not gotten around to it. lol
 

gencarson

Community Member
View Badges
Joined
Oct 17, 2017
Messages
29
Reaction score
50
Rating - 0%
0   0   0
Sorry for butting in out of nowhere but it might be easier to tie into the api provided by dropbox or google drive. It would be pretty simple to add that as the backup target, and the user would just use that auth system vs. trying to roll one independently. Just zip it up and send it with a cron entry.

I stumbled upon this project on accident. After I homegrew something similar using node-red and python on the RPi.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
So here are the two main files that you would need to copy to a remote system on a routine basis in order to restore reef-pi:

-rw------- 1 root root 1286144 Feb 27 21:19 /var/lib/reef-pi/reef-pi.db
-rwxr-xr-x 1 root root 1638 Jan 4 19:20 /boot/config.txt

Now a couple of questions are there any other files that would be beneficial in addition to these, if so let me know. The other question is I would like to keep things simple, the idea is we would like to have a cron type job that copies the files to a remote system. There are a lot of ways of doing this, I would assume that most users will be windows based, but I believe an easier target would be something like a pi zero or something similar. Open to suggestions for target destinations, with the idea of keeping it simple for anyone to setup. Let me here some suggestions and I will see what I can put together based on the input.

Thanks :)
thats all i can think of. Its wise to capture the pi version and raspbian version (lsb_release/uname)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Sorry for butting in out of nowhere but it might be easier to tie into the api provided by dropbox or google drive. It would be pretty simple to add that as the backup target, and the user would just use that auth system vs. trying to roll one independently. Just zip it up and send it with a cron entry.

I stumbled upon this project on accident. After I homegrew something similar using node-red and python on the RPi.
you dont need the api, just configure the google driver cli (mentioned in earlier post) and set up a cron job to take backup.
In my past three years experience, I felt even this is more that what I need. In most cases, all I need is a one-time backup after i set everything up. I rarely change the settings once the controller is dialed in (like light schedule, dosing schedule, temperature sensors etc...).
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I probably dont even need that much either...and it takes 15 minutes to set everything back up...by the time I have a major fail I bet there will be a new version of reef pi anyways ;)

The major fail point will be the SD card, so as cheap as they are, I built a second card as a spare with everything ready to go.

I setup my reef pi, such that my relays are wired Normally closed, if reef pi goes down, my equipment outlets are ON, meaning the only thing I lose is light control, and the way I did my lights, the manual switch still works, the heaters and pumps still work as if reef pi wasnt there.
 

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
688
Reaction score
1,119
Location
Malmö, Sweden
Rating - 0%
0   0   0
Maybe I've missed this in the documentation but is there a possibility to add a safe shutdown button to the Reef-Pi? A button that will run the shutdown sequence and do a proper shutdown instead of just cutting the power? It's not a super big deal but it would be nice to be able to safely shut it down on the spot if you have to pull or plug in 3.5mm sensor plugs for instance.
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Maybe I've missed this in the documentation but is there a possibility to add a safe shutdown button to the Reef-Pi? A button that will run the shutdown sequence and do a proper shutdown instead of just cutting the power? It's not a super big deal but it would be nice to be able to safely shut it down on the spot if you have to pull or plug in 3.5mm sensor plugs for instance.

There is, but it isn't straightforward. I plan on doing it on my setup.
For shutdown: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=216586#p1332042
also this: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=206921#p1281172
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Maybe I've missed this in the documentation but is there a possibility to add a safe shutdown button to the Reef-Pi? A button that will run the shutdown sequence and do a proper shutdown instead of just cutting the power? It's not a super big deal but it would be nice to be able to safely shut it down on the spot if you have to pull or plug in 3.5mm sensor plugs for instance.
there is , you can just click on the Configuration ->Admin -> Poweroff
 
Back
Top