]> mj.ucw.cz Git - home-hw.git/commitdiff
BSB Daemon: More parameters
authorMartin Mares <mj@ucw.cz>
Fri, 6 Mar 2020 20:33:36 +0000 (21:33 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 6 Mar 2020 20:33:36 +0000 (21:33 +0100)
bsb/daemon/burrow-bsbd.c

index 13836165031c0f10247d35aeadf8ffd7e384f4b9..a0a2147d3002223fed5f43a08da35f2e69a94510 100644 (file)
@@ -219,9 +219,28 @@ static void process_info(time_t t, byte *p, uint len)
                        break;
                case 0x05040227:
                        // AGU.2 control
-                       if (len >= 2) {
+                       if (len >= 4) {
                                uint m = get_u16_be(p);
                                mqtt_publish("burrow/heating/circuit1/mix-valve", "%u %lld", m, (long long) t);
+                               mqtt_publish("burrow/heating/circuit1/pump", "%u %lld", (p[3] == 3), (long long) t);
+                       }
+                       break;
+               case 0x2d000211:
+                       // Circuit 1 status
+                       if (len >= 10) {
+                               mqtt_publish("burrow/heating/circuit1/active", "%u %lld", (p[8] != 0), (long long) t);
+                       }
+                       break;
+               case 0x2e000211:
+                       // Circuit 2 status
+                       if (len >= 10) {
+                               mqtt_publish("burrow/heating/circuit2/active", "%u %lld", (p[8] != 0), (long long) t);
+                       }
+                       break;
+               case 0x31000212:
+                       // Hot water status
+                       if (len >= 3) {
+                               mqtt_publish("burrow/heating/water/active", "%u %lld", (p[1] != 0), (long long) t);
                        }
                        break;
                case 0x3d2d0215: