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

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.
 
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:
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..
 
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?
 
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:
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 :)
 
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?
 
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.

:)
 
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
 
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
 
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.
 
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)
 
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...).
 
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.
 
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.
 
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
 
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
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top