> For the complete documentation index, see [llms.txt](https://docs.mclimate.eu/mclimate-lorawan-devices/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/decoding-and-bacnet-object-mapping/bacnet-codec-and-definition-files/milesight.md).

# Milesight

## Creation procedure

### **Network Server → Payload Codec → Custom Payload Codec**

Copy and paste each of the following in their respective fields:

#### Payload Decoder Function

```js
var KA_LEN = 9;

// GET-response / notification DATA length per command byte (excluding the
// command byte). Every entry is cross-checked against the byte table on its own
// command page. A wrong entry desyncs every later command in a multi-command
// frame, so validate_codecs.js asserts each against a worked doc example.
var RESP_LEN = {
    0x04: 2,   // hw / sw version nibbles
    0x12: 1,   // keep-alive period, minutes
    0x13: 4,   // open window (1.0 accuracy): en, dur/5, motorPos[7:0], motorPos[11:8]<<4 | delta
    0x14: 1,   // child lock
    0x15: 2,   // target temperature range min, max
    0x18: 1,   // online operational mode 0..3
    0x19: 1,   // join retry period, raw*5 s
    0x1b: 1,   // uplink type
    0x1d: 2,   // watchdog confirmed count, unconfirmed hours
    0x1f: 1,   // primary operational mode 0 heating / 1 cooling
    0x28: 1,   // NOTIFICATION: target changed by hand on the rotary ring
    0x34: 1,   // child lock behaviour when offline
    0x36: 3,   // Kp * 131072
    0x3d: 3,   // Ki * 131072
    0x3f: 2,   // PI integral value * 10
    0x40: 1,   // PI run period, minutes
    0x42: 1,   // Thys * 10
    0x44: 2,   // external temperature * 10
    0x46: 3,   // open window (0.1 accuracy): en, dur/5, delta*10
    0x48: 1,   // force-attach status
    0x4a: 3,   // anti-freeze: activation*10, deactivation*10, target (whole C)
    0x4d: 2,   // max allowed integral * 10
    0x50: 2,   // valve openness range: 100-max, 100-min
    0x52: 2,   // target temperature * 10 (auto-prepended when non-integer)
    0x54: 1,   // internal temperature offset raw
    0x56: 1,   // LED display units 0 C / 1 F / 2 scale 0-5
    0x58: 2,   // NOTIFICATION: additional notifications bitfield + reserved
    0x5a: 41,  // heating events group: group index + 8 x 5 bytes
    0x5c: 4,   // heating season start month/day, end month/day
    0x5e: 4,   // device time, unix MSB..LSB
    0x60: 1,   // time zone offset hours, two's complement
    0x62: 1,   // automatic setback time, 10-minute steps
    0x64: 1,   // new-setpoint LED indication duration, 0.5 s steps
    0x66: 2,   // offline target temperature * 10 (0 = disabled)
    0x68: 1,   // internal algorithm temporary state
    0x6a: 12,  // scale 0-5 levels, 6 x 2 bytes * 10
    0x6c: 4,   // heating events active bits: reserved, 19..16, 15..8, 7..0
    0x6e: 1,   // automatic time sync via LNS
    0x70: 16,  // D2D notification device AppKey
    0x72: 2,   // NOTIFICATION (mode 03): HT Sensor temperature * 10, prepended to keep-alive
    0xa4: 1,   // LoRaWAN region
    0xa6: 0,   // NOTIFICATION: external crystal malfunction, no data
    0x16: 3,   // (fw < 4.2) Talg, Pfirst/last, Pnext
    0x17: 2,   // (fw < 4.2) Tdiff open, Tdiff close
    0x29: 2,   // (fw < 4.3) proportional coefficient, period
    0x2b: 1    // (4.0 <= fw < 4.3) algorithm in use
};

// DataCake
function Decoder(bytes, port) {
    var decoded = decodeUplink({ bytes: bytes, fPort: port }).data;
    return decoded;
}

// Milesight
function Decode(port, bytes) {
    var decoded = decodeUplink({ bytes: bytes, fPort: port }).data;
    return decoded;
}

function bit(v, n) {
    return (v >> n) & 0x01;
}

function u16(b, i) {
    return ((b[i] << 8) | b[i + 1]) >>> 0;
}

function u24(b, i) {
    return ((b[i] << 16) | (b[i + 1] << 8) | b[i + 2]) >>> 0;
}

function round(v, d) {
    return Number(v.toFixed(d));
}

function hex2(v) {
    return ("0" + (v & 0xff).toString(16)).slice(-2).toUpperCase();
}

// The Things Industries / Main
function decodeUplink(input) {
    try {
        var bytes = input.bytes;
        var data = {};

        // ---- keep-alive (0x81 fw>=3.5 / 0x01 fw<=3.4) -----------------------
        // byte1 : target temperature, whole C (0x05..0x1E)
        // byte2 : sensor temperature raw (formula depends on byte0)
        // byte3 : RH[%] = XX * 100 / 256
        // byte4 : motor position [7:0]   byte5 : motor range [7:0]
        // byte6 : bits7:4 motor position [11:8] | bits3:0 motor range [11:8]
        // byte7 : bits7:4 battery V = 2 + X*0.1 | b3 open window | b2 high
        //         motor current | b1 low motor current | b0 broken sensor
        // byte8 : b7 child lock (rotary disabled) | b6 calibration failed |
        //         b5 attached to backplate | b4 perceives online | b3 anti-freeze
        //         active | b2 D2D reliable (fw>=5.0) | b1 battery too low | b0 RFU
        function handleKeepalive(b, data) {
            var t = b[0] === 0x81 ? (b[2] - 28.33333) / 5.66666
                                  : (b[2] * 165) / 256 - 40;
            data.targetTemperature = b[1];
            data.sensorTemperature = round(t, 2);
            data.relativeHumidity = round((b[3] * 100) / 256, 2);
            var motorPosition = (((b[6] >> 4) & 0x0f) << 8) | b[4];
            var motorRange = ((b[6] & 0x0f) << 8) | b[5];
            data.motorPosition = motorPosition;
            data.motorRange = motorRange;
            data.valveOpenness = motorRange !== 0
                ? Math.round((1 - motorPosition / motorRange) * 100) : 0;
            data.batteryVoltage = round(2 + ((b[7] >> 4) & 0x0f) * 0.1, 2);
            data.openWindow = bit(b[7], 3);
            data.highMotorConsumption = bit(b[7], 2);
            data.lowMotorConsumption = bit(b[7], 1);
            data.brokenSensor = bit(b[7], 0);
            data.childLockStatus = bit(b[8], 7);
            data.calibrationFailed = bit(b[8], 6);
            data.attachedBackplate = bit(b[8], 5);
            data.perceiveAsOnline = bit(b[8], 4);
            data.antiFreezeActive = bit(b[8], 3);
            data.d2dReliable = bit(b[8], 2);
            data.batteryTooLow = bit(b[8], 1);
            return data;
        }

        // ---- GET responses / notifications ------------------------------------
        function handleResponse(cmd, b, i, data) {
            var j, k, ev, arr;
            switch (cmd) {
                case 0x04:
                    // nibble-decode and FLATTEN (doc ex 0x041211 -> HW 1.2 / SW 1.1)
                    data.deviceHardwareVersion =
                        ((b[i + 1] >> 4) & 0x0f) + ((b[i + 1] & 0x0f) / 10);
                    data.deviceSoftwareVersion =
                        ((b[i + 2] >> 4) & 0x0f) + ((b[i + 2] & 0x0f) / 10);
                    break;
                case 0x12:
                    data.keepAliveTime = b[i + 1];                 // minutes
                    break;
                case 0x13:
                    // doc ex 0x130102F412: enabled, 10 min, 500 steps, 2 C
                    data.openWindowEnabled = b[i + 1] & 0x01;
                    data.openWindowDuration = b[i + 2] * 5;        // minutes
                    data.openWindowMotorPosition =
                        (((b[i + 4] >> 4) & 0x0f) << 8) | b[i + 3];
                    data.openWindowDelta = b[i + 4] & 0x0f;        // whole C
                    break;
                case 0x14:
                    data.childLock = b[i + 1] & 0x01;
                    break;
                case 0x15:
                    data.temperatureRangeMin = b[i + 1];
                    data.temperatureRangeMax = b[i + 2];
                    break;
                case 0x18:
                    data.operationalMode = b[i + 1];
                    break;
                case 0x19:
                    // raw*5 s -> MINUTES (doc ex 0x19C6 -> 16.5 min)
                    data.joinRetryPeriod = round((b[i + 1] * 5) / 60, 4);
                    break;
                case 0x1b:
                    data.uplinkType = b[i + 1];
                    break;
                case 0x1d:
                    data.watchDogPeriodConfirmed = b[i + 1];
                    data.watchDogPeriodUnconfirmed = b[i + 2];     // hours
                    break;
                case 0x1f:
                    data.primaryOperationalMode = b[i + 1];
                    break;
                case 0x28:
                    data.manualTargetTemperature = b[i + 1];
                    break;
                case 0x34:
                    // MISSING from the published decoder entirely.
                    data.childLockOfflineBehavior = b[i + 1];
                    break;
                case 0x36:
                    data.proportionalGain = round(u24(b, i + 1) / 131072, 5);
                    break;
                case 0x3d:
                    data.integralGain = round(u24(b, i + 1) / 131072, 5);
                    break;
                case 0x3f:
                    data.integralValue = round(u16(b, i + 1) / 10, 1);
                    break;
                case 0x40:
                    data.piRunPeriod = b[i + 1];
                    break;
                case 0x42:
                    data.temperatureHysteresis = round(b[i + 1] / 10, 1);
                    break;
                case 0x44:
                    data.externalTemperature = round(u16(b, i + 1) / 10, 1);
                    break;
                case 0x46:
                    // doc ex 0x4601020F: enabled, 10 min, 1.5 C
                    data.openWindowEnabled = b[i + 1] & 0x01;
                    data.openWindowDuration = b[i + 2] * 5;
                    data.openWindowDelta = round(b[i + 3] / 10, 1);
                    break;
                case 0x48:
                    data.forceAttach = b[i + 1] & 0x01;
                    break;
                case 0x4a:
                    // doc ex 0x4A3C5A07 -> 6.0 / 9.0 / 7
                    data.antiFreezeActivationThreshold = round(b[i + 1] / 10, 1);
                    data.antiFreezeDeactivationThreshold = round(b[i + 2] / 10, 1);
                    data.antiFreezeTargetTemperature = b[i + 3];
                    break;
                case 0x4d:
                    // doc ex 0x4D03E8 -> 100
                    data.maxIntegralValue = round(u16(b, i + 1) / 10, 1);
                    break;
                case 0x50:
                    // wire carries 100-max, 100-min; doc ex 0x500064 -> 100 / 0
                    data.valveOpennessMax = 100 - b[i + 1];
                    data.valveOpennessMin = 100 - b[i + 2];
                    break;
                case 0x52:
                    data.targetTemperatureFloat = round(u16(b, i + 1) / 10, 1);
                    break;
                case 0x54:
                    // offset[C] = (XX - 28) * 0.176; doc ex 0x5438 -> +4.928
                    data.temperatureOffset = round((b[i + 1] - 28) * 0.176, 3);
                    break;
                case 0x56:
                    data.ledDisplayUnits = b[i + 1];
                    break;
                case 0x58:
                    data.setbackRestoredNotification = bit(b[i + 1], 0);
                    data.scheduleChangedTargetNotification = bit(b[i + 1], 1);
                    break;
                case 0x5a:
                    arr = [];
                    for (k = 0; k < 8; k++) {
                        j = i + 2 + k * 5;
                        arr.push([b[j], b[j + 1], round(u16(b, j + 2) / 10, 1), b[j + 4]]);
                    }
                    ev = b[i + 1];
                    if (ev === 0) data.heatingEventsGroup0 = JSON.stringify(arr);
                    else if (ev === 1) data.heatingEventsGroup1 = JSON.stringify(arr);
                    else if (ev === 2) data.heatingEventsGroup2 = JSON.stringify(arr);
                    break;
                case 0x5c:
                    // wire months are 0-based (0 = January); emitted 1-based so a
                    // human (and the encoder's input) reads 11 as November.
                    data.heatingSeasonStartMonth = b[i + 1] + 1;
                    data.heatingSeasonStartDay = b[i + 2];
                    data.heatingSeasonEndMonth = b[i + 3] + 1;
                    data.heatingSeasonEndDay = b[i + 4];
                    break;
                case 0x5e:
                    data.deviceTime = ((b[i + 1] << 24) >>> 0) + (b[i + 2] << 16) +
                                      (b[i + 3] << 8) + b[i + 4];
                    break;
                case 0x60:
                    data.timeZoneOffset = b[i + 1] > 127 ? b[i + 1] - 256 : b[i + 1];
                    break;
                case 0x62:
                    data.setbackTime = b[i + 1] * 10;              // minutes
                    break;
                case 0x64:
                    data.ledIndicationDuration = b[i + 1] / 2;     // seconds
                    break;
                case 0x66:
                    data.offlineTargetTemperature = round(u16(b, i + 1) / 10, 1);
                    break;
                case 0x68:
                    data.internalAlgoTemporaryState = b[i + 1] & 0x01;
                    break;
                case 0x6a:
                    for (k = 0; k < 6; k++) {
                        data["scaleLevel" + k] = round(u16(b, i + 1 + 2 * k) / 10, 1);
                    }
                    break;
                case 0x6c:
                    // byte1 reserved, byte2 events 19..16, byte3 15..8, byte4 7..0.
                    // Emitted as a JSON array of 20 ints indexed by event number.
                    arr = [];
                    for (k = 0; k < 20; k++) {
                        if (k < 8) arr.push(bit(b[i + 4], k));
                        else if (k < 16) arr.push(bit(b[i + 3], k - 8));
                        else arr.push(bit(b[i + 2], k - 16));
                    }
                    data.heatingEventStates = JSON.stringify(arr);
                    break;
                case 0x6e:
                    data.autoTimeSync = b[i + 1] & 0x01;
                    break;
                case 0x70:
                    ev = "";
                    for (k = 1; k <= 16; k++) ev += hex2(b[i + k]);
                    data.d2dAppKey = ev;
                    break;
                case 0x72:
                    data.d2dTemperature = round(u16(b, i + 1) / 10, 1);
                    break;
                case 0xa4:
                    data.lorawanRegion = b[i + 1];
                    break;
                case 0xa6:
                    data.crystalOscillatorError = 1;
                    break;
                default:
                    // 0x16 / 0x17 / 0x29 / 0x2b: legacy answers, consumed only
                    break;
            }
            return data;
        }

        var i = 0, decodedAny = false;
        while (i < bytes.length) {
            var cmd = bytes[i];
            if ((cmd === 0x81 || cmd === 0x01) && (bytes.length - i) >= KA_LEN) {
                handleKeepalive(bytes.slice(i, i + KA_LEN), data);
                i += KA_LEN;
                decodedAny = true;
                continue;
            }
            if (RESP_LEN.hasOwnProperty(cmd) && (bytes.length - i) > RESP_LEN[cmd]) {
                handleResponse(cmd, bytes, i, data);
                i += 1 + RESP_LEN[cmd];
                decodedAny = true;
                continue;
            }

            data.undecodedTrailingBytes = bytes.length - i;
            break;
        }
        if (!decodedAny) throw new Error("Unhandled data");

        if (data.targetTemperature !== undefined && data.targetTemperatureFloat === undefined) {
            data.targetTemperatureFloat = data.targetTemperature;
        }
        return { data: data };
    } catch (e) {
        throw new Error("Unhandled data");
    }
}

```

#### Payload Encoder Function

```js
function asNumber(value, fallback) {
  if (value === null || value === undefined || value === "") return fallback;
  if (typeof value === "number") return value;
  var n = Number(value);
  return isNaN(n) ? fallback : n;
}

function asBool(value, fallback) {
  if (value === null || value === undefined || value === "") return fallback;
  if (typeof value === "boolean") return value;
  if (typeof value === "number") return value !== 0;
  if (typeof value === "string") {
    var v = value.trim().toLowerCase();
    if (v === "true" || v === "on" || v === "1" || v === "yes" ||
        v === "enabled" || v === "enable" || v === "active" || v === "confirmed" ||
        v === "cooling") return true;
    if (v === "false" || v === "off" || v === "0" || v === "no" ||
        v === "disabled" || v === "disable" || v === "inactive" || v === "unconfirmed" ||
        v === "heating") return false;
  }
  return fallback;
}

function parseMaybeJson(value) {
  if (value && typeof value === "object") return value;
  if (typeof value !== "string") return value;
  try {
    return JSON.parse(value);
  } catch (e) {
    return value;
  }
}

function clampByte(v) {
  v = Math.round(v);
  if (v < 0) v = 0;
  if (v > 255) v = 255;
  return v;
}

function clampRange(v, lo, hi) {
  v = Math.round(v);
  if (lo === undefined) lo = 0;
  if (hi === undefined) hi = 255;
  if (v < lo) v = lo;
  if (v > hi) v = hi;
  return v;
}

function push16(bytes, v) {
  bytes.push((v >> 8) & 0xff);
  bytes.push(v & 0xff);
}

function num(obj, a, b) {
  var v = obj[a];
  if ((v === undefined || v === null || v === "") && b !== undefined) v = obj[b];
  if (v === undefined || v === null || v === "") return undefined;
  v = Number(v);
  return isNaN(v) ? undefined : v;
}

function normalizeCall(portOrInput, maybeInput) {
  var fPort = 1;
  var input = {};

  var legacy = arguments.length >= 2 && maybeInput !== undefined && maybeInput !== null;

  if (legacy) {
    fPort = portOrInput || 1;
    input = maybeInput || {};
  } else {
    input = portOrInput || {};
    fPort = input.fPort || input.port || 1;
  }

  if (!input.hasOwnProperty("data")) {
    input = { data: input };
  }

  return { legacy: legacy, fPort: fPort, data: input.data || {} };
}

var GET_OPCODES = {
  getDeviceVersions:              0x04,
  getKeepAliveTime:               0x12,
  getOpenWindowParams:            0x13,
  getChildLock:                   0x14,
  getTemperatureRange:            0x15,
  getOperationalMode:             0x18,
  getJoinRetryPeriod:             0x19,
  getUplinkType:                  0x1B,
  getWatchDogParams:              0x1D,
  getPrimaryOperationalMode:      0x1F,
  getChildLockOfflineBehavior:    0x34,
  getProportionalGain:            0x36,
  getIntegralGain:                0x3D,
  getIntegralValue:               0x3F,
  getPiRunPeriod:                 0x40,
  getTemperatureHysteresis:       0x42,
  getExternalTemperature:         0x44,
  getOpenWindowPrecisely:         0x46,
  getForceAttach:                 0x48,
  getAntiFreezeParams:            0x4A,
  getMaxIntegralValue:            0x4D,
  getValveOpennessRange:          0x50,
  getTemperatureOffset:           0x54,
  getLedDisplayUnits:             0x56,
  getHeatingSeason:               0x5C,
  getDeviceTime:                  0x5E,
  getTimeZoneOffset:              0x60,
  getSetbackTime:                 0x62,
  getLedIndicationDuration:       0x64,
  getOfflineTargetTemperature:    0x66,
  getInternalAlgoTemporaryState:  0x68,
  getScaleLevels:                 0x6A,
  getHeatingEventStates:          0x6C,
  getAutoTimeSync:                0x6E,
  getD2dAppKey:                   0x70,
  getLoRaWANRegion:               0xA4
};

var GET_WITH_ARG = {
  getHeatingEventsGroup0: [0x5A, 0x00],   // events 0-7
  getHeatingEventsGroup1: [0x5A, 0x01],   // events 8-15
  getHeatingEventsGroup2: [0x5A, 0x02]    // events 16-19 (+ zero padding)
};

function encodeDownlink(input) {
  var bytes = [];
  var data = (input && input.data) || {};
  var key, obj, v, a, b, c, d, e, k, s;

  for (key in data) {
    if (!data.hasOwnProperty(key)) continue;

    if (GET_OPCODES.hasOwnProperty(key)) {

      if (asBool(data[key], true)) bytes.push(GET_OPCODES[key]);
      continue;
    }
    if (GET_WITH_ARG.hasOwnProperty(key)) {
      if (asBool(data[key], true)) {
        bytes.push(GET_WITH_ARG[key][0]);
        bytes.push(GET_WITH_ARG[key][1]);
      }
      continue;
    }

    switch (key) {
      // ---- network ---------------------------------------------------------
      case "setKeepAlive": // 0x02 <minutes>. 0x00 invalid. Default 10.
        bytes.push(0x02);
        bytes.push(clampRange(asNumber(data[key], 10), 1, 255));
        break;

      case "setJoinRetryPeriod": 
        bytes.push(0x10);
        bytes.push(clampRange((asNumber(data[key], 10) * 60) / 5, 1, 255));
        break;

      case "setUplinkType": // 0x11 <00 unconfirmed | 01 confirmed>. Default 00 (fw>=3.5).
        bytes.push(0x11);
        bytes.push(asBool(data[key], false) ? 1 : 0);
        break;

      case "setWatchDogParams": 
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = num(obj, "confirmed", "confirmedUplinks");
        b = num(obj, "unconfirmed", "unconfirmedUplinks");
        if (a === undefined && b === undefined) break;
        bytes.push(0x1C);
        bytes.push(clampByte(a === undefined ? 2 : a));
        bytes.push(clampByte(b === undefined ? 24 : b));
        break;

      case "deviceReset": 
        if (asBool(data[key], false)) bytes.push(0x30);
        break;

      // ---- operational modes -------------------------------------------------
      case "setOperationalMode": // 0x0D <0 manual | 1 auto | 2 auto+ext temp | 3 auto+D2D HT>
        v = asNumber(data[key], undefined);
        if (v === undefined) break;
        v = Math.round(v);
        if (v < 0 || v > 3) break;   
        bytes.push(0x0D);
        bytes.push(v);
        break;

      case "setPrimaryOperationalMode": // 0x1E <0 heating | 1 cooling>. Default heating.
        bytes.push(0x1E);
        bytes.push(asBool(data[key], false) ? 1 : 0);
        break;

      // ---- target temperature --------------------------------------------------
      case "setTargetTemperature": // 0x0E <whole C>, auto modes only.
        bytes.push(0x0E);
        bytes.push(clampRange(asNumber(data[key], 21), 5, 30));
        break;

      case "setTargetTemperaturePrecisely": // 0x51 <T*10 MSB> <LSB>, C with 0.1 res.
        // Doc example 25.8 -> 0x510102.
        bytes.push(0x51);
        push16(bytes, clampRange(asNumber(data[key], 21) * 10, 50, 300));
        break;

      case "setTargetTemperatureFahrenheit": // 0x57 <F>, 41..86 F (0x29..0x56).
        bytes.push(0x57);
        bytes.push(clampRange(asNumber(data[key], 70), 41, 86));
        break;

      case "setTemperatureRange": // 0x08 <min C> <max C>, 5..30. Limits the ROTARY ring only.
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = num(obj, "min");
        b = num(obj, "max");
        if (a === undefined || b === undefined) break;
        a = clampRange(a, 5, 30);
        b = clampRange(b, 5, 30);
        if (a > b) break;
        bytes.push(0x08);
        bytes.push(a);
        bytes.push(b);
        break;

      // ---- external temperature (mode 02) --------------------------------------
      case "setExternalTemperature": // 0x0F <whole C>, must be > 0.
        v = asNumber(data[key], undefined);
        if (v === undefined || v <= 0) break;
        bytes.push(0x0F);
        bytes.push(clampRange(v, 1, 255));
        break;

      case "setExternalTemperatureFloat": 
        v = asNumber(data[key], undefined);
        if (v === undefined || v <= 0) break;
        bytes.push(0x3C);
        push16(bytes, clampRange(v * 10, 1, 0xffff));
        break;

      // ---- manual mode / motor -------------------------------------------------
      case "setValveOpenness": // 0x4E <percent 0..100>, manual mode only.
        bytes.push(0x4E);
        bytes.push(clampRange(asNumber(data[key], 0), 0, 100));
        break;

      case "setMotorPositionOnly": // 0x2D <steps MSB> <LSB>, manual mode only, max 800.
        // Doc example 500 -> 0x2D01F4.
        v = asNumber(data[key], undefined);
        if (v === undefined) break;
        bytes.push(0x2D);
        push16(bytes, clampRange(v, 0, 800));
        break;

      case "setTargetTemperatureAndMotorPosition": // 0x31 <steps MSB> <LSB> <target C>
        // Doc example 300 / 29 -> 0x31012C1D (TWO position bytes).
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = num(obj, "motorPosition");
        b = num(obj, "targetTemperature");
        if (a === undefined || b === undefined) break;
        bytes.push(0x31);
        push16(bytes, clampRange(a, 0, 800));
        bytes.push(clampRange(b, 5, 30));
        break;

      case "recalibrateMotor": // 0x03, no data. Drives the motor to fully closed and recalibrates.
        if (asBool(data[key], false)) bytes.push(0x03);
        break;

      case "setForceAttach": // 0x47 <bit0>. fw >= 4.2; BROKEN on 4.5 and 4.6 (fixed 4.7).
        bytes.push(0x47);
        bytes.push(asBool(data[key], false) ? 1 : 0);
        break;

      // ---- open window -----------------------------------------------------------
      case "setOpenWindow": 
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = obj.enabled;
        b = num(obj, "duration", "closeTime");
        c = num(obj, "motorPosition");
        d = num(obj, "delta");
        if (a === undefined || b === undefined || d === undefined) break;
        if (c === undefined) c = 258;          // documented default position
        c = clampRange(c, 0, 0xfff);
        bytes.push(0x06);
        bytes.push(asBool(a, false) ? 1 : 0);
        bytes.push(clampByte(b / 5));
        bytes.push(c & 0xff);
        bytes.push((((c >> 8) & 0x0f) << 4) | clampRange(d, 0, 15));
        break;

      case "setOpenWindowPrecisely": // 0x45 <en> <dur/5> <delta*10>, delta >= 0.2 C
        // Doc example {1, 30 min, 1.3 C} -> 0x4501060D.
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = obj.enabled;
        b = num(obj, "duration");
        d = num(obj, "delta");
        if (a === undefined || b === undefined || d === undefined) break;
        bytes.push(0x45);
        bytes.push(asBool(a, false) ? 1 : 0);
        bytes.push(clampByte(b / 5));
        bytes.push(clampRange(d * 10, 2, 255));
        break;

      // ---- child lock --------------------------------------------------------------
      case "setChildLock": // 0x07 <0|1>. Default 0.
        bytes.push(0x07);
        bytes.push(asBool(data[key], false) ? 1 : 0);
        break;

      case "setChildLockOfflineBehavior": // 0x35 <0 disable when offline | 1 unchanged>. Default 0.
        bytes.push(0x35);
        bytes.push(asBool(data[key], false) ? 1 : 0);
        break;

      // ---- PI algorithm ------------------------------------------------------------
      case "setProportionalGain": // 0x37 <Kp*131072, 3 bytes>. Default 6 (0x0C0000).
        // Doc example 2.74688 -> 0x37057E67.
        v = asNumber(data[key], undefined);
        if (v === undefined || v < 0) break;

        v = Math.floor(v * 131072 + 1e-6);
        if (v > 0xffffff) v = 0xffffff;
        bytes.push(0x37, (v >> 16) & 0xff, (v >> 8) & 0xff, v & 0xff);
        break;

      case "setIntegralGain": // 0x3E <Ki*131072, 3 bytes>. Default 1 (0x020000).
        // Doc example 0.412678 -> 0x3E00D34A.
        v = asNumber(data[key], undefined);
        if (v === undefined || v < 0) break;
        v = Math.floor(v * 131072 + 1e-6);   // floor: see setProportionalGain
        if (v > 0xffffff) v = 0xffffff;
        bytes.push(0x3E, (v >> 16) & 0xff, (v >> 8) & 0xff, v & 0xff);
        break;

      case "setPiRunPeriod": // 0x41 <minutes>. Default 10.
        bytes.push(0x41);
        bytes.push(clampRange(asNumber(data[key], 10), 1, 255));
        break;

      case "setTemperatureHysteresis": // 0x43 <Thys*10>, 0..100 (0..10 C). Default 0 (fw>=4.6).
        bytes.push(0x43);
        bytes.push(clampRange(asNumber(data[key], 0) * 10, 0, 100));
        break;

      case "setMaxIntegralValue": // 0x4C <I*10 MSB> <LSB>, degrees. Default 50.
        // Doc example 30 -> 0x4C012C.
        bytes.push(0x4C);
        push16(bytes, clampRange(asNumber(data[key], 50) * 10, 0, 0xffff));
        break;

      case "setInternalAlgoTemporaryState": // 0x67 <1 disable temporarily | 0 enable>
        bytes.push(0x67);
        bytes.push(asBool(data[key], false) ? 1 : 0);
        break;

      // ---- valve openness range ---------------------------------------------------
      case "setValveOpennessRange": // 0x4F <100-max> <100-min>, percent
        // Input is the openness in PERCENT; the "deduct from 100" is done here.
        // Doc example min 20 / max 60 -> 0x4F2850. "Not allowed to set values
        // that result in Min - Max < 10%" -> emit nothing for such a pair.
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = num(obj, "max");
        b = num(obj, "min");
        if (a === undefined || b === undefined) break;
        a = clampRange(a, 0, 100);
        b = clampRange(b, 0, 100);
        if (a - b < 10) break;
        bytes.push(0x4F);
        bytes.push(100 - a);
        bytes.push(100 - b);
        break;

      // ---- anti-freeze ----------------------------------------------------------------
      case "setAntiFreezeParams": // 0x49 <activation*10> <deactivation*10> <target C>
        // Doc example 6.0 / 9.0 / 7 -> 0x493C5A07. One byte each, so the
        // thresholds top out at 25.5 C.
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = num(obj, "activationThreshold", "activation");
        b = num(obj, "deactivationThreshold", "deactivation");
        c = num(obj, "targetTemperature", "target");
        if (a === undefined || b === undefined || c === undefined) break;
        bytes.push(0x49);
        bytes.push(clampByte(a * 10));
        bytes.push(clampByte(b * 10));
        bytes.push(clampByte(c));
        break;

      // ---- temperature offset ---------------------------------------------------------
      case "setTemperatureOffset": // 0x53 <raw>, raw = (offset + 4.928) / 0.176, -5..+5 C
        // Doc table: 0 C -> 0x1C, +5 C -> 0x38, -5 C -> 0x00.
        bytes.push(0x53);
        bytes.push(clampRange((asNumber(data[key], 0) + 4.928) / 0.176, 0, 56));
        break;

      // ---- display -----------------------------------------------------------------------
      case "setLedDisplayUnits": // 0x55 <0 C | 1 F | 2 scale 0-5 (fw>=4.6)>
        v = asNumber(data[key], undefined);
        if (v === undefined) break;
        v = Math.round(v);
        if (v < 0 || v > 2) break;
        bytes.push(0x55);
        bytes.push(v);
        break;

      case "setLedIndicationDuration": // 0x63 <seconds*2>, 1..20 (0.5..10 s). Default 1 s.
        bytes.push(0x63);
        bytes.push(clampRange(asNumber(data[key], 1) * 2, 1, 20));
        break;

      case "setScaleLevels": // 0x69 6 x <T*10 MSB> <LSB>, ascending, 5..30 C
        // Doc example 7.0/18.9/20.2/22.5/25.0/30.0 -> 0x69004600BD00CA00E100FA012C.
        // "The command accepts only ascending values" -> emit nothing otherwise.
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        s = [];
        for (k = 0; k < 6; k++) {
          v = num(obj, "level" + k);
          if (v === undefined) { s = null; break; }
          s.push(clampRange(v * 10, 50, 300));
        }
        if (!s) break;
        for (k = 1; k < 6; k++) {
          if (s[k] <= s[k - 1]) { s = null; break; }
        }
        if (!s) break;
        bytes.push(0x69);
        for (k = 0; k < 6; k++) push16(bytes, s[k]);
        break;

      // ---- offline / setback ------------------------------------------------------------
      case "setSetbackTime": // 0x61 <minutes/10>, 0 disables. Default 0.
        bytes.push(0x61);
        bytes.push(clampByte(asNumber(data[key], 0) / 10));
        break;

      case "setOfflineTargetTemperature": // 0x65 <T*10 MSB> <LSB>, 5..30 C, 0 disables
        // Doc example 21.5 -> 0x6500D7.
        v = asNumber(data[key], undefined);
        if (v === undefined) break;
        bytes.push(0x65);
        push16(bytes, v === 0 ? 0 : clampRange(v * 10, 50, 300));
        break;

      // ---- heating schedules & time -----------------------------------------------------
      case "setHeatingEvent": // 0x59 <idx> <hour> <minute> <T*10 MSB> <LSB> <weekday bits>
        // Doc example idx 0, 08:01, 25.8 C, Mon-Fri -> 0x5900080101021F.
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = num(obj, "index");
        b = num(obj, "hour");
        c = num(obj, "minute");
        d = num(obj, "targetTemperature");
        e = num(obj, "weekdays");
        if (a === undefined || b === undefined || c === undefined ||
            d === undefined || e === undefined) break;
        if (a < 0 || a > 19) break;
        bytes.push(0x59);
        bytes.push(Math.round(a));
        bytes.push(clampRange(b, 0, 23));
        bytes.push(clampRange(c, 0, 59));
        push16(bytes, clampRange(d * 10, 50, 300));
        bytes.push(clampRange(e, 0, 127));
        break;

      case "setHeatingEventState": // 0x6B <idx> <1 active | 0 inactive>
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = num(obj, "index");
        if (a === undefined || a < 0 || a > 19 || obj.active === undefined) break;
        bytes.push(0x6B);
        bytes.push(Math.round(a));
        bytes.push(asBool(obj.active, false) ? 1 : 0);
        break;

      case "setHeatingSeason": // 0x5B <start month-1> <start day> <end month-1> <end day>
        // Input months are 1-BASED (11 = November); the wire is 0-based. A day
        // of 0 disables schedule handling. Doc example Nov 1 - Apr 1 -> 0x5B0A010301.
        obj = parseMaybeJson(data[key]);
        if (!obj || typeof obj !== "object") break;
        a = num(obj, "startMonth");
        b = num(obj, "startDay");
        c = num(obj, "endMonth");
        d = num(obj, "endDay");
        if (a === undefined || b === undefined || c === undefined || d === undefined) break;
        bytes.push(0x5B);
        bytes.push(clampRange(a, 1, 12) - 1);
        bytes.push(clampRange(b, 0, 31));
        bytes.push(clampRange(c, 1, 12) - 1);
        bytes.push(clampRange(d, 0, 31));
        break;

      case "setDeviceTime": // 0x5D <unix MSB..LSB>, unsigned 32-bit
        // Doc example 1751176800 -> 0x5D6860D660.
        v = asNumber(data[key], undefined);
        if (v === undefined || v <= 0 || v > 4294967295) break;
        v = Math.round(v);
        bytes.push(0x5D);
        bytes.push(Math.floor(v / 16777216) & 0xff);
        bytes.push((v >> 16) & 0xff, (v >> 8) & 0xff, v & 0xff);
        break;

      case "setTimeZoneOffset": // 0x5F <hours, two's complement>, -12..+12
        // Doc example -3 -> 0x5FFD.
        v = asNumber(data[key], undefined);
        if (v === undefined) break;
        bytes.push(0x5F);
        bytes.push(clampRange(v, -12, 12) & 0xff);
        break;

      case "setAutoTimeSync": // 0x6D <0 stop | 1 resume>. Default 1.
        bytes.push(0x6D);
        bytes.push(asBool(data[key], true) ? 1 : 0);
        break;

      // ---- D2D (fw >= 5.0, mode 03 only) ------------------------------------------------
      case "setD2dAppKey": 
        s = String(data[key] === undefined || data[key] === null ? "" : data[key])
              .replace(/^0x/i, "").replace(/[\s:-]/g, "");
        if (!/^[0-9a-fA-F]{32}$/.test(s)) break;
        bytes.push(0x6F);
        for (k = 0; k < 32; k += 2) bytes.push(parseInt(s.substr(k, 2), 16));
        break;

      case "requestD2dListen": // 0x71, no data. Re-listen for the D2D notification device.
        if (asBool(data[key], false)) bytes.push(0x71);
        break;

      default:
        break;
    }
  }

  return {
    bytes: bytes,
    fPort: (input && input.fPort) || 1,
    warnings: [],
    errors: []
  };
}

function Encode(portOrInput, maybeInput) {
  var call = normalizeCall(portOrInput, maybeInput);
  var result = encodeDownlink({ fPort: call.fPort, data: call.data });

  // legacy style: Encode(port, input) -> raw bytes
  if (call.legacy) {
    return result.bytes;
  }
  // UG65/UG67 style: Encode(input) -> object
  return result;
}

function Encoder(portOrInput, maybeInput) {
  return Encode(portOrInput, maybeInput);
}

function decodeDownlink(input) {
  return {
    data: { bytes: input.bytes },
    warnings: [],
    errors: []
  };
}

```

#### Object Mapping Function (JSON Function)

```json
{
    "object": [
        {
            "id": "targetTemperature",
            "name": "Target Temperature",
            "value": "",
            "unit": "°C",
            "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": "targetTemperatureFloat",
            "name": "Target Temp 0.1",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "sensorTemperature",
            "name": "Temperature",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "relativeHumidity",
            "name": "Relative Humidity",
            "value": "",
            "unit": "%",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 29,
            "bacnet_unit_type": "UNITS_PERCENT_RELATIVE_HUMIDITY"
        },
        {
            "id": "motorPosition",
            "name": "Motor Position",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "motorRange",
            "name": "Motor Range",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "valveOpenness",
            "name": "Valve Openness",
            "value": "",
            "unit": "%",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 98,
            "bacnet_unit_type": "UNITS_PERCENT"
        },
        {
            "id": "batteryVoltage",
            "name": "Battery Voltage",
            "value": "",
            "unit": "V",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 5,
            "bacnet_unit_type": "UNITS_VOLTS"
        },
        {
            "id": "openWindow",
            "name": "Open Window",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "highMotorConsumption",
            "name": "High Motor Current",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "lowMotorConsumption",
            "name": "Low Motor Current",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "brokenSensor",
            "name": "Broken Sensor",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "childLockStatus",
            "name": "Child Lock Active",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "calibrationFailed",
            "name": "Calibration Failed",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "attachedBackplate",
            "name": "Attached Backplate",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "perceiveAsOnline",
            "name": "Perceives Online",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "antiFreezeActive",
            "name": "Anti-Freeze Active",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "d2dReliable",
            "name": "D2D Reliable",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "batteryTooLow",
            "name": "Battery Too Low",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "manualTargetTemperature",
            "name": "Manual Target",
            "value": "",
            "unit": "°C",
            "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": "setbackRestoredNotification",
            "name": "Setback Restored",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "scheduleChangedTargetNotification",
            "name": "Schedule Chg Target",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "d2dTemperature",
            "name": "D2D HT Temperature",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "crystalOscillatorError",
            "name": "Crystal Error",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_input_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": "",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "deviceSoftwareVersion",
            "name": "Software Version",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "lorawanRegion",
            "name": "LoRaWAN Region",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "ENUM",
            "value_type": "UINT8",
            "bacnet_type": "multistate_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "EU868"
                },
                {
                    "value": 1,
                    "name": "AS923"
                },
                {
                    "value": 2,
                    "name": "AU915"
                },
                {
                    "value": 3,
                    "name": "US915"
                }
            ]
        },
        {
            "id": "keepAliveTime",
            "name": "Keep-Alive Time",
            "value": "",
            "unit": "min",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "joinRetryPeriod",
            "name": "Join Retry Period",
            "value": "",
            "unit": "min",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "uplinkType",
            "name": "Uplink Type",
            "value": "",
            "unit": "",
            "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": "watchDogPeriodConfirmed",
            "name": "Watchdog WDP-C",
            "value": "",
            "unit": "",
            "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": "watchDogPeriodUnconfirmed",
            "name": "Watchdog WDP-UC",
            "value": "",
            "unit": "h",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 71,
            "bacnet_unit_type": "UNITS_HOURS"
        },
        {
            "id": "childLock",
            "name": "Child Lock",
            "value": "",
            "unit": "",
            "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": "childLockOfflineBehavior",
            "name": "Child Lock Offline",
            "value": "",
            "unit": "",
            "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": "temperatureRangeMin",
            "name": "Target Range Min",
            "value": "",
            "unit": "°C",
            "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": "temperatureRangeMax",
            "name": "Target Range Max",
            "value": "",
            "unit": "°C",
            "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": "openWindowEnabled",
            "name": "Open Window Enabled",
            "value": "",
            "unit": "",
            "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": "openWindowDuration",
            "name": "Open Window Duration",
            "value": "",
            "unit": "min",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "openWindowMotorPosition",
            "name": "Open Window Position",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "openWindowDelta",
            "name": "Open Window Delta",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "operationalMode",
            "name": "Operational Mode",
            "value": "",
            "unit": "",
            "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": "primaryOperationalMode",
            "name": "Primary Mode",
            "value": "",
            "unit": "",
            "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": "proportionalGain",
            "name": "PI Kp",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "integralGain",
            "name": "PI Ki",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "integralValue",
            "name": "PI Integral",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "piRunPeriod",
            "name": "PI Run Period",
            "value": "",
            "unit": "min",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "temperatureHysteresis",
            "name": "PI Hysteresis",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "maxIntegralValue",
            "name": "PI Max Integral",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "externalTemperature",
            "name": "External Temp",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "forceAttach",
            "name": "Force Attach",
            "value": "",
            "unit": "",
            "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": "antiFreezeActivationThreshold",
            "name": "AntiFrz On Below",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "antiFreezeDeactivationThreshold",
            "name": "AntiFrz Off Above",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "antiFreezeTargetTemperature",
            "name": "AntiFrz Target",
            "value": "",
            "unit": "°C",
            "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": "valveOpennessMax",
            "name": "Valve Open Max",
            "value": "",
            "unit": "%",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 98,
            "bacnet_unit_type": "UNITS_PERCENT"
        },
        {
            "id": "valveOpennessMin",
            "name": "Valve Open Min",
            "value": "",
            "unit": "%",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 98,
            "bacnet_unit_type": "UNITS_PERCENT"
        },
        {
            "id": "temperatureOffset",
            "name": "Temp Offset",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "ledDisplayUnits",
            "name": "Display Units",
            "value": "",
            "unit": "",
            "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": "ledIndicationDuration",
            "name": "LED Duration",
            "value": "",
            "unit": "s",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 73,
            "bacnet_unit_type": "UNITS_SECONDS"
        },
        {
            "id": "setbackTime",
            "name": "Setback Time",
            "value": "",
            "unit": "min",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "offlineTargetTemperature",
            "name": "Offline Target",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "internalAlgoTemporaryState",
            "name": "Algo Temp Disabled",
            "value": "",
            "unit": "",
            "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": "scaleLevel0",
            "name": "Scale Level 0",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "scaleLevel1",
            "name": "Scale Level 1",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "scaleLevel2",
            "name": "Scale Level 2",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "scaleLevel3",
            "name": "Scale Level 3",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "scaleLevel4",
            "name": "Scale Level 4",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "scaleLevel5",
            "name": "Scale Level 5",
            "value": "",
            "unit": "°C",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "heatingSeasonStartMonth",
            "name": "Season Start Month",
            "value": "",
            "unit": "",
            "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": "heatingSeasonStartDay",
            "name": "Season Start Day",
            "value": "",
            "unit": "",
            "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": "heatingSeasonEndMonth",
            "name": "Season End Month",
            "value": "",
            "unit": "",
            "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": "heatingSeasonEndDay",
            "name": "Season End Day",
            "value": "",
            "unit": "",
            "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": "deviceTime",
            "name": "Device Time",
            "value": "",
            "unit": "s",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 73,
            "bacnet_unit_type": "UNITS_SECONDS"
        },
        {
            "id": "timeZoneOffset",
            "name": "Time Zone",
            "value": "",
            "unit": "h",
            "access_mode": "R",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_input_object",
            "bacnet_unit_type_id": 71,
            "bacnet_unit_type": "UNITS_HOURS"
        },
        {
            "id": "autoTimeSync",
            "name": "Auto Time Sync",
            "value": "",
            "unit": "",
            "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": "heatingEventsGroup0",
            "name": "Heat Events 0-7",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 242
        },
        {
            "id": "heatingEventsGroup1",
            "name": "Heat Events 8-15",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 242
        },
        {
            "id": "heatingEventsGroup2",
            "name": "Heat Events 16-19",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 242
        },
        {
            "id": "heatingEventStates",
            "name": "Heat Event States",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 96
        },
        {
            "id": "d2dAppKey",
            "name": "D2D AppKey",
            "value": "",
            "unit": "",
            "access_mode": "R",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 40
        },
        {
            "id": "setKeepAlive",
            "name": "Set KeepAlv",
            "value": "",
            "unit": "min",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "setJoinRetryPeriod",
            "name": "Set JoinRt",
            "value": "",
            "unit": "min",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "setOperationalMode",
            "name": "Set Op Mode",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "setTargetTemperature",
            "name": "Set Target",
            "value": "",
            "unit": "°C",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "setTargetTemperaturePrecisely",
            "name": "Set Target 0.1",
            "value": "",
            "unit": "°C",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "setTargetTemperatureFahrenheit",
            "name": "Set Target F",
            "value": "",
            "unit": "°F",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 64,
            "bacnet_unit_type": "UNITS_DEGREES_FAHRENHEIT"
        },
        {
            "id": "setExternalTemperature",
            "name": "Set Ext Temp",
            "value": "",
            "unit": "°C",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "setExternalTemperatureFloat",
            "name": "Set Ext Temp 0.1",
            "value": "",
            "unit": "°C",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "setValveOpenness",
            "name": "Set Valve %",
            "value": "",
            "unit": "%",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 98,
            "bacnet_unit_type": "UNITS_PERCENT"
        },
        {
            "id": "setMotorPositionOnly",
            "name": "Set Motor Pos",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "setProportionalGain",
            "name": "Set PI Kp",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "setIntegralGain",
            "name": "Set PI Ki",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "setPiRunPeriod",
            "name": "Set PI Period",
            "value": "",
            "unit": "min",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "setTemperatureHysteresis",
            "name": "Set PI Hyst",
            "value": "",
            "unit": "°C",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "setMaxIntegralValue",
            "name": "Set PI MaxInt",
            "value": "",
            "unit": "°C",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "setTemperatureOffset",
            "name": "Set Temp Offset",
            "value": "",
            "unit": "°C",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "setLedDisplayUnits",
            "name": "Set Disp Units",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT8",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS"
        },
        {
            "id": "setLedIndicationDuration",
            "name": "Set LED Dur",
            "value": "",
            "unit": "s",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 73,
            "bacnet_unit_type": "UNITS_SECONDS"
        },
        {
            "id": "setSetbackTime",
            "name": "Set Setback",
            "value": "",
            "unit": "min",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "UINT16",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 72,
            "bacnet_unit_type": "UNITS_MINUTES"
        },
        {
            "id": "setOfflineTargetTemperature",
            "name": "Set Offline Tgt",
            "value": "",
            "unit": "°C",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 62,
            "bacnet_unit_type": "UNITS_DEGREES_CELSIUS"
        },
        {
            "id": "setDeviceTime",
            "name": "Set Dev Time",
            "value": "",
            "unit": "s",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 73,
            "bacnet_unit_type": "UNITS_SECONDS"
        },
        {
            "id": "setTimeZoneOffset",
            "name": "Set Time Zone",
            "value": "",
            "unit": "h",
            "access_mode": "W",
            "data_type": "NUMBER",
            "value_type": "FLOAT",
            "bacnet_type": "analog_output_object",
            "bacnet_unit_type_id": 71,
            "bacnet_unit_type": "UNITS_HOURS"
        },
        {
            "id": "setUplinkType",
            "name": "Set Uplink",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Unconfirmed"
                },
                {
                    "value": 1,
                    "name": "Confirmed"
                }
            ]
        },
        {
            "id": "setChildLock",
            "name": "Set Child Lock",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "setChildLockOfflineBehavior",
            "name": "Set CL Offline",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Disable"
                },
                {
                    "value": 1,
                    "name": "Keep"
                }
            ]
        },
        {
            "id": "setPrimaryOperationalMode",
            "name": "Set Primary",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Heating"
                },
                {
                    "value": 1,
                    "name": "Cooling"
                }
            ]
        },
        {
            "id": "setForceAttach",
            "name": "Set Force Att",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "setInternalAlgoTemporaryState",
            "name": "Set Algo Pause",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Run"
                },
                {
                    "value": 1,
                    "name": "Paused"
                }
            ]
        },
        {
            "id": "setAutoTimeSync",
            "name": "Set Time Sync",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Off"
                },
                {
                    "value": 1,
                    "name": "On"
                }
            ]
        },
        {
            "id": "deviceReset",
            "name": "Reset Device",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "recalibrateMotor",
            "name": "Recalibrate",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "requestD2dListen",
            "name": "D2D Re-listen",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "setWatchDogParams",
            "name": "Set WD Pms",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setTemperatureRange",
            "name": "Set Tgt Range",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setOpenWindow",
            "name": "Set OpenWin",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setOpenWindowPrecisely",
            "name": "Set OpenWin 0.1",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setTargetTemperatureAndMotorPosition",
            "name": "Set Motor+Tgt",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setValveOpennessRange",
            "name": "Set Valve Range",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setAntiFreezeParams",
            "name": "Set AntiFreeze",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setScaleLevels",
            "name": "Set Scale Lvls",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 160
        },
        {
            "id": "setHeatingEvent",
            "name": "Set Heat Event",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setHeatingEventState",
            "name": "Set Event State",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setHeatingSeason",
            "name": "Set Heat Season",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 128
        },
        {
            "id": "setD2dAppKey",
            "name": "Set D2D Key",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "TEXT",
            "value_type": "STRING",
            "bacnet_type": "character_string_value_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "max_length": 40
        },
        {
            "id": "getDeviceVersions",
            "name": "Get DevVers",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getKeepAliveTime",
            "name": "Get KeepAlv",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getOpenWindowParams",
            "name": "Get OpenWin",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getChildLock",
            "name": "Get Child Lock",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getTemperatureRange",
            "name": "Get Tgt Range",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getOperationalMode",
            "name": "Get Op Mode",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getJoinRetryPeriod",
            "name": "Get JoinRt",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getUplinkType",
            "name": "Get Uplink",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getWatchDogParams",
            "name": "Get WD Params",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getPrimaryOperationalMode",
            "name": "Get Primary",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getChildLockOfflineBehavior",
            "name": "Get CL Offline",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getProportionalGain",
            "name": "Get PI Kp",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getIntegralGain",
            "name": "Get PI Ki",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getIntegralValue",
            "name": "Get PI Integral",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getPiRunPeriod",
            "name": "Get PI Period",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getTemperatureHysteresis",
            "name": "Get PI Hyst",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getExternalTemperature",
            "name": "Get Ext Temp",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getOpenWindowPrecisely",
            "name": "Get OpenWin 0.1",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getForceAttach",
            "name": "Get Force Att",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getAntiFreezeParams",
            "name": "Get AntiFreeze",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getMaxIntegralValue",
            "name": "Get PI MaxInt",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getValveOpennessRange",
            "name": "Get Valve Range",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getTemperatureOffset",
            "name": "Get Temp Offset",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getLedDisplayUnits",
            "name": "Get Disp Units",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getHeatingSeason",
            "name": "Get Heat Season",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getDeviceTime",
            "name": "Get Dev Time",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getTimeZoneOffset",
            "name": "Get Time Zone",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getSetbackTime",
            "name": "Get Setback",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getLedIndicationDuration",
            "name": "Get LED Dur",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getOfflineTargetTemperature",
            "name": "Get Offline Tgt",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getInternalAlgoTemporaryState",
            "name": "Get Algo Pause",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getScaleLevels",
            "name": "Get Scale Lvls",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getHeatingEventStates",
            "name": "Get Event States",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getAutoTimeSync",
            "name": "Get Time Sync",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getD2dAppKey",
            "name": "Get D2D Key",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getLoRaWANRegion",
            "name": "Get Region",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getHeatingEventsGroup0",
            "name": "Get Events 0-7",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getHeatingEventsGroup1",
            "name": "Get Events 8-15",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        },
        {
            "id": "getHeatingEventsGroup2",
            "name": "Get Events 16-19",
            "value": "",
            "unit": "",
            "access_mode": "W",
            "data_type": "BOOL",
            "value_type": "UINT8",
            "bacnet_type": "binary_output_object",
            "bacnet_unit_type_id": 95,
            "bacnet_unit_type": "UNITS_NO_UNITS",
            "values": [
                {
                    "value": 0,
                    "name": "Idle"
                },
                {
                    "value": 1,
                    "name": "Run"
                }
            ]
        }
    ]
}

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/decoding-and-bacnet-object-mapping/bacnet-codec-and-definition-files/milesight.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
