Your thermostat appears to be using one of the multilevel sensor classes (for the temperature reporting):
My Trane thermostats both look like this:
For mine, the 49 is the class, 5 is for report, the 1 is for sensor type (1 is presumably for temperature?),the 9 is complicated so better fetch documents from the link below, followed by n values.
I DID NOT post it and found it on google, but see the second link from the bottom here:
According to that "link" and the fact that I have never signed an NDA with Zensys and found the information freely on google:
I believe your answer lies in the byte after the 1, (the 042) and the data that follows.
42 in binary is 001 01 010.
From the link, the 001 indicates a precision of one (e.g. 72.1, 72.5 etc...), the 01 means *F, and the 010 means data size (two in your case).
I believe the value then is probably a normalized bit value (over the operating range of the sensor). I believe this is using a two byte signed value where the 002 is the most significant byte and the 248 is the least significant byte.
So we have: 0000 0010 (002) 1111 1000 (248)
If we use windows calculator in programming mode for binary, type in 0000001011111000, select word, then select decimal and we get 760. Wait, what about about the 001 precision? That's 76.0 degrees Fahrenheit, Eureka!
Basically, you'll need to add code to due the binary conversion and process the value for the case when two sensor values are received (leave the existing case alone so other sensors will still work). Let me know if you need help with that part by posting here. I think the most significant byte is critical, so you cannot do the conversion like you are doing. The next release may include a case for 2 bytes of sensor data, and will if I ever end up owning a multilevel sensor that does two bytes.
Things are a little more complicated as the value is signed binary. I left that part out as you are only dealing with positive values, but if the module is updated, we should make things generic for all multivalue sensor levels, even negative ones. Also, feel free to post your modifications even if they do not handle the signed binary. Again, I don't mind helping/doing, especially if a donation is involved
Edited by etc6849, 08 July 2013 - 08:52 PM.