orin-status: clean poweroff when the UPS pack stays low while discharging
--poweroff-below V --poweroff-after N (deployed: 11.0 V, 30 readings at 1/s). Charging or a missing reading restarts the count. Publishes 'stopping' first; poweroff through svc-gw's polkit grant, no sudo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
@@ -11,7 +11,9 @@ User=mikkeli
|
||||
SupplementaryGroups=i2c
|
||||
# The ELM's address, for elm_connected; without the file nothing is reported.
|
||||
EnvironmentFile=-/etc/default/yukart-elm
|
||||
ExecStart=/usr/local/bin/yukart-orin-status --elm ${ELM_ADDR}
|
||||
# Below 11.0 V while discharging for 30 s (about 10 % left at the Orin's load): power off
|
||||
# cleanly, through the polkit grant svc-gw installs (50-yukart-gw-power.pkla), not sudo.
|
||||
ExecStart=/usr/local/bin/yukart-orin-status --elm ${ELM_ADDR} --poweroff-below 11.0 --poweroff-after 30
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user