NodeRedEPEverDashboard icon indicating copy to clipboard operation
NodeRedEPEverDashboard copied to clipboard

Temperatures below zero

Open oauestad opened this issue 4 years ago • 2 comments

Hi Adam, many thanks for your code which I use with a Tracer 2210AN.

In my cabin, the temperature can fall below zero C in winter. I found the Tracer encodes negative values in 2's complement. To display temperatures correctly, I replaced the /100 Range nodes after Tbatt and Tcase with Function nodes, with the following code:

var t = msg.payload;

if (t >> 15) {
    t -= 1 << 16;
}

msg.payload = t/100;

return msg;

oauestad avatar Feb 09 '21 19:02 oauestad

Thanks for the suggestion. I'll add this to my flow now and try it out.

AdamWelchUK avatar Feb 10 '21 20:02 AdamWelchUK

Thanks for this, I just applied it to my 2210AN installation and it works perfectly.

razvanfatu avatar Jan 06 '22 07:01 razvanfatu