-
CommentStreams:9d7b9e53ef5ff88dcc59fbefceb2182b
Hey, When the main power is down, I want the Raspberry pi to show a message, close some programs safely, and then shut down. Then, once I connect the main power again, the pi turns on automatically. That means I don't want to interact with the onboard button since the pi will be closed in a case. I referred to the Hardware documentation and could enable the automatic switch on when I connect the power, but that only happens when the X708 hat is off.
My problem now is how to switch the hat OFF through the software so that when I connect the power again, the pi will automatically turn on. I referred to the Software documentation, followed the directions, and repeated many times, but the "x708off" doesn't switch the hat OFF. When I run it on the command line, I get "X708 Shutting down..." but the x708 is still ON even after the command finishes running. I uninstalled and reinstalled the files many times, but the same thing happened every time.
I2C is enabled, and I can detect when the power is lost, but I can't switch off the x708 or shut down the pi. When I run "plsd.py", it gets stuck at "Shutdown in 5 seconds", but it never shuts down.
I appreciate your help, I'm using Raspbian GNU/Linux 10 (buster) on raspberry pi 4