From 3d6e77a9e7df48369a568f7f99a1b33d5920829b Mon Sep 17 00:00:00 2001 From: Obbart Date: Mon, 22 Dec 2025 13:31:49 +0100 Subject: [PATCH] added service restart and new keys to export --- deploy.sh | 2 +- upsmon.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index f6c1cee..4e7ff16 100755 --- a/deploy.sh +++ b/deploy.sh @@ -9,5 +9,5 @@ sudo cp upsmon.service /etc/systemd/system/upsmon.service sudo systemctl daemon-reexec sudo systemctl daemon-reload sudo systemctl enable upsmon.service -sudo systemctl start upsmon.service +sudo systemctl restart upsmon.service diff --git a/upsmon.py b/upsmon.py index 36ef9f4..23e23ae 100644 --- a/upsmon.py +++ b/upsmon.py @@ -29,7 +29,7 @@ CMD: list[str] = ['apcaccess', '-u'] T_LONG: float = 15.0 T_SHORT: float = 5.0 EXPORT_KEYS: list[str] = [ - 'UPSNAME', 'STATUS', 'LINEV', 'LOADPCT', 'BCHARGE', 'TIMELEFT', 'ITEMP', 'BATTV', 'LINEFREQ' + 'UPSNAME', 'STATUS', 'LINEV', 'LOADPCT', 'BCHARGE', 'TIMELEFT', 'ITEMP', 'BATTV', 'LINEFREQ', 'TONBATT', 'CUMONBATT', 'NUMXFERS' ] def clean_data(v: str) -> float | str: