2017-09-06, 08:21 AM
2017-09-06, 10:47 AM
(2017-09-06, 08:21 AM)Alpenskipper Wrote: [ -> ]Hi!
In notifications it would be great, if units could be changed (e.g. celsius) and rounded.
It looks strange in freeboard.
You can add a function node to do that, I don't use freeboard so you'll probably need to change msg.topic to something else.
var numInput = Number(msg.payload);
msg.topic = "Eng";
var T = numInput-273.15;
msg.payload = T.toFixed(1);
return msg;
2017-09-06, 09:11 PM
(2017-09-06, 08:21 AM)Alpenskipper Wrote: [ -> ]Hi!
In notifications it would be great, if units could be changed (e.g. celsius) and rounded.
It looks strange in freeboard.
Hello, I changed the units in freeborad in "value" or JS editor with this is comand:
datasources["node-red"][environment.inside.heating.temperature"].toFixed()-273
Saludos
2017-09-06, 10:04 PM
Thanks for the hints. But, for I am a Linux/ JS noob, I have no idea, where to edit...
Could you explain it for dummies, please?
Martin
Could you explain it for dummies, please?
Martin
2017-09-06, 11:02 PM
(2017-09-06, 10:04 PM)Alpenskipper Wrote: [ -> ]Thanks for the hints. But, for I am a Linux/ JS noob, I have no idea, where to edit...if I remember correctly, it is modified where you have added the temperature, pressure, ... in freeboard.
Could you explain it for dummies, please?
Martin
you have to add the last part.
.toFixed()-273
If you do not find it, tomorrow I'll send you a screenshot
Saludos
2017-09-07, 04:00 PM
Great!
.toFixed(n)
worked perfect.
.toFixed(n)
worked perfect.