]> mj.ucw.cz Git - home-hw.git/commitdiff
BSB: Errors logged in decimal (for Grafana's sake)
authorMartin Mares <mj@ucw.cz>
Mon, 27 Jul 2020 10:32:36 +0000 (12:32 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 27 Jul 2020 10:32:36 +0000 (12:32 +0200)
MQTT
bsb/daemon/burrow-bsbd.c

diff --git a/MQTT b/MQTT
index d6ef72b0cce83c66bca8b0b25782d2bd940c6186..a3b0a03e6c12338ff02944bb594397a7fbc2018d 100644 (file)
--- a/MQTT
+++ b/MQTT
@@ -48,7 +48,7 @@ burrow/heating/circuit1/active        0/1
 burrow/heating/circuit2/room-temp
 burrow/heating/circuit2/active 0/1
 burrow/heating/water/active    0/1
-burrow/heating/error           %04x [error code from message 0500:006b]
+burrow/heating/error           [error code from message 0500:006b in decimal]
 burrow/heating/clock           yyyy-mm-ddThh:mm
 
 bsb/stats/*
index 2ffb94f9afbf0cf8fbe01ca6451deb76cc8716b9..d855b4743af434a41df9a9acf6c031a0382ce8a1 100644 (file)
@@ -205,7 +205,7 @@ static void process_info(time_t t, byte *p, uint len)
                case 0x0500006b:
                        if (len >= 2) {
                                int err = get_u16_be(p);
-                               mqtt_publish("burrow/heating/error", "%04x %lld", err, (long long) t);
+                               mqtt_publish("burrow/heating/error", "%d %lld", err, (long long) t);
                        }
                        break;
                case 0x0500006c: