6 Commits

Author SHA1 Message Date
tim f2ffc4568a Add multi-device support
server.py
  - --device is now repeatable (-d ups1:/dev/ttyUSB0 -d ups2:/dev/ttyUSB1). Bare paths (/dev/ttyUSB0) auto-name from the last path component (ttyUSB0).
  - Maintains {name: {ser, data, timestamp}} per UPS — each device has independent data freshness.
  - GET response is now {ups_name: JBDUPS}. Accepts optional ups key in the request to return only one.

client.py
  - read_data() gains ups=None parameter — pass a name to filter server-side, or omit for all.
  - Always returns {ups_name: JBDUPS}.

influxdb.py
  - influxdb_create_snapshot() iterates {name: JBDUPS} and tags every InfluxDB point with ups=name.
  - influxdb_export() / bmspy-influxdb gain --ups to export only a specific UPS.

__init__.py
  - bmspy CLI gains --ups to display only a named UPS.
  - Displays each UPS under a === name === header.
2026-05-02 17:40:31 +02:00
tim af97e393f6 Improve documentation, and improve systemd service files 2024-05-09 09:43:06 +02:00
tim dab791fb79 Refactor into a client/server model, to enable multiple clients to access the BMS data 2024-04-30 17:28:14 +02:00
tim be75d8fd88 Convert to using poetry to run bmspy 2024-03-19 22:28:39 +02:00
tim 951013f0b8 Add bms.py. 2021-02-03 13:23:18 +02:00
tim 0ac9c62ddb Initial commit 2021-02-03 11:19:58 +00:00