From b551c87b9671d3dc2c5a4b807f9b252cc7fc38b0 Mon Sep 17 00:00:00 2001 From: Marin Ivanov Date: Thu, 4 Sep 2025 10:23:46 +0300 Subject: Device metrics command and telemetry fix * feat: execute command to retrieve device metrics * bugfix: add requestid to (telemetry) reply data --- config.json.example | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'config.json.example') diff --git a/config.json.example b/config.json.example index 14ab023..ce7d209 100644 --- a/config.json.example +++ b/config.json.example @@ -13,8 +13,14 @@ "altitude": 2.0 }, "deviceMetrics": { - "broadcastInterval": 300, - "upsAddress": "upsname@localhost" + "broadcastInterval": 0, + "command": "jq", + "commandArgs": [ + "-n", + "--arg", "battery_level", "100", + "--arg", "voltage", "13.37", + ".battery_level=($battery_level|tonumber) | .voltage=($voltage|tonumber)" + ] }, "channels": [ { -- cgit v1.2.3