Convert Value back to INT8


(Jack) #1

Hi,
Each time I read the RSSI value from my ZigBee device, the value being sent is (INT8) -57. However, when my ST hub gets the message, it reads the value as (hex) C7 or (decimal) 199. How can I convert the ST value back into the original (INT8) -57?


(www.rboyapps.com - Make your home your butler!) #2

Typecast it to a Byte

I don’t recall exactly but I also think the ZigBee Utilities in ST allow for data manipulation to cast to specific data types as defined in the ZigBee specs.


(Tony Fleisher) #3

Looks like signed vs. Unsigned decoding issue. Make sure the data type is 0x28 for int8 or 0x20 for uint8