Uplink
Script Structure
function consume(event) {
emit('sample', { data: {}, topic: 'default' });
}Decoding the Payload
function consume(event) {
let payload = event.data.payloadHex;
let bits = Bits.hexToBits(payload);
data.counter = Bits.bitsToUnsigned(bits.substr(6, 10)) / 4;
// emit
emit('sample', { data: {}, topic: 'default' });
}Uplink Event Object
Example HTTP or MQTT event
Example LoRaWAN event
Example Array Uplink event
Event examples
LoRaWAN Device uplink event
MQTT Device uplink event
Last updated
Was this helpful?