added service restart and new keys to export

This commit is contained in:
2025-12-22 13:31:49 +01:00
parent d7872ed620
commit 3d6e77a9e7
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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: