@pittsgal That Temperature Measurement appears to be in hexadecimal. I used an online converter to convert 0x2A1C to decimal and got 10780. Perhaps you tried that, too. I knew we could ignore the 0x after reading the article I link to below but I wasn’t sure about the rest of the value.
So it seems we need some more information about the type of value that is being output as temperature.
And there is some in the information you posted (I tried to find the API documentation you mentioned but couldn’t. Is it available online?).
“Byte 1 contains the flag field.” This helps us know if the temperature is in °C or °F but it doesn’t affect the actual value of the temperature.
According to the article below, each hexadecimal digit maps to 4 bits (4 binary digits). A byte is eight binary digits or two hexadecimal digits. So Byte 1 consists of the first two hexadecimal digits, “1C.” So we can ignore those for now.
“Byte 2 to 5 is a 4 byte float representing the temperature reading…” Now we’re getting somewhere!
If we take Byte 2 to 5 as a single value, we need to evaluate “2A.” Because that’s all that remains after we remove the 0x prefix and Byte 1 “1C.”
And 2A in hexadecimal converts to 42 in decimal. So the answer is 42 degrees! Woo hoo! But wait, is that 42°F or 42°C? Probably if you’re measuring the temperature at home with the physical device, you already know the answer. But if you need help with parsing the value from Byte 1, I could take a crack at that, too.
Mind you, I just figured this out and I’ve never worked with hexadecimal. So even though I feel pretty good about the chances that 42° is correct, you might want someone else to double-check my assumptions.
I found this useful: Hexadecimal - learn.sparkfun.com, especially the part titled " Hex-to-Decimal Example: Convert 0xC0DE" and the couple of sections below that. Also, I had to read this to understand that in “little endian,” bytes are read from right to left: Is binary code read from right to left? - Quora.
Edit: I can’t leave well enough alone when it comes to learning more about coding! Byte 1’s value of 1C in hexadecimal equals 00011100 in binary. That’s eight bits: 0, 0, 0, 1, 1, 1, 0, and 0. According to what you posted above, “Bit 0 [is the] Temperature scale.” So if we look at bit 0, the value is 0 – I’m pretty sure that’s the right-most value. So this temperature is in Celsius (a value of 1 would indicate Fahrenheit). I hope I’m right!
To contextualize, I’m going to say you’re probably measuring some nice hot tub water at about 108 °F.