Ok so here is my Payload code. It’s basically an amalgam of tests. I only want one number which is the temp of the freezer.
function Decoder(bytes, port) {
var params = {
"temperature": null,
"temp2": null,
"temp_dec": null,
"temp_int": null,
"fulltemp": null,
"bytes": bytes
}
{
params.temperature = (bytes[5]<<24>>19);
params.temp2 = (bytes[5]>>1 );
params.temp_dec = (bytes[4]);
params.temp_int = (bytes[5]);
params.fulltemp = (bytes[5] + bytes[4] / 100);
}
{
return params;
}
}
The actual temp of the Freezer is -17c currently
This is the last payload
01010000DBF20500000000
And here is the output of the conversion
{
"bytes": "AQEAANvyBQAAAAA=",
"fulltemp": 244.19,
"temp2": 121,
"temp_dec": 219,
"temp_int": 242,
"temperature": -448
}
Does that help at all?
jim