PiSugar / pisugar-power-manager-rs

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

[BUG] Bricked PiSugar2 after runing set_battery_output false #103

Open radium226 opened 9 months ago

radium226 commented 9 months ago

I think I bricked my PiSugar2 after running echo "set_battery_output false" | nc -q 0 -U /tmp/pisugar-server.sock: I'm not able to run the pisugar-server anymore and nothing works.

I'm still able to see things using i2cdetect, but I don't know what to do...

Environment

To Reproduce Steps to reproduce the behavior:

  1. I ran ``
  2. Then when I run , I have the followin logs: Hello!

After running echo "set_battery_output false" | nc -q 0 -U /tmp/pisugar-server.sock

I have those errors when running RUST_LOG=debug /usr/bin/pisugar-server --model "PiSugar 2 (2-LEDs)":

[2024-01-08T21:42:28Z DEBUG pisugar_server] Running with model: PiSugar 2 (2-LEDs)(PiSugar 2 (2-LEDs))
[2024-01-08T21:42:28Z DEBUG pisugar_core] Core init rtc...
[2024-01-08T21:42:28Z DEBUG pisugar_core] Core init battery...
[2024-01-08T21:42:28Z WARN  pisugar_core] Retry to init battery later, error: I/O error: Remote I/O error (os error 121)
[2024-01-08T21:42:28Z DEBUG pisugar_server] Polling
[2024-01-08T21:42:28Z DEBUG pisugar_server] Polling state
[2024-01-08T21:42:28Z INFO  pisugar_core] Init battery...
[2024-01-08T21:42:28Z DEBUG pisugar_core] Core init battery...
[2024-01-08T21:42:28Z INFO  pisugar_server] Http web server listening...
[2024-01-08T21:42:28Z DEBUG pisugar_server] Poll error: I/O error: Remote I/O error (os error 121)
[2024-01-08T21:42:28Z INFO  pisugar_server] UDS listening...
[2024-01-08T21:42:28Z DEBUG pisugar_server] Polling
[2024-01-08T21:42:28Z DEBUG pisugar_server] Polling state
[2024-01-08T21:42:28Z INFO  pisugar_core] Init battery...
[2024-01-08T21:42:28Z DEBUG pisugar_core] Core init battery...
[2024-01-08T21:42:28Z DEBUG pisugar_server] Poll error: I/O error: Remote I/O error (os error 121)

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.