Zitat:
It works with a normal shutdown, but with a failure not.
and
Zitat:
...if you want to use the "VAR PERSISTENT RETAIN" with the Pi and a have reliable solution
then a UPS is a must have!
So, I have an UPS, but I'd like to shutdown my mashine and RPI after that. As I understund it is posible to retain persistent variables if normal shutdown is afected.
My question is it possible to shutdown RPI from program ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's cool. Is there any other cool stuff like setting up Raspi Ethernet IP and gateway?
There is another good way to kind of deal with retains. When I have retains in the form of settings that don't change all the time, I write the retain file off to disk on change. And restore on a reboot. It's a problem though when the pi has to deal with frequently changing stuff like metering pulses.
Sent from my SM-G935F using Tapatalk
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From here :
l viewtopic.php?t=5722&start=30#p17138 l
There is statement:
and
So, I have an UPS, but I'd like to shutdown my mashine and RPI after that. As I understund it is posible to retain persistent variables if normal shutdown is afected.
My question is it possible to shutdown RPI from program ?
Hi mbruck,
Yes it is possible to shutdown the pi form the program. See my example below.
First you will need to import the SysProcess library in the library manager.
Second add these two variables in the variable editor.
Then in the editor add these lines:
You can replace the command1 variable with 'sudo reboot' for a reboot.
You can even use it to run a python script in the background.
Nice and simple
Best Regards,
Johan
That's cool. Is there any other cool stuff like setting up Raspi Ethernet IP and gateway?
There is another good way to kind of deal with retains. When I have retains in the form of settings that don't change all the time, I write the retain file off to disk on change. And restore on a reboot. It's a problem though when the pi has to deal with frequently changing stuff like metering pulses.
Sent from my SM-G935F using Tapatalk