Hi Phil, thanks for the log file upload, I’d like to say that it helped but it just confused things more.
Let me try to explain.
I’ve decoded the B0 PowerMaster messages and I’ve realised by also looking at the
that I am decoding the message in the wrong way. I also looked at plugins for other gadgets and there are very few B0 messages decoded.
There are 2 differences to DomotiGa with my decoding of the B0 message data:
- I do not have the B0 message data timeouts as per the DomotiGa plugin. The DomotiGa plugin uses 2 timouts:
- The first that prevents sequential device triggers within 30 seconds. This means that walking aound a property may not trigger each motion sensor within HA (or DomotiGa). Since I have not implemented this timeout it isn’t an issue for me but they must have a good reason for doing this.
- The second is that 2 messages have to come from the panel within 5 seconds of each other. Looking at your logs this does actually happen (44:38, 44:40 and 46:42, 46:45). The DomotiGa plugin looks at the differences between the first and second zone states and assumes that each difference means that there has been a detection. The main problem with this is that it has no idea what the values actually mean, it just looks for a difference, it could mean anything.
- I have been decoding the zone data in the wrong place. I assumed in version 0.3.2 that the data started at offset 3 and it starts at offset 7.
Having taken item 2 above in to account in your logs, if I used the same code as DomotiGa then I would not get any motion sensor detections, let me explain using this sample from you logs:
Zone Position 1 2 3 4 5 6
07:44:38 03 04 45 ff 08 03 40 11 08 08 04 08 08
07:44:40 03 04 45 ff 08 03 40 15 08 08 04 08 08
I have tried to line things up so I can explain, I know it’s detail but I might as well go for it
03 04 is the message type and subtype
45 (or 69 decimal) is the length of the data part of the overall data structure
FF 08 03 I have no idea but it’s the same on all “03 04” and “03 07” messages
40 (or 64 decimal) is the number of zones. I have seen in the past this set to 1E (30 decimal) for PowerMaster10 so I assume that it’s correct.
The 6 values after the 40 represent your 6 Zones. If you look at your logs at the same message data then you’ll see lots of 00 that I’ve missed out as there’s no zone data.
As you can see from this pair of messages, Zone 1 has changed data from 11 to 15. Since Zone 1 is not a motion sensor the DomotiGa plugin would ignore this change.
It is a similar story for the pair of messages at 46:42 and 46:45. The only change in data is for Zone 4 (from 17 to 21) which is also not a motion sensor.
So, I’m confused. It’s possible that 03 04 messages are only sending through non motion sensor data but that isn’t what DomotiGa thinks. It’s also possible that I’ve translated the DomotiGa plugin code wrong, no ones infalible. If anyone else thinks different to the above then please please let me know.
Anyway, I have made some changes to the B0 message decode to see if we can get more data and I’ve uploaded Version 0.3.2.1 to Github. Could you and anyone else interested please do as I suggest previously (if you have a PowerMaster 10 or 30): update the plugin, set debug logging on this plugin, restart HA, walk around your house triggering magnet and motion sensors and then upload the log to pastebin please
Thankyou for your patience.