PiSugar / pisugar-power-manager-rs

PiSugar Power Manger in rust language
https://www.pisugar.com/
GNU General Public License v3.0
129 stars 15 forks source link

[BUG] Afer setting RTC alarm and shutdown, PI didn't boot up. #88

Open anhu opened 1 year ago

anhu commented 1 year ago

Environment

To Reproduce

$ echo "get rtc_time" | nc -q 0 127.0.0.1 8423
rtc_time: 2022-12-12T20:40:37.000-05:00
$ echo "rtc_alarm_set 2022-12-12T21:00:00-05:00 127" | nc -q 0 127.0.0.1 8423
rtc_alarm_set: done
$ echo "get rtc_alarm_time" | nc -q 0 127.0.0.1 8423
rtc_alarm_time: 1999-12-31T21:00:00.000-05:00
$ echo "get rtc_alarm_enabled" | nc -q 0 127.0.0.1 8423
rtc_alarm_enabled: true
$ sudo pisugar-poweroff --model "PiSugar 2 Pro"                      
3 2 1 0...

Expected behavior

Approx. 20 minutes later at 21:00 I thought the Raspberry Pi would reboot; but it did not.

anhu commented 1 year ago

Something that is kind of weird is that the response to get rtc_alarm_time says the year is 1999

anhu commented 1 year ago

by the way, the web interface doesn't work either.

anhu commented 1 year ago

@fengyc @JdaieLin @wlmh110 ....any comments?

anhu commented 1 year ago

I understand now. The pisugar must NOT be plugged in. If it is plugged in it will not wake up.

That seems like a weird behavior. It should wake up whether its plugged in or not.