]> mj.ucw.cz Git - home-hw.git/commitdiff
BSB Daemon: Bug fixes
authorMartin Mares <mj@ucw.cz>
Mon, 27 Jul 2020 10:12:22 +0000 (12:12 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 27 Jul 2020 10:12:22 +0000 (12:12 +0200)
MQTT
bsb/daemon/burrow-bsbd.c

diff --git a/MQTT b/MQTT
index 80ec60a4dbf9a67c5d299241de3087529a11a010..d6ef72b0cce83c66bca8b0b25782d2bd940c6186 100644 (file)
--- a/MQTT
+++ b/MQTT
@@ -49,7 +49,7 @@ 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/clock           yyyy-mm-dd hh:mm
+burrow/heating/clock           yyyy-mm-ddThh:mm
 
 bsb/stats/*
 bsb/frame                      hex dump of raw frames received
index 786e05879954721f7baadeb408f00e2bee6c537a..2ffb94f9afbf0cf8fbe01ca6451deb76cc8716b9 100644 (file)
@@ -205,14 +205,15 @@ 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", err);
+                               mqtt_publish("burrow/heating/error", "%04x %lld", err, (long long) t);
                        }
                        break;
                case 0x0500006c:
                        if (len >= 7) {
-                               mqtt_publish("burrow/heating/clock", "%04d-%02d-%02d %02d:%02d",
+                               mqtt_publish("burrow/heating/clock", "%04d-%02d-%02dT%02d:%02d %lld",
                                        get_u16_be(p) + 1900, p[2], p[3],
-                                       p[5], p[6]);
+                                       p[5], p[6],
+                                       (long long) t);
                        }
                        break;
                case 0x05000219: