x708 ups hat is not turning OFF through the script | Geekworm

x708 ups hat is not turning OFF through the script


  • Hey, 


    In my project, 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 (https://wiki.geekworm.com/X708-Hardware) and could enable the automatic switch on when I connect the power, but that only happens when the X708 hat is off. Showing a message and shutting down the Pi is simple, but my problem is turning off the x708 ups hat.

    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 (https://wiki.geekworm.com/X708-Software), 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. Also, 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



  • Hello everyone,
    Here is what happened for whoever is interested in knowing how it worked for me. 

    After contacting the support team, they tried the exact same setup (same PI, OS, and HAT) as the ones I have and worked for them. So, I tried loading the same OS to a new SD card just to try the function, and surprisingly it worked like a charm.

    After many tests and comparing multiple variables, I managed to fix the problem in my original SD card. What worked for me was moving everything extra on the "/etc/rc.local" file to somewhere else and only keeping "/etc/x708pwr.sh &". Apparently, there was an error related to the "rc.local" file.

    I'm glad that worked, and thanks to the Geekworm support team for their time.

     


Please login to reply this topic!
BACK TO TOP