Device Type Encoders

Overview

To help manage devices of the same type e.g Semtech LoRaMote SX1272 RuBAN allows you to create Device Types. A Device Type allows you to define

encoders, used to send messages to sensors. Therefore Device Types can be shared across all device of a certain type.

Encoders

Encoders are used to send messages down to the device e.g Rising HF Outdoor IP64 Temperature and Humidity LoRaWAN sensor RHF1S001.

In the attached document page 3 it details how to send down "Change Duty Cycle" by sending the value down as 2 bytes on port 8.

 PDF

Dsl Encoder

Similar to decoders and encoder can be a Dsl e.g

{
    "postprocessing": {
        "call""payloadToBase64"
    },
    "parameters": ["Cycle Time"],
    "processing": {
        "bytes": [
            {
                "format""context.value = context.parameters[0].value / 2;",
                "call""writeUInt16LE",
                "comment""Create 2 byte payload"
            }
        ]
    }
}


Raw Encoder

var buffer = new Buffer(2);
 
 
var value = context.parameters[0].value / 2;
buffer.writeUInt16LE(value, 0);
 
 
return buffer.toString('base64');


Sending Downlink Messages

See LoRa Device Management  section "Downlink Messages" for details on how to use encoders to send messages to devices.