I am looking for a way to turn off/shut down the Raspberry Pi with Venus OS via button (no hardware switch solution please).
Does anyone have a solution for this?
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
I am looking for a way to turn off/shut down the Raspberry Pi with Venus OS via button (no hardware switch solution please).
Does anyone have a solution for this?
Guten Tag Herr Hein ;-)
Ich habe die Frage mal in den Mod-Bereich verschoben, da passt es besser hin.
https://community.victronenergy.com/spaces/31/mods.html
I guess there is a way but you might be not able to restart it without physical access.
That would be enough for me. Power off to restart after shutdown and power on again to restart after shutdown is ok for me. I am purely concerned with the shutdown via touchscreen.
If you also use RpiGpioSetup, you can add a physical button for reset. Refer to the ShutdownMonitor ReadMe for details.
On note: if the PI locks up to the point services are not running then the physical input will also not work. There is nothing I can do to reset the PI in this case short of a power cycle.
I was hoping to add a "Shutdown" menu but I couldn't figure out the code to start a shutdown. So for now I bring up the menu, go to Settings -> General. Then tap on Reboot. Once the screen goes dark I then disconnect the power. Not ideal but it works the rare times I need to power down cleanly.
One option would be to implement it as a url ( not part of the GUI).
In principle the steps are:
1) enable python in hiawatha.configure
2) write a python script to execute is “power off”
3) put the script in the hiawatha directory
On a browser go to http://Venus.local/<script name>
The url could easily be stored as a favourite in your browser or on your phone home screen.
If this is enough information for you, give it a go. If you want to try it but need full instructions ( file names and lines to edit and the python code) I can write you some more notes.
Thank you for your advice. Your solution can not be activated directly via the user interface of the Venus OS but requires a 2nd device which triggers the shutdown via browser right?
I am assuming that by "hardware switch" (you don't want this) you mean something that cuts the power and by "button" on Venus (you want this), you mean something that gracefully shuts down.
I assume you mean a GUI "button".
If you meant a GUI button, you could implement the solution here but instead of a physical push button, you could use a relay like this from https://community.victronenergy.com/questions/34195/make-more-than-two-relays-visible-on-rpi-rpi.html:
Please check the "here" Link.
Unfortunately it does not work.
Here is the fixed link:
https://www.quartoknows.com/page/raspberry-pi-shutdown-button
Thanks for Update.
Your tip directly with a hardware button is great. Maybe even a bit more women friendly.
Since I have never worked with Venus OS I am now looking for the possibility to install Python.
Apparently I also have to activate the GPIO?
Unfortunately, I have also found after search in the forum nothing.
Ya, sorry link is : https://www.quartoknows.com/page/raspberry-pi-shutdown-button
I don't think I was able to express myself properly.
What I was looking for was a shutdown button as a direct
command to Venus OS (Picture below from Raspian OS).
Any ideas for this in Venus OS?
There is no shutdown menu in the Venus OS GUI. Just the Reboot menu as I mentioned in my answer. If you have ssh access then you can run "halt" or "shutdown" from the command line.
And is there a possibility to add the shutdown as an additional button after the reboot button?
Because of the power consumption of the RPi and the Display I also want to cut Power of the System while I am not in the RV or sleeping.
I thought about a simple switch that cuts the power of the RPi.
You said "you don´t want this" it sounded like a general "you" :-) Is there any problem with just cutting the power?
Best regards
Is there any other reason why I shouldn´t use a hardware switch to power down the hole RPi?
Check out my ShutdownMonitor addition. It adds a button in the menu below the Reboot button
https://github.com/kwindrem/ShutdownMonitor
On a Raspberry PI, it also permits using a physical switch to initiate shutdown. (RpiGpioSetup also required).
Note that Cerbo will reboot itself after it is shutdown. I don't recall the delay in this but it does give you ample opportunity to disconnect power.
Hello, Kevin thanks for all the work you have done, I use most of your scripts, they are very handy! In reference to the shutdown script, I like to add a hardware button because when the Rasp Pi locks up for whatever reason, the shutdown script won't work. I end up pulling the plug. I like to add a button, by adding a button will the Rasp Pi shut down completely or go into a stand-by mode? Which pins do the connections go? I would appreciate your valuable time. Thanks again!
Victron Venus OS Open Source intro page
Venus OS GitHub (please do not post to this)
40 People are following this question.