xorbit / LiFePO4wered-Pi

Access library, command line tool and daemon for the LiFePO4wered/Pi module
GNU General Public License v2.0
132 stars 31 forks source link

Cannot Auto-shutdown? #8

Closed fiveseven808 closed 7 years ago

fiveseven808 commented 7 years ago
$ lifepo4wered-cli set AUTO_SHDN_TIME 0
0
$ lifepo4wered-cli set AUTO_SHDN_TIME 1
1
$ date
Sun Apr  9 22:56:18 HST 2017
$ date
Sun Apr  9 22:57:23 HST 2017

So, I seem to be able to set a shutdown time... but I'm not sure why it doesn't shut down?

Edit: Well, it looks like if I power it off by hand using the touch sensor, the wake timer seems to work, which is nice :)

Do I need to have the device plugged in and then disconnect it for the auto shutdown timer to work?

Edit 2: Actually... once the device booted back up, it shut down after a minute.... That was weird...

xorbit commented 7 years ago

Please refer to the product brief for details on each of the register settings. The AUTO_SHDN_TIME sets the time after which the Pi will be shut down when external power (VIN) is removed. It's intended (in combination with AUTO_BOOT 3 or 4) for automatic boot and clean shutdown based on the availability of incoming power (think clean shutdown for a device with a hard on/off switch cutting power). Your Edit 2 seems to indicate it's working as intended. You had set the time to 1 minute and must not have had the unit plugged in at the time?