I have a Daniu outdoor weather sensor that returns data in Alecto V4 format according to rflink:
20;C8;Alecto V4;ID=5be8;TEMP=00c0;HUM=68;
Humidity is returned as a straight decimal integer, but temp is a hex number which corresponds to my current temp * 10, but can anyone confirm the full encoding of temperature and how negative values are presented.
For what it's worth, I am currently extracting the temp and humidity values in node-red as follows:
Code: Select all
// Example: RFLinkS 20;03;Alecto V4;ID=5be8;TEMP=009a;HUM=83;
var results = msg.payload.split(";");
switch (results[2])
{
case "Alecto V4":
humidity = parseInt(results[5].split("=")[1]);
temperature = parseInt('0x' + results[4].split("=")[1])/10;
var msg1 = {payload:temperature};
var msg2 = {payload:humidity};
return [msg1,msg2,null,null];
default:
return [null,null,null,null];
}
Thanks