AdamWelchUK / NodeRedEPEverDashboard

A node red based dashboard for most EPEver/EPSolar solar charge controllers.
68 stars 25 forks source link

Temperatures below zero #2

Open oauestad opened 3 years ago

oauestad commented 3 years ago

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;
AdamWelchUK commented 3 years ago

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

razvanfatu commented 2 years ago

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