Decoder for RisingHF rhf1s001

Did anyone already wrote a decoder function for the format of the RisingHF RHF1S001 sensor node?

If not, I’m willing to write one and share it, but I have some troubles to get started writing the custom decoder function.

This is the payload which arrives at TTN: 010C6E740F008224C4. The documentation says:

Try this?

function Decoder(bytes, port) {
var obj = new Object();

//temp
var tempEncoded=(bytes[2]<<8)|(bytes[1]);
var tempDecoded=(tempEncoded*175.72/65536)-46.85;
obj.temp=tempDecoded.toFixed(2);

//humidity
var humEncoded=(bytes[3]);
var humDecoded=(humEncoded*125/256)-6;
obj.hum=humDecoded.toFixed(2);

//period
var periodEncoded=(bytes[5]<<8)|(bytes[4]);
var periodDecoded=(periodEncoded*2);
obj.period=periodDecoded+" sec";

//battery
var batteryEncoded=(bytes[8]);
var batteryDecoded=(batteryEncoded+150)*0.01;
obj.battery=batteryDecoded.toFixed(2);


return obj;
}

Thanks a lot! Works like a charm…