Daniu Outdoor sensor (Alecto V4 protocol) - decoding temperature

About receivers, transmitters, transceivers, connections, antennas etc.

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Post Reply
Message
Author
linker3000
Normal user
Posts: 12
Joined: 08 May 2017, 09:51

Daniu Outdoor sensor (Alecto V4 protocol) - decoding temperature

#1 Post by linker3000 » 19 Aug 2017, 12:33

Hi,

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];
}
The function is written as a 'case' so that I can add sections to process data received from other devices.

Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests