Netvox configuration

Configuration guide

To add a Netvox sensor to a Milesight gateway, follow the instructions in this guide:

To connect the Milesight gateway to UMA's MQTT server follow the instructions in this guide:

Unsure about UMA's MQTT server details? Click here.

Payload codec

In order for our server to correctly understand messages sent from Netvox sensors you will need to create a custom payload codec on the Milesight gateway. Use the following decoder:

function Decode(fPort, bytes, LoRaObject) {
    var decoded = {
        version: bytes[0],
        device_type: "R718N325",
        report_type: bytes[2],
        battery_voltage: (bytes[3] & 0x7F) * 0.1,
        battery_low: (bytes[3] & 0x80) ? true : false,
        currents_mA: {
            L1: (bytes[4] << 8 | bytes[5]),
            L2: (bytes[6] << 8 | bytes[7]),
            L3: (bytes[8] << 8 | bytes[9])
        },
        multiplier: {
            L1: 1,
            L2: 1,
            L3: 1
        }
    };

    // Add devEUI and ISO timestamp if available
    if (LoRaObject) {
        decoded.devEUI = LoRaObject.devEUI;
        decoded.rssi = LoRaObject.rxInfo && LoRaObject.rxInfo[0] ? LoRaObject.rxInfo[0].rssi : null;
        decoded.snr = LoRaObject.rxInfo && LoRaObject.rxInfo[0] ? LoRaObject.rxInfo[0].loRaSNR : null;
        decoded.data = LoRaObject.data;
        decoded.time = LoRaObject.time ? LoRaObject.time : new Date().toISOString();
    } else {
        decoded.time = new Date().toISOString();
    }

    return decoded;
}

Application setup

In order for our server to correctly understand uplinks and downlinks from our server you will need to configure the application on the gateway with the following topic:

Uplink topic - netvox

Add the device to UMA

To add a Netvox sensor to UMA, you will need the Dev EUI which can be obtained either locally on the sensor or from your distributor. Use the Dev EUI as the UMA ID.

When adding a Netvox device in UMA, click on add device and then use the Netvox card to find the device you want to add.

After some minutes, the device will come online and you will start recording the data coming from the sensor.

Last updated

Was this helpful?