Hi,
I've had no success decoding the ADC message from a Zigbee board.
I'm working with a TI cc2530 Zigbee board. This is similar to Dr Haas Thingshield. I've found some firmware for the board on a Zigbee2MQTT website. I've loaded this firmware and have paired it to my hub. This firmware has a Switch input (which is working) and an ADC which is what I cannot decode. The log results are below. I've not been able to understand the significance of the attrid:0055 and encoding:39. This may be the key but I've looked in every Zigbee document I could find and have come up with nothing useful.
Any suggestions would be very welcome.
Thanks
John
it appears that the payload is invalid for data type 0x39 single precision (the frame is being parsed correctly) but it's supposed to be 4 octets, this device is sending 13
I see a pattern starting from the right, perhaps there are three single precision values and one extra byte at the beginning?
No idea.
Info on how to parse these data types starts at page 2-45, section 2.6.2.9 in the Zigbee Cluster library specification revision 6, Zigbee document 07-5123-06
If I understand the CC2530, 1.42V in should be ~1762 decimal counts
The 0x0055 PresentValue Attribute should contain an actual value, so your firmware should be sending 1.42V as a single float which would be 0x3fb5c28f until you decoded it. And obviously 0V would be 0x00000000
If you have a sniffer to hand you could see what the board is sending ..... but as Mike mentioned it sounds like the board is sending it wrong if that big value is making it into parse() .....
Is the data a response from read attribute? if yes, the format may be defined as in 2.5.2.1 Zigbee cluster library. It could be composed of multiple attributes from the same cluster. The parsing code may need to watch for this possibility.
In my opinion, here are the values.
962B03000C20 55003900000000 6F0018F3 1C00420156
55 00 39 00000000 //this is the float from present value
6F 00 12 F3 //this is status flag
1C 00 42 0156 //this is a description.
00 looks like a successful status.
If I have to guess, this is may be why the values are more than 4 bytes.