Commit Graph
4 Commits
Author SHA1 Message Date
tim 82def5737f Select the bmspy-ups device from the configured devices
bmspy-ups selected its device from the devices that had data at startup, and exited with status 0 if the selection failed. One failed first read ended the monitor or made it select the wrong device.

The server has a new DEVICES command that lists the configured names, and client.list_devices calls it. bmspy-ups selects from that list and then waits for the first data of its device. A wrong or missing --device now exits with status 2. The service file does not restart on that status, because a restart cannot correct it.

An older server ends on the unknown DEVICES command, so update the server first.
2026-10-10 09:03:35 +02:00
tim b569bcf27b Fix email, shutdown, and option bugs in bmspy-ups
The recipient check used a regular expression that never matched, so a full address got the host name appended. The main loop passed the device name with a parameter name that read_data does not have. A canceled shutdown did not clear its flag, so a second incident did not schedule a shutdown. The recorded shutdown time used the wrong unit. The --port option stayed text and never matched the STARTTLS ports.
2026-10-10 09:03:34 +02:00
tim 75564f96f0 Fix UPS functionality for multiple devices 2026-05-02 23:25:15 +02:00
tim 897ae5dfb7 Add unit tests 2026-05-02 23:12:29 +02:00