SolarOS

SolarOS 4.17.7 manual · job

batmon

Battery monitor. It periodically samples battery voltage, maintains a smoothed trend, estimates power state, and can request sleep, deep sleep, or shutdown when the configured minimum voltage is reached.

Usage:

job start batmon [interval-sec] [sleep|deepsleep|shutdown]
job stop batmon
job status batmon

Defaults:

SettingValue
Interval60 seconds
Low-voltage actionsleep

The action can also be supplied without an interval, for example job start batmon shutdown. The selected action appears in the startup log and the job's battery resource details.

ActionBehavior
sleepRequest the same light sleep as the sleep command.
deepsleepRequest the same deep sleep as the deepsleep command.
shutdownRun the normal shutdown sequence, including storage cleanup and board power-off when supported.

Battery limits are configured with the battery shell command:

battery capacity <mAh>
battery min_voltage <volts>
battery max_voltage <volts>

Notes:

Example:

job start batmon 60
job start batmon 30 shutdown