Milesight

Creation procedure

Import steps

  1. Network Server → Payload Codec → Custom Payload Codec

  2. Copy/paste in the 3 fields:

    1. Payload Decoder

    2. Payload Encoder

    3. Object Mapping - from the code box below

{

    "object": [
        {
            "id": "internalTemperature",
            "name": "Internal Temperature",
            "value": "",
            "unit": "UNITS_DEGREES_CELSIUS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "energy_kWh",
            "name": "Energy",
            "value": "",
            "unit": "UNITS_KILOWATT_HOURS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 19,
            "bacnet_unit_type": "UNITS_KILOWATT_HOURS"
        },
        {
            "id": "power_W",
            "name": "Power",
            "value": "",
            "unit": "UNITS_WATTS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 47,
            "bacnet_unit_type": "UNITS_WATTS"
        },
        {
            "id": "acVoltage_V",
            "name": "AC Voltage",
            "value": "",
            "unit": "UNITS_VOLTS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 5,
            "bacnet_unit_type": "UNITS_VOLTS"
        },
        {
            "id": "acCurrent_mA",
            "name": "AC Current",
            "value": "",
            "unit": "UNITS_MILLIAMPERES",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 2,
            "bacnet_unit_type": "UNITS_MILLIAMPERES"
        },
        {
            "id": "relayState",
            "name": "Relay State",
            "value": "",
            "unit": "",
            "access_mode": "RW",
            "data_type": "BOOL",
            "value_type": "BOOL",
            "bacnet_type": "binary_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "deviceHardwareVersion",
            "name": "Hardware Version",
            "value": "",
            "unit": "UNITS_NO_UNITS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "deviceSoftwareVersion",
            "name": "Software Version",
            "value": "",
            "unit": "UNITS_NO_UNITS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "keepAliveTime",
            "name": "Keep‑Alive Time",
            "value": "",
            "unit": "UNITS_MINUTES",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "joinRetryPeriod",
            "name": "Join Retry Period",
            "value": "",
            "unit": "UNITS_HOURS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 71,
            "bacnet_unit_type": "UNITS_HOURS"
        },
        {
            "id": "uplinkType",
            "name": "Uplink Type",
            "value": "",
            "unit": "",
            "access_mode": "RW",
            "data_type": "ENUM",
            "value_type": "UINT8",
            "bacnet_type": "multistate_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Unconfirmed"
                },
                {
                    "value": 1,
                    "name": "Confirmed"
                }
            ]
        },
        {
            "id": "watchDogParams_wdpC",
            "name": "Watchdog WDP-C",
            "value": "",
            "unit": "UNITS_NO_UNITS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "watchDogParams_wdpUc",
            "name": "Watchdog WDP-UC",
            "value": "",
            "unit": "UNITS_NO_UNITS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "overheatingThreshold_trigger",
            "name": "Overheating Threshold (Trigger)",
            "value": "",
            "unit": "UNITS_DEGREES_CELSIUS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "overheatingThreshold_recovery",
            "name": "Overheating Threshold (Recovery)",
            "value": "",
            "unit": "UNITS_DEGREES_CELSIUS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "overvoltageThreshold_trigger",
            "name": "Overvoltage Threshold (Trigger)",
            "value": "",
            "unit": "UNITS_VOLTS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 5,
            "bacnet_unit_type": "UNITS_VOLTS"
        },
        {
            "id": "overvoltageThreshold_recovery",
            "name": "Overvoltage Threshold (Recovery)",
            "value": "",
            "unit": "UNITS_VOLTS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 5,
            "bacnet_unit_type": "UNITS_VOLTS"
        },
        {
            "id": "overcurrentThreshold",
            "name": "Overcurrent Threshold",
            "value": "",
            "unit": "UNITS_MILLIAMPERES",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 2,
            "bacnet_unit_type": "UNITS_MILLIAMPERES"
        },
        {
            "id": "overpowerThreshold",
            "name": "Overpower Threshold",
            "value": "",
            "unit": "UNITS_WATTS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 47,
            "bacnet_unit_type": "UNITS_WATTS"
        },
        {
            "id": "afterOverheatingProtectionRecovery",
            "name": "After Overheating Protection Recovery",
            "value": "",
            "unit": "UNITS_NO_UNITS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "ledIndicationMode",
            "name": "LED Indication Mode",
            "value": "",
            "unit": "",
            "access_mode": "RW",
            "data_type": "ENUM",
            "value_type": "UINT8",
            "bacnet_type": "multistate_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "manualChangeRelayState",
            "name": "Manual Change Relay State",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "BOOL",
            "bacnet_type": "binary_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "relayRecoveryState",
            "name": "Relay Recovery State",
            "value": "",
            "unit": "",
            "access_mode": "RW",
            "data_type": "ENUM",
            "value_type": "UINT8",
            "bacnet_type": "multistate_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "overheatingEvents_count",
            "name": "Overheating Events Count",
            "value": "",
            "unit": "UNITS_NO_UNITS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "overheatingEvents_temperature",
            "name": "Overheating Event Temperature",
            "value": "",
            "unit": "UNITS_DEGREES_CELSIUS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "overvoltageEvents_count",
            "name": "Overvoltage Events Count",
            "value": "",
            "unit": "UNITS_NO_UNITS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "overvoltageEvents_voltage",
            "name": "Overvoltage Event Voltage",
            "value": "",
            "unit": "UNITS_VOLTS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 5,
            "bacnet_unit_type": "UNITS_VOLTS"
        },
        {
            "id": "overcurrentEvents_count",
            "name": "Overcurrent Events Count",
            "value": "",
            "unit": "UNITS_NO_UNITS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "overcurrentEvents_current",
            "name": "Overcurrent Event Current",
            "value": "",
            "unit": "UNITS_MILLIAMPERES",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 2,
            "bacnet_unit_type": "UNITS_MILLIAMPERES"
        },
        {
            "id": "overpowerEvents_count",
            "name": "Overpower Events Count",
            "value": "",
            "unit": "UNITS_NO_UNITS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "overpowerEvents_power",
            "name": "Overpower Event Power",
            "value": "",
            "unit": "UNITS_WATTS",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 47,
            "bacnet_unit_type": "UNITS_WATTS"
        },
        {
            "id": "overheatingRecoveryTime",
            "name": "Overheating Recovery Time",
            "value": "",
            "unit": "UNITS_SECONDS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 73,
            "bacnet_unit_type": "UNITS_SECONDS"
        },
        {
            "id": "overvoltageRecoveryTime",
            "name": "Overvoltage Recovery Time",
            "value": "",
            "unit": "UNITS_SECONDS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 73,
            "bacnet_unit_type": "UNITS_SECONDS"
        },
        {
            "id": "overcurrentRecoveryTemp",
            "name": "Overcurrent Recovery Temperature",
            "value": "",
            "unit": "UNITS_DEGREES_CELSIUS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "overpowerRecoveryTemp",
            "name": "Overpower Recovery Temperature",
            "value": "",
            "unit": "UNITS_DEGREES_CELSIUS",
            "access_mode": "RW",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_value_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        }
    ]
}

Last updated

Was this helpful?