if (len < 4)
return;
- u32 addr = get_u32_be(p); // Two highest-order bytes are swapped
+ // Two highest-order bytes are swapped
+ u32 addr = (p[0] << 16) | (p[1] << 24) | (p[2] << 8) | p[3];
p += 4;
len -= 4;
switch (addr) {
- case 0x053d0834:
- // Boiler modulation (format not decoded yet)
+ case 0x3d050834:
+ // Burner modulation
if (len >= 2) {
uint mod = get_u16_be(p);
- mqtt_publish("burrow/heating/modulation", "%04x %lld", mod, (long long) t);
+ if (mod > 100) // If there is no flame, the value is 0x100; otherwise, it's percentage
+ mod = 0;
+ mqtt_publish("burrow/heating/modulation", "%d %lld", mod, (long long) t);
}
break;
- case 0x313d052f:
+ case 0x3d31052f:
// Hot water temperature
if (len >= 3) {
int temp = get_s16_be(p + 1);
mqtt_publish("burrow/heating/water/temp", "%.2f %lld", temp / 64., (long long) t);
}
break;
- case 0x113d051a:
+ case 0x3d11051a:
// Boiler return temperature
if (len >= 3) {
int temp = get_s16_be(p + 1);
static u32 query_list[] = {
0x3d31052f, // Hot water temperature
- 0x3d050834, // Boiler modulation
+ 0x3d050834, // Burner modulation
0x3d31052f, // Hot water temperature (measure more frequently)
0x3d11051a, // Boiler return temperature
};