-
Notifications
You must be signed in to change notification settings - Fork 0
batmon.lua
This program monitors and reports energy levels of one or more attached peripherals. Common use case would be to report the charge status of one or more Energy Cells.
Main program searches for all attached peripherals that match the name thermalexpansion:storage_cell
, periodically collects a total sum om the current energy level and a maximum capacity, then emits a websocket info message with the properties stored
, total
and percent
(ratio between stored and total, in percentage points.
Place the computer in connection to one or more Energy Cells, start the program to bootstrap configuration.
Edit configuration file in /var/batmon.conf
according to your needs. Use the group
and hidden
properties together with a multi-computer setup (same group, all hidden) to allow the controller frontend to do a collective sum and display all computers and their attached cells in one widget.
This program is totally reliant on the Websocket system, it does not display any information in the computer terminal.
Peripherals are dynamically addressed (you can add/remove cells while program is running).