"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Clusters = void 0;
const enums_1 = require("./enums");
const manufacturerCode_1 = require("./manufacturerCode");
const status_1 = require("./status");
exports.Clusters = {
    genBasic: {
        name: "genBasic",
        ID: 0x0000,
        attributes: {
            zclVersion: { name: "zclVersion", ID: 0x0000, type: enums_1.DataType.UINT8, required: true, max: 0xff, default: 8 },
            appVersion: { name: "appVersion", ID: 0x0001, type: enums_1.DataType.UINT8, max: 0xff, default: 0 },
            stackVersion: { name: "stackVersion", ID: 0x0002, type: enums_1.DataType.UINT8, max: 0xff, default: 0 },
            hwVersion: { name: "hwVersion", ID: 0x0003, type: enums_1.DataType.UINT8, max: 0xff, default: 0 },
            manufacturerName: { name: "manufacturerName", ID: 0x0004, type: enums_1.DataType.CHAR_STR, default: "", maxLen: 32 },
            modelId: { name: "modelId", ID: 0x0005, type: enums_1.DataType.CHAR_STR, default: "", maxLen: 32 },
            dateCode: { name: "dateCode", ID: 0x0006, type: enums_1.DataType.CHAR_STR, default: "", maxLen: 16 },
            powerSource: { name: "powerSource", ID: 0x0007, type: enums_1.DataType.ENUM8, required: true, default: 0xff },
            genericDeviceClass: { name: "genericDeviceClass", ID: 0x0008, type: enums_1.DataType.ENUM8, default: 0xff },
            genericDeviceType: { name: "genericDeviceType", ID: 0x0009, type: enums_1.DataType.ENUM8, default: 0xff },
            productCode: { name: "productCode", ID: 0x000a, type: enums_1.DataType.OCTET_STR, default: "" },
            productUrl: { name: "productUrl", ID: 0x000b, type: enums_1.DataType.CHAR_STR, default: "" },
            manufacturerVersionDetails: { name: "manufacturerVersionDetails", ID: 0x000c, type: enums_1.DataType.CHAR_STR, default: "" },
            serialNumber: { name: "serialNumber", ID: 0x000d, type: enums_1.DataType.CHAR_STR, default: "" },
            productLabel: { name: "productLabel", ID: 0x000e, type: enums_1.DataType.CHAR_STR, default: "" },
            locationDesc: { name: "locationDesc", ID: 0x0010, type: enums_1.DataType.CHAR_STR, write: true, default: "", maxLen: 16 },
            physicalEnv: { name: "physicalEnv", ID: 0x0011, type: enums_1.DataType.ENUM8, write: true, default: 0 },
            deviceEnabled: { name: "deviceEnabled", ID: 0x0012, type: enums_1.DataType.BOOLEAN, write: true, default: 1 },
            alarmMask: { name: "alarmMask", ID: 0x0013, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            disableLocalConfig: { name: "disableLocalConfig", ID: 0x0014, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            swBuildId: { name: "swBuildId", ID: 0x4000, type: enums_1.DataType.CHAR_STR, default: "", maxLen: 16 },
        },
        commands: {
            resetFactDefault: { name: "resetFactDefault", ID: 0x00, parameters: [] },
        },
        commandsResponse: {},
    },
    genPowerCfg: {
        name: "genPowerCfg",
        ID: 0x0001,
        attributes: {
            mainsVoltage: { name: "mainsVoltage", ID: 0x0000, type: enums_1.DataType.UINT16, max: 0xffff },
            mainsFrequency: { name: "mainsFrequency", ID: 0x0001, type: enums_1.DataType.UINT8, max: 0xff },
            mainsAlarmMask: { name: "mainsAlarmMask", ID: 0x0010, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            mainsVoltMinThres: { name: "mainsVoltMinThres", ID: 0x0011, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            mainsVoltMaxThres: { name: "mainsVoltMaxThres", ID: 0x0012, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0xffff },
            mainsVoltageDwellTripPoint: { name: "mainsVoltageDwellTripPoint", ID: 0x0013, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            batteryVoltage: { name: "batteryVoltage", ID: 0x0020, type: enums_1.DataType.UINT8, max: 0xff },
            batteryPercentageRemaining: { name: "batteryPercentageRemaining", ID: 0x0021, type: enums_1.DataType.UINT8, report: true, max: 0xff, default: 0 },
            batteryManufacturer: { name: "batteryManufacturer", ID: 0x0030, type: enums_1.DataType.CHAR_STR, write: true, default: "", maxLen: 16 },
            batterySize: { name: "batterySize", ID: 0x0031, type: enums_1.DataType.ENUM8, write: true, default: 0xff },
            batteryAHrRating: { name: "batteryAHrRating", ID: 0x0032, type: enums_1.DataType.UINT16, write: true, max: 0xffff },
            batteryQuantity: { name: "batteryQuantity", ID: 0x0033, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            batteryRatedVoltage: { name: "batteryRatedVoltage", ID: 0x0034, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            batteryAlarmMask: { name: "batteryAlarmMask", ID: 0x0035, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            batteryVoltMinThres: { name: "batteryVoltMinThres", ID: 0x0036, type: enums_1.DataType.UINT8, write: true, max: 0xff, default: 0 },
            batteryVoltThres1: { name: "batteryVoltThres1", ID: 0x0037, type: enums_1.DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0 },
            batteryVoltThres2: { name: "batteryVoltThres2", ID: 0x0038, type: enums_1.DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0 },
            batteryVoltThres3: { name: "batteryVoltThres3", ID: 0x0039, type: enums_1.DataType.UINT8, write: true, writeOptional: true, max: 0xff, default: 0 },
            batteryPercentMinThres: {
                name: "batteryPercentMinThres",
                ID: 0x003a,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            batteryPercentThres1: {
                name: "batteryPercentThres1",
                ID: 0x003b,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            batteryPercentThres2: {
                name: "batteryPercentThres2",
                ID: 0x003c,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            batteryPercentThres3: {
                name: "batteryPercentThres3",
                ID: 0x003d,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            batteryAlarmState: { name: "batteryAlarmState", ID: 0x003e, type: enums_1.DataType.BITMAP32, report: true, default: 0 },
            battery2Voltage: { name: "battery2Voltage", ID: 0x0040, type: enums_1.DataType.UINT8, max: 0xff },
            battery2PercentageRemaining: { name: "battery2PercentageRemaining", ID: 0x0041, type: enums_1.DataType.UINT8, report: true, max: 0xff, default: 0 },
            battery2Manufacturer: { name: "battery2Manufacturer", ID: 0x0050, type: enums_1.DataType.CHAR_STR, write: true, default: "", maxLen: 16 },
            battery2Size: { name: "battery2Size", ID: 0x0051, type: enums_1.DataType.ENUM8, write: true, default: 0xff },
            battery2AHrRating: { name: "battery2AHrRating", ID: 0x0052, type: enums_1.DataType.UINT16, write: true, max: 0xffff },
            battery2Quantity: { name: "battery2Quantity", ID: 0x0053, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            battery2RatedVoltage: { name: "battery2RatedVoltage", ID: 0x0054, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            battery2AlarmMask: { name: "battery2AlarmMask", ID: 0x0055, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            battery2VoltageMinThreshold: { name: "battery2VoltageMinThreshold", ID: 0x0056, type: enums_1.DataType.UINT8, write: true, max: 0xff, default: 0 },
            battery2VoltageThreshold1: {
                name: "battery2VoltageThreshold1",
                ID: 0x0057,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery2VoltageThreshold2: {
                name: "battery2VoltageThreshold2",
                ID: 0x0058,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery2VoltageThreshold3: {
                name: "battery2VoltageThreshold3",
                ID: 0x0059,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery2PercentageMinThreshold: {
                name: "battery2PercentageMinThreshold",
                ID: 0x005a,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery2PercentageThreshold1: {
                name: "battery2PercentageThreshold1",
                ID: 0x005b,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery2PercentageThreshold2: {
                name: "battery2PercentageThreshold2",
                ID: 0x005c,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery2PercentageThreshold3: {
                name: "battery2PercentageThreshold3",
                ID: 0x005d,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery2AlarmState: { name: "battery2AlarmState", ID: 0x005e, type: enums_1.DataType.BITMAP32, report: true, default: 0 },
            battery3Voltage: { name: "battery3Voltage", ID: 0x0060, type: enums_1.DataType.UINT8, max: 0xff },
            battery3PercentageRemaining: { name: "battery3PercentageRemaining", ID: 0x0061, type: enums_1.DataType.UINT8, report: true, max: 0xff, default: 0 },
            battery3Manufacturer: { name: "battery3Manufacturer", ID: 0x0070, type: enums_1.DataType.CHAR_STR, write: true, default: "", maxLen: 16 },
            battery3Size: { name: "battery3Size", ID: 0x0071, type: enums_1.DataType.ENUM8, write: true, default: 0xff },
            battery3AHrRating: { name: "battery3AHrRating", ID: 0x0072, type: enums_1.DataType.UINT16, write: true, max: 0xffff },
            battery3Quantity: { name: "battery3Quantity", ID: 0x0073, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            battery3RatedVoltage: { name: "battery3RatedVoltage", ID: 0x0074, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            battery3AlarmMask: { name: "battery3AlarmMask", ID: 0x0075, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            battery3VoltageMinThreshold: { name: "battery3VoltageMinThreshold", ID: 0x0076, type: enums_1.DataType.UINT8, write: true, max: 0xff, default: 0 },
            battery3VoltageThreshold1: {
                name: "battery3VoltageThreshold1",
                ID: 0x0077,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery3VoltageThreshold2: {
                name: "battery3VoltageThreshold2",
                ID: 0x0078,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery3VoltageThreshold3: {
                name: "battery3VoltageThreshold3",
                ID: 0x0079,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery3PercentageMinThreshold: {
                name: "battery3PercentageMinThreshold",
                ID: 0x007a,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery3PercentageThreshold1: {
                name: "battery3PercentageThreshold1",
                ID: 0x007b,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery3PercentageThreshold2: {
                name: "battery3PercentageThreshold2",
                ID: 0x007c,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery3PercentageThreshold3: {
                name: "battery3PercentageThreshold3",
                ID: 0x007d,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                max: 0xff,
                default: 0,
            },
            battery3AlarmState: { name: "battery3AlarmState", ID: 0x007e, type: enums_1.DataType.BITMAP32, report: true, default: 0 },
        },
        commands: {},
        commandsResponse: {},
    },
    genDeviceTempCfg: {
        name: "genDeviceTempCfg",
        ID: 0x0002,
        attributes: {
            currentTemperature: { name: "currentTemperature", ID: 0x0000, type: enums_1.DataType.INT16, required: true, min: -200, max: 200 },
            minTempExperienced: { name: "minTempExperienced", ID: 0x0001, type: enums_1.DataType.INT16, min: -200, max: 200 },
            maxTempExperienced: { name: "maxTempExperienced", ID: 0x0002, type: enums_1.DataType.INT16, min: -200, max: 200 },
            overTempTotalDwell: { name: "overTempTotalDwell", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            devTempAlarmMask: { name: "devTempAlarmMask", ID: 0x0010, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            lowTempThres: { name: "lowTempThres", ID: 0x0011, type: enums_1.DataType.INT16, write: true, min: -200, max: 200 },
            highTempThres: { name: "highTempThres", ID: 0x0012, type: enums_1.DataType.INT16, write: true, min: -200, max: 200 },
            lowTempDwellTripPoint: { name: "lowTempDwellTripPoint", ID: 0x0013, type: enums_1.DataType.UINT24, write: true, max: 0xffffff },
            highTempDwellTripPoint: { name: "highTempDwellTripPoint", ID: 0x0014, type: enums_1.DataType.UINT24, write: true, max: 0xffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genIdentify: {
        name: "genIdentify",
        ID: 0x0003,
        attributes: {
            identifyTime: { name: "identifyTime", ID: 0x0000, type: enums_1.DataType.UINT16, write: true, required: true, max: 0xffff, default: 0 },
        },
        commands: {
            identify: { name: "identify", ID: 0x00, parameters: [{ name: "identifytime", type: enums_1.DataType.UINT16 }], required: true },
            identifyQuery: { name: "identifyQuery", ID: 0x01, parameters: [], required: true },
            triggerEffect: {
                name: "triggerEffect",
                ID: 0x40,
                parameters: [
                    { name: "effectid", type: enums_1.DataType.ENUM8 },
                    { name: "effectvariant", type: enums_1.DataType.ENUM8 },
                ],
            },
        },
        commandsResponse: {
            identifyQueryRsp: {
                name: "identifyQueryRsp",
                ID: 0x00,
                parameters: [{ name: "timeout", type: enums_1.DataType.UINT16, max: 0xffff }],
                required: true,
            },
        },
    },
    /** Note: an end device being "sleepy" makes everything optional, even if marked mandatory */
    genGroups: {
        name: "genGroups",
        ID: 0x0004,
        attributes: {
            nameSupport: { name: "nameSupport", ID: 0x0000, type: enums_1.DataType.BITMAP8, required: true, default: 0 },
        },
        commands: {
            add: {
                name: "add",
                ID: 0x00,
                response: 0x00,
                parameters: [
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "groupname", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
            view: { name: "view", ID: 0x01, response: 0x01, parameters: [{ name: "groupid", type: enums_1.DataType.UINT16 }], required: true },
            getMembership: {
                name: "getMembership",
                ID: 0x02,
                response: 0x02,
                parameters: [
                    { name: "groupcount", type: enums_1.DataType.UINT8 },
                    { name: "grouplist", type: enums_1.BuffaloZclDataType.LIST_UINT16 },
                ],
                required: true,
            },
            remove: { name: "remove", ID: 0x03, response: 0x03, parameters: [{ name: "groupid", type: enums_1.DataType.UINT16 }], required: true },
            removeAll: { name: "removeAll", ID: 0x04, parameters: [], required: true },
            addIfIdentifying: {
                name: "addIfIdentifying",
                ID: 0x05,
                parameters: [
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "groupname", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
        },
        commandsResponse: {
            addRsp: {
                name: "addRsp",
                ID: 0x00,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            viewRsp: {
                name: "viewRsp",
                ID: 0x01,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "groupname", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
            getMembershipRsp: {
                name: "getMembershipRsp",
                ID: 0x02,
                parameters: [
                    { name: "capacity", type: enums_1.DataType.UINT8 },
                    { name: "groupcount", type: enums_1.DataType.UINT8 },
                    { name: "grouplist", type: enums_1.BuffaloZclDataType.LIST_UINT16 },
                ],
                required: true,
            },
            removeRsp: {
                name: "removeRsp",
                ID: 0x03,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
        },
    },
    /** Note: an end device being "sleepy" makes everything optional, even if marked mandatory */
    genScenes: {
        name: "genScenes",
        ID: 0x0005,
        attributes: {
            count: { name: "count", ID: 0x0000, type: enums_1.DataType.UINT8, required: true, max: 0xff, default: 0 },
            currentScene: { name: "currentScene", ID: 0x0001, type: enums_1.DataType.UINT8, required: true, max: 0xff, default: 0 },
            currentGroup: { name: "currentGroup", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, max: 0xfff7, default: 0 },
            sceneValid: { name: "sceneValid", ID: 0x0003, type: enums_1.DataType.BOOLEAN, required: true, default: 0 },
            nameSupport: { name: "nameSupport", ID: 0x0004, type: enums_1.DataType.BITMAP8, required: true, default: 0 },
            lastCfgBy: { name: "lastCfgBy", ID: 0x0005, type: enums_1.DataType.IEEE_ADDR, special: [["UnknownOrNotConfigured", "ffffffffffffffff"]] },
        },
        commands: {
            add: {
                name: "add",
                ID: 0x00,
                response: 0x00,
                parameters: [
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    { name: "scenename", type: enums_1.DataType.CHAR_STR },
                    { name: "extensionfieldsets", type: enums_1.BuffaloZclDataType.EXTENSION_FIELD_SETS },
                ],
                required: true,
            },
            view: {
                name: "view",
                ID: 0x01,
                response: 0x01,
                parameters: [
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            remove: {
                name: "remove",
                ID: 0x02,
                response: 0x02,
                parameters: [
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            removeAll: { name: "removeAll", ID: 0x03, response: 0x03, parameters: [{ name: "groupid", type: enums_1.DataType.UINT16 }], required: true },
            store: {
                name: "store",
                ID: 0x04,
                response: 0x04,
                parameters: [
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            recall: {
                name: "recall",
                ID: 0x05,
                parameters: [
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                    {
                        name: "transitionTime",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 2 }],
                    },
                ],
                required: true,
            },
            getSceneMembership: {
                name: "getSceneMembership",
                ID: 0x06,
                response: 0x06,
                parameters: [{ name: "groupid", type: enums_1.DataType.UINT16 }],
                required: true,
            },
            enhancedAdd: {
                name: "enhancedAdd",
                ID: 0x40,
                response: 0x40,
                parameters: [
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    { name: "scenename", type: enums_1.DataType.CHAR_STR },
                    { name: "extensionfieldsets", type: enums_1.BuffaloZclDataType.EXTENSION_FIELD_SETS },
                ],
            },
            enhancedView: {
                name: "enhancedView",
                ID: 0x41,
                response: 0x41,
                parameters: [
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                ],
            },
            copy: {
                name: "copy",
                ID: 0x42,
                response: 0x42,
                parameters: [
                    { name: "mode", type: enums_1.DataType.BITMAP8 },
                    { name: "groupidfrom", type: enums_1.DataType.UINT16 },
                    { name: "sceneidfrom", type: enums_1.DataType.UINT8 },
                    { name: "groupidto", type: enums_1.DataType.UINT16 },
                    { name: "sceneidto", type: enums_1.DataType.UINT8 },
                ],
            },
        },
        commandsResponse: {
            addRsp: {
                name: "addRsp",
                ID: 0x00,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupId", type: enums_1.DataType.UINT16 },
                    { name: "sceneId", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            viewRsp: {
                name: "viewRsp",
                ID: 0x01,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                    {
                        name: "transtime",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "scenename",
                        type: enums_1.DataType.CHAR_STR,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "extensionfieldsets",
                        type: enums_1.BuffaloZclDataType.EXTENSION_FIELD_SETS,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                ],
                required: true,
            },
            removeRsp: {
                name: "removeRsp",
                ID: 0x02,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            removeAllRsp: {
                name: "removeAllRsp",
                ID: 0x03,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            storeRsp: {
                name: "storeRsp",
                ID: 0x04,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            getSceneMembershipRsp: {
                name: "getSceneMembershipRsp",
                ID: 0x06,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    {
                        name: "capacity",
                        type: enums_1.DataType.UINT8,
                        min: 0,
                        max: 0xff,
                        special: [
                            ["NoFurtherScenesMayBeAdded", "00"],
                            ["AtLeastOneFurtherSceneMayBeAdded", "fe"],
                            ["Unknown", "ff"],
                        ],
                    },
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    {
                        name: "scenecount",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "scenelist",
                        type: enums_1.BuffaloZclDataType.LIST_UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                ],
                required: true,
            },
            enhancedAddRsp: {
                name: "enhancedAddRsp",
                ID: 0x40,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupId", type: enums_1.DataType.UINT16 },
                    { name: "sceneId", type: enums_1.DataType.UINT8 },
                ],
            },
            enhancedViewRsp: {
                name: "enhancedViewRsp",
                ID: 0x41,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupid", type: enums_1.DataType.UINT16 },
                    { name: "sceneid", type: enums_1.DataType.UINT8 },
                    {
                        name: "transtime",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "scenename",
                        type: enums_1.DataType.CHAR_STR,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "extensionfieldsets",
                        type: enums_1.BuffaloZclDataType.EXTENSION_FIELD_SETS,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                ],
            },
            copyRsp: {
                name: "copyRsp",
                ID: 0x42,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "groupidfrom", type: enums_1.DataType.UINT16 },
                    { name: "sceneidfrom", type: enums_1.DataType.UINT8 },
                ],
            },
        },
    },
    genOnOff: {
        name: "genOnOff",
        ID: 0x0006,
        attributes: {
            onOff: { name: "onOff", ID: 0x0000, type: enums_1.DataType.BOOLEAN, report: true, scene: true, required: true, default: 0 },
            globalSceneCtrl: { name: "globalSceneCtrl", ID: 0x4000, type: enums_1.DataType.BOOLEAN, default: 1 },
            onTime: { name: "onTime", ID: 0x4001, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            offWaitTime: { name: "offWaitTime", ID: 0x4002, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            startUpOnOff: { name: "startUpOnOff", ID: 0x4003, type: enums_1.DataType.ENUM8, write: true, max: 0xff, special: [["SetToPreviousValue", "ff"]] },
        },
        commands: {
            off: { name: "off", ID: 0x00, parameters: [], required: true },
            on: { name: "on", ID: 0x01, parameters: [], required: true },
            toggle: { name: "toggle", ID: 0x02, parameters: [], required: true },
            offWithEffect: {
                name: "offWithEffect",
                ID: 0x40,
                parameters: [
                    { name: "effectid", type: enums_1.DataType.ENUM8 },
                    { name: "effectvariant", type: enums_1.DataType.UINT8 },
                ],
            },
            onWithRecallGlobalScene: { name: "onWithRecallGlobalScene", ID: 0x41, parameters: [] },
            onWithTimedOff: {
                name: "onWithTimedOff",
                ID: 0x42,
                parameters: [
                    { name: "ctrlbits", type: enums_1.DataType.UINT8 },
                    { name: "ontime", type: enums_1.DataType.UINT16 },
                    { name: "offwaittime", type: enums_1.DataType.UINT16 },
                ],
            },
        },
        commandsResponse: {},
    },
    genOnOffSwitchCfg: {
        name: "genOnOffSwitchCfg",
        ID: 0x0007,
        attributes: {
            switchType: { name: "switchType", ID: 0x0000, type: enums_1.DataType.ENUM8, required: true, min: 0x00, max: 0x02 },
            switchActions: { name: "switchActions", ID: 0x0010, type: enums_1.DataType.ENUM8, required: true, write: true, min: 0, max: 2 },
        },
        commands: {},
        commandsResponse: {},
    },
    genLevelCtrl: {
        name: "genLevelCtrl",
        ID: 0x0008,
        attributes: {
            currentLevel: {
                name: "currentLevel",
                ID: 0x0000,
                type: enums_1.DataType.UINT8,
                report: true,
                scene: true,
                required: true,
                default: 0xff,
                // for genLevelCtrlForLighting:
                // min: 1,
                // max: 0xfe,
            },
            remainingTime: { name: "remainingTime", ID: 0x0001, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            minLevel: { name: "minLevel", ID: 0x0002, type: enums_1.DataType.UINT8, default: 0 },
            maxLevel: { name: "maxLevel", ID: 0x0003, type: enums_1.DataType.UINT8, max: 0xff, default: 0xff },
            currentFrequency: { name: "currentFrequency", ID: 0x0004, type: enums_1.DataType.UINT16, report: true, default: 0 },
            minFrequency: { name: "minFrequency", ID: 0x0005, type: enums_1.DataType.UINT16, default: 0 },
            maxFrequency: { name: "maxFrequency", ID: 0x0006, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            options: { name: "options", ID: 0x000f, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            onOffTransitionTime: { name: "onOffTransitionTime", ID: 0x0010, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            onLevel: { name: "onLevel", ID: 0x0011, type: enums_1.DataType.UINT8, write: true, default: 0xff },
            onTransitionTime: { name: "onTransitionTime", ID: 0x0012, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0xffff },
            offTransitionTime: { name: "offTransitionTime", ID: 0x0013, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0xffff },
            defaultMoveRate: { name: "defaultMoveRate", ID: 0x0014, type: enums_1.DataType.UINT8, write: true, max: 0xfe },
            startUpCurrentLevel: {
                name: "startUpCurrentLevel",
                ID: 0x4000,
                type: enums_1.DataType.UINT8,
                write: true,
                max: 0xff,
                special: [
                    ["MinimumDeviceValuePermitted", "00"],
                    ["SetToPreviousValue", "ff"],
                ],
            },
        },
        commands: {
            moveToLevel: {
                name: "moveToLevel",
                ID: 0x00,
                parameters: [
                    { name: "level", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            move: {
                name: "move",
                ID: 0x01,
                parameters: [
                    { name: "movemode", type: enums_1.DataType.ENUM8 },
                    { name: "rate", type: enums_1.DataType.UINT8 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            step: {
                name: "step",
                ID: 0x02,
                parameters: [
                    { name: "stepmode", type: enums_1.DataType.ENUM8 },
                    { name: "stepsize", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            stop: {
                name: "stop",
                ID: 0x03,
                parameters: [
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            moveToLevelWithOnOff: {
                name: "moveToLevelWithOnOff",
                ID: 0x04,
                parameters: [
                    { name: "level", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            moveWithOnOff: {
                name: "moveWithOnOff",
                ID: 0x05,
                parameters: [
                    { name: "movemode", type: enums_1.DataType.ENUM8 },
                    { name: "rate", type: enums_1.DataType.UINT8 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            stepWithOnOff: {
                name: "stepWithOnOff",
                ID: 0x06,
                parameters: [
                    { name: "stepmode", type: enums_1.DataType.ENUM8 },
                    { name: "stepsize", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            stopWithOnOff: {
                name: "stopWithOnOff",
                ID: 0x07,
                parameters: [
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            // only `required: true` if `currentFrequency` attribute supported
            moveToClosestFrequency: { name: "moveToClosestFrequency", ID: 0x08, parameters: [{ name: "frequency", type: enums_1.DataType.UINT16 }] },
        },
        commandsResponse: {},
    },
    genAlarms: {
        name: "genAlarms",
        ID: 0x0009,
        attributes: {
            alarmCount: { name: "alarmCount", ID: 0x0000, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
        },
        commands: {
            reset: {
                name: "reset",
                ID: 0x00,
                parameters: [
                    { name: "alarmcode", type: enums_1.DataType.ENUM8 },
                    { name: "clusterid", type: enums_1.DataType.CLUSTER_ID },
                ],
                required: true,
            },
            resetAll: { name: "resetAll", ID: 0x01, parameters: [], required: true },
            getAlarm: { name: "getAlarm", ID: 0x02, parameters: [] },
            resetLog: { name: "resetLog", ID: 0x03, parameters: [] },
        },
        commandsResponse: {
            alarm: {
                name: "alarm",
                ID: 0x00,
                parameters: [
                    { name: "alarmcode", type: enums_1.DataType.ENUM8 },
                    { name: "clusterid", type: enums_1.DataType.CLUSTER_ID },
                ],
                required: true,
            },
            getRsp: {
                name: "getRsp",
                ID: 0x01,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    {
                        name: "alarmcode",
                        type: enums_1.DataType.ENUM8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "clusterid",
                        type: enums_1.DataType.CLUSTER_ID,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "timestamp",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                ],
            },
        },
    },
    genTime: {
        name: "genTime",
        ID: 0x000a,
        attributes: {
            time: { name: "time", ID: 0x0000, type: enums_1.DataType.UTC, write: true, required: true, max: 0xfffffffe, default: 0xffffffff },
            timeStatus: { name: "timeStatus", ID: 0x0001, type: enums_1.DataType.BITMAP8, write: true, required: true, default: 0 },
            timeZone: { name: "timeZone", ID: 0x0002, type: enums_1.DataType.INT32, write: true, min: -86400, max: 86400, default: 0 },
            dstStart: { name: "dstStart", ID: 0x0003, type: enums_1.DataType.UINT32, write: true, max: 0xfffffffe, default: 0xffffffff },
            dstEnd: { name: "dstEnd", ID: 0x0004, type: enums_1.DataType.UINT32, write: true, max: 0xfffffffe, default: 0xffffffff },
            dstShift: { name: "dstShift", ID: 0x0005, type: enums_1.DataType.INT32, write: true, min: -86400, max: 86400, default: 0 },
            standardTime: { name: "standardTime", ID: 0x0006, type: enums_1.DataType.UINT32, max: 0xfffffffe, default: 0xffffffff },
            localTime: { name: "localTime", ID: 0x0007, type: enums_1.DataType.UINT32, max: 0xfffffffe, default: 0xffffffff },
            lastSetTime: { name: "lastSetTime", ID: 0x0008, type: enums_1.DataType.UTC, default: 0xffffffff },
            validUntilTime: { name: "validUntilTime", ID: 0x0009, type: enums_1.DataType.UTC, write: true, default: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genRssiLocation: {
        name: "genRssiLocation",
        ID: 0x000b,
        attributes: {
            /** [2: coordinator system, 1: 2-D, 1: absolute] */
            type: { name: "type", ID: 0x0000, type: enums_1.DataType.DATA8, required: true, write: true },
            method: { name: "method", ID: 0x0001, type: enums_1.DataType.ENUM8, required: true, write: true },
            age: { name: "age", ID: 0x0002, type: enums_1.DataType.UINT16, max: 0xffff },
            qualityMeasure: { name: "qualityMeasure", ID: 0x0003, type: enums_1.DataType.UINT8, max: 100 },
            numOfDevices: { name: "numOfDevices", ID: 0x0004, type: enums_1.DataType.UINT8, max: 0xff },
            coordinate1: { name: "coordinate1", ID: 0x0010, type: enums_1.DataType.INT16, required: true, write: true, min: -0x8000, max: 0x7fff },
            coordinate2: { name: "coordinate2", ID: 0x0011, type: enums_1.DataType.INT16, required: true, write: true, min: -0x8000, max: 0x7fff },
            coordinate3: { name: "coordinate3", ID: 0x0012, type: enums_1.DataType.INT16, write: true, min: -0x8000, max: 0x7fff },
            power: { name: "power", ID: 0x0013, type: enums_1.DataType.INT16, required: true, write: true, min: -0x8000, max: 0x7fff },
            pathLossExponent: { name: "pathLossExponent", ID: 0x0014, type: enums_1.DataType.UINT16, required: true, write: true },
            reportingPeriod: { name: "reportingPeriod", ID: 0x0015, type: enums_1.DataType.UINT16, write: true, max: 0xffff },
            calcPeriod: { name: "calcPeriod", ID: 0x0016, type: enums_1.DataType.UINT16, write: true, max: 0xffff },
            numRSSIMeasurements: { name: "numRSSIMeasurements", ID: 0x0017, type: enums_1.DataType.UINT8, required: true, write: true, min: 0x01, max: 0xff },
        },
        commands: {
            setAbsolute: {
                name: "setAbsolute",
                ID: 0x00,
                parameters: [
                    { name: "coordinate1", type: enums_1.DataType.INT16 },
                    { name: "coordinate2", type: enums_1.DataType.INT16 },
                    { name: "coordinate3", type: enums_1.DataType.INT16 },
                    { name: "power", type: enums_1.DataType.INT16 },
                    { name: "pathLossExponent", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            setDeviceConfig: {
                name: "setDeviceConfig",
                ID: 0x01,
                parameters: [
                    { name: "power", type: enums_1.DataType.INT16 },
                    { name: "pathLossExponent", type: enums_1.DataType.UINT16 },
                    { name: "calcPeriod", type: enums_1.DataType.UINT16 },
                    { name: "numRssiMeasurements", type: enums_1.DataType.UINT8 },
                    { name: "reportingPeriod", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            getDeviceConfig: { name: "getDeviceConfig", ID: 0x02, parameters: [{ name: "targetAddr", type: enums_1.DataType.IEEE_ADDR }], required: true },
            getLocationData: {
                name: "getLocationData",
                ID: 0x03,
                parameters: [
                    /** [3: reserved, 1: compactResponse, 1: broadcastResponse, 1: broadcastIndicator, 1: recalculate, 1: absoluteOnly] */
                    { name: "info", type: enums_1.DataType.BITMAP8 },
                    { name: "numResponses", type: enums_1.DataType.UINT8 },
                    {
                        name: "targetAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "info", mask: 0b100, reversed: true }],
                    },
                ],
                required: true,
            },
            rssiResponse: {
                name: "rssiResponse",
                ID: 0x04,
                parameters: [
                    { name: "replyingDevice", type: enums_1.DataType.IEEE_ADDR },
                    { name: "x", type: enums_1.DataType.INT16 },
                    { name: "y", type: enums_1.DataType.INT16 },
                    { name: "z", type: enums_1.DataType.INT16 },
                    { name: "rssi", type: enums_1.DataType.INT8 },
                    { name: "numRssiMeasurements", type: enums_1.DataType.UINT8 },
                ],
            },
            sendPings: {
                name: "sendPings",
                ID: 0x05,
                parameters: [
                    { name: "targetAddr", type: enums_1.DataType.IEEE_ADDR },
                    { name: "numRssiMeasurements", type: enums_1.DataType.UINT8 },
                    { name: "calcPeriod", type: enums_1.DataType.UINT16 },
                ],
            },
            anchorNodeAnnounce: {
                name: "anchorNodeAnnounce",
                ID: 0x06,
                parameters: [
                    { name: "anchorNodeAddr", type: enums_1.DataType.IEEE_ADDR },
                    { name: "x", type: enums_1.DataType.INT16 },
                    { name: "y", type: enums_1.DataType.INT16 },
                    { name: "z", type: enums_1.DataType.INT16 },
                ],
            },
        },
        commandsResponse: {
            deviceConfigResponse: {
                name: "deviceConfigResponse",
                ID: 0x00,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    {
                        name: "power",
                        type: enums_1.DataType.INT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "pathLossExponent",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "calcPeriod",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "numRssiMeasurements",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "reportingPeriod",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                ],
                required: true,
            },
            locationDataResponse: {
                name: "locationDataResponse",
                ID: 0x01,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    {
                        name: "type",
                        type: enums_1.DataType.DATA8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "coordinate1",
                        type: enums_1.DataType.INT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "coordinate2",
                        type: enums_1.DataType.INT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "coordinate3",
                        type: enums_1.DataType.INT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "power",
                        type: enums_1.DataType.INT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "pathLossExponent",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "method",
                        type: enums_1.DataType.ENUM8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "qualityMeasure",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "age",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                ],
                required: true,
            },
            locationDataNotification: {
                name: "locationDataNotification",
                ID: 0x02,
                parameters: [
                    { name: "type", type: enums_1.DataType.DATA8 },
                    { name: "coordinate1", type: enums_1.DataType.INT16 },
                    { name: "coordinate2", type: enums_1.DataType.INT16 },
                    {
                        name: "coordinate3",
                        type: enums_1.DataType.INT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "type", mask: 0b10, reversed: true }],
                    },
                    { name: "power", type: enums_1.DataType.INT16 },
                    { name: "pathLossExponent", type: enums_1.DataType.UINT16 },
                    {
                        name: "method",
                        type: enums_1.DataType.ENUM8,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "type", mask: 0b1, reversed: true }],
                    },
                    {
                        name: "qualityMeasure",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "type", mask: 0b1, reversed: true }],
                    },
                    {
                        name: "age",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "type", mask: 0b1, reversed: true }],
                    },
                ],
            },
            compactLocationDataNotification: {
                name: "compactLocationDataNotification",
                ID: 0x03,
                parameters: [
                    { name: "type", type: enums_1.DataType.DATA8 },
                    { name: "coordinate1", type: enums_1.DataType.INT16 },
                    { name: "coordinate2", type: enums_1.DataType.INT16 },
                    {
                        name: "coordinate3",
                        type: enums_1.DataType.INT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "type", mask: 0b10, reversed: true }],
                    },
                    {
                        name: "qualityMeasure",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "type", mask: 0b1, reversed: true }],
                    },
                    {
                        name: "age",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "type", mask: 0b1, reversed: true }],
                    },
                ],
                required: true,
            },
            rssiPing: { name: "rssiPing", ID: 0x04, parameters: [{ name: "type", type: enums_1.DataType.DATA8 }], required: true },
            rssiRequest: { name: "rssiRequest", ID: 0x05, parameters: [] },
            reportRssiMeasurements: {
                name: "reportRssiMeasurements",
                ID: 0x06,
                parameters: [
                    { name: "measuringDeviceAddr", type: enums_1.DataType.IEEE_ADDR },
                    { name: "numNeighbors", type: enums_1.DataType.UINT8 },
                    // TODO: needs special Buffalo read(/write)
                    // {name: "neighborInfo", type: DataType.LIST_NEIGHBORS_INFO},
                    //   {name: "neighbor", type: DataType.IEEE_ADDR},
                    //   {name: "x", type: DataType.INT16},
                    //   {name: "y", type: DataType.INT16},
                    //   {name: "z", type: DataType.INT16},
                    //   {name: "rssi", type: DataType.INT8},
                    //   {name: "numRssiMeasurements", type: DataType.UINT8},
                ],
            },
            requestOwnLocation: { name: "requestOwnLocation", ID: 0x07, parameters: [{ name: "blindNodeAddr", type: enums_1.DataType.IEEE_ADDR }] },
        },
    },
    genAnalogInput: {
        name: "genAnalogInput",
        ID: 0x000c,
        attributes: {
            description: { name: "description", ID: 0x001c, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            maxPresentValue: { name: "maxPresentValue", ID: 0x0041, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true },
            minPresentValue: { name: "minPresentValue", ID: 0x0045, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true },
            outOfService: { name: "outOfService", ID: 0x0051, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0 },
            presentValue: { name: "presentValue", ID: 0x0055, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, report: true },
            reliability: { name: "reliability", ID: 0x0067, type: enums_1.DataType.ENUM8, write: true, writeOptional: true, default: 0x00 },
            resolution: { name: "resolution", ID: 0x006a, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true },
            statusFlags: { name: "statusFlags", ID: 0x006f, type: enums_1.DataType.BITMAP8, required: true, report: true, max: 0x0f, default: 0 },
            engineeringUnits: { name: "engineeringUnits", ID: 0x0075, type: enums_1.DataType.ENUM16, write: true, writeOptional: true, max: 0xffff },
            applicationType: { name: "applicationType", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genAnalogOutput: {
        name: "genAnalogOutput",
        ID: 0x000d,
        attributes: {
            description: { name: "description", ID: 0x001c, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            maxPresentValue: { name: "maxPresentValue", ID: 0x0041, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true },
            minPresentValue: { name: "minPresentValue", ID: 0x0045, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true },
            outOfService: { name: "outOfService", ID: 0x0051, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0 },
            presentValue: { name: "presentValue", ID: 0x0055, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, report: true },
            priorityArray: {
                name: "priorityArray",
                ID: 0x0057,
                type: enums_1.DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_ANALOG_PRIORITY
                write: true,
                // default: [[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0]],
            },
            reliability: { name: "reliability", ID: 0x0067, type: enums_1.DataType.ENUM8, write: true, writeOptional: true, default: 0x00 },
            relinquishDefault: { name: "relinquishDefault", ID: 0x0068, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true },
            resolution: { name: "resolution", ID: 0x006a, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true },
            statusFlags: { name: "statusFlags", ID: 0x006f, type: enums_1.DataType.BITMAP8, required: true, report: true, max: 0x0f, default: 0 },
            engineeringUnits: { name: "engineeringUnits", ID: 0x0075, type: enums_1.DataType.ENUM16, write: true, writeOptional: true, max: 0xffff },
            applicationType: { name: "applicationType", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genAnalogValue: {
        name: "genAnalogValue",
        ID: 0x000e,
        attributes: {
            description: { name: "description", ID: 0x001c, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            outOfService: { name: "outOfService", ID: 0x0051, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0 },
            presentValue: { name: "presentValue", ID: 0x0055, type: enums_1.DataType.SINGLE_PREC, required: true, write: true },
            priorityArray: {
                name: "priorityArray",
                ID: 0x0057,
                type: enums_1.DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_ANALOG_PRIORITY
                write: true,
                // default: [[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0],[0, 0.0]],
            },
            reliability: { name: "reliability", ID: 0x0067, type: enums_1.DataType.ENUM8, write: true, writeOptional: true, default: 0x00 },
            relinquishDefault: { name: "relinquishDefault", ID: 0x0068, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true },
            statusFlags: { name: "statusFlags", ID: 0x006f, type: enums_1.DataType.BITMAP8, required: true, max: 0x0f, default: 0 },
            engineeringUnits: { name: "engineeringUnits", ID: 0x0075, type: enums_1.DataType.ENUM16, write: true, writeOptional: true, max: 0xffff },
            applicationType: { name: "applicationType", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genBinaryInput: {
        name: "genBinaryInput",
        ID: 0x000f,
        attributes: {
            activeText: { name: "activeText", ID: 0x0004, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            description: { name: "description", ID: 0x001c, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            inactiveText: { name: "inactiveText", ID: 0x002e, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            outOfService: { name: "outOfService", ID: 0x0051, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0 },
            polarity: { name: "polarity", ID: 0x0054, type: enums_1.DataType.ENUM8, default: 0 },
            presentValue: { name: "presentValue", ID: 0x0055, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true },
            reliability: { name: "reliability", ID: 0x0067, type: enums_1.DataType.ENUM8, write: true, writeOptional: true, default: 0x00 },
            statusFlags: { name: "statusFlags", ID: 0x006f, type: enums_1.DataType.BITMAP8, required: true, max: 0x0f, default: 0 },
            applicationType: { name: "applicationType", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genBinaryOutput: {
        name: "genBinaryOutput",
        ID: 0x0010,
        attributes: {
            activeText: { name: "activeText", ID: 0x0004, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            description: { name: "description", ID: 0x001c, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            inactiveText: { name: "inactiveText", ID: 0x002e, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            minimumOffTime: { name: "minimumOffTime", ID: 0x0042, type: enums_1.DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff },
            minimumOnTime: { name: "minimumOnTime", ID: 0x0043, type: enums_1.DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff },
            outOfService: { name: "outOfService", ID: 0x0051, type: enums_1.DataType.BOOLEAN, required: true, writeOptional: true, write: true, default: 0 },
            polarity: { name: "polarity", ID: 0x0054, type: enums_1.DataType.ENUM8, default: 0 },
            presentValue: { name: "presentValue", ID: 0x0055, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true },
            priorityArray: {
                name: "priorityArray",
                ID: 0x0057,
                type: enums_1.DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_BINARY_PRIORITY
                write: true,
                // default: [[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
            },
            reliability: { name: "reliability", ID: 0x0067, type: enums_1.DataType.ENUM8, write: true, writeOptional: true },
            relinquishDefault: { name: "relinquishDefault", ID: 0x0068, type: enums_1.DataType.BOOLEAN, write: true, writeOptional: true },
            statusFlags: { name: "statusFlags", ID: 0x006f, type: enums_1.DataType.BITMAP8, required: true, max: 0x0f, default: 0 },
            applicationType: { name: "applicationType", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genBinaryValue: {
        name: "genBinaryValue",
        ID: 0x0011,
        attributes: {
            activeText: { name: "activeText", ID: 0x0004, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            description: { name: "description", ID: 0x001c, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            inactiveText: { name: "inactiveText", ID: 0x002e, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            minimumOffTime: { name: "minimumOffTime", ID: 0x0042, type: enums_1.DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff },
            minimumOnTime: { name: "minimumOnTime", ID: 0x0043, type: enums_1.DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff },
            outOfService: { name: "outOfService", ID: 0x0051, type: enums_1.DataType.BOOLEAN, required: true, writeOptional: true, write: true, default: 0 },
            presentValue: { name: "presentValue", ID: 0x0055, type: enums_1.DataType.BOOLEAN, required: true, writeOptional: true, write: true },
            priorityArray: {
                name: "priorityArray",
                ID: 0x0057,
                type: enums_1.DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_BINARY_PRIORITY
                write: true,
                // default: [[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
            },
            reliability: { name: "reliability", ID: 0x0067, type: enums_1.DataType.ENUM8, write: true, writeOptional: true },
            relinquishDefault: { name: "relinquishDefault", ID: 0x0068, type: enums_1.DataType.BOOLEAN, write: true, writeOptional: true },
            statusFlags: { name: "statusFlags", ID: 0x006f, type: enums_1.DataType.BITMAP8, required: true, max: 0x0f, default: 0 },
            applicationType: { name: "applicationType", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genMultistateInput: {
        name: "genMultistateInput",
        ID: 0x0012,
        attributes: {
            stateText: { name: "stateText", ID: 0x000e, type: enums_1.DataType.ARRAY, write: true, writeOptional: true /*default: null*/ },
            description: { name: "description", ID: 0x001c, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            numberOfStates: {
                name: "numberOfStates",
                ID: 0x004a,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                min: 1,
                max: 0xffff,
                default: 0,
            },
            outOfService: { name: "outOfService", ID: 0x0051, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0 },
            presentValue: { name: "presentValue", ID: 0x0055, type: enums_1.DataType.UINT16, required: true, write: true, writeOptional: true },
            reliability: { name: "reliability", ID: 0x0067, type: enums_1.DataType.ENUM8, write: true, writeOptional: true, default: 0x00 },
            statusFlags: { name: "statusFlags", ID: 0x006f, type: enums_1.DataType.BITMAP8, required: true, max: 0x0f, default: 0 },
            applicationType: { name: "applicationType", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genMultistateOutput: {
        name: "genMultistateOutput",
        ID: 0x0013,
        attributes: {
            stateText: { name: "stateText", ID: 0x000e, type: enums_1.DataType.ARRAY, write: true, writeOptional: true /*default: null*/ },
            description: { name: "description", ID: 0x001c, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            numberOfStates: {
                name: "numberOfStates",
                ID: 0x004a,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                min: 1,
                max: 0xffff,
                default: 0,
            },
            outOfService: { name: "outOfService", ID: 0x0051, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0 },
            presentValue: { name: "presentValue", ID: 0x0055, type: enums_1.DataType.UINT16, required: true, write: true },
            priorityArray: {
                name: "priorityArray",
                ID: 0x0057,
                type: enums_1.DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_BINARY_PRIORITY
                write: true,
                // default: [[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
            },
            reliability: { name: "reliability", ID: 0x0067, type: enums_1.DataType.ENUM8, write: true, writeOptional: true, default: 0x00 },
            relinquishDefault: { name: "relinquishDefault", ID: 0x0068, type: enums_1.DataType.UINT16, write: true, writeOptional: true },
            statusFlags: { name: "statusFlags", ID: 0x006f, type: enums_1.DataType.BITMAP8, required: true, max: 0x0f, default: 0 },
            applicationType: { name: "applicationType", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genMultistateValue: {
        name: "genMultistateValue",
        ID: 0x0014,
        attributes: {
            stateText: { name: "stateText", ID: 0x000e, type: enums_1.DataType.ARRAY, write: true, writeOptional: true /*default: null*/ },
            description: { name: "description", ID: 0x001c, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
            numberOfStates: {
                name: "numberOfStates",
                ID: 0x004a,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                min: 1,
                max: 0xffff,
                default: 0,
            },
            outOfService: { name: "outOfService", ID: 0x0051, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true, default: 0 },
            presentValue: { name: "presentValue", ID: 0x0055, type: enums_1.DataType.UINT16, required: true, write: true },
            priorityArray: {
                name: "priorityArray",
                ID: 0x0057,
                type: enums_1.DataType.ARRAY, // TODO: BuffaloZclDataType.LIST_BINARY_PRIORITY
                write: true,
                // default: [[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
            },
            reliability: { name: "reliability", ID: 0x0067, type: enums_1.DataType.ENUM8, write: true, writeOptional: true, default: 0x00 },
            relinquishDefault: { name: "relinquishDefault", ID: 0x0068, type: enums_1.DataType.UINT16, write: true, writeOptional: true },
            statusFlags: { name: "statusFlags", ID: 0x006f, type: enums_1.DataType.BITMAP8, required: true, max: 0x0f, default: 0 },
            applicationType: { name: "applicationType", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    genCommissioning: {
        name: "genCommissioning",
        ID: 0x0015,
        attributes: {
            shortress: { name: "shortress", ID: 0x0000, type: enums_1.DataType.UINT16, write: true, required: true, max: 0xfff7 },
            extendedPANId: {
                name: "extendedPANId",
                ID: 0x0001,
                type: enums_1.DataType.IEEE_ADDR,
                write: true,
                required: true,
                default: "0xffffffffffffffff",
                special: [["PANIdUnspecified", "ffffffffffffffff"]],
            },
            panId: { name: "panId", ID: 0x0002, type: enums_1.DataType.UINT16, write: true, required: true, max: 0xffff },
            channelmask: { name: "channelmask", ID: 0x0003, type: enums_1.DataType.BITMAP32, write: true, required: true },
            protocolVersion: { name: "protocolVersion", ID: 0x0004, type: enums_1.DataType.UINT8, write: true, required: true, min: 0x02, max: 0x02 },
            stackProfile: { name: "stackProfile", ID: 0x0005, type: enums_1.DataType.UINT8, write: true, required: true, min: 0x01, max: 0x02 },
            startupControl: { name: "startupControl", ID: 0x0006, type: enums_1.DataType.ENUM8, write: true, required: true, max: 0x03 },
            trustCenterress: {
                name: "trustCenterress",
                ID: 0x0010,
                type: enums_1.DataType.IEEE_ADDR,
                write: true,
                required: true,
                default: "0x0000000000000000",
                special: [["AddressUnspecified", "0000000000000000"]],
            },
            trustCenterMasterKey: { name: "trustCenterMasterKey", ID: 0x0011, type: enums_1.DataType.SEC_KEY, write: true },
            networkKey: { name: "networkKey", ID: 0x0012, type: enums_1.DataType.SEC_KEY, write: true, required: true },
            useInsecureJoin: { name: "useInsecureJoin", ID: 0x0013, type: enums_1.DataType.BOOLEAN, write: true, required: true, default: 1 },
            preconfiguredLinkKey: { name: "preconfiguredLinkKey", ID: 0x0014, type: enums_1.DataType.SEC_KEY, write: true, required: true },
            networkKeySeqNum: { name: "networkKeySeqNum", ID: 0x0015, type: enums_1.DataType.UINT8, write: true, required: true, max: 0xff, default: 0 },
            networkKeyType: { name: "networkKeyType", ID: 0x0016, type: enums_1.DataType.ENUM8, write: true, required: true },
            networkManagerress: { name: "networkManagerress", ID: 0x0017, type: enums_1.DataType.UINT16, write: true, required: true, default: 0 },
            scanAttempts: { name: "scanAttempts", ID: 0x0020, type: enums_1.DataType.UINT8, write: true, min: 1, max: 255, default: 5 },
            timeBetweenScans: { name: "timeBetweenScans", ID: 0x0021, type: enums_1.DataType.UINT16, write: true, min: 1, max: 65535, default: 100 },
            rejoinInterval: { name: "rejoinInterval", ID: 0x0022, type: enums_1.DataType.UINT16, write: true, min: 1, default: 60 },
            maxRejoinInterval: { name: "maxRejoinInterval", ID: 0x0023, type: enums_1.DataType.UINT16, write: true, min: 1, max: 65535, default: 3600 },
            indirectPollRate: { name: "indirectPollRate", ID: 0x0030, type: enums_1.DataType.UINT16, write: true, max: 65535 },
            parentRetryThreshold: { name: "parentRetryThreshold", ID: 0x0031, type: enums_1.DataType.UINT8, max: 255 },
            concentratorFlag: { name: "concentratorFlag", ID: 0x0040, type: enums_1.DataType.BOOLEAN, write: true, default: 0 },
            concentratorRadius: { name: "concentratorRadius", ID: 0x0041, type: enums_1.DataType.UINT8, write: true, max: 255, default: 15 },
            concentratorDiscoveryTime: { name: "concentratorDiscoveryTime", ID: 0x0042, type: enums_1.DataType.UINT8, write: true, max: 255, default: 0 },
        },
        commands: {
            restartDevice: {
                name: "restartDevice",
                ID: 0x00,
                parameters: [
                    /** [4: reserved, 1: immediate, 3: startup mode] */
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    { name: "delay", type: enums_1.DataType.UINT8 },
                    { name: "jitter", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            saveStartupParams: {
                name: "saveStartupParams",
                ID: 0x01,
                parameters: [
                    /** reserved */
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    { name: "index", type: enums_1.DataType.UINT8 },
                ],
            },
            restoreStartupParams: {
                name: "restoreStartupParams",
                ID: 0x02,
                parameters: [
                    /** reserved */
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    { name: "index", type: enums_1.DataType.UINT8 },
                ],
            },
            resetStartupParams: {
                name: "resetStartupParams",
                ID: 0x03,
                parameters: [
                    /** [5: reserved, 1: erase index, 1: reset all, 1: reset current] */
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    { name: "index", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
        },
        commandsResponse: {
            restartDeviceRsp: { name: "restartDeviceRsp", ID: 0x00, parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }], required: true },
            saveStartupParamsRsp: { name: "saveStartupParamsRsp", ID: 0x01, parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }], required: true },
            restoreStartupParamsRsp: {
                name: "restoreStartupParamsRsp",
                ID: 0x02,
                parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }],
                required: true,
            },
            resetStartupParamsRsp: { name: "resetStartupParamsRsp", ID: 0x03, parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }], required: true },
        },
    },
    piPartition: {
        name: "piPartition",
        ID: 0x00016,
        attributes: {
            maximumIncomingTransferSize: {
                name: "maximumIncomingTransferSize",
                ID: 0x0000,
                type: enums_1.DataType.UINT16,
                required: true,
                max: 0xffff,
                default: 0x0500,
            },
            maximumOutgoingTransferSize: {
                name: "maximumOutgoingTransferSize",
                ID: 0x0001,
                type: enums_1.DataType.UINT16,
                required: true,
                max: 0xffff,
                default: 0x0500,
            },
            partionedFrameSize: { name: "partionedFrameSize", ID: 0x0002, type: enums_1.DataType.UINT8, required: true, write: true, max: 0xff, default: 0x50 },
            largeFrameSize: { name: "largeFrameSize", ID: 0x0003, type: enums_1.DataType.UINT16, required: true, write: true, max: 0xffff, default: 0x0500 },
            numberOfAckFrame: { name: "numberOfAckFrame", ID: 0x0004, type: enums_1.DataType.UINT8, required: true, write: true, max: 0xff, default: 100 },
            nackTimeout: { name: "nackTimeout", ID: 0x0005, type: enums_1.DataType.UINT16, required: true, max: 0xffff },
            interframeDelay: { name: "interframeDelay", ID: 0x0006, type: enums_1.DataType.UINT8, required: true, write: true, max: 0xff },
            numberOfSendRetries: { name: "numberOfSendRetries", ID: 0x0007, type: enums_1.DataType.UINT8, required: true, max: 0xff, default: 3 },
            senderTimeout: { name: "senderTimeout", ID: 0x0008, type: enums_1.DataType.UINT16, required: true, max: 0xffff },
            receiverTimeout: { name: "receiverTimeout", ID: 0x0009, type: enums_1.DataType.UINT16, required: true, max: 0xffff },
        },
        commands: {
            transferPartionedFrame: {
                name: "transferPartionedFrame",
                ID: 0x00,
                parameters: [
                    /** [6: reserved, 1: indicator length, 1: first block] */
                    { name: "fragmentionOptions", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "partitionIndicator",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b10, reversed: true }],
                    },
                    {
                        name: "partitionIndicator",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b10 }],
                    },
                    { name: "partitionedFrame", type: enums_1.DataType.OCTET_STR },
                ],
                required: true,
            },
            readHandshakeParam: {
                name: "readHandshakeParam",
                ID: 0x01,
                parameters: [
                    { name: "partitionedClusterId", type: enums_1.DataType.CLUSTER_ID },
                    { name: "attributeIds", type: enums_1.BuffaloZclDataType.LIST_UINT16 },
                ],
                required: true,
                response: 0x01,
            },
            writeHandshakeParam: {
                name: "writeHandshakeParam",
                ID: 0x02,
                parameters: [
                    { name: "partitionedClusterId", type: enums_1.DataType.CLUSTER_ID },
                    // TODO: need special BuffaloZcl read/write
                    // {name: "attributeRecords", type: BuffaloZclDataType.LIST_WRITE_ATTR_RECORD},
                    //   {name: "id", type: DataType.UINT16},
                    //   {name: "dataType", type: DataType.DATA8},
                    //   {name: "data", type: BuffaloZclDataType.USE_DATA_TYPE},
                ],
                required: true,
            },
        },
        commandsResponse: {
            multipleAck: {
                name: "multipleAck",
                ID: 0x0,
                parameters: [
                    /** [7: reserved, 1: nackId length] */
                    { name: "ackOptions", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "firstFrameId",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b1, reversed: true }],
                    },
                    {
                        name: "firstFrameId",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b1 }],
                    },
                    {
                        name: "nackId",
                        type: enums_1.BuffaloZclDataType.LIST_UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b1, reversed: true }],
                    },
                    {
                        name: "nackId",
                        type: enums_1.BuffaloZclDataType.LIST_UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "fragmentationOptions", mask: 0b1 }],
                    },
                ],
                required: true,
            },
            readHandshakeParamResponse: {
                name: "readHandshakeParamResponse",
                ID: 0x01,
                parameters: [
                    { name: "partitionedClusterId", type: enums_1.DataType.CLUSTER_ID },
                    // TODO: need special BuffaloZcl read/write
                    // {name: "attributeRecords", type: BuffaloZclDataType.LIST_READ_ATTR_RECORD},
                    //   {name: "id", type: DataType.UINT16},
                    //   {name: "status", type: DataType.UINT16},
                    //   {name: "dataType", type: DataType.DATA8, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "Status", value: Status.SUCCESS}]},
                    //   {name: "data", type: BuffaloZclDataType.USE_DATA_TYPE, conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "Status", value: Status.SUCCESS}]},
                ],
                required: true,
            },
        },
    },
    genOta: {
        name: "genOta",
        ID: 0x0019,
        attributes: {
            upgradeServerId: {
                name: "upgradeServerId",
                ID: 0x0000,
                type: enums_1.DataType.IEEE_ADDR,
                client: true,
                required: true,
                default: "0xffffffffffffffff",
            },
            fileOffset: { name: "fileOffset", ID: 0x0001, type: enums_1.DataType.UINT32, client: true, max: 0xffffffff, default: 0xffffffff },
            currentFileVersion: { name: "currentFileVersion", ID: 0x0002, type: enums_1.DataType.UINT32, client: true, max: 0xffffffff, default: 0xffffffff },
            currentZigbeeStackVersion: {
                name: "currentZigbeeStackVersion",
                ID: 0x0003,
                type: enums_1.DataType.UINT16,
                client: true,
                max: 0xffff,
                default: 0xffff,
            },
            downloadedFileVersion: {
                name: "downloadedFileVersion",
                ID: 0x0004,
                type: enums_1.DataType.UINT32,
                client: true,
                max: 0xffffffff,
                default: 0xffffffff,
            },
            downloadedZigbeeStackVersion: {
                name: "downloadedZigbeeStackVersion",
                ID: 0x0005,
                type: enums_1.DataType.UINT16,
                client: true,
                max: 0xffff,
                default: 0xffff,
            },
            imageUpgradeStatus: {
                name: "imageUpgradeStatus",
                ID: 0x0006,
                type: enums_1.DataType.ENUM8,
                client: true,
                required: true,
                max: 0xff,
                default: 0x00,
            },
            manufacturerId: { name: "manufacturerId", ID: 0x0007, type: enums_1.DataType.UINT16, client: true, max: 0xffff },
            imageTypeId: { name: "imageTypeId", ID: 0x0008, type: enums_1.DataType.UINT16, client: true, max: 0xffff },
            minimumBlockReqDelay: { name: "minimumBlockReqDelay", ID: 0x0009, type: enums_1.DataType.UINT16, client: true, max: 0xfffe, default: 0 },
            imageStamp: { name: "imageStamp", ID: 0x000a, type: enums_1.DataType.UINT32, client: true, max: 0xffffffff },
            upgradeActivationPolicy: { name: "upgradeActivationPolicy", ID: 0x000b, type: enums_1.DataType.ENUM8, client: true, default: 0 },
            upgradeTimeoutPolicy: { name: "upgradeTimeoutPolicy", ID: 0x000c, type: enums_1.DataType.ENUM8, client: true, default: 0 },
        },
        commands: {
            queryNextImageRequest: {
                name: "queryNextImageRequest",
                ID: 0x01,
                response: 0x02,
                parameters: [
                    { name: "fieldControl", type: enums_1.DataType.BITMAP8 },
                    { name: "manufacturerCode", type: enums_1.DataType.UINT16 },
                    { name: "imageType", type: enums_1.DataType.UINT16, max: 0xffbf },
                    { name: "fileVersion", type: enums_1.DataType.UINT32 },
                    {
                        name: "hardwareVersion",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "fieldControl", mask: 0b1 }],
                    },
                ],
                required: true,
            },
            imageBlockRequest: {
                name: "imageBlockRequest",
                ID: 0x03,
                response: 0x05,
                parameters: [
                    { name: "fieldControl", type: enums_1.DataType.BITMAP8 },
                    { name: "manufacturerCode", type: enums_1.DataType.UINT16 },
                    { name: "imageType", type: enums_1.DataType.UINT16, max: 0xffbf },
                    { name: "fileVersion", type: enums_1.DataType.UINT32 },
                    { name: "fileOffset", type: enums_1.DataType.UINT32 },
                    { name: "maximumDataSize", type: enums_1.DataType.UINT8 },
                    {
                        name: "requestNodeIeeeAddress",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "fieldControl", mask: 0b1 }],
                    },
                    {
                        name: "minimumBlockPeriod",
                        type: enums_1.DataType.UINT16,
                        conditions: [
                            { type: enums_1.ParameterCondition.BITMASK_SET, param: "fieldControl", mask: 0b10 },
                            // WORKAROUND: https://github.com/Koenkk/zigbee2mqtt/issues/28217
                            { type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 2 },
                        ],
                    },
                ],
                required: true,
            },
            imagePageRequest: {
                name: "imagePageRequest",
                ID: 0x04,
                response: 0x05,
                parameters: [
                    { name: "fieldControl", type: enums_1.DataType.BITMAP8 },
                    { name: "manufacturerCode", type: enums_1.DataType.UINT16 },
                    { name: "imageType", type: enums_1.DataType.UINT16, max: 0xffbf },
                    { name: "fileVersion", type: enums_1.DataType.UINT32 },
                    { name: "fileOffset", type: enums_1.DataType.UINT32 },
                    { name: "maximumDataSize", type: enums_1.DataType.UINT8 },
                    { name: "pageSize", type: enums_1.DataType.UINT16 },
                    { name: "responseSpacing", type: enums_1.DataType.UINT16 },
                    {
                        name: "requestNodeIeeeAddress",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "fieldControl", mask: 0b1 }],
                    },
                ],
            },
            upgradeEndRequest: {
                name: "upgradeEndRequest",
                ID: 0x06,
                response: 0x07,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "manufacturerCode", type: enums_1.DataType.UINT16 },
                    { name: "imageType", type: enums_1.DataType.UINT16, max: 0xffbf },
                    { name: "fileVersion", type: enums_1.DataType.UINT32 },
                ],
                required: true,
            },
            queryDeviceSpecificFileRequest: {
                name: "queryDeviceSpecificFileRequest",
                ID: 0x08,
                response: 0x09,
                parameters: [
                    { name: "eui64", type: enums_1.DataType.IEEE_ADDR },
                    { name: "manufacturerCode", type: enums_1.DataType.UINT16 },
                    { name: "imageType", type: enums_1.DataType.UINT16, min: 0xffc0, max: 0xfffe },
                    { name: "fileVersion", type: enums_1.DataType.UINT32 },
                    { name: "zigbeeStackVersion", type: enums_1.DataType.UINT16 },
                ],
            },
        },
        commandsResponse: {
            imageNotify: {
                name: "imageNotify",
                ID: 0x00,
                parameters: [
                    { name: "payloadType", type: enums_1.DataType.ENUM8 },
                    { name: "queryJitter", type: enums_1.DataType.UINT8 },
                    {
                        name: "manufacturerCode",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_GT, field: "payloadType", value: 0x00 }],
                    },
                    {
                        name: "imageType",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_GT, field: "payloadType", value: 0x01 }],
                        max: 0xffff,
                    },
                    {
                        name: "fileVersion",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_GT, field: "payloadType", value: 0x02 }],
                        max: 0xffffffff,
                    },
                ],
            },
            queryNextImageResponse: {
                name: "queryNextImageResponse",
                ID: 0x02,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    {
                        name: "manufacturerCode",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "imageType",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                        max: 0xffbf,
                    },
                    {
                        name: "fileVersion",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "imageSize",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                ],
                required: true,
            },
            imageBlockResponse: {
                name: "imageBlockResponse",
                ID: 0x05,
                parameters: [
                    // alone if Status.ABORT
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    {
                        name: "manufacturerCode",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "imageType",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                        max: 0xffbf,
                    },
                    {
                        name: "fileVersion",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "fileOffset",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "dataSize",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "data",
                        type: enums_1.BuffaloZclDataType.BUFFER,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "currentTime",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.WAIT_FOR_DATA }],
                    },
                    {
                        name: "requestTime",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.WAIT_FOR_DATA }],
                    },
                    {
                        name: "minimumBlockPeriod",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.WAIT_FOR_DATA }],
                    },
                ],
                required: true,
            },
            upgradeEndResponse: {
                name: "upgradeEndResponse",
                ID: 0x07,
                parameters: [
                    { name: "manufacturerCode", type: enums_1.DataType.UINT16, max: 0xfffff },
                    { name: "imageType", type: enums_1.DataType.UINT16, max: 0xfffff },
                    { name: "fileVersion", type: enums_1.DataType.UINT32, max: 0xfffffffff },
                    { name: "currentTime", type: enums_1.DataType.UTC },
                    { name: "upgradeTime", type: enums_1.DataType.UTC },
                ],
                required: true,
            },
            queryDeviceSpecificFileResponse: {
                name: "queryDeviceSpecificFileResponse",
                ID: 0x09,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    {
                        name: "manufacturerCode",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "imageType",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                        min: 0xffc0,
                        max: 0xfffe,
                    },
                    {
                        name: "fileVersion",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                    {
                        name: "imageSize",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "status", value: status_1.Status.SUCCESS }],
                    },
                ],
            },
        },
    },
    powerProfile: {
        name: "powerProfile",
        ID: 0x001a,
        attributes: {
            totalProfileNum: { name: "totalProfileNum", ID: 0x0000, type: enums_1.DataType.UINT8, required: true, min: 1, max: 0xfe, default: 1 },
            multipleScheduling: { name: "multipleScheduling", ID: 0x0001, type: enums_1.DataType.BOOLEAN, required: true, default: 0 },
            energyFormatting: { name: "energyFormatting", ID: 0x0002, type: enums_1.DataType.BITMAP8, required: true, default: 1 },
            energyRemote: { name: "energyRemote", ID: 0x0003, type: enums_1.DataType.BOOLEAN, required: true, default: 0 },
            scheduleMode: { name: "scheduleMode", ID: 0x0004, type: enums_1.DataType.BITMAP8, required: true, write: true, report: true, default: 0x00 },
        },
        commands: {
            powerProfileRequest: {
                name: "powerProfileRequest",
                ID: 0x00,
                parameters: [{ name: "powerProfileId", type: enums_1.DataType.UINT8 }],
                required: true,
            },
            powerProfileStateRequest: { name: "powerProfileStateRequest", ID: 0x01, parameters: [], required: true },
            getPowerProfilePriceResponse: {
                name: "getPowerProfilePriceResponse",
                ID: 0x02,
                parameters: [
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "currency", type: enums_1.DataType.UINT16 },
                    { name: "price", type: enums_1.DataType.UINT32 },
                    { name: "priceTrailingDigit", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            getOverallSchedulePriceResponse: {
                name: "getOverallSchedulePriceResponse",
                ID: 0x03,
                parameters: [
                    { name: "currency", type: enums_1.DataType.UINT16 },
                    { name: "price", type: enums_1.DataType.UINT32 },
                    { name: "priceTrailingDigit", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            energyPhasesScheduleNotification: {
                name: "energyPhasesScheduleNotification",
                ID: 0x04,
                parameters: [
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "numScheduledPhases", type: enums_1.DataType.UINT8 },
                    // TODO: special Buffalo write/read
                    // {name: "scheduledPhases", type: BuffaloZclDataType.LIST_SCHEDULED_PHASES},
                    //  {name: "energyPhaseId", type: DataType.UINT8},
                    //  {name: "scheduledTime", type: DataType.UINT16},
                ],
                required: true,
            },
            energyPhasesScheduleResponse: {
                name: "energyPhasesScheduleResponse",
                ID: 0x05,
                parameters: [
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "numScheduledPhases", type: enums_1.DataType.UINT8 },
                    // TODO: special Buffalo write/read
                    // {name: "scheduledPhases", type: BuffaloZclDataType.LIST_SCHEDULED_PHASES},
                    //  {name: "energyPhaseId", type: DataType.UINT8},
                    //  {name: "scheduledTime", type: DataType.UINT16},
                ],
                required: true,
            },
            powerProfileScheduleConstraintsRequest: {
                name: "powerProfileScheduleConstraintsRequest",
                ID: 0x06,
                parameters: [{ name: "powerProfileId", type: enums_1.DataType.UINT8 }],
                required: true,
            },
            energyPhasesScheduleStateRequest: {
                name: "energyPhasesScheduleStateRequest",
                ID: 0x07,
                parameters: [{ name: "powerProfileId", type: enums_1.DataType.UINT8 }],
                required: true,
            },
            getPowerProfilePriceExtendedResponse: {
                name: "getPowerProfilePriceExtendedResponse",
                ID: 0x08,
                parameters: [
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "currency", type: enums_1.DataType.UINT16 },
                    { name: "price", type: enums_1.DataType.UINT32 },
                    { name: "priceTrailingDigit", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
        },
        commandsResponse: {
            powerProfileNotification: {
                name: "powerProfileNotification",
                ID: 0x00,
                parameters: [
                    { name: "totalProfileNum", type: enums_1.DataType.UINT8 },
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "numTransferredPhases", type: enums_1.DataType.UINT8 },
                    // TODO: special Buffalo write/read
                    // {name: "transferredPhases", type: DataType.LIST_TRANSFERRED_PHASES},
                    //  {name: "energyPhaseId", type: DataType.UINT8},
                    //  {name: "macroPhaseId", type: DataType.UINT8},
                    //  {name: "expectedDuration", type: DataType.UINT16},
                    //  {name: "peakPower", type: DataType.UINT16},
                    //  {name: "energy", type: DataType.UINT16},
                    //  {name: "maxActivationDelay", type: DataType.UINT16},
                ],
                required: true,
            },
            powerProfileResponse: {
                name: "powerProfileResponse",
                ID: 0x01,
                parameters: [
                    { name: "totalProfileNum", type: enums_1.DataType.UINT8 },
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "numTransferredPhases", type: enums_1.DataType.UINT8 },
                    // TODO: special Buffalo write/read
                    // {name: "transferredPhases", type: DataType.LIST_TRANSFERRED_PHASES},
                    //  {name: "energyPhaseId", type: DataType.UINT8},
                    //  {name: "macroPhaseId", type: DataType.UINT8},
                    //  {name: "expectedDuration", type: DataType.UINT16},
                    //  {name: "peakPower", type: DataType.UINT16},
                    //  {name: "energy", type: DataType.UINT16},
                    //  {name: "maxActivationDelay", type: DataType.UINT16},
                ],
                required: true,
            },
            powerProfileStateResponse: {
                name: "powerProfileStateResponse",
                ID: 0x02,
                parameters: [
                    { name: "powerProfileCount", type: enums_1.DataType.UINT8 },
                    // TODO: special Buffalo write/read
                    // {name: "powerProfiles", type: BuffaloZclDataType.LIST_POWER_PROFILE},
                    //  {name: "powerProfileId", type: DataType.UINT8},
                    //  {name: "energyPhaseId", type: DataType.UINT8},
                    //  {name: "powerProfileRemoteControl", type: DataType.BOOLEAN},
                    //  {name: "powerProfileState", type: DataType.ENUM8},
                ],
                required: true,
            },
            getPowerProfilePrice: { name: "getPowerProfilePrice", ID: 0x03, parameters: [{ name: "powerProfileId", type: enums_1.DataType.UINT8 }] },
            powerProfilesStateNotification: {
                name: "powerProfilesStateNotification",
                ID: 0x04,
                parameters: [
                    { name: "powerProfileCount", type: enums_1.DataType.UINT8 },
                    // TODO: special Buffalo write/read
                    // {name: "powerProfiles", type: BuffaloZclDataType.LIST_POWER_PROFILE},
                    //  {name: "powerProfileId", type: DataType.UINT8},
                    //  {name: "energyPhaseId", type: DataType.UINT8},
                    //  {name: "powerProfileRemoteControl", type: DataType.BOOLEAN},
                    //  {name: "powerProfileState", type: DataType.ENUM8},
                ],
                required: true,
            },
            getOverallSchedulePrice: { name: "getOverallSchedulePrice", ID: 0x05, parameters: [] },
            energyPhasesScheduleRequest: {
                name: "energyPhasesScheduleRequest",
                ID: 0x06,
                parameters: [{ name: "powerProfileId", type: enums_1.DataType.UINT8 }],
                required: true,
            },
            energyPhasesScheduleStateResponse: {
                name: "energyPhasesScheduleStateResponse",
                ID: 0x07,
                parameters: [
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "numScheduledPhases", type: enums_1.DataType.UINT8 },
                    // TODO: special Buffalo write/read
                    // {name: "scheduledPhases", type: BuffaloZclDataType.LIST_SCHEDULED_PHASES},
                    //  {name: "energyPhaseId", type: DataType.UINT8},
                    //  {name: "scheduledTime", type: DataType.UINT16},
                ],
                required: true,
            },
            energyPhasesScheduleStateNotification: {
                name: "energyPhasesScheduleStateNotification",
                ID: 0x08,
                parameters: [
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "numScheduledPhases", type: enums_1.DataType.UINT8 },
                    // TODO: special Buffalo write/read
                    // {name: "scheduledPhases", type: BuffaloZclDataType.LIST_SCHEDULED_PHASES},
                    //  {name: "energyPhaseId", type: DataType.UINT8},
                    //  {name: "scheduledTime", type: DataType.UINT16},
                ],
                required: true,
            },
            powerProfileScheduleConstraintsNotification: {
                name: "powerProfileScheduleConstraintsNotification",
                ID: 0x09,
                parameters: [
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "startAfter", type: enums_1.DataType.UINT16 },
                    { name: "stopBefore", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            powerProfileScheduleConstraintsResponse: {
                name: "powerProfileScheduleConstraintsResponse",
                ID: 0x0a,
                parameters: [
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    { name: "startAfter", type: enums_1.DataType.UINT16 },
                    { name: "stopBefore", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            getPowerProfilePriceExtended: {
                name: "getPowerProfilePriceExtended",
                ID: 0x0b,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    { name: "powerProfileId", type: enums_1.DataType.UINT8 },
                    {
                        name: "powerProfileStartTime",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 2 }],
                    },
                ],
            },
        },
    },
    haApplianceControl: {
        name: "haApplianceControl",
        ID: 0x001b,
        attributes: {
            startTime: { name: "startTime", ID: 0x0000, type: enums_1.DataType.UINT16, required: true, report: true, max: 0xffff, default: 0 },
            finishTime: { name: "finishTime", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, report: true, max: 0xffff, default: 0 },
            remainingTime: { name: "remainingTime", ID: 0x0002, type: enums_1.DataType.UINT16, report: true, max: 0xffff, default: 0 },
        },
        commands: {
            executionOfCommand: { name: "executionOfCommand", ID: 0x00, parameters: [{ name: "commandId", type: enums_1.DataType.ENUM8 }] },
            signalState: { name: "signalState", ID: 0x01, parameters: [], response: 0x00, required: true },
            writeFunctions: {
                name: "writeFunctions",
                ID: 0x02,
                parameters: [
                // TODO: need BuffaloZcl read/write
                // {name: "functions", type: BuffaloZclDataType.LIST_FUNCTIONS},
                //   {name: "id", type: DataType.UINT16},
                //   {name: "dataType", type: DataType.DATA8},
                //   {name: "data", type: BuffaloZclDataType.USE_DATA_TYPE},
                ],
            },
            overloadPauseResume: { name: "overloadPauseResume", ID: 0x03, parameters: [] },
            overloadPause: { name: "overloadPause", ID: 0x04, parameters: [] },
            overloadWarning: { name: "overloadWarning", ID: 0x05, parameters: [{ name: "warningEvent", type: enums_1.DataType.ENUM8 }] },
        },
        commandsResponse: {
            signalStateRsp: {
                name: "signalStateRsp",
                ID: 0x00,
                parameters: [
                    { name: "applianceStatus", type: enums_1.DataType.ENUM8 },
                    /** [4: device status 2, 4: remote enable flags] */
                    { name: "remoteEnableFlagsAndDeviceStatus2", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "applianceStatus2",
                        type: enums_1.DataType.UINT24,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 3 }],
                    },
                ],
                required: true,
            },
            signalStateNotification: {
                name: "signalStateNotification",
                ID: 0x00,
                parameters: [
                    { name: "applianceStatus", type: enums_1.DataType.ENUM8 },
                    /** [4: device status 2, 4: remote enable flags] */
                    { name: "remoteEnableFlagsAndDeviceStatus2", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "applianceStatus2",
                        type: enums_1.DataType.UINT24,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 3 }],
                    },
                ],
                required: true,
            },
        },
    },
    pulseWidthModulation: {
        name: "pulseWidthModulation",
        ID: 0x001c,
        attributes: {
            currentLevel: { name: "currentLevel", ID: 0x0000, type: enums_1.DataType.UINT8, report: true, scene: true, required: true, default: 255 },
            remainingTime: { name: "remainingTime", ID: 0x0001, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            minLevel: { name: "minLevel", ID: 0x0002, type: enums_1.DataType.UINT8, default: 0, required: true },
            maxLevel: { name: "maxLevel", ID: 0x0003, type: enums_1.DataType.UINT8, max: 100, default: 100, required: true },
            currentFrequency: { name: "currentFrequency", ID: 0x0004, type: enums_1.DataType.UINT16, report: true, default: 0, required: true },
            minFrequency: { name: "minFrequency", ID: 0x0005, type: enums_1.DataType.UINT16, default: 0, required: true },
            maxFrequency: { name: "maxFrequency", ID: 0x0006, type: enums_1.DataType.UINT16, max: 0xffff, default: 0, required: true },
            options: { name: "options", ID: 0x000f, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            onOffTransitionTime: { name: "onOffTransitionTime", ID: 0x0010, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            onLevel: { name: "onLevel", ID: 0x0011, type: enums_1.DataType.UINT8, write: true, default: 0xff },
            onTransitionTime: { name: "onTransitionTime", ID: 0x0012, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0xffff },
            offTransitionTime: { name: "offTransitionTime", ID: 0x0013, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0xffff },
            defaultMoveRate: { name: "defaultMoveRate", ID: 0x0014, type: enums_1.DataType.UINT8, write: true, max: 0xfe },
            startUpCurrentLevel: {
                name: "startUpCurrentLevel",
                ID: 0x4000,
                type: enums_1.DataType.UINT8,
                write: true,
                max: 0xff,
                special: [
                    ["MinimumDeviceValuePermitted", "00"],
                    ["SetToPreviousValue", "ff"],
                ],
            },
        },
        commands: {
            moveToLevel: {
                name: "moveToLevel",
                ID: 0x00,
                parameters: [
                    { name: "level", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            move: {
                name: "move",
                ID: 0x01,
                parameters: [
                    { name: "movemode", type: enums_1.DataType.UINT8 },
                    { name: "rate", type: enums_1.DataType.UINT8 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            step: {
                name: "step",
                ID: 0x02,
                parameters: [
                    { name: "stepmode", type: enums_1.DataType.UINT8 },
                    { name: "stepsize", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            stop: {
                name: "stop",
                ID: 0x03,
                parameters: [
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            moveToLevelWithOnOff: {
                name: "moveToLevelWithOnOff",
                ID: 0x04,
                parameters: [
                    { name: "level", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            moveWithOnOff: {
                name: "moveWithOnOff",
                ID: 0x05,
                parameters: [
                    { name: "movemode", type: enums_1.DataType.UINT8 },
                    { name: "rate", type: enums_1.DataType.UINT8 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            stepWithOnOff: {
                name: "stepWithOnOff",
                ID: 0x06,
                parameters: [
                    { name: "stepmode", type: enums_1.DataType.UINT8 },
                    { name: "stepsize", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            stopWithOnOff: {
                name: "stopWithOnOff",
                ID: 0x07,
                parameters: [
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                required: true,
            },
            moveToClosestFrequency: {
                name: "moveToClosestFrequency",
                ID: 0x08,
                parameters: [{ name: "frequency", type: enums_1.DataType.UINT16 }],
                required: true,
            },
        },
        commandsResponse: {},
    },
    genPollCtrl: {
        name: "genPollCtrl",
        ID: 0x0020,
        attributes: {
            checkinInterval: { name: "checkinInterval", ID: 0x0000, type: enums_1.DataType.UINT32, write: true, required: true, max: 7208960, default: 14400 },
            longPollInterval: { name: "longPollInterval", ID: 0x0001, type: enums_1.DataType.UINT32, required: true, min: 4, max: 7208960, default: 20 },
            shortPollInterval: { name: "shortPollInterval", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, min: 1, max: 0xffff, default: 2 },
            fastPollTimeout: {
                name: "fastPollTimeout",
                ID: 0x0003,
                type: enums_1.DataType.UINT16,
                write: true,
                required: true,
                min: 1,
                max: 0xffff,
                default: 40,
            },
            checkinIntervalMin: { name: "checkinIntervalMin", ID: 0x0004, type: enums_1.DataType.UINT32, default: 0 },
            longPollIntervalMin: { name: "longPollIntervalMin", ID: 0x0005, type: enums_1.DataType.UINT32, default: 0 },
            fastPollTimeoutMax: { name: "fastPollTimeoutMax", ID: 0x0006, type: enums_1.DataType.UINT16, default: 0 },
        },
        commands: {
            checkinRsp: {
                name: "checkinRsp",
                ID: 0x00,
                parameters: [
                    { name: "startFastPolling", type: enums_1.DataType.BOOLEAN },
                    { name: "fastPollTimeout", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            fastPollStop: { name: "fastPollStop", ID: 0x01, parameters: [], required: true },
            setLongPollInterval: { name: "setLongPollInterval", ID: 0x02, parameters: [{ name: "newLongPollInterval", type: enums_1.DataType.UINT32 }] },
            setShortPollInterval: { name: "setShortPollInterval", ID: 0x03, parameters: [{ name: "newShortPollInterval", type: enums_1.DataType.UINT16 }] },
        },
        commandsResponse: {
            checkin: { name: "checkin", ID: 0x00, parameters: [], required: true },
        },
    },
    greenPower: {
        name: "greenPower",
        ID: 0x0021,
        attributes: {
            gpsMaxSinkTableEntries: { name: "gpsMaxSinkTableEntries", ID: 0x0000, type: enums_1.DataType.UINT8, required: true, max: 0xff },
            sinkTable: { name: "sinkTable", ID: 0x0001, type: enums_1.DataType.LONG_OCTET_STR, required: true },
            /** 0b00: full unicast forward, 0b01: groupcast forward to DGroupID, 0b10: groupcast forward to pre-comm GroupID, 0b11: unicast forward */
            gpsCommunicationMode: { name: "gpsCommunicationMode", ID: 0x0002, type: enums_1.DataType.BITMAP8, required: true, write: true, default: 0x01 },
            /** [5: reserved, 1: on GP proxy commiss mode, 1: on first pairing success, 1: on commiss window expiration] */
            gpsCommissioningExitMode: {
                name: "gpsCommissioningExitMode",
                ID: 0x0003,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                default: 0x02,
            },
            gpsCommissioningWindow: { name: "gpsCommissioningWindow", ID: 0x0004, type: enums_1.DataType.UINT16, write: true, max: 65535, default: 180 },
            /** [4: reserved, 1: involve TC, 1: protection with gpLinkKey, 1: minimal GPD security level] */
            gpsSecurityLevel: { name: "gpsSecurityLevel", ID: 0x0005, type: enums_1.DataType.BITMAP8, required: true, write: true, default: 0x06 },
            /** see A.3.3.2.7 of 14-0563-19 */
            gpsFunctionality: { name: "gpsFunctionality", ID: 0x0006, type: enums_1.DataType.BITMAP24, required: true },
            /** see A.3.3.2.8 of 14-0563-19 */
            gpsActiveFunctionality: { name: "gpsActiveFunctionality", ID: 0x0007, type: enums_1.DataType.BITMAP24, required: true, default: 0xffffff },
            gpsMaxProxyTableEntries: {
                name: "gpsMaxProxyTableEntries",
                ID: 0x0010,
                type: enums_1.DataType.UINT8,
                required: true,
                max: 0xff,
                default: 0x14,
                client: true,
            },
            proxyTable: { name: "proxyTable", ID: 0x0011, type: enums_1.DataType.LONG_OCTET_STR, required: true, default: 0, client: true },
            gppNotificationRetryNumber: {
                name: "gppNotificationRetryNumber",
                ID: 0x0012,
                type: enums_1.DataType.UINT8,
                write: true,
                max: 5,
                default: 2,
                client: true,
            },
            gppNotificationRetryTimer: {
                name: "gppNotificationRetryTimer",
                ID: 0x0013,
                type: enums_1.DataType.UINT8,
                write: true,
                max: 255,
                default: 100,
                client: true,
            },
            gppMaxSearchCounter: { name: "gppMaxSearchCounter", ID: 0x0014, type: enums_1.DataType.UINT8, write: true, max: 255, default: 10, client: true },
            gppBlockGpdId: { name: "gppBlockGpdId", ID: 0x0015, type: enums_1.DataType.LONG_OCTET_STR, client: true },
            gppFunctionality: { name: "gppFunctionality", ID: 0x0016, type: enums_1.DataType.BITMAP24, required: true, client: true },
            gppActiveFunctionality: { name: "gppActiveFunctionality", ID: 0x0017, type: enums_1.DataType.BITMAP24, required: true, client: true },
            /** 0b000: no key, 0b001: nwk key, 0b010: GP group key, 0b011: nwk key derived GP group key, 0b111: derived individual GPD key */
            gpSharedSecurityKeyType: { name: "gpSharedSecurityKeyType", ID: 0x0020, type: enums_1.DataType.BITMAP8, write: true, max: 0x07, default: 0 },
            gpSharedSecurityKey: { name: "gpSharedSecurityKey", ID: 0x0021, type: enums_1.DataType.SEC_KEY, write: true },
            gpLinkKey: { name: "gpLinkKey", ID: 0x0022, type: enums_1.DataType.SEC_KEY, write: true /* default: "ZigBeeAlliance09" */ },
        },
        commands: {
            notification: {
                name: "notification",
                ID: 0x00,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP16 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    { name: "frameCounter", type: enums_1.DataType.UINT32 },
                    { name: "commandID", type: enums_1.DataType.UINT8 },
                    { name: "payloadSize", type: enums_1.DataType.UINT8 },
                    {
                        name: "commandFrame",
                        type: enums_1.BuffaloZclDataType.GPD_FRAME,
                        // not parsing when FULLENCR (requires decryption first - then re-parsing)
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0xc0, reversed: true }],
                    },
                    { name: "gppNwkAddr", type: enums_1.DataType.UINT16, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x4000 }] },
                    /** Bits: 0..5 RSSI 6..7 Link quality */
                    {
                        name: "gppGpdLink",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x4000 }],
                    },
                ],
            },
            pairingSearch: {
                name: "pairingSearch",
                ID: 0x01,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP16 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                ],
            },
            tunnelingStop: {
                name: "tunnelingStop",
                ID: 0x03,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    { name: "gpdSecurityFrameCounter", type: enums_1.DataType.UINT32 },
                    { name: "gppShortAddress", type: enums_1.DataType.UINT16 },
                    { name: "gppGpdLink", type: enums_1.DataType.BITMAP8 },
                ],
            },
            commissioningNotification: {
                name: "commissioningNotification",
                ID: 0x04,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP16 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    { name: "frameCounter", type: enums_1.DataType.UINT32 },
                    { name: "commandID", type: enums_1.DataType.UINT8 },
                    { name: "payloadSize", type: enums_1.DataType.UINT8 },
                    {
                        name: "commandFrame",
                        type: enums_1.BuffaloZclDataType.GPD_FRAME,
                        conditions: [
                            // not parsing when FULLENCR and "security failed" bit is set (requires decryption first - then re-parsing)
                            { type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x30, reversed: true },
                            { type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x200, reversed: true },
                        ],
                    },
                    { name: "gppNwkAddr", type: enums_1.DataType.UINT16, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x800 }] },
                    /** Bits: 0..5 RSSI 6..7 Link quality */
                    { name: "gppGpdLink", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x800 }] },
                    { name: "mic", type: enums_1.DataType.UINT32, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x200 }] },
                ],
            },
            sinkCommissioningMode: {
                name: "sinkCommissioningMode",
                ID: 0x04,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    { name: "gpmAddressForSecurity", type: enums_1.DataType.UINT16, max: 0xffff /* default: 0xffff */ },
                    { name: "gpmAddressForPairing", type: enums_1.DataType.UINT16, max: 0xffff /* default: 0xffff */ },
                    { name: "sinkEndpoint", type: enums_1.DataType.UINT8 },
                ],
            },
            translationTableUpdate: {
                name: "translationTableUpdate",
                ID: 0x07,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP16 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    // TODO: need BuffaloZcl read/write (length from options bits 5..7)
                    // {name: "translations", type: BuffaloZclDataType.LIST_WRITE_GP_TRANSLATION_ENTRY},
                    //   {name: "index", type: DataType.UINT8},
                    //   {name: "commandId", type: DataType.UINT8},
                    //   {name: "endpoint", type: DataType.UINT8},
                    //   {name: "profile", type: DataType.UINT16},
                    //   {name: "cluster", type: DataType.UINT16},
                    //   {name: "zigbeeCommandId", type: DataType.UINT8},
                    //   {name: "zigbeeCommandPayloadLength", type: DataType.UINT8},
                    //   {name: "zigbeeCommandPayload", type: BuffaloZclDataType.LIST_UINT8},
                    //   {name: "additionalInfoBlockCount", type: DataType.UINT8},
                    //   {name: "additionalInfoBlock", type: BuffaloZclDataType.LIST_UINT8},
                ],
            },
            translationTableReq: { name: "translationTableReq", ID: 0x08, parameters: [{ name: "startIndex", type: enums_1.DataType.UINT8 }], response: 0x08 },
            // TODO: logic too complex for current frame parsing method
            // pairingConfiguration: {ID: 0x09},
            sinkTableReq: {
                name: "sinkTableReq",
                ID: 0x0a,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    { name: "index", type: enums_1.DataType.UINT8 },
                ],
                response: 0x0a,
            },
            proxyTableRsp: {
                name: "proxyTableRsp",
                ID: 0x0b,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "totalNumberNonEmptyEntries", type: enums_1.DataType.UINT8 },
                    { name: "startIndex", type: enums_1.DataType.UINT8 },
                    { name: "entriesCount", type: enums_1.DataType.UINT8 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "entries", type: BuffaloZclDataType.LIST_OCTET_STR},
                ],
            },
        },
        commandsResponse: {
            notificationResponse: {
                name: "notificationResponse",
                ID: 0x00,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    { name: "gpdSecurityFrameCounter", type: enums_1.DataType.UINT32 },
                ],
            },
            pairing: {
                name: "pairing",
                ID: 0x01,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP24 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "sinkIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 4, size: 3, value: 0b110 }],
                    },
                    {
                        name: "sinkIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 4, size: 3, value: 0b000 }],
                    },
                    {
                        name: "sinkNwkAddr",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 4, size: 3, value: 0b110 }],
                    },
                    {
                        name: "sinkNwkAddr",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 4, size: 3, value: 0b000 }],
                    },
                    {
                        name: "sinkGroupID",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 4, size: 3, value: 0b100 }],
                    },
                    {
                        name: "sinkGroupID",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 4, size: 3, value: 0b010 }],
                    },
                    { name: "deviceID", type: enums_1.DataType.UINT8, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x0008 }] },
                    {
                        name: "frameCounter",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x4000 }],
                    },
                    { name: "gpdKey", type: enums_1.DataType.SEC_KEY, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x8000 }] },
                    {
                        name: "assignedAlias",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x10000 }],
                    },
                    {
                        name: "groupcastRadius",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x20000 }],
                    },
                ],
            },
            /** A.K.A. proxyCommisioningMode */
            commisioningMode: {
                name: "commisioningMode",
                ID: 0x02,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "commisioningWindow",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x2 }],
                    },
                    { name: "channel", type: enums_1.DataType.UINT8, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "options", mask: 0x10 }] },
                ],
            },
            response: {
                name: "response",
                ID: 0x06,
                parameters: [
                    { name: "options", type: enums_1.DataType.UINT8 },
                    /** A.K.A. selectedSenderShortAddress */
                    { name: "tempMaster", type: enums_1.DataType.UINT16 },
                    /** A.K.A. selectedSenderTxChannel */
                    { name: "tempMasterTx", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    { name: "gpdCmd", type: enums_1.DataType.UINT8 },
                    { name: "gpdPayload", type: enums_1.BuffaloZclDataType.GPD_FRAME },
                ],
            },
            translationTableRsp: {
                name: "translationTableRsp",
                ID: 0x08,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    { name: "totalNumberEntries", type: enums_1.DataType.UINT8 },
                    { name: "startIndex", type: enums_1.DataType.UINT8 },
                    { name: "entriesCount", type: enums_1.DataType.UINT8 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "translations", type: BuffaloZclDataType.LIST_READ_GP_TRANSLATION_ENTRY},
                    //   {
                    //       name: "srcID",
                    //       type: DataType.UINT32,
                    //       conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000}],
                    //   },
                    //   {
                    //       name: "gpdIEEEAddr",
                    //       type: DataType.IEEE_ADDR,
                    //       conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}],
                    //   },
                    //   {
                    //       name: "gpdEndpoint",
                    //       type: DataType.UINT8,
                    //       conditions: [{type: ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010}],
                    //   },
                    //   {name: "commandId", type: DataType.UINT8},
                    //   {name: "endpoint", type: DataType.UINT8},
                    //   {name: "profile", type: DataType.UINT16},
                    //   {name: "cluster", type: DataType.UINT16},
                    //   {name: "zigbeeCommandId", type: DataType.UINT8},
                    //   {name: "zigbeeCommandPayloadLength", type: DataType.UINT8},
                    //   {name: "zigbeeCommandPayload", type: BuffaloZclDataType.LIST_UINT8},
                    //   {name: "additionalInfoBlockCount", type: DataType.UINT8},
                    //   {name: "additionalInfoBlock", type: BuffaloZclDataType.LIST_UINT8},
                ],
            },
            sinkTableRsp: {
                name: "sinkTableRsp",
                ID: 0x0a,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "totalNumberNonEmptyEntries", type: enums_1.DataType.UINT8 },
                    { name: "startIndex", type: enums_1.DataType.UINT8 },
                    { name: "entriesCount", type: enums_1.DataType.UINT8 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "entries", type: BuffaloZclDataType.LIST_OCTET_STR},
                ],
            },
            proxyTableReq: {
                name: "proxyTableReq",
                ID: 0x0b,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    {
                        name: "srcID",
                        type: enums_1.DataType.UINT32,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b000 }],
                    },
                    {
                        name: "gpdIEEEAddr",
                        type: enums_1.DataType.IEEE_ADDR,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    {
                        name: "gpdEndpoint",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.BITFIELD_ENUM, param: "options", offset: 0, size: 3, value: 0b010 }],
                    },
                    { name: "index", type: enums_1.DataType.UINT8 },
                ],
            },
        },
    },
    mobileDeviceCfg: {
        name: "mobileDeviceCfg",
        ID: 0x0022,
        attributes: {
            keepAliveTime: { name: "keepAliveTime", ID: 0x0000, type: enums_1.DataType.UINT16, required: true, write: true, min: 1, max: 65535, default: 15 },
            rejoinTimeout: {
                name: "rejoinTimeout",
                ID: 0x0001,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                max: 0xffff,
                default: 0xffff,
                special: [["Never", "ffff"]],
            },
        },
        commands: {},
        commandsResponse: {
            keepAliveNotification: {
                name: "keepAliveNotification",
                ID: 0x00,
                parameters: [
                    { name: "keepAliveTime", type: enums_1.DataType.UINT16 },
                    { name: "rejoinTimeout", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
        },
    },
    neighborCleaning: {
        name: "neighborCleaning",
        ID: 0x0023,
        attributes: {
            neighborCleaningTimeout: {
                name: "neighborCleaningTimeout",
                ID: 0x0000,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                min: 1,
                max: 65535,
                default: 30,
            },
        },
        commands: {
            purgeEntries: { name: "purgeEntries", ID: 0x00, parameters: [], required: true },
        },
        commandsResponse: {},
    },
    nearestGateway: {
        name: "nearestGateway",
        ID: 0x0024,
        attributes: {
            nearestGateway: { name: "nearestGateway", ID: 0x0000, type: enums_1.DataType.UINT16, required: true, write: true, max: 0xfff8, default: 0 },
            newMobileNode: {
                name: "newMobileNode",
                ID: 0x0001,
                type: enums_1.DataType.UINT16,
                required: true,
                read: false,
                write: true,
                max: 0xfff8,
                default: 0,
            },
        },
        commands: {},
        commandsResponse: {},
    },
    keepAlive: {
        name: "keepAlive",
        ID: 0x0025,
        attributes: {
            tcKeepAliveBase: { name: "tcKeepAliveBase", ID: 0x0000, type: enums_1.DataType.UINT8, required: true, max: 0xff, default: 0x0a },
            tcKeepAliveJitter: { name: "tcKeepAliveJitter", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 0xffff, default: 0x012c },
        },
        commands: {},
        commandsResponse: {},
    },
    closuresShadeCfg: {
        name: "closuresShadeCfg",
        ID: 0x0100,
        attributes: {
            physicalClosedLimit: { name: "physicalClosedLimit", ID: 0x0000, type: enums_1.DataType.UINT16, min: 1, max: 0xfffe },
            motorStepSize: { name: "motorStepSize", ID: 0x0001, type: enums_1.DataType.UINT8, max: 0xfe },
            status: { name: "status", ID: 0x0002, type: enums_1.DataType.BITMAP8, write: true, required: true, default: 0 },
            closedLimit: { name: "closedLimit", ID: 0x0010, type: enums_1.DataType.UINT16, write: true, required: true, min: 1, max: 0xfffe, default: 1 },
            mode: { name: "mode", ID: 0x0011, type: enums_1.DataType.ENUM8, write: true, required: true, max: 0xfe, default: 0 },
        },
        commands: {},
        commandsResponse: {},
    },
    closuresDoorLock: {
        name: "closuresDoorLock",
        ID: 0x0101,
        attributes: {
            lockState: { name: "lockState", ID: 0x0000, type: enums_1.DataType.ENUM8, report: true, required: true },
            lockType: { name: "lockType", ID: 0x0001, type: enums_1.DataType.ENUM8, required: true },
            actuatorEnabled: { name: "actuatorEnabled", ID: 0x0002, type: enums_1.DataType.BOOLEAN, required: true },
            doorState: { name: "doorState", ID: 0x0003, type: enums_1.DataType.ENUM8, report: true },
            doorOpenEvents: { name: "doorOpenEvents", ID: 0x0004, type: enums_1.DataType.UINT32, write: true },
            doorClosedEvents: { name: "doorClosedEvents", ID: 0x0005, type: enums_1.DataType.UINT32, write: true },
            openPeriod: { name: "openPeriod", ID: 0x0006, type: enums_1.DataType.UINT16, write: true },
            numOfLockRecordsSupported: { name: "numOfLockRecordsSupported", ID: 0x0010, type: enums_1.DataType.UINT16, default: 0 },
            numOfTotalUsersSupported: { name: "numOfTotalUsersSupported", ID: 0x0011, type: enums_1.DataType.UINT16, default: 0 },
            numOfPinUsersSupported: { name: "numOfPinUsersSupported", ID: 0x0012, type: enums_1.DataType.UINT16, default: 0 },
            numOfRfidUsersSupported: { name: "numOfRfidUsersSupported", ID: 0x0013, type: enums_1.DataType.UINT16, default: 0 },
            numOfWeekDaySchedulesSupportedPerUser: { name: "numOfWeekDaySchedulesSupportedPerUser", ID: 0x0014, type: enums_1.DataType.UINT8, default: 0 },
            numOfYearDaySchedulesSupportedPerUser: { name: "numOfYearDaySchedulesSupportedPerUser", ID: 0x0015, type: enums_1.DataType.UINT8, default: 0 },
            numOfHolidayScheduledsSupported: { name: "numOfHolidayScheduledsSupported", ID: 0x0016, type: enums_1.DataType.UINT8, default: 0 },
            maxPinLen: { name: "maxPinLen", ID: 0x0017, type: enums_1.DataType.UINT8, default: 8 },
            minPinLen: { name: "minPinLen", ID: 0x0018, type: enums_1.DataType.UINT8, default: 4 },
            maxRfidLen: { name: "maxRfidLen", ID: 0x0019, type: enums_1.DataType.UINT8, default: 20 },
            minRfidLen: { name: "minRfidLen", ID: 0x001a, type: enums_1.DataType.UINT8, default: 8 },
            enableLogging: { name: "enableLogging", ID: 0x0020, type: enums_1.DataType.BOOLEAN, write: true, writeOptional: true, report: true, default: 0 },
            language: { name: "language", ID: 0x0021, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, report: true, default: "", length: 2 },
            ledSettings: { name: "ledSettings", ID: 0x0022, type: enums_1.DataType.UINT8, write: true, writeOptional: true, report: true, default: 0 },
            autoRelockTime: {
                name: "autoRelockTime",
                ID: 0x0023,
                type: enums_1.DataType.UINT32,
                write: true,
                writeOptional: true,
                report: true,
                default: 0,
                special: [["Disabled", "0"]],
            },
            soundVolume: { name: "soundVolume", ID: 0x0024, type: enums_1.DataType.UINT8, write: true, writeOptional: true, report: true, default: 0 },
            operatingMode: { name: "operatingMode", ID: 0x0025, type: enums_1.DataType.ENUM8, write: true, writeOptional: true, report: true, default: 0 },
            supportedOperatingModes: { name: "supportedOperatingModes", ID: 0x0026, type: enums_1.DataType.BITMAP16, default: 1 },
            defaultConfigurationRegister: { name: "defaultConfigurationRegister", ID: 0x0027, type: enums_1.DataType.BITMAP16, report: true, default: 0 },
            enableLocalProgramming: {
                name: "enableLocalProgramming",
                ID: 0x0028,
                type: enums_1.DataType.BOOLEAN,
                write: true,
                writeOptional: true,
                report: true,
                default: 1,
            },
            enableOneTouchLocking: { name: "enableOneTouchLocking", ID: 0x0029, type: enums_1.DataType.BOOLEAN, write: true, report: true, default: 0 },
            enableInsideStatusLed: { name: "enableInsideStatusLed", ID: 0x002a, type: enums_1.DataType.BOOLEAN, write: true, report: true, default: 0 },
            enablePrivacyModeButton: { name: "enablePrivacyModeButton", ID: 0x002b, type: enums_1.DataType.BOOLEAN, write: true, report: true, default: 0 },
            wrongCodeEntryLimit: {
                name: "wrongCodeEntryLimit",
                ID: 0x0030,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                report: true,
                default: 0,
            },
            userCodeTemporaryDisableTime: {
                name: "userCodeTemporaryDisableTime",
                ID: 0x0031,
                type: enums_1.DataType.UINT8,
                write: true,
                writeOptional: true,
                report: true,
                default: 0,
            },
            sendPinOta: { name: "sendPinOta", ID: 0x0032, type: enums_1.DataType.BOOLEAN, write: true, writeOptional: true, report: true, default: 0 },
            requirePinForRfOperation: {
                name: "requirePinForRfOperation",
                ID: 0x0033,
                type: enums_1.DataType.BOOLEAN,
                write: true,
                writeOptional: true,
                report: true,
                default: 0,
            },
            zigbeeSecurityLevel: { name: "zigbeeSecurityLevel", ID: 0x0034, type: enums_1.DataType.ENUM8, report: true, default: 0 },
            alarmMask: { name: "alarmMask", ID: 0x0040, type: enums_1.DataType.BITMAP16, write: true, report: true, default: 0 },
            keypadOperationEventMask: { name: "keypadOperationEventMask", ID: 0x0041, type: enums_1.DataType.BITMAP16, write: true, report: true, default: 0 },
            rfOperationEventMask: { name: "rfOperationEventMask", ID: 0x0042, type: enums_1.DataType.BITMAP16, write: true, report: true, default: 0 },
            manualOperationEventMask: { name: "manualOperationEventMask", ID: 0x0043, type: enums_1.DataType.BITMAP16, write: true, report: true, default: 0 },
            rfidOperationEventMask: { name: "rfidOperationEventMask", ID: 0x0044, type: enums_1.DataType.BITMAP16, write: true, report: true, default: 0 },
            keypadProgrammingEventMask: {
                name: "keypadProgrammingEventMask",
                ID: 0x0045,
                type: enums_1.DataType.BITMAP16,
                write: true,
                report: true,
                default: 0,
            },
            rfProgrammingEventMask: { name: "rfProgrammingEventMask", ID: 0x0046, type: enums_1.DataType.BITMAP16, write: true, report: true, default: 0 },
            rfidProgrammingEventMask: { name: "rfidProgrammingEventMask", ID: 0x0047, type: enums_1.DataType.BITMAP16, write: true, report: true, default: 0 },
        },
        commands: {
            lockDoor: { name: "lockDoor", ID: 0x00, response: 0x00, parameters: [{ name: "pincodevalue", type: enums_1.DataType.OCTET_STR }], required: true },
            unlockDoor: {
                name: "unlockDoor",
                ID: 0x01,
                response: 0x01,
                parameters: [{ name: "pincodevalue", type: enums_1.DataType.OCTET_STR }],
                required: true,
            },
            toggleDoor: { name: "toggleDoor", ID: 0x02, response: 0x02, parameters: [{ name: "pincodevalue", type: enums_1.DataType.OCTET_STR }] },
            unlockWithTimeout: {
                name: "unlockWithTimeout",
                ID: 0x03,
                response: 0x03,
                parameters: [
                    { name: "timeout", type: enums_1.DataType.UINT16 },
                    { name: "pincodevalue", type: enums_1.DataType.OCTET_STR },
                ],
            },
            getLogRecord: {
                name: "getLogRecord",
                ID: 0x04,
                response: 0x04,
                parameters: [{ name: "logindex", type: enums_1.DataType.UINT16, special: [["MostRecent", "0"]] }],
            },
            setPinCode: {
                name: "setPinCode",
                ID: 0x05,
                response: 0x05,
                parameters: [
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "userstatus", type: enums_1.DataType.UINT8 },
                    { name: "usertype", type: enums_1.DataType.ENUM8 },
                    { name: "pincodevalue", type: enums_1.DataType.OCTET_STR },
                ],
            },
            getPinCode: { name: "getPinCode", ID: 0x06, response: 0x06, parameters: [{ name: "userid", type: enums_1.DataType.UINT16 }] },
            clearPinCode: { name: "clearPinCode", ID: 0x07, response: 0x07, parameters: [{ name: "userid", type: enums_1.DataType.UINT16 }] },
            clearAllPinCodes: { name: "clearAllPinCodes", ID: 0x08, response: 0x08, parameters: [] },
            setUserStatus: {
                name: "setUserStatus",
                ID: 0x09,
                response: 0x09,
                parameters: [
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "userstatus", type: enums_1.DataType.UINT8 },
                ],
            },
            getUserStatus: { name: "getUserStatus", ID: 0x0a, response: 0x0a, parameters: [{ name: "userid", type: enums_1.DataType.UINT16 }] },
            setWeekDaySchedule: {
                name: "setWeekDaySchedule",
                ID: 0x0b,
                response: 0x0b,
                parameters: [
                    { name: "scheduleid", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "daysmask", type: enums_1.DataType.BITMAP8 },
                    { name: "starthour", type: enums_1.DataType.UINT8, min: 0, max: 23 },
                    { name: "startminute", type: enums_1.DataType.UINT8, min: 0, max: 59 },
                    { name: "endhour", type: enums_1.DataType.UINT8, min: 0, max: 23 },
                    { name: "endminute", type: enums_1.DataType.UINT8, min: 0, max: 59 },
                ],
            },
            getWeekDaySchedule: {
                name: "getWeekDaySchedule",
                ID: 0x0c,
                response: 0x0c,
                parameters: [
                    { name: "scheduleid", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                ],
            },
            clearWeekDaySchedule: {
                name: "clearWeekDaySchedule",
                ID: 0x0d,
                response: 0x0d,
                parameters: [
                    { name: "scheduleid", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                ],
            },
            setYearDaySchedule: {
                name: "setYearDaySchedule",
                ID: 0x0e,
                response: 0x0e,
                parameters: [
                    { name: "scheduleid", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "zigbeelocalstarttime", type: enums_1.DataType.UINT32 },
                    { name: "zigbeelocalendtime", type: enums_1.DataType.UINT32 },
                ],
            },
            getYearDaySchedule: {
                name: "getYearDaySchedule",
                ID: 0x0f,
                response: 0x0f,
                parameters: [
                    { name: "scheduleid", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                ],
            },
            clearYearDaySchedule: {
                name: "clearYearDaySchedule",
                ID: 0x10,
                response: 0x10,
                parameters: [
                    { name: "scheduleid", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                ],
            },
            setHolidaySchedule: {
                name: "setHolidaySchedule",
                ID: 0x11,
                response: 0x11,
                parameters: [
                    { name: "holidayscheduleid", type: enums_1.DataType.UINT8 },
                    { name: "zigbeelocalstarttime", type: enums_1.DataType.UINT32 },
                    { name: "zigbeelocalendtime", type: enums_1.DataType.UINT32 },
                    { name: "opermodelduringholiday", type: enums_1.DataType.ENUM8 },
                ],
            },
            getHolidaySchedule: {
                name: "getHolidaySchedule",
                ID: 0x12,
                response: 0x12,
                parameters: [{ name: "holidayscheduleid", type: enums_1.DataType.UINT8 }],
            },
            clearHolidaySchedule: {
                name: "clearHolidaySchedule",
                ID: 0x13,
                response: 0x13,
                parameters: [{ name: "holidayscheduleid", type: enums_1.DataType.UINT8 }],
            },
            setUserType: {
                name: "setUserType",
                ID: 0x14,
                response: 0x14,
                parameters: [
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "usertype", type: enums_1.DataType.ENUM8 },
                ],
            },
            getUserType: { name: "getUserType", ID: 0x15, response: 0x15, parameters: [{ name: "userid", type: enums_1.DataType.UINT16 }] },
            setRfidCode: {
                name: "setRfidCode",
                ID: 0x16,
                response: 0x16,
                parameters: [
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "userstatus", type: enums_1.DataType.UINT8 },
                    { name: "usertype", type: enums_1.DataType.ENUM8 },
                    { name: "pincodevalue", type: enums_1.DataType.OCTET_STR },
                ],
            },
            getRfidCode: { name: "getRfidCode", ID: 0x17, response: 0x17, parameters: [{ name: "userid", type: enums_1.DataType.UINT16 }] },
            clearRfidCode: { name: "clearRfidCode", ID: 0x18, response: 0x18, parameters: [{ name: "userid", type: enums_1.DataType.UINT16 }] },
            clearAllRfidCodes: { name: "clearAllRfidCodes", ID: 0x19, response: 0x19, parameters: [] },
        },
        commandsResponse: {
            lockDoorRsp: { name: "lockDoorRsp", ID: 0x00, parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }], required: true },
            unlockDoorRsp: { name: "unlockDoorRsp", ID: 0x01, parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }], required: true },
            toggleDoorRsp: { name: "toggleDoorRsp", ID: 0x02, parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }] },
            unlockWithTimeoutRsp: { name: "unlockWithTimeoutRsp", ID: 0x03, parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }] },
            getLogRecordRsp: {
                name: "getLogRecordRsp",
                ID: 0x04,
                parameters: [
                    { name: "logentryid", type: enums_1.DataType.UINT16 },
                    { name: "timestamp", type: enums_1.DataType.UINT32 },
                    { name: "eventtype", type: enums_1.DataType.ENUM8 },
                    { name: "source", type: enums_1.DataType.UINT8 },
                    { name: "eventidalarmcode", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "pincodevalue", type: enums_1.DataType.OCTET_STR },
                ],
            },
            setPinCodeRsp: { name: "setPinCodeRsp", ID: 0x05, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            getPinCodeRsp: {
                name: "getPinCodeRsp",
                ID: 0x06,
                parameters: [
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "userstatus", type: enums_1.DataType.UINT8 },
                    { name: "usertype", type: enums_1.DataType.ENUM8 },
                    { name: "pincodevalue", type: enums_1.DataType.OCTET_STR },
                ],
            },
            clearPinCodeRsp: { name: "clearPinCodeRsp", ID: 0x07, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            clearAllPinCodesRsp: { name: "clearAllPinCodesRsp", ID: 0x08, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            setUserStatusRsp: { name: "setUserStatusRsp", ID: 0x09, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            getUserStatusRsp: {
                name: "getUserStatusRsp",
                ID: 0x0a,
                parameters: [
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "userstatus", type: enums_1.DataType.UINT8 },
                ],
            },
            setWeekDayScheduleRsp: { name: "setWeekDayScheduleRsp", ID: 0x0b, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            getWeekDayScheduleRsp: {
                name: "getWeekDayScheduleRsp",
                ID: 0x0c,
                parameters: [
                    { name: "scheduleid", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "status", type: enums_1.DataType.UINT8 },
                    { name: "daysmask", type: enums_1.DataType.BITMAP8 },
                    { name: "starthour", type: enums_1.DataType.UINT8, min: 0, max: 23 },
                    { name: "startminute", type: enums_1.DataType.UINT8, min: 0, max: 59 },
                    { name: "endhour", type: enums_1.DataType.UINT8, min: 0, max: 23 },
                    { name: "endminute", type: enums_1.DataType.UINT8, min: 0, max: 59 },
                ],
            },
            clearWeekDayScheduleRsp: { name: "clearWeekDayScheduleRsp", ID: 0x0d, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            setYearDayScheduleRsp: { name: "setYearDayScheduleRsp", ID: 0x0e, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            getYearDayScheduleRsp: {
                name: "getYearDayScheduleRsp",
                ID: 0x0f,
                parameters: [
                    { name: "scheduleid", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "zigbeelocalstarttime", type: enums_1.DataType.UINT32 },
                    { name: "zigbeelocalendtime", type: enums_1.DataType.UINT32 },
                ],
            },
            clearYearDayScheduleRsp: { name: "clearYearDayScheduleRsp", ID: 0x10, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            setHolidayScheduleRsp: { name: "setHolidayScheduleRsp", ID: 0x11, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            getHolidayScheduleRsp: {
                name: "getHolidayScheduleRsp",
                ID: 0x12,
                parameters: [
                    { name: "holidayscheduleid", type: enums_1.DataType.UINT8 },
                    { name: "status", type: enums_1.DataType.UINT8 },
                    { name: "zigbeelocalstarttime", type: enums_1.DataType.UINT32 },
                    { name: "zigbeelocalendtime", type: enums_1.DataType.UINT32 },
                    { name: "opermodelduringholiday", type: enums_1.DataType.ENUM8 },
                ],
            },
            clearHolidayScheduleRsp: { name: "clearHolidayScheduleRsp", ID: 0x13, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            setUserTypeRsp: { name: "setUserTypeRsp", ID: 0x14, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            getUserTypeRsp: {
                name: "getUserTypeRsp",
                ID: 0x15,
                parameters: [
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "usertype", type: enums_1.DataType.ENUM8 },
                ],
            },
            setRfidCodeRsp: { name: "setRfidCodeRsp", ID: 0x16, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            getRfidCodeRsp: {
                name: "getRfidCodeRsp",
                ID: 0x17,
                parameters: [
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "userstatus", type: enums_1.DataType.UINT8 },
                    { name: "usertype", type: enums_1.DataType.ENUM8 },
                    { name: "pincodevalue", type: enums_1.DataType.OCTET_STR },
                ],
            },
            clearRfidCodeRsp: { name: "clearRfidCodeRsp", ID: 0x18, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            clearAllRfidCodesRsp: { name: "clearAllRfidCodesRsp", ID: 0x19, parameters: [{ name: "status", type: enums_1.DataType.UINT8 }] },
            operationEventNotification: {
                name: "operationEventNotification",
                ID: 0x20,
                parameters: [
                    { name: "opereventsrc", type: enums_1.DataType.UINT8 },
                    { name: "opereventcode", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "pin", type: enums_1.DataType.OCTET_STR },
                    { name: "zigbeelocaltime", type: enums_1.DataType.UINT32 },
                    { name: "data", type: enums_1.DataType.CHAR_STR },
                ],
            },
            programmingEventNotification: {
                name: "programmingEventNotification",
                ID: 0x21,
                parameters: [
                    { name: "programeventsrc", type: enums_1.DataType.UINT8 },
                    { name: "programeventcode", type: enums_1.DataType.UINT8 },
                    { name: "userid", type: enums_1.DataType.UINT16 },
                    { name: "pin", type: enums_1.DataType.OCTET_STR },
                    { name: "usertype", type: enums_1.DataType.ENUM8 },
                    { name: "userstatus", type: enums_1.DataType.UINT8 },
                    { name: "zigbeelocaltime", type: enums_1.DataType.UINT32 },
                    { name: "data", type: enums_1.DataType.CHAR_STR },
                ],
            },
        },
    },
    closuresWindowCovering: {
        name: "closuresWindowCovering",
        ID: 0x0102,
        attributes: {
            windowCoveringType: { name: "windowCoveringType", ID: 0x0000, type: enums_1.DataType.ENUM8, required: true, default: 0 },
            physicalClosedLimitLiftCm: { name: "physicalClosedLimitLiftCm", ID: 0x0001, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            physicalClosedLimitTiltDdegree: { name: "physicalClosedLimitTiltDdegree", ID: 0x0002, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            currentPositionLiftCm: { name: "currentPositionLiftCm", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            currentPositionTiltDdegree: { name: "currentPositionTiltDdegree", ID: 0x0004, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            numOfActuationsLift: { name: "numOfActuationsLift", ID: 0x0005, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            numOfActuationsTilt: { name: "numOfActuationsTilt", ID: 0x0006, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            configStatus: { name: "configStatus", ID: 0x0007, type: enums_1.DataType.BITMAP8, required: true, default: 3 },
            // `required: true` only if Closed Loop control and Lift actions are supported
            currentPositionLiftPercentage: {
                name: "currentPositionLiftPercentage",
                ID: 0x0008,
                type: enums_1.DataType.UINT8,
                report: true,
                scene: true,
                max: 100,
                default: 0,
            },
            // `required: true` only if Closed Loop control and Tilt actions are supported
            currentPositionTiltPercentage: {
                name: "currentPositionTiltPercentage",
                ID: 0x0009,
                type: enums_1.DataType.UINT8,
                report: true,
                scene: true,
                max: 100,
                default: 0,
            },
            // `required: true` only if Closed Loop control and Lift actions are supported
            installedOpenLimitLiftCm: { name: "installedOpenLimitLiftCm", ID: 0x0010, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            // `required: true` only if Closed Loop control and Lift actions are supported
            installedClosedLimitLiftCm: { name: "installedClosedLimitLiftCm", ID: 0x0011, type: enums_1.DataType.UINT16, max: 0xffff, default: 0xffff },
            // `required: true` only if Closed Loop control and Tilt actions are supported
            installedOpenLimitTiltDdegree: { name: "installedOpenLimitTiltDdegree", ID: 0x0012, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            // `required: true` only if Closed Loop control and Tilt actions are supported
            installedClosedLimitTiltDdegree: {
                name: "installedClosedLimitTiltDdegree",
                ID: 0x0013,
                type: enums_1.DataType.UINT16,
                max: 0xffff,
                default: 0xffff,
            },
            velocityLift: { name: "velocityLift", ID: 0x0014, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            accelerationTimeLift: { name: "accelerationTimeLift", ID: 0x0015, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            decelerationTimeLift: { name: "decelerationTimeLift", ID: 0x0016, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            windowCoveringMode: { name: "windowCoveringMode", ID: 0x0017, type: enums_1.DataType.BITMAP8, write: true, required: true, default: 4 },
            intermediateSetpointsLift: { name: "intermediateSetpointsLift", ID: 0x0018, type: enums_1.DataType.OCTET_STR, write: true, default: "1,0x0000" },
            intermediateSetpointsTilt: { name: "intermediateSetpointsTilt", ID: 0x0019, type: enums_1.DataType.OCTET_STR, write: true, default: "1,0x0000" },
        },
        commands: {
            upOpen: { name: "upOpen", ID: 0x00, parameters: [], required: true },
            downClose: { name: "downClose", ID: 0x01, parameters: [], required: true },
            stop: { name: "stop", ID: 0x02, parameters: [], required: true },
            goToLiftValue: {
                name: "goToLiftValue",
                ID: 0x04,
                parameters: [
                    {
                        name: "liftvalue",
                        type: enums_1.DataType.UINT16,
                    },
                ],
            },
            goToLiftPercentage: { name: "goToLiftPercentage", ID: 0x05, parameters: [{ name: "percentageliftvalue", type: enums_1.DataType.UINT8, max: 100 }] },
            goToTiltValue: {
                name: "goToTiltValue",
                ID: 0x07,
                parameters: [
                    {
                        name: "tiltvalue",
                        type: enums_1.DataType.UINT16,
                    },
                ],
            },
            goToTiltPercentage: { name: "goToTiltPercentage", ID: 0x08, parameters: [{ name: "percentagetiltvalue", type: enums_1.DataType.UINT8, max: 100 }] },
        },
        commandsResponse: {},
    },
    barrierControl: {
        name: "barrierControl",
        ID: 0x0103,
        attributes: {
            movingState: { name: "movingState", ID: 0x0001, type: enums_1.DataType.ENUM8, report: true, required: true },
            safetyStatus: { name: "safetyStatus", ID: 0x0002, type: enums_1.DataType.BITMAP16, report: true, required: true },
            capabilities: { name: "capabilities", ID: 0x0003, type: enums_1.DataType.BITMAP8, required: true },
            openEvents: { name: "openEvents", ID: 0x0004, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0 },
            closeEvents: { name: "closeEvents", ID: 0x0005, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0 },
            commandOpenEvents: { name: "commandOpenEvents", ID: 0x0006, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0 },
            commandCloseEvents: { name: "commandCloseEvents", ID: 0x0007, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0 },
            openPeriod: { name: "openPeriod", ID: 0x0008, type: enums_1.DataType.UINT16, write: true, max: 0xfffe },
            closePeriod: { name: "closePeriod", ID: 0x0009, type: enums_1.DataType.UINT16, write: true, max: 0xfffe },
            barrierPosition: {
                name: "barrierPosition",
                ID: 0x000a,
                type: enums_1.DataType.UINT8,
                report: true,
                scene: true,
                required: true,
                max: 100,
                special: [["PositionUnknown", "ff"]],
            },
        },
        commands: {
            goToPercent: { name: "goToPercent", ID: 0x00, parameters: [{ name: "percentOpen", type: enums_1.DataType.UINT8, min: 0, max: 100 }], required: true },
            stop: { name: "stop", ID: 0x01, parameters: [], required: true },
        },
        commandsResponse: {},
    },
    hvacPumpCfgCtrl: {
        name: "hvacPumpCfgCtrl",
        ID: 0x0200,
        attributes: {
            maxPressure: { name: "maxPressure", ID: 0x0000, type: enums_1.DataType.INT16, required: true, min: -32767, max: 32767 },
            maxSpeed: { name: "maxSpeed", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 65534 },
            maxFlow: { name: "maxFlow", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, max: 65534 },
            minConstPressure: { name: "minConstPressure", ID: 0x0003, type: enums_1.DataType.INT16, min: -32767, max: 32767 },
            maxConstPressure: { name: "maxConstPressure", ID: 0x0004, type: enums_1.DataType.INT16, min: -32767, max: 32767 },
            minCompPressure: { name: "minCompPressure", ID: 0x0005, type: enums_1.DataType.INT16, min: -32767, max: 32767 },
            maxCompPressure: { name: "maxCompPressure", ID: 0x0006, type: enums_1.DataType.INT16, min: -32767, max: 32767 },
            minConstSpeed: { name: "minConstSpeed", ID: 0x0007, type: enums_1.DataType.UINT16, max: 65534 },
            maxConstSpeed: { name: "maxConstSpeed", ID: 0x0008, type: enums_1.DataType.UINT16, max: 65534 },
            minConstFlow: { name: "minConstFlow", ID: 0x0009, type: enums_1.DataType.UINT16, max: 65534 },
            maxConstFlow: { name: "maxConstFlow", ID: 0x000a, type: enums_1.DataType.UINT16, max: 65534 },
            minConstTemp: { name: "minConstTemp", ID: 0x000b, type: enums_1.DataType.INT16, min: -27315, max: 32767 },
            maxConstTemp: { name: "maxConstTemp", ID: 0x000c, type: enums_1.DataType.INT16, min: -27315, max: 32767 },
            pumpStatus: { name: "pumpStatus", ID: 0x0010, type: enums_1.DataType.BITMAP16, report: true },
            effectiveOperationMode: { name: "effectiveOperationMode", ID: 0x0011, type: enums_1.DataType.ENUM8, required: true, max: 0xfe },
            effectiveControlMode: { name: "effectiveControlMode", ID: 0x0012, type: enums_1.DataType.ENUM8, required: true, max: 0xfe },
            capacity: { name: "capacity", ID: 0x0013, type: enums_1.DataType.INT16, report: true, required: true, min: 0, max: 0x7fff },
            speed: { name: "speed", ID: 0x0014, type: enums_1.DataType.UINT16, max: 0xfffe },
            lifetimeRunningHours: { name: "lifetimeRunningHours", ID: 0x0015, type: enums_1.DataType.UINT24, write: true, max: 0xfffffe, default: 0 },
            power: { name: "power", ID: 0x0016, type: enums_1.DataType.UINT24, write: true, max: 0xfffffe },
            lifetimeEnergyConsumed: { name: "lifetimeEnergyConsumed", ID: 0x0017, type: enums_1.DataType.UINT32, max: 0xfffffffe, default: 0 },
            operationMode: { name: "operationMode", ID: 0x0020, type: enums_1.DataType.ENUM8, write: true, required: true, max: 0xfe, default: 0 },
            controlMode: { name: "controlMode", ID: 0x0021, type: enums_1.DataType.ENUM8, write: true, max: 0xfe, default: 0 },
            alarmMask: { name: "alarmMask", ID: 0x0022, type: enums_1.DataType.BITMAP16 },
        },
        commands: {},
        commandsResponse: {},
    },
    hvacThermostat: {
        name: "hvacThermostat",
        ID: 0x0201,
        attributes: {
            localTemp: { name: "localTemp", ID: 0x0000, type: enums_1.DataType.INT16, report: true, required: true, min: -27315, max: 32767 },
            outdoorTemp: { name: "outdoorTemp", ID: 0x0001, type: enums_1.DataType.INT16, min: -27315, max: 32767 },
            occupancy: { name: "occupancy", ID: 0x0002, type: enums_1.DataType.BITMAP8, default: 1 },
            absMinHeatSetpointLimit: { name: "absMinHeatSetpointLimit", ID: 0x0003, type: enums_1.DataType.INT16, min: -27315, max: 32767, default: 700 },
            absMaxHeatSetpointLimit: { name: "absMaxHeatSetpointLimit", ID: 0x0004, type: enums_1.DataType.INT16, min: -27315, max: 32767, default: 3000 },
            absMinCoolSetpointLimit: { name: "absMinCoolSetpointLimit", ID: 0x0005, type: enums_1.DataType.INT16, min: -27315, max: 32767, default: 1600 },
            absMaxCoolSetpointLimit: { name: "absMaxCoolSetpointLimit", ID: 0x0006, type: enums_1.DataType.INT16, min: -27315, max: 32767, default: 3200 },
            pICoolingDemand: { name: "pICoolingDemand", ID: 0x0007, type: enums_1.DataType.UINT8, report: true, max: 100 },
            pIHeatingDemand: { name: "pIHeatingDemand", ID: 0x0008, type: enums_1.DataType.UINT8, report: true, max: 100 },
            systemTypeConfig: { name: "systemTypeConfig", ID: 0x0009, type: enums_1.DataType.BITMAP8, write: true, writeOptional: true, default: 0 },
            localTemperatureCalibration: {
                name: "localTemperatureCalibration",
                ID: 0x0010,
                type: enums_1.DataType.INT8,
                write: true,
                min: -25,
                max: 25,
                default: 0,
            },
            occupiedCoolingSetpoint: { name: "occupiedCoolingSetpoint", ID: 0x0011, type: enums_1.DataType.INT16, write: true, scene: true, default: 2600 },
            occupiedHeatingSetpoint: { name: "occupiedHeatingSetpoint", ID: 0x0012, type: enums_1.DataType.INT16, write: true, scene: true, default: 2000 },
            unoccupiedCoolingSetpoint: { name: "unoccupiedCoolingSetpoint", ID: 0x0013, type: enums_1.DataType.INT16, write: true, default: 2600 },
            unoccupiedHeatingSetpoint: { name: "unoccupiedHeatingSetpoint", ID: 0x0014, type: enums_1.DataType.INT16, write: true, default: 2000 },
            minHeatSetpointLimit: {
                name: "minHeatSetpointLimit",
                ID: 0x0015,
                type: enums_1.DataType.INT16,
                write: true,
                min: -27315,
                max: 32767,
                default: 700,
            },
            maxHeatSetpointLimit: {
                name: "maxHeatSetpointLimit",
                ID: 0x0016,
                type: enums_1.DataType.INT16,
                write: true,
                min: -27315,
                max: 32767,
                default: 3000,
            },
            minCoolSetpointLimit: {
                name: "minCoolSetpointLimit",
                ID: 0x0017,
                type: enums_1.DataType.INT16,
                write: true,
                min: -27315,
                max: 32767,
                default: 1600,
            },
            maxCoolSetpointLimit: {
                name: "maxCoolSetpointLimit",
                ID: 0x0018,
                type: enums_1.DataType.INT16,
                write: true,
                min: -27315,
                max: 32767,
                default: 3200,
            },
            minSetpointDeadBand: {
                name: "minSetpointDeadBand",
                ID: 0x0019,
                type: enums_1.DataType.INT8,
                write: true,
                writeOptional: true,
                min: 10,
                max: 25,
                default: 25,
            },
            remoteSensing: { name: "remoteSensing", ID: 0x001a, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            ctrlSeqeOfOper: { name: "ctrlSeqeOfOper", ID: 0x001b, type: enums_1.DataType.ENUM8, write: true, required: true, default: 4 },
            systemMode: { name: "systemMode", ID: 0x001c, type: enums_1.DataType.ENUM8, write: true, required: true, default: 1 },
            alarmMask: { name: "alarmMask", ID: 0x001d, type: enums_1.DataType.BITMAP8, default: 0 },
            runningMode: { name: "runningMode", ID: 0x001e, type: enums_1.DataType.ENUM8, default: 0 },
            startOfWeek: { name: "startOfWeek", ID: 0x0020, type: enums_1.DataType.ENUM8 },
            numberOfWeeklyTrans: { name: "numberOfWeeklyTrans", ID: 0x0021, type: enums_1.DataType.UINT8, max: 0xff, default: 0 },
            numberOfDailyTrans: { name: "numberOfDailyTrans", ID: 0x0022, type: enums_1.DataType.UINT8, max: 0xff, default: 0 },
            tempSetpointHold: { name: "tempSetpointHold", ID: 0x0023, type: enums_1.DataType.ENUM8, write: true, default: 0 },
            tempSetpointHoldDuration: { name: "tempSetpointHoldDuration", ID: 0x0024, type: enums_1.DataType.UINT16, write: true, min: 0, max: 1440 },
            programingOperMode: { name: "programingOperMode", ID: 0x0025, type: enums_1.DataType.BITMAP8, write: true, report: true, default: 0 },
            runningState: { name: "runningState", ID: 0x0029, type: enums_1.DataType.BITMAP16 },
            setpointChangeSource: { name: "setpointChangeSource", ID: 0x0030, type: enums_1.DataType.ENUM8, default: 0 },
            setpointChangeAmount: { name: "setpointChangeAmount", ID: 0x0031, type: enums_1.DataType.INT16, min: 0, max: 0xffff },
            setpointChangeSourceTimeStamp: { name: "setpointChangeSourceTimeStamp", ID: 0x0032, type: enums_1.DataType.UTC, max: 0xfffffffe, default: 0 },
            occupiedSetback: { name: "occupiedSetback", ID: 0x0034, type: enums_1.DataType.UINT8, write: true },
            occupiedSetbackMin: { name: "occupiedSetbackMin", ID: 0x0035, type: enums_1.DataType.UINT8, min: 0 },
            occupiedSetbackMax: { name: "occupiedSetbackMax", ID: 0x0036, type: enums_1.DataType.UINT8 },
            unoccupiedSetback: { name: "unoccupiedSetback", ID: 0x0037, type: enums_1.DataType.UINT8, write: true },
            unoccupiedSetbackMin: { name: "unoccupiedSetbackMin", ID: 0x0038, type: enums_1.DataType.UINT8, min: 0 },
            unoccupiedSetbackMax: { name: "unoccupiedSetbackMax", ID: 0x0039, type: enums_1.DataType.UINT8 },
            emergencyHeatDelta: { name: "emergencyHeatDelta", ID: 0x003a, type: enums_1.DataType.UINT8, write: true },
            acType: { name: "acType", ID: 0x0040, type: enums_1.DataType.ENUM8, write: true, default: 0 },
            acCapacity: { name: "acCapacity", ID: 0x0041, type: enums_1.DataType.UINT16, write: true, max: 0xffff, default: 0 },
            acRefrigerantType: { name: "acRefrigerantType", ID: 0x0042, type: enums_1.DataType.ENUM8, write: true, default: 0 },
            acConpressorType: { name: "acConpressorType", ID: 0x0043, type: enums_1.DataType.ENUM8, write: true, default: 0 },
            acErrorCode: { name: "acErrorCode", ID: 0x0044, type: enums_1.DataType.BITMAP32, write: true, max: 0xffffffff, default: 0 },
            acLouverPosition: { name: "acLouverPosition", ID: 0x0045, type: enums_1.DataType.ENUM8, write: true, default: 0 },
            acCollTemp: { name: "acCollTemp", ID: 0x0046, type: enums_1.DataType.INT16, min: -27315, max: 32767 },
            acCapacityFormat: { name: "acCapacityFormat", ID: 0x0047, type: enums_1.DataType.ENUM8, write: true, default: 0 },
        },
        commands: {
            setpointRaiseLower: {
                name: "setpointRaiseLower",
                ID: 0x00,
                parameters: [
                    { name: "mode", type: enums_1.DataType.ENUM8 },
                    { name: "amount", type: enums_1.DataType.INT8 },
                ],
                required: true,
            },
            setWeeklySchedule: {
                name: "setWeeklySchedule",
                ID: 0x01,
                parameters: [
                    { name: "numoftrans", type: enums_1.DataType.UINT8, min: 0, max: 10 },
                    { name: "dayofweek", type: enums_1.DataType.BITMAP8 },
                    { name: "mode", type: enums_1.DataType.BITMAP8 },
                    { name: "transitions", type: enums_1.BuffaloZclDataType.LIST_THERMO_TRANSITIONS },
                ],
            },
            getWeeklySchedule: {
                name: "getWeeklySchedule",
                ID: 0x02,
                response: 0x00,
                parameters: [
                    { name: "daystoreturn", type: enums_1.DataType.BITMAP8 },
                    { name: "modetoreturn", type: enums_1.DataType.BITMAP8 },
                ],
            },
            clearWeeklySchedule: { name: "clearWeeklySchedule", ID: 0x03, parameters: [] },
            getRelayStatusLog: { name: "getRelayStatusLog", ID: 0x04, response: 0x01, parameters: [] },
        },
        commandsResponse: {
            getWeeklyScheduleRsp: {
                name: "getWeeklyScheduleRsp",
                ID: 0x00,
                parameters: [
                    { name: "numoftrans", type: enums_1.DataType.UINT8, min: 0, max: 10 },
                    { name: "dayofweek", type: enums_1.DataType.BITMAP8 },
                    { name: "mode", type: enums_1.DataType.BITMAP8 },
                    { name: "transitions", type: enums_1.BuffaloZclDataType.LIST_THERMO_TRANSITIONS },
                ],
            },
            getRelayStatusLogRsp: {
                name: "getRelayStatusLogRsp",
                ID: 0x01,
                parameters: [
                    { name: "timeofday", type: enums_1.DataType.UINT16 },
                    { name: "relaystatus", type: enums_1.DataType.BITMAP8 },
                    { name: "localtemp", type: enums_1.DataType.INT16 },
                    { name: "humidity", type: enums_1.DataType.UINT8 },
                    { name: "setpoint", type: enums_1.DataType.INT16 },
                    { name: "unreadentries", type: enums_1.DataType.UINT16 },
                ],
            },
        },
    },
    hvacFanCtrl: {
        name: "hvacFanCtrl",
        ID: 0x0202,
        attributes: {
            fanMode: { name: "fanMode", ID: 0x0000, type: enums_1.DataType.ENUM8, write: true, required: true, max: 0x06, default: 5 },
            fanModeSequence: { name: "fanModeSequence", ID: 0x0001, type: enums_1.DataType.ENUM8, write: true, required: true, max: 0x04, default: 2 },
        },
        commands: {},
        commandsResponse: {},
    },
    hvacDehumidificationCtrl: {
        name: "hvacDehumidificationCtrl",
        ID: 0x0203,
        attributes: {
            relativeHumidity: { name: "relativeHumidity", ID: 0x0000, type: enums_1.DataType.UINT8, max: 100 },
            dehumidCooling: { name: "dehumidCooling", ID: 0x0001, type: enums_1.DataType.UINT8, report: true, required: true },
            rhDehumidSetpoint: {
                name: "rhDehumidSetpoint",
                ID: 0x0010,
                type: enums_1.DataType.UINT8,
                write: true,
                required: true,
                min: 30,
                max: 100,
                default: 50,
            },
            relativeHumidityMode: { name: "relativeHumidityMode", ID: 0x0011, type: enums_1.DataType.ENUM8, write: true, default: 0 },
            dehumidLockout: { name: "dehumidLockout", ID: 0x0012, type: enums_1.DataType.ENUM8, write: true, default: 1 },
            dehumidHysteresis: {
                name: "dehumidHysteresis",
                ID: 0x0013,
                type: enums_1.DataType.UINT8,
                write: true,
                required: true,
                min: 2,
                max: 20,
                default: 2,
            },
            dehumidMaxCool: { name: "dehumidMaxCool", ID: 0x0014, type: enums_1.DataType.UINT8, write: true, required: true, min: 20, max: 100, default: 20 },
            relativeHumidDisplay: { name: "relativeHumidDisplay", ID: 0x0015, type: enums_1.DataType.ENUM8, write: true, max: 0x01, default: 0 },
        },
        commands: {},
        commandsResponse: {},
    },
    hvacUserInterfaceCfg: {
        name: "hvacUserInterfaceCfg",
        ID: 0x0204,
        attributes: {
            tempDisplayMode: { name: "tempDisplayMode", ID: 0x0000, type: enums_1.DataType.ENUM8, write: true, required: true, max: 0x01, default: 0 },
            keypadLockout: { name: "keypadLockout", ID: 0x0001, type: enums_1.DataType.ENUM8, write: true, required: true, max: 0x05, default: 0 },
            programmingVisibility: { name: "programmingVisibility", ID: 0x0002, type: enums_1.DataType.ENUM8, write: true, max: 0x01, default: 0 },
        },
        commands: {},
        commandsResponse: {},
    },
    lightingColorCtrl: {
        name: "lightingColorCtrl",
        ID: 0x0300,
        attributes: {
            // `required: true` only if bit 0 of colorCapabilities attribute is 1
            currentHue: { name: "currentHue", ID: 0x0000, type: enums_1.DataType.UINT8, report: true, max: 0xfe, default: 0 },
            // `required: true` only if bit 0 of colorCapabilities attribute is 1
            currentSaturation: { name: "currentSaturation", ID: 0x0001, type: enums_1.DataType.UINT8, report: true, scene: true, max: 0xfe, default: 0 },
            remainingTime: { name: "remainingTime", ID: 0x0002, type: enums_1.DataType.UINT16, max: 0xfffe, default: 0 },
            // `required: true` only if bit 3 of colorCapabilities attribute is 1
            currentX: { name: "currentX", ID: 0x0003, type: enums_1.DataType.UINT16, report: true, scene: true, max: 0xfeff, default: 0x616b },
            // `required: true` only if bit 3 of colorCapabilities attribute is 1
            currentY: { name: "currentY", ID: 0x0004, type: enums_1.DataType.UINT16, report: true, scene: true, max: 0xfeff, default: 0x607d },
            driftCompensation: { name: "driftCompensation", ID: 0x0005, type: enums_1.DataType.ENUM8, max: 0x04 },
            compensationText: { name: "compensationText", ID: 0x0006, type: enums_1.DataType.CHAR_STR, maxLen: 254 },
            // `required: true` only if bit 4 of colorCapabilities attribute is 1
            colorTemperature: {
                name: "colorTemperature",
                ID: 0x0007,
                type: enums_1.DataType.UINT16,
                report: true,
                scene: true,
                max: 0xfeff,
                default: 0x00fa,
                special: [["Undefined", "0000"]],
            },
            colorMode: { name: "colorMode", ID: 0x0008, type: enums_1.DataType.ENUM8, required: true, max: 0x02, default: 1 },
            options: { name: "options", ID: 0x000f, type: enums_1.DataType.BITMAP8, write: true, required: true, default: 0 },
            numPrimaries: { name: "numPrimaries", ID: 0x0010, type: enums_1.DataType.UINT8, required: true, max: 0x06 },
            // all `primary1..` `required: true` only if numPrimaries > 0
            primary1X: { name: "primary1X", ID: 0x0011, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary1Y: { name: "primary1Y", ID: 0x0012, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary1Intensity: { name: "primary1Intensity", ID: 0x0013, type: enums_1.DataType.UINT8, max: 0xff },
            // 0x0014: reserved
            // all `primary2..` `required: true` only if numPrimaries > 1
            primary2X: { name: "primary2X", ID: 0x0015, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary2Y: { name: "primary2Y", ID: 0x0016, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary2Intensity: { name: "primary2Intensity", ID: 0x0017, type: enums_1.DataType.UINT8 },
            // 0x0018: reserved
            // all `primary3..` `required: true` only if numPrimaries > 2
            primary3X: { name: "primary3X", ID: 0x0019, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary3Y: { name: "primary3Y", ID: 0x001a, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary3Intensity: { name: "primary3Intensity", ID: 0x001b, type: enums_1.DataType.UINT8, max: 0xff },
            // all `primary4..` `required: true` only if numPrimaries > 3
            primary4X: { name: "primary4X", ID: 0x0020, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary4Y: { name: "primary4Y", ID: 0x0021, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary4Intensity: { name: "primary4Intensity", ID: 0x0022, type: enums_1.DataType.UINT8, max: 0xff },
            // 0x0023: reserved
            // all `primary5..` `required: true` only if numPrimaries > 4
            primary5X: { name: "primary5X", ID: 0x0024, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary5Y: { name: "primary5Y", ID: 0x0025, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary5Intensity: { name: "primary5Intensity", ID: 0x0026, type: enums_1.DataType.UINT8, max: 0xff },
            // 0x0027: reserved
            // all `primary6..` `required: true` only if numPrimaries > 5
            primary6X: { name: "primary6X", ID: 0x0028, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary6Y: { name: "primary6Y", ID: 0x0029, type: enums_1.DataType.UINT16, max: 0xfeff },
            primary6Intensity: { name: "primary6Intensity", ID: 0x002a, type: enums_1.DataType.UINT8, max: 0xff },
            whitePointX: { name: "whitePointX", ID: 0x0030, type: enums_1.DataType.UINT16, write: true, max: 0xfeff },
            whitePointY: { name: "whitePointY", ID: 0x0031, type: enums_1.DataType.UINT16, write: true, max: 0xfeff },
            colorPointRX: { name: "colorPointRX", ID: 0x0032, type: enums_1.DataType.UINT16, write: true, max: 0xfeff },
            colorPointRY: { name: "colorPointRY", ID: 0x0033, type: enums_1.DataType.UINT16, write: true, max: 0xfeff },
            colorPointRIntensity: { name: "colorPointRIntensity", ID: 0x0034, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            // 0x0035: reserved
            colorPointGX: { name: "colorPointGX", ID: 0x0036, type: enums_1.DataType.UINT16, write: true, max: 0xfeff },
            colorPointGY: { name: "colorPointGY", ID: 0x0037, type: enums_1.DataType.UINT16, write: true, max: 0xfeff },
            colorPointGIntensity: { name: "colorPointGIntensity", ID: 0x0038, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            // 0x0039: reserved
            colorPointBX: { name: "colorPointBX", ID: 0x003a, type: enums_1.DataType.UINT16, write: true, max: 0xfeff },
            colorPointBY: { name: "colorPointBY", ID: 0x003b, type: enums_1.DataType.UINT16, write: true, max: 0xfeff },
            colorPointBIntensity: { name: "colorPointBIntensity", ID: 0x003c, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            // `required: true` only if bit 1 of colorCapabilities attribute is 1
            enhancedCurrentHue: { name: "enhancedCurrentHue", ID: 0x4000, type: enums_1.DataType.UINT16, scene: true, max: 0xffff, default: 0 },
            enhancedColorMode: { name: "enhancedColorMode", ID: 0x4001, type: enums_1.DataType.ENUM8, required: true, max: 0xff, default: 1 },
            // `required: true` only if bit 2 of colorCapabilities attribute is 1
            colorLoopActive: { name: "colorLoopActive", ID: 0x4002, type: enums_1.DataType.UINT8, scene: true, max: 0xff, default: 0 },
            // `required: true` only if bit 2 of colorCapabilities attribute is 1
            colorLoopDirection: { name: "colorLoopDirection", ID: 0x4003, type: enums_1.DataType.UINT8, scene: true, max: 0xff, default: 0 },
            // `required: true` only if bit 2 of colorCapabilities attribute is 1
            colorLoopTime: { name: "colorLoopTime", ID: 0x4004, type: enums_1.DataType.UINT16, scene: true, max: 0xffff, default: 0x0019 },
            // `required: true` only if bit 2 of colorCapabilities attribute is 1
            colorLoopStartEnhancedHue: { name: "colorLoopStartEnhancedHue", ID: 0x4005, type: enums_1.DataType.UINT16, max: 0xffff, default: 0x2300 },
            // `required: true` only if bit 2 of colorCapabilities attribute is 1
            colorLoopStoredEnhancedHue: { name: "colorLoopStoredEnhancedHue", ID: 0x4006, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            colorCapabilities: { name: "colorCapabilities", ID: 0x400a, type: enums_1.DataType.BITMAP16, required: true, max: 0x001f, default: 0 },
            // `required: true` only if bit 4 of colorCapabilities attribute is 1
            colorTempPhysicalMin: { name: "colorTempPhysicalMin", ID: 0x400b, type: enums_1.DataType.UINT16, max: 0xfeff, default: 0 },
            // `required: true` only if bit 4 of colorCapabilities attribute is 1
            colorTempPhysicalMax: { name: "colorTempPhysicalMax", ID: 0x400c, type: enums_1.DataType.UINT16, max: 0xfeff, default: 0xfeff },
            // `required: true` only if bit 4 of colorCapabilities attribute is 1 AND colorTemperature supported
            coupleColorTempToLevelMin: { name: "coupleColorTempToLevelMin", ID: 0x400d, type: enums_1.DataType.UINT16 },
            // `required: true` only if bit 4 of colorCapabilities attribute is 1 AND colorTemperature supported
            startUpColorTemperature: {
                name: "startUpColorTemperature",
                ID: 0x4010,
                type: enums_1.DataType.UINT16,
                write: true,
                max: 0xfeff,
                special: [["SetColorTempToPreviousValue", "ffff"]],
            },
        },
        commands: {
            moveToHue: {
                name: "moveToHue",
                ID: 0x00,
                parameters: [
                    { name: "hue", type: enums_1.DataType.UINT8 },
                    { name: "direction", type: enums_1.DataType.ENUM8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 0 of colorCapabilities attribute is 1
            },
            moveHue: {
                name: "moveHue",
                ID: 0x01,
                parameters: [
                    { name: "movemode", type: enums_1.DataType.ENUM8 },
                    { name: "rate", type: enums_1.DataType.UINT8 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 0 of colorCapabilities attribute is 1
            },
            stepHue: {
                name: "stepHue",
                ID: 0x02,
                parameters: [
                    { name: "stepmode", type: enums_1.DataType.ENUM8 },
                    { name: "stepsize", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT8 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 0 of colorCapabilities attribute is 1
            },
            moveToSaturation: {
                name: "moveToSaturation",
                ID: 0x03,
                parameters: [
                    { name: "saturation", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 0 of colorCapabilities attribute is 1
            },
            moveSaturation: {
                name: "moveSaturation",
                ID: 0x04,
                parameters: [
                    { name: "movemode", type: enums_1.DataType.ENUM8 },
                    { name: "rate", type: enums_1.DataType.UINT8 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 0 of colorCapabilities attribute is 1
            },
            stepSaturation: {
                name: "stepSaturation",
                ID: 0x05,
                parameters: [
                    { name: "stepmode", type: enums_1.DataType.ENUM8 },
                    { name: "stepsize", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT8 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 0 of colorCapabilities attribute is 1
            },
            moveToHueAndSaturation: {
                name: "moveToHueAndSaturation",
                ID: 0x06,
                parameters: [
                    { name: "hue", type: enums_1.DataType.UINT8 },
                    { name: "saturation", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 0 of colorCapabilities attribute is 1
            },
            moveToColor: {
                name: "moveToColor",
                ID: 0x07,
                parameters: [
                    { name: "colorx", type: enums_1.DataType.UINT16 },
                    { name: "colory", type: enums_1.DataType.UINT16 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 3 of colorCapabilities attribute is 1
            },
            moveColor: {
                name: "moveColor",
                ID: 0x08,
                parameters: [
                    { name: "ratex", type: enums_1.DataType.INT16 },
                    { name: "ratey", type: enums_1.DataType.INT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 3 of colorCapabilities attribute is 1
            },
            stepColor: {
                name: "stepColor",
                ID: 0x09,
                parameters: [
                    { name: "stepx", type: enums_1.DataType.INT16 },
                    { name: "stepy", type: enums_1.DataType.INT16 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 3 of colorCapabilities attribute is 1
            },
            moveToColorTemp: {
                name: "moveToColorTemp",
                ID: 0x0a,
                parameters: [
                    { name: "colortemp", type: enums_1.DataType.UINT16 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 4 of colorCapabilities attribute is 1
            },
            enhancedMoveToHue: {
                name: "enhancedMoveToHue",
                ID: 0x40,
                parameters: [
                    { name: "enhancehue", type: enums_1.DataType.UINT16 },
                    { name: "direction", type: enums_1.DataType.ENUM8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 1 of colorCapabilities attribute is 1
            },
            enhancedMoveHue: {
                name: "enhancedMoveHue",
                ID: 0x41,
                parameters: [
                    { name: "movemode", type: enums_1.DataType.ENUM8 },
                    { name: "rate", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 1 of colorCapabilities attribute is 1
            },
            enhancedStepHue: {
                name: "enhancedStepHue",
                ID: 0x42,
                parameters: [
                    { name: "stepmode", type: enums_1.DataType.ENUM8 },
                    { name: "stepsize", type: enums_1.DataType.UINT16 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 1 of colorCapabilities attribute is 1
            },
            enhancedMoveToHueAndSaturation: {
                name: "enhancedMoveToHueAndSaturation",
                ID: 0x43,
                parameters: [
                    { name: "enhancehue", type: enums_1.DataType.UINT16 },
                    { name: "saturation", type: enums_1.DataType.UINT8 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 1 of colorCapabilities attribute is 1
            },
            colorLoopSet: {
                name: "colorLoopSet",
                ID: 0x44,
                parameters: [
                    { name: "updateflags", type: enums_1.DataType.BITMAP8 },
                    { name: "action", type: enums_1.DataType.ENUM8 },
                    { name: "direction", type: enums_1.DataType.ENUM8 },
                    { name: "time", type: enums_1.DataType.UINT16 },
                    { name: "starthue", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 2 of colorCapabilities attribute is 1
            },
            stopMoveStep: {
                name: "stopMoveStep",
                ID: 0x47,
                parameters: [
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 0, 1, 3 or 4 of colorCapabilities attribute is 1
            },
            moveColorTemp: {
                name: "moveColorTemp",
                ID: 0x4b,
                parameters: [
                    { name: "movemode", type: enums_1.DataType.ENUM8 },
                    { name: "rate", type: enums_1.DataType.UINT16 },
                    { name: "minimum", type: enums_1.DataType.UINT16 },
                    { name: "maximum", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 4 of colorCapabilities attribute is 1
            },
            stepColorTemp: {
                name: "stepColorTemp",
                ID: 0x4c,
                parameters: [
                    { name: "stepmode", type: enums_1.DataType.ENUM8 },
                    { name: "stepsize", type: enums_1.DataType.UINT16 },
                    { name: "transtime", type: enums_1.DataType.UINT16 },
                    { name: "minimum", type: enums_1.DataType.UINT16 },
                    { name: "maximum", type: enums_1.DataType.UINT16 },
                    // XXX: behind bytes condition due to likely missing fields with many devices
                    { name: "optionsMask", type: enums_1.DataType.BITMAP8, conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }] },
                    {
                        name: "optionsOverride",
                        type: enums_1.DataType.BITMAP8,
                        conditions: [{ type: enums_1.ParameterCondition.MINIMUM_REMAINING_BUFFER_BYTES, value: 1 }],
                    },
                ],
                // required: true only if bit 0 of colorCapabilities attribute is 1
            },
        },
        commandsResponse: {},
    },
    lightingBallastCfg: {
        name: "lightingBallastCfg",
        ID: 0x0301,
        attributes: {
            physicalMinLevel: { name: "physicalMinLevel", ID: 0x0000, type: enums_1.DataType.UINT8, required: true, min: 1, max: 0xfe, default: 1 },
            physicalMaxLevel: { name: "physicalMaxLevel", ID: 0x0001, type: enums_1.DataType.UINT8, required: true, min: 1, max: 0xfe, default: 0xfe },
            ballastStatus: { name: "ballastStatus", ID: 0x0002, type: enums_1.DataType.BITMAP8, default: 0 },
            minLevel: { name: "minLevel", ID: 0x0010, type: enums_1.DataType.UINT8, write: true, required: true, min: 1, max: 0xfe },
            maxLevel: { name: "maxLevel", ID: 0x0011, type: enums_1.DataType.UINT8, write: true, required: true, min: 1, max: 0xfe },
            powerOnLevel: { name: "powerOnLevel", ID: 0x0012, type: enums_1.DataType.UINT8, write: true, max: 0xfe },
            powerOnFadeTime: { name: "powerOnFadeTime", ID: 0x0013, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0 },
            intrinsicBallastFactor: { name: "intrinsicBallastFactor", ID: 0x0014, type: enums_1.DataType.UINT8, write: true, max: 0xfe },
            ballastFactorAdjustment: { name: "ballastFactorAdjustment", ID: 0x0015, type: enums_1.DataType.UINT8, write: true, min: 100, default: 0xff },
            lampQuantity: { name: "lampQuantity", ID: 0x0020, type: enums_1.DataType.UINT8, max: 0xfe },
            lampType: { name: "lampType", ID: 0x0030, type: enums_1.DataType.CHAR_STR, write: true, default: "", maxLen: 16 },
            lampManufacturer: { name: "lampManufacturer", ID: 0x0031, type: enums_1.DataType.CHAR_STR, write: true, default: "", maxLen: 16 },
            lampRatedHours: { name: "lampRatedHours", ID: 0x0032, type: enums_1.DataType.UINT24, write: true, max: 0xfffffe, default: 0xffffff },
            lampBurnHours: { name: "lampBurnHours", ID: 0x0033, type: enums_1.DataType.UINT24, write: true, max: 0xfffffe, default: 0 },
            lampAlarmMode: { name: "lampAlarmMode", ID: 0x0034, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            lampBurnHoursTripPoint: {
                name: "lampBurnHoursTripPoint",
                ID: 0x0035,
                type: enums_1.DataType.UINT24,
                write: true,
                max: 0xfffffe,
                default: 0xffffff,
            },
        },
        commands: {},
        commandsResponse: {},
    },
    msIlluminanceMeasurement: {
        name: "msIlluminanceMeasurement",
        ID: 0x0400,
        attributes: {
            measuredValue: {
                name: "measuredValue",
                ID: 0x0000,
                type: enums_1.DataType.UINT16,
                report: true,
                required: true,
                max: 0xfffe,
                default: 0,
                special: [
                    ["TooLowToBeMeasured", "0000"],
                    ["Invalid", "ffff"],
                ],
            },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, min: 1, max: 65533 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, min: 2, max: 65534 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x0800 },
            lightSensorType: { name: "lightSensorType", ID: 0x0004, type: enums_1.DataType.ENUM8, default: 0xff, special: [["Unknown", "ff"]] },
        },
        commands: {},
        commandsResponse: {},
    },
    msIlluminanceLevelSensing: {
        name: "msIlluminanceLevelSensing",
        ID: 0x0401,
        attributes: {
            levelStatus: { name: "levelStatus", ID: 0x0000, type: enums_1.DataType.ENUM8, report: true, required: true, max: 254 },
            lightSensorType: { name: "lightSensorType", ID: 0x0001, type: enums_1.DataType.ENUM8, max: 0xfe },
            illuminanceTargetLevel: { name: "illuminanceTargetLevel", ID: 0x0010, type: enums_1.DataType.UINT16, write: true, required: true, max: 65534 },
        },
        commands: {},
        commandsResponse: {},
    },
    msTemperatureMeasurement: {
        name: "msTemperatureMeasurement",
        ID: 0x0402,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.INT16, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.INT16, required: true, min: -27315, max: 32766 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.INT16, required: true, min: -27314, max: 32767 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x0800 },
        },
        commands: {},
        commandsResponse: {},
    },
    msPressureMeasurement: {
        name: "msPressureMeasurement",
        ID: 0x0403,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.INT16, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.INT16, required: true, min: -32767, max: 32766 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.INT16, required: true, min: -32766, max: 32767 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x0800 },
            // if supported, should also be `report: true`
            scaledValue: { name: "scaledValue", ID: 0x0010, type: enums_1.DataType.INT16, default: 0 },
            minScaledValue: { name: "minScaledValue", ID: 0x0011, type: enums_1.DataType.INT16, min: -32767, max: 32766 },
            maxScaledValue: { name: "maxScaledValue", ID: 0x0012, type: enums_1.DataType.INT16, min: -32766, max: 32767 },
            // if supported, should also be `report: true`
            scaledTolerance: { name: "scaledTolerance", ID: 0x0013, type: enums_1.DataType.UINT16, max: 2048 },
            scale: { name: "scale", ID: 0x0014, type: enums_1.DataType.INT8, min: -127, max: 127 },
        },
        commands: {},
        commandsResponse: {},
    },
    msFlowMeasurement: {
        name: "msFlowMeasurement",
        ID: 0x0404,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.UINT16, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 65533 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, min: 1, max: 65534 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x0800 },
        },
        commands: {},
        commandsResponse: {},
    },
    msRelativeHumidity: {
        name: "msRelativeHumidity",
        ID: 0x0405,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.UINT16, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 9999 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, min: 1, max: 10000 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x0800 },
        },
        commands: {},
        commandsResponse: {},
    },
    msOccupancySensing: {
        name: "msOccupancySensing",
        ID: 0x0406,
        attributes: {
            occupancy: { name: "occupancy", ID: 0x0000, type: enums_1.DataType.BITMAP8, report: true, required: true },
            occupancySensorType: { name: "occupancySensorType", ID: 0x0001, type: enums_1.DataType.ENUM8, required: true, default: 0 },
            occupancySensorTypeBitmap: { name: "occupancySensorTypeBitmap", ID: 0x0002, type: enums_1.DataType.BITMAP8, required: true },
            pirOToUDelay: { name: "pirOToUDelay", ID: 0x0010, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0x0000 },
            pirUToODelay: { name: "pirUToODelay", ID: 0x0011, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0x0000 },
            pirUToOThreshold: { name: "pirUToOThreshold", ID: 0x0012, type: enums_1.DataType.UINT8, write: true, min: 0x01, max: 0xfe, default: 0x01 },
            ultrasonicOToUDelay: { name: "ultrasonicOToUDelay", ID: 0x0020, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0x0000 },
            ultrasonicUToODelay: { name: "ultrasonicUToODelay", ID: 0x0021, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0x0000 },
            ultrasonicUToOThreshold: {
                name: "ultrasonicUToOThreshold",
                ID: 0x0022,
                type: enums_1.DataType.UINT8,
                write: true,
                min: 0x01,
                max: 0xfe,
                default: 0x01,
            },
            contactOToUDelay: { name: "contactOToUDelay", ID: 0x0030, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0x0000 },
            contactUToODelay: { name: "contactUToODelay", ID: 0x0031, type: enums_1.DataType.UINT16, write: true, max: 0xfffe, default: 0x0000 },
            contactUToOThreshold: { name: "contactUToOThreshold", ID: 0x0032, type: enums_1.DataType.UINT8, write: true, min: 0x01, max: 0xfe, default: 0x01 },
        },
        commands: {},
        commandsResponse: {},
    },
    msLeafWetness: {
        name: "msLeafWetness",
        ID: 0x0407,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.UINT16, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 9999 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, min: 1, max: 10000 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x0800 },
        },
        commands: {},
        commandsResponse: {},
    },
    msSoilMoisture: {
        name: "msSoilMoisture",
        ID: 0x0408,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.UINT16, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 9999 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, min: 1, max: 10000 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x0800 },
        },
        commands: {},
        commandsResponse: {},
    },
    pHMeasurement: {
        name: "pHMeasurement",
        ID: 0x0409,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.UINT16, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 1399 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, min: 1, max: 1400 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x00c8 },
        },
        commands: {},
        commandsResponse: {},
    },
    msElectricalConductivity: {
        name: "msElectricalConductivity",
        ID: 0x040a,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.UINT16, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 65533 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, min: 1, max: 65534 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x0064 },
        },
        commands: {},
        commandsResponse: {},
    },
    msWindSpeed: {
        name: "msWindSpeed",
        ID: 0x040b,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.UINT16, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 65533 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, min: 1, max: 65534 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.UINT16, max: 0x0308, default: 0 },
        },
        commands: {},
        commandsResponse: {},
    },
    msCarbonMonoxide: {
        // CO
        name: "msCarbonMonoxide",
        ID: 0x040c,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msCO2: {
        // Carbon Dioxide
        name: "msCO2",
        ID: 0x040d,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msEthylene: {
        // CH2
        name: "msEthylene",
        ID: 0x040e,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msEthyleneOxide: {
        // C2H4O
        name: "msEthyleneOxide",
        ID: 0x040f,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msHydrogen: {
        // H
        name: "msHydrogen",
        ID: 0x0410,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msHydrogenSulfide: {
        // H2S
        name: "msHydrogenSulfide",
        ID: 0x0411,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msNitricOxide: {
        // NO
        name: "msNitricOxide",
        ID: 0x0412,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msNitrogenDioxide: {
        // NO2
        name: "msNitrogenDioxide",
        ID: 0x0413,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msOxygen: {
        // O2
        name: "msOxygen",
        ID: 0x0414,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msOzone: {
        // O3
        name: "msOzone",
        ID: 0x0415,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msSulfurDioxide: {
        // SO2
        name: "msSulfurDioxide",
        ID: 0x0416,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msDissolvedOxygen: {
        // DO
        name: "msDissolvedOxygen",
        ID: 0x0417,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msBromate: {
        name: "msBromate",
        ID: 0x0418,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msChloramines: {
        name: "msChloramines",
        ID: 0x0419,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msChlorine: {
        name: "msChlorine",
        ID: 0x041a,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msFecalColiformAndEColi: {
        name: "msFecalColiformAndEColi",
        ID: 0x041b,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msFluoride: {
        name: "msFluoride",
        ID: 0x041c,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msHaloaceticAcids: {
        name: "msHaloaceticAcids",
        ID: 0x041d,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msTotalTrihalomethanes: {
        name: "msTotalTrihalomethanes",
        ID: 0x041e,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msTotalColiformBacteria: {
        name: "msTotalColiformBacteria",
        ID: 0x041f,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msTurbidity: {
        name: "msTurbidity",
        ID: 0x0420,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msCopper: {
        name: "msCopper",
        ID: 0x0421,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msLead: {
        name: "msLead",
        ID: 0x0422,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msManganese: {
        name: "msManganese",
        ID: 0x0423,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msSulfate: {
        name: "msSulfate",
        ID: 0x0424,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msBromodichloromethane: {
        name: "msBromodichloromethane",
        ID: 0x0425,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msBromoform: {
        name: "msBromoform",
        ID: 0x0426,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msChlorodibromomethane: {
        name: "msChlorodibromomethane",
        ID: 0x0427,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msChloroform: {
        name: "msChloroform",
        ID: 0x0428,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msSodium: {
        name: "msSodium",
        ID: 0x0429,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    pm25Measurement: {
        name: "pm25Measurement",
        ID: 0x042a,
        // XXX: attrs not named same as other concentration measurement clusters
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            measuredMinValue: { name: "measuredMinValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            measuredMaxValue: { name: "measuredMaxValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    msFormaldehyde: {
        name: "msFormaldehyde",
        ID: 0x042b,
        attributes: {
            measuredValue: { name: "measuredValue", ID: 0x0000, type: enums_1.DataType.SINGLE_PREC, report: true, required: true },
            minMeasuredValue: { name: "minMeasuredValue", ID: 0x0001, type: enums_1.DataType.SINGLE_PREC, required: true, min: 0 },
            maxMeasuredValue: { name: "maxMeasuredValue", ID: 0x0002, type: enums_1.DataType.SINGLE_PREC, required: true, max: 1 },
            tolerance: { name: "tolerance", ID: 0x0003, type: enums_1.DataType.SINGLE_PREC },
        },
        commands: {},
        commandsResponse: {},
    },
    ssIasZone: {
        name: "ssIasZone",
        ID: 0x0500,
        attributes: {
            zoneState: { name: "zoneState", ID: 0x0000, type: enums_1.DataType.ENUM8, required: true, default: 0 },
            zoneType: { name: "zoneType", ID: 0x0001, type: enums_1.DataType.ENUM16, required: true },
            zoneStatus: { name: "zoneStatus", ID: 0x0002, type: enums_1.DataType.BITMAP16, required: true, default: 0 },
            iasCieAddr: { name: "iasCieAddr", ID: 0x0010, type: enums_1.DataType.IEEE_ADDR, write: true, required: true },
            zoneId: { name: "zoneId", ID: 0x0011, type: enums_1.DataType.UINT8, required: true, max: 0xff, default: 0xff },
            // if currentZoneSensitivityLevel is supported, this one should be too (`required: true`)
            numZoneSensitivityLevelsSupported: {
                name: "numZoneSensitivityLevelsSupported",
                ID: 0x0012,
                type: enums_1.DataType.UINT8,
                min: 2,
                max: 0xff,
                default: 2,
            },
            // if numZoneSensitivityLevelsSupported is supported, this one should be too (`required: true`)
            currentZoneSensitivityLevel: { name: "currentZoneSensitivityLevel", ID: 0x0013, type: enums_1.DataType.UINT8, write: true, max: 0xff, default: 0 },
        },
        commands: {
            enrollRsp: {
                name: "enrollRsp",
                ID: 0x00,
                parameters: [
                    { name: "enrollrspcode", type: enums_1.DataType.ENUM8 },
                    { name: "zoneid", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            initNormalOpMode: { name: "initNormalOpMode", ID: 0x01, parameters: [] },
            initTestMode: {
                name: "initTestMode",
                ID: 0x02,
                parameters: [
                    { name: "testModeDuration", type: enums_1.DataType.UINT8 },
                    { name: "currentZoneSensitivityLevel", type: enums_1.DataType.UINT8 },
                ],
            },
        },
        commandsResponse: {
            statusChangeNotification: {
                name: "statusChangeNotification",
                ID: 0x00,
                parameters: [
                    { name: "zonestatus", type: enums_1.DataType.BITMAP16 },
                    { name: "extendedstatus", type: enums_1.DataType.BITMAP8 },
                    { name: "zoneID", type: enums_1.DataType.UINT8 },
                    { name: "delay", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            enrollReq: {
                name: "enrollReq",
                ID: 0x01,
                parameters: [
                    { name: "zonetype", type: enums_1.DataType.ENUM16 },
                    { name: "manucode", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
        },
    },
    ssIasAce: {
        name: "ssIasAce",
        ID: 0x0501,
        attributes: {},
        commands: {
            arm: {
                name: "arm",
                ID: 0x00,
                response: 0x00,
                parameters: [
                    { name: "armmode", type: enums_1.DataType.ENUM8 },
                    { name: "code", type: enums_1.DataType.CHAR_STR },
                    { name: "zoneid", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            bypass: {
                name: "bypass",
                ID: 0x01,
                parameters: [
                    { name: "numofzones", type: enums_1.DataType.UINT8 },
                    { name: "zoneidlist", type: enums_1.BuffaloZclDataType.LIST_UINT8 },
                    { name: "armDisarmCode", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
            emergency: { name: "emergency", ID: 0x02, parameters: [], required: true },
            fire: { name: "fire", ID: 0x03, parameters: [], required: true },
            panic: { name: "panic", ID: 0x04, parameters: [], required: true },
            getZoneIDMap: { name: "getZoneIDMap", ID: 0x05, response: 0x01, parameters: [], required: true },
            getZoneInfo: { name: "getZoneInfo", ID: 0x06, response: 0x02, parameters: [{ name: "zoneid", type: enums_1.DataType.UINT8 }], required: true },
            getPanelStatus: { name: "getPanelStatus", ID: 0x07, response: 0x05, parameters: [], required: true },
            getBypassedZoneList: { name: "getBypassedZoneList", ID: 0x08, parameters: [], required: true },
            getZoneStatus: {
                name: "getZoneStatus",
                ID: 0x09,
                response: 0x08,
                parameters: [
                    { name: "startzoneid", type: enums_1.DataType.UINT8 },
                    { name: "maxnumzoneid", type: enums_1.DataType.UINT8 },
                    { name: "zonestatusmaskflag", type: enums_1.DataType.BOOLEAN },
                    { name: "zonestatusmask", type: enums_1.DataType.BITMAP16 },
                ],
                required: true,
            },
        },
        commandsResponse: {
            armRsp: { name: "armRsp", ID: 0x00, parameters: [{ name: "armnotification", type: enums_1.DataType.ENUM8 }], required: true },
            getZoneIDMapRsp: {
                name: "getZoneIDMapRsp",
                ID: 0x01,
                parameters: [
                    { name: "zoneidmapsection0", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection1", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection2", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection3", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection4", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection5", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection6", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection7", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection8", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection9", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection10", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection11", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection12", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection13", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection14", type: enums_1.DataType.BITMAP16 },
                    { name: "zoneidmapsection15", type: enums_1.DataType.BITMAP16 },
                ],
                required: true,
            },
            getZoneInfoRsp: {
                name: "getZoneInfoRsp",
                ID: 0x02,
                parameters: [
                    { name: "zoneid", type: enums_1.DataType.UINT8 },
                    { name: "zonetype", type: enums_1.DataType.ENUM16 },
                    { name: "ieeeaddr", type: enums_1.DataType.IEEE_ADDR },
                    { name: "zonelabel", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
            zoneStatusChanged: {
                name: "zoneStatusChanged",
                ID: 0x03,
                parameters: [
                    { name: "zoneid", type: enums_1.DataType.UINT8 },
                    { name: "zonestatus", type: enums_1.DataType.ENUM16 },
                    { name: "audiblenotif", type: enums_1.DataType.ENUM8 },
                    { name: "zonelabel", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
            panelStatusChanged: {
                name: "panelStatusChanged",
                ID: 0x04,
                parameters: [
                    { name: "panelstatus", type: enums_1.DataType.ENUM8 },
                    { name: "secondsremain", type: enums_1.DataType.UINT8 },
                    { name: "audiblenotif", type: enums_1.DataType.ENUM8 },
                    { name: "alarmstatus", type: enums_1.DataType.ENUM8 },
                ],
                required: true,
            },
            getPanelStatusRsp: {
                name: "getPanelStatusRsp",
                ID: 0x05,
                parameters: [
                    { name: "panelstatus", type: enums_1.DataType.ENUM8 },
                    { name: "secondsremain", type: enums_1.DataType.UINT8 },
                    { name: "audiblenotif", type: enums_1.DataType.ENUM8 },
                    { name: "alarmstatus", type: enums_1.DataType.ENUM8 },
                ],
                required: true,
            },
            setBypassedZoneList: {
                name: "setBypassedZoneList",
                ID: 0x06,
                parameters: [
                    { name: "numofzones", type: enums_1.DataType.UINT8 },
                    { name: "zoneid", type: enums_1.BuffaloZclDataType.LIST_UINT8 },
                ],
                required: true,
            },
            bypassRsp: {
                name: "bypassRsp",
                ID: 0x07,
                parameters: [
                    { name: "numofzones", type: enums_1.DataType.UINT8 },
                    { name: "bypassresult", type: enums_1.BuffaloZclDataType.LIST_UINT8 },
                ],
                required: true,
            },
            getZoneStatusRsp: {
                name: "getZoneStatusRsp",
                ID: 0x08,
                parameters: [
                    { name: "zonestatuscomplete", type: enums_1.DataType.BOOLEAN },
                    { name: "numofzones", type: enums_1.DataType.UINT8 },
                    { name: "zoneinfo", type: enums_1.BuffaloZclDataType.LIST_ZONEINFO },
                ],
                required: true,
            },
        },
    },
    ssIasWd: {
        name: "ssIasWd",
        ID: 0x0502,
        attributes: {
            maxDuration: { name: "maxDuration", ID: 0x0000, type: enums_1.DataType.UINT16, write: true, required: true, max: 0xfffe, default: 240 },
        },
        commands: {
            startWarning: {
                name: "startWarning",
                ID: 0x00,
                parameters: [
                    /** [4: warning mode, 2: strobe, 2: siren level] */
                    { name: "startwarninginfo", type: enums_1.DataType.BITMAP8 },
                    { name: "warningduration", type: enums_1.DataType.UINT16 },
                    { name: "strobedutycycle", type: enums_1.DataType.UINT8, max: 100 },
                    { name: "strobelevel", type: enums_1.DataType.ENUM8 },
                ],
                required: true,
            },
            squawk: {
                name: "squawk",
                ID: 0x01,
                parameters: [
                    /** [4: squawk mode, 1: strobe, 1: reserved, 2: squawk level] */
                    { name: "squawkinfo", type: enums_1.DataType.BITMAP8 },
                ],
                required: true,
            },
        },
        commandsResponse: {},
    },
    piGenericTunnel: {
        name: "piGenericTunnel",
        ID: 0x0600,
        attributes: {
            maxIncomeTransSize: { name: "maxIncomeTransSize", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 0xffff },
            maxOutgoTransSize: { name: "maxOutgoTransSize", ID: 0x0002, type: enums_1.DataType.UINT16, required: true, max: 0xffff },
            protocolAddr: { name: "protocolAddr", ID: 0x0003, type: enums_1.DataType.OCTET_STR, required: true, minLen: 0, maxLen: 255, default: "\u0000" },
        },
        commands: {
            matchProtocolAddr: { name: "matchProtocolAddr", ID: 0x00, parameters: [{ name: "protocoladdr", type: enums_1.DataType.OCTET_STR }], required: true },
        },
        commandsResponse: {
            matchProtocolAddrRsp: {
                name: "matchProtocolAddrRsp",
                ID: 0x00,
                parameters: [
                    { name: "devieeeaddr", type: enums_1.DataType.IEEE_ADDR },
                    { name: "protocoladdr", type: enums_1.DataType.OCTET_STR },
                ],
                required: true,
            },
            advertiseProtocolAddr: { name: "advertiseProtocolAddr", ID: 0x01, parameters: [{ name: "protocoladdr", type: enums_1.DataType.OCTET_STR }] },
        },
    },
    piBacnetProtocolTunnel: {
        name: "piBacnetProtocolTunnel",
        ID: 0x0601,
        attributes: {},
        commands: {
            transferNpdu: { name: "transferNpdu", ID: 0x00, parameters: [{ name: "npdu", type: enums_1.BuffaloZclDataType.LIST_UINT8 }], required: true },
        },
        commandsResponse: {},
    },
    piAnalogInputReg: {
        name: "piAnalogInputReg",
        ID: 0x0602,
        attributes: {
            covIncrement: { name: "covIncrement", ID: 0x0016, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true },
            deviceType: { name: "deviceType", ID: 0x001f, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
            objectId: { name: "objectId", ID: 0x004b, type: enums_1.DataType.BAC_OID, required: true, max: 0xffffffff },
            objectName: { name: "objectName", ID: 0x004d, type: enums_1.DataType.CHAR_STR, required: true, default: "\u0000" },
            objectType: { name: "objectType", ID: 0x004f, type: enums_1.DataType.ENUM16, required: true },
            updateInterval: { name: "updateInterval", ID: 0x0076, type: enums_1.DataType.UINT8, write: true, writeOptional: true },
            profileName: { name: "profileName", ID: 0x00a8, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
        },
        commands: {},
        commandsResponse: {},
    },
    piAnalogInputExt: {
        name: "piAnalogInputExt",
        ID: 0x0603,
        attributes: {
            ackedTransitions: {
                name: "ackedTransitions",
                ID: 0x0000,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            notificationClass: {
                name: "notificationClass",
                ID: 0x0011,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                max: 0xffff,
                default: 0,
            },
            deadband: { name: "deadband", ID: 0x0019, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0 },
            eventEnable: { name: "eventEnable", ID: 0x0023, type: enums_1.DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0 },
            eventState: { name: "eventState", ID: 0x0024, type: enums_1.DataType.ENUM8, default: 0 },
            highLimit: { name: "highLimit", ID: 0x002d, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0 },
            limitEnable: {
                name: "limitEnable",
                ID: 0x0034,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                max: 0x11,
                default: 0,
            },
            lowLimit: { name: "lowLimit", ID: 0x003b, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0 },
            notifyType: { name: "notifyType", ID: 0x0048, type: enums_1.DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0 },
            timeDelay: { name: "timeDelay", ID: 0x0071, type: enums_1.DataType.UINT8, required: true, write: true, writeOptional: true, default: 0 },
            // length 3, each index is any of: UINT16 | TOD | struct(DATE, TOD)
            eventTimeStamps: { name: "eventTimeStamps", ID: 0x0082, type: enums_1.DataType.ARRAY },
        },
        commands: {
            transferApdu: { name: "transferApdu", ID: 0x00, parameters: [] },
            connectReq: { name: "connectReq", ID: 0x01, parameters: [] },
            disconnectReq: { name: "disconnectReq", ID: 0x02, parameters: [] },
            connectStatusNoti: { name: "connectStatusNoti", ID: 0x03, parameters: [] },
        },
        commandsResponse: {},
    },
    piAnalogOutputReg: {
        name: "piAnalogOutputReg",
        ID: 0x0604,
        attributes: {
            covIncrement: { name: "covIncrement", ID: 0x0016, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true, default: 0 },
            deviceType: { name: "deviceType", ID: 0x001f, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
            objectId: { name: "objectId", ID: 0x004b, type: enums_1.DataType.BAC_OID, required: true, max: 0xffffffff },
            objectName: { name: "objectName", ID: 0x004d, type: enums_1.DataType.CHAR_STR, required: true, default: "\u0000" },
            objectType: { name: "objectType", ID: 0x004f, type: enums_1.DataType.ENUM16, required: true },
            profileName: { name: "profileName", ID: 0x00a8, type: enums_1.DataType.CHAR_STR, write: true, writeOptional: true, default: "\u0000" },
        },
        commands: {},
        commandsResponse: {},
    },
    piAnalogOutputExt: {
        name: "piAnalogOutputExt",
        ID: 0x0605,
        attributes: {
            ackedTransitions: {
                name: "ackedTransitions",
                ID: 0x0000,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            notificationClass: {
                name: "notificationClass",
                ID: 0x0011,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                max: 0xffff,
                default: 0,
            },
            deadband: { name: "deadband", ID: 0x0019, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0 },
            eventEnable: { name: "eventEnable", ID: 0x0023, type: enums_1.DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0 },
            eventState: { name: "eventState", ID: 0x0024, type: enums_1.DataType.ENUM8, default: 0 },
            highLimit: { name: "highLimit", ID: 0x002d, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0 },
            limitEnable: {
                name: "limitEnable",
                ID: 0x0034,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                max: 0x11,
                default: 0,
            },
            lowLimit: { name: "lowLimit", ID: 0x003b, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0 },
            notifyType: { name: "notifyType", ID: 0x0048, type: enums_1.DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0 },
            timeDelay: { name: "timeDelay", ID: 0x0071, type: enums_1.DataType.UINT8, required: true, write: true, writeOptional: true, default: 0 },
            // each index is any of: UINT16 | TOD | struct(DATE, TOD)
            eventTimeStamps: { name: "eventTimeStamps", ID: 0x0082, type: enums_1.DataType.ARRAY },
        },
        commands: {},
        commandsResponse: {},
    },
    piAnalogValueReg: {
        name: "piAnalogValueReg",
        ID: 0x0606,
        attributes: {
            covIncrement: { name: "covIncrement", ID: 0x0016, type: enums_1.DataType.SINGLE_PREC, write: true, writeOptional: true, default: 0 },
            objectId: { name: "objectId", ID: 0x004b, type: enums_1.DataType.BAC_OID, required: true, max: 0xffffffff },
            objectName: { name: "objectName", ID: 0x004d, type: enums_1.DataType.CHAR_STR, required: true, default: "\u0000" },
            objectType: { name: "objectType", ID: 0x004f, type: enums_1.DataType.ENUM16, required: true },
            profileName: { name: "profileName", ID: 0x00a8, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
        },
        commands: {},
        commandsResponse: {},
    },
    piAnalogValueExt: {
        name: "piAnalogValueExt",
        ID: 0x0607,
        attributes: {
            ackedTransitions: {
                name: "ackedTransitions",
                ID: 0x0000,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            notificationClass: {
                name: "notificationClass",
                ID: 0x0011,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                max: 0xffff,
                default: 0,
            },
            deadband: { name: "deadband", ID: 0x0019, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0 },
            eventEnable: { name: "eventEnable", ID: 0x0023, type: enums_1.DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0 },
            eventState: { name: "eventState", ID: 0x0024, type: enums_1.DataType.ENUM8, default: 0 },
            highLimit: { name: "highLimit", ID: 0x002d, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0 },
            limitEnable: {
                name: "limitEnable",
                ID: 0x0034,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                max: 0x11,
                default: 0,
            },
            lowLimit: { name: "lowLimit", ID: 0x003b, type: enums_1.DataType.SINGLE_PREC, required: true, write: true, writeOptional: true, default: 0 },
            notifyType: { name: "notifyType", ID: 0x0048, type: enums_1.DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0 },
            timeDelay: { name: "timeDelay", ID: 0x0071, type: enums_1.DataType.UINT8, required: true, write: true, writeOptional: true, default: 0 },
            // each index is any of: UINT16 | TOD | struct(DATE, TOD)
            eventTimeStamps: { name: "eventTimeStamps", ID: 0x0082, type: enums_1.DataType.ARRAY, required: true },
        },
        commands: {},
        commandsResponse: {},
    },
    piBinaryInputReg: {
        name: "piBinaryInputReg",
        ID: 0x0608,
        attributes: {
            changeOfStateCount: {
                name: "changeOfStateCount",
                ID: 0x000f,
                type: enums_1.DataType.UINT32,
                write: true,
                writeOptional: true,
                default: 0xffffffff,
            },
            changeOfStateTime: { name: "changeOfStateTime", ID: 0x0010, type: enums_1.DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */ },
            deviceType: { name: "deviceType", ID: 0x001f, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
            elapsedActiveTime: { name: "elapsedActiveTime", ID: 0x0021, type: enums_1.DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff },
            objectIdentifier: { name: "objectIdentifier", ID: 0x004b, type: enums_1.DataType.BAC_OID, required: true, max: 0xffffffff },
            objectName: { name: "objectName", ID: 0x004d, type: enums_1.DataType.CHAR_STR, required: true, default: "\u0000" },
            objectType: { name: "objectType", ID: 0x004f, type: enums_1.DataType.ENUM16, required: true },
            timeOfATReset: { name: "timeOfATReset", ID: 0x0072, type: enums_1.DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */ },
            timeOfSCReset: { name: "timeOfSCReset", ID: 0x0073, type: enums_1.DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */ },
            profileName: { name: "profileName", ID: 0x00a8, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
        },
        commands: {},
        commandsResponse: {},
    },
    piBinaryInputExt: {
        name: "piBinaryInputExt",
        ID: 0x0609,
        attributes: {
            ackedTransitions: {
                name: "ackedTransitions",
                ID: 0x0000,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            alarmValue: { name: "alarmValue", ID: 0x0006, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true },
            notificationClass: {
                name: "notificationClass",
                ID: 0x0011,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            eventEnable: { name: "eventEnable", ID: 0x0023, type: enums_1.DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0 },
            eventState: { name: "eventState", ID: 0x0024, type: enums_1.DataType.ENUM8 },
            notifyType: { name: "notifyType", ID: 0x0048, type: enums_1.DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0 },
            timeDelay: { name: "timeDelay", ID: 0x0071, type: enums_1.DataType.UINT8, required: true, write: true, writeOptional: true, default: 0 },
            // each index is any of: UINT16 | TOD | struct(DATE, TOD)
            eventTimeStamps: { name: "eventTimeStamps", ID: 0x0082, type: enums_1.DataType.ARRAY, required: true },
        },
        commands: {},
        commandsResponse: {},
    },
    piBinaryOutputReg: {
        name: "piBinaryOutputReg",
        ID: 0x060a,
        attributes: {
            changeOfStateCount: {
                name: "changeOfStateCount",
                ID: 0x000f,
                type: enums_1.DataType.UINT32,
                write: true,
                writeOptional: true,
                default: 0xffffffff,
            },
            changeOfStateTime: { name: "changeOfStateTime", ID: 0x0010, type: enums_1.DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */ },
            deviceType: { name: "deviceType", ID: 0x001f, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
            elapsedActiveTime: { name: "elapsedActiveTime", ID: 0x0021, type: enums_1.DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff },
            feedBackValue: { name: "feedBackValue", ID: 0x0028, type: enums_1.DataType.ENUM8, max: 1, default: 0 },
            objectIdentifier: { name: "objectIdentifier", ID: 0x004b, type: enums_1.DataType.BAC_OID, required: true, max: 0xffffffff },
            objectName: { name: "objectName", ID: 0x004d, type: enums_1.DataType.CHAR_STR, required: true, default: "\u0000" },
            objectType: { name: "objectType", ID: 0x004f, type: enums_1.DataType.ENUM16, required: true },
            timeOfATReset: { name: "timeOfATReset", ID: 0x0072, type: enums_1.DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */ },
            timeOfSCReset: { name: "timeOfSCReset", ID: 0x0073, type: enums_1.DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */ },
            profileName: { name: "profileName", ID: 0x00a8, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
        },
        commands: {},
        commandsResponse: {},
    },
    piBinaryOutputExt: {
        name: "piBinaryOutputExt",
        ID: 0x060b,
        attributes: {
            ackedTransitions: {
                name: "ackedTransitions",
                ID: 0x0000,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            notificationClass: {
                name: "notificationClass",
                ID: 0x0011,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            eventEnable: { name: "eventEnable", ID: 0x0023, type: enums_1.DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0 },
            eventState: { name: "eventState", ID: 0x0024, type: enums_1.DataType.ENUM8, default: 0 },
            notifyType: { name: "notifyType", ID: 0x0048, type: enums_1.DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0 },
            timeDelay: { name: "timeDelay", ID: 0x0071, type: enums_1.DataType.UINT8, required: true, write: true, writeOptional: true, default: 0 },
            // each index is any of: UINT16 | TOD | struct(DATE, TOD)
            eventTimeStamps: { name: "eventTimeStamps", ID: 0x0082, type: enums_1.DataType.ARRAY },
        },
        commands: {},
        commandsResponse: {},
    },
    piBinaryValueReg: {
        name: "piBinaryValueReg",
        ID: 0x060c,
        attributes: {
            changeOfStateCount: {
                name: "changeOfStateCount",
                ID: 0x000f,
                type: enums_1.DataType.UINT32,
                write: true,
                writeOptional: true,
                default: 0xffffffff,
            },
            changeOfStateTime: { name: "changeOfStateTime", ID: 0x0010, type: enums_1.DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */ },
            elapsedActiveTime: { name: "elapsedActiveTime", ID: 0x0021, type: enums_1.DataType.UINT32, write: true, writeOptional: true, default: 0xffffffff },
            objectIdentifier: { name: "objectIdentifier", ID: 0x004b, type: enums_1.DataType.BAC_OID, required: true, max: 0xffffffff },
            objectName: { name: "objectName", ID: 0x004d, type: enums_1.DataType.CHAR_STR, required: true, default: "\u0000" },
            objectType: { name: "objectType", ID: 0x004f, type: enums_1.DataType.ENUM16, required: true },
            timeOfATReset: { name: "timeOfATReset", ID: 0x0072, type: enums_1.DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */ },
            timeOfSCReset: { name: "timeOfSCReset", ID: 0x0073, type: enums_1.DataType.STRUCT /* default: (0xffffffff, 0xffffffff) */ },
            profileName: { name: "profileName", ID: 0x00a8, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
        },
        commands: {},
        commandsResponse: {},
    },
    piBinaryValueExt: {
        name: "piBinaryValueExt",
        ID: 0x060d,
        attributes: {
            ackedTransitions: {
                name: "ackedTransitions",
                ID: 0x0000,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            alarmValue: { name: "alarmValue", ID: 0x0006, type: enums_1.DataType.BOOLEAN, required: true, write: true, writeOptional: true },
            notificationClass: {
                name: "notificationClass",
                ID: 0x0011,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            eventEnable: { name: "eventEnable", ID: 0x0023, type: enums_1.DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0 },
            eventState: { name: "eventState", ID: 0x0024, type: enums_1.DataType.ENUM8, default: 0 },
            notifyType: { name: "notifyType", ID: 0x0048, type: enums_1.DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0 },
            timeDelay: { name: "timeDelay", ID: 0x0071, type: enums_1.DataType.UINT8, required: true, write: true, writeOptional: true, default: 0 },
            // each index is any of: UINT16 | TOD | struct(DATE, TOD)
            eventTimeStamps: { name: "eventTimeStamps", ID: 0x0082, type: enums_1.DataType.ARRAY, required: true },
        },
        commands: {},
        commandsResponse: {},
    },
    piMultistateInputReg: {
        name: "piMultistateInputReg",
        ID: 0x060e,
        attributes: {
            deviceType: { name: "deviceType", ID: 0x001f, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
            objectIdentifier: { name: "objectIdentifier", ID: 0x004b, type: enums_1.DataType.BAC_OID, required: true, max: 0xffffffff },
            objectName: { name: "objectName", ID: 0x004d, type: enums_1.DataType.CHAR_STR, required: true, default: "\u0000" },
            objectType: { name: "objectType", ID: 0x004f, type: enums_1.DataType.ENUM16, required: true },
            profileName: { name: "profileName", ID: 0x00a8, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
        },
        commands: {},
        commandsResponse: {},
    },
    piMultistateInputExt: {
        name: "piMultistateInputExt",
        ID: 0x060f,
        attributes: {
            ackedTransitions: {
                name: "ackedTransitions",
                ID: 0x0000,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            alarmValues: { name: "alarmValues", ID: 0x0006, type: enums_1.DataType.SET, required: true, write: true, writeOptional: true, max: 0xffff },
            notificationClass: {
                name: "notificationClass",
                ID: 0x0011,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            eventEnable: { name: "eventEnable", ID: 0x0023, type: enums_1.DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0 },
            eventState: { name: "eventState", ID: 0x0024, type: enums_1.DataType.ENUM8, default: 0 },
            faultValues: {
                name: "faultValues",
                ID: 0x0025,
                type: enums_1.DataType.SET,
                required: true,
                write: true,
                writeOptional: true,
                max: 0xffff,
                default: 0,
            },
            notifyType: { name: "notifyType", ID: 0x0048, type: enums_1.DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0 },
            timeDelay: { name: "timeDelay", ID: 0x0071, type: enums_1.DataType.UINT8, required: true, write: true, writeOptional: true, default: 0 },
            // each index is any of: UINT16 | TOD | struct(DATE, TOD)
            eventTimeStamps: { name: "eventTimeStamps", ID: 0x0082, type: enums_1.DataType.ARRAY, required: true },
        },
        commands: {},
        commandsResponse: {},
    },
    piMultistateOutputReg: {
        name: "piMultistateOutputReg",
        ID: 0x0610,
        attributes: {
            deviceType: { name: "deviceType", ID: 0x001f, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
            feedBackValue: { name: "feedBackValue", ID: 0x0028, type: enums_1.DataType.ENUM8, write: true, writeOptional: true, max: 1 },
            objectIdentifier: { name: "objectIdentifier", ID: 0x004b, type: enums_1.DataType.BAC_OID, required: true, max: 0xffffffff },
            objectName: { name: "objectName", ID: 0x004d, type: enums_1.DataType.CHAR_STR, required: true, default: "\u0000" },
            objectType: { name: "objectType", ID: 0x004f, type: enums_1.DataType.ENUM16, required: true },
            profileName: { name: "profileName", ID: 0x00a8, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
        },
        commands: {},
        commandsResponse: {},
    },
    piMultistateOutputExt: {
        name: "piMultistateOutputExt",
        ID: 0x0611,
        attributes: {
            ackedTransitions: {
                name: "ackedTransitions",
                ID: 0x0000,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            notificationClass: {
                name: "notificationClass",
                ID: 0x0011,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                max: 0xffff,
                default: 0,
            },
            eventEnable: { name: "eventEnable", ID: 0x0023, type: enums_1.DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0 },
            eventState: { name: "eventState", ID: 0x0024, type: enums_1.DataType.ENUM8, default: 0 },
            notifyType: { name: "notifyType", ID: 0x0048, type: enums_1.DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0 },
            timeDelay: { name: "timeDelay", ID: 0x0071, type: enums_1.DataType.UINT8, required: true, write: true, writeOptional: true, default: 0 },
            // each index is any of: UINT16 | TOD | struct(DATE, TOD)
            eventTimeStamps: { name: "eventTimeStamps", ID: 0x0082, type: enums_1.DataType.ARRAY, required: true },
        },
        commands: {},
        commandsResponse: {},
    },
    piMultistateValueReg: {
        name: "piMultistateValueReg",
        ID: 0x0612,
        attributes: {
            objectIdentifier: { name: "objectIdentifier", ID: 0x004b, type: enums_1.DataType.BAC_OID, required: true, max: 0xffffffff },
            objectName: { name: "objectName", ID: 0x004d, type: enums_1.DataType.CHAR_STR, required: true, default: "\u0000" },
            objectType: { name: "objectType", ID: 0x004f, type: enums_1.DataType.ENUM16, required: true },
            profileName: { name: "profileName", ID: 0x00a8, type: enums_1.DataType.CHAR_STR, default: "\u0000" },
        },
        commands: {},
        commandsResponse: {},
    },
    piMultistateValueExt: {
        name: "piMultistateValueExt",
        ID: 0x0613,
        attributes: {
            ackedTransitions: {
                name: "ackedTransitions",
                ID: 0x0000,
                type: enums_1.DataType.BITMAP8,
                required: true,
                write: true,
                writeOptional: true,
                default: 0,
            },
            alarmValues: { name: "alarmValues", ID: 0x0006, type: enums_1.DataType.SET, required: true, write: true, writeOptional: true, max: 0xffff },
            notificationClass: {
                name: "notificationClass",
                ID: 0x0011,
                type: enums_1.DataType.UINT16,
                required: true,
                write: true,
                writeOptional: true,
                max: 0xffff,
                default: 0,
            },
            eventEnable: { name: "eventEnable", ID: 0x0023, type: enums_1.DataType.BITMAP8, required: true, write: true, writeOptional: true, default: 0 },
            eventState: { name: "eventState", ID: 0x0024, type: enums_1.DataType.ENUM8 },
            faultValues: {
                name: "faultValues",
                ID: 0x0025,
                type: enums_1.DataType.SET,
                required: true,
                write: true,
                writeOptional: true,
                max: 0xffff,
                default: 0,
            },
            notifyType: { name: "notifyType", ID: 0x0048, type: enums_1.DataType.ENUM8, required: true, write: true, writeOptional: true, default: 0 },
            timeDelay: { name: "timeDelay", ID: 0x0071, type: enums_1.DataType.UINT8, required: true, write: true, writeOptional: true, default: 0 },
            // each index is any of: UINT16 | TOD | struct(DATE, TOD)
            eventTimeStamps: { name: "eventTimeStamps", ID: 0x0082, type: enums_1.DataType.ARRAY, required: true },
        },
        commands: {},
        commandsResponse: {},
    },
    pi11073ProtocolTunnel: {
        name: "pi11073ProtocolTunnel",
        ID: 0x0614,
        attributes: {
            deviceidList: { name: "deviceidList", ID: 0x0000, type: enums_1.DataType.ARRAY, default: 0xffff },
            managerTarget: { name: "managerTarget", ID: 0x0001, type: enums_1.DataType.IEEE_ADDR },
            managerEndpoint: { name: "managerEndpoint", ID: 0x0002, type: enums_1.DataType.UINT8, min: 0x01, max: 0xff },
            connected: { name: "connected", ID: 0x0003, type: enums_1.DataType.BOOLEAN },
            preemptible: { name: "preemptible", ID: 0x0004, type: enums_1.DataType.BOOLEAN },
            idleTimeout: { name: "idleTimeout", ID: 0x0005, type: enums_1.DataType.UINT16, min: 0x0001, max: 0xffff, default: 0x0000 },
        },
        commands: {
            transferApdu: { name: "transferApdu", ID: 0x00, parameters: [{ name: "apdu", type: enums_1.DataType.OCTET_STR }], required: true },
            connectRequest: {
                name: "connectRequest",
                ID: 0x01,
                parameters: [
                    /** [7: reserved, 1: preemptible] */
                    { name: "control", type: enums_1.DataType.BITMAP8 },
                    { name: "idleTimeout", type: enums_1.DataType.UINT16 },
                    { name: "managerTarget", type: enums_1.DataType.IEEE_ADDR },
                    { name: "managerEndpoint", type: enums_1.DataType.UINT8 },
                ],
            },
            disconnectRequest: { name: "disconnectRequest", ID: 0x02, parameters: [{ name: "managerTarget", type: enums_1.DataType.IEEE_ADDR }] },
            connectStatusNotification: { name: "connectStatusNotification", ID: 0x03, parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }] },
        },
        commandsResponse: {},
    },
    piIso7818ProtocolTunnel: {
        name: "piIso7818ProtocolTunnel",
        ID: 0x0615,
        attributes: {
            status: { name: "status", ID: 0x0000, type: enums_1.DataType.UINT8, required: true, max: 1, default: 0 },
        },
        commands: {
            transferApdu: { name: "transferApdu", ID: 0x00, parameters: [{ name: "apdu", type: enums_1.DataType.OCTET_STR }], required: true },
            insertSmartCard: { name: "insertSmartCard", ID: 0x01, parameters: [], required: true },
            extractSmartCard: { name: "extractSmartCard", ID: 0x02, parameters: [], required: true },
        },
        commandsResponse: {
            transferApdu: { name: "transferApdu", ID: 0x00, parameters: [{ name: "apdu", type: enums_1.DataType.OCTET_STR }], required: true },
        },
    },
    retailTunnel: {
        name: "retailTunnel",
        ID: 0x0617,
        attributes: {
            manufacturerCode: { name: "manufacturerCode", ID: 0x0000, type: enums_1.DataType.UINT16, required: true, min: 0x1000, max: 0x10ff },
            msProfile: { name: "msProfile", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, min: 0xc000, max: 0xffff },
        },
        commands: {
            transferApdu: { name: "transferApdu", ID: 0x00, parameters: [{ name: "apdu", type: enums_1.DataType.OCTET_STR }], required: true },
        },
        commandsResponse: {},
    },
    // sePrice: {ID: 0x0700},
    // seDemandResponseAndLoadControl: {ID: 0x0701},
    seMetering: {
        name: "seMetering",
        ID: 0x0702,
        attributes: {
            currentSummDelivered: { name: "currentSummDelivered", ID: 0x0000, type: enums_1.DataType.UINT48, required: true, max: 0xffffffffffff },
            currentSummReceived: { name: "currentSummReceived", ID: 0x0001, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentMaxDemandDelivered: { name: "currentMaxDemandDelivered", ID: 0x0002, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentMaxDemandReceived: { name: "currentMaxDemandReceived", ID: 0x0003, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            dftSumm: { name: "dftSumm", ID: 0x0004, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            dailyFreezeTime: { name: "dailyFreezeTime", ID: 0x0005, type: enums_1.DataType.UINT16, max: 0x173b, default: 0 },
            powerFactor: { name: "powerFactor", ID: 0x0006, type: enums_1.DataType.INT8, min: -100, max: 100, default: 0 },
            readingSnapshotTime: { name: "readingSnapshotTime", ID: 0x0007, type: enums_1.DataType.UTC },
            currentMaxDemandDeliverdTime: { name: "currentMaxDemandDeliverdTime", ID: 0x0008, type: enums_1.DataType.UTC },
            currentMaxDemandReceivedTime: { name: "currentMaxDemandReceivedTime", ID: 0x0009, type: enums_1.DataType.UTC },
            defaultUpdatePeriod: { name: "defaultUpdatePeriod", ID: 0x000a, type: enums_1.DataType.UINT8, max: 0xff, default: 0x1e },
            fastPollUpdatePeriod: { name: "fastPollUpdatePeriod", ID: 0x000b, type: enums_1.DataType.UINT8, max: 0xff, default: 0x05 },
            currentBlockPeriodConsumpDelivered: { name: "currentBlockPeriodConsumpDelivered", ID: 0x000c, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            dailyConsumpTarget: { name: "dailyConsumpTarget", ID: 0x000d, type: enums_1.DataType.UINT24, max: 0xffffff },
            currentBlock: { name: "currentBlock", ID: 0x000e, type: enums_1.DataType.ENUM8, max: 0x10 },
            profileIntervalPeriod: { name: "profileIntervalPeriod", ID: 0x000f, type: enums_1.DataType.ENUM8, max: 0xff },
            presetReadingTime: { name: "presetReadingTime", ID: 0x0011, type: enums_1.DataType.UINT16, max: 0x173b, default: 0 },
            volumePerReport: { name: "volumePerReport", ID: 0x0012, type: enums_1.DataType.UINT16, max: 0xffff },
            flowRestriction: { name: "flowRestriction", ID: 0x0013, type: enums_1.DataType.UINT8, max: 0xff },
            supplyStatus: { name: "supplyStatus", ID: 0x0014, type: enums_1.DataType.ENUM8, max: 0xff },
            currentInEnergyCarrierSumm: { name: "currentInEnergyCarrierSumm", ID: 0x0015, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentOutEnergyCarrierSumm: { name: "currentOutEnergyCarrierSumm", ID: 0x0016, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            inletTempreature: { name: "inletTempreature", ID: 0x0017, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            outletTempreature: { name: "outletTempreature", ID: 0x0018, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            controlTempreature: { name: "controlTempreature", ID: 0x0019, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            currentInEnergyCarrierDemand: { name: "currentInEnergyCarrierDemand", ID: 0x001a, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            currentOutEnergyCarrierDemand: { name: "currentOutEnergyCarrierDemand", ID: 0x001b, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            previousBlockPeriodConsumpReceived: { name: "previousBlockPeriodConsumpReceived", ID: 0x001c, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentBlockPeriodConsumpReceived: { name: "currentBlockPeriodConsumpReceived", ID: 0x001d, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentBlockReceived: { name: "currentBlockReceived", ID: 0x001e, type: enums_1.DataType.ENUM8, max: 0xff },
            DFTSummationReceived: { name: "DFTSummationReceived", ID: 0x001f, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            activeRegisterTierDelivered: { name: "activeRegisterTierDelivered", ID: 0x0020, type: enums_1.DataType.ENUM8, max: 48 },
            activeRegisterTierReceived: { name: "activeRegisterTierReceived", ID: 0x0021, type: enums_1.DataType.ENUM8, max: 48 },
            lastBlockSwitchTime: { name: "lastBlockSwitchTime", ID: 0x0022, type: enums_1.DataType.UTC },
            currentTier1SummDelivered: { name: "currentTier1SummDelivered", ID: 0x0100, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier1SummReceived: { name: "currentTier1SummReceived", ID: 0x0101, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier2SummDelivered: { name: "currentTier2SummDelivered", ID: 0x0102, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier2SummReceived: { name: "currentTier2SummReceived", ID: 0x0103, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier3SummDelivered: { name: "currentTier3SummDelivered", ID: 0x0104, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier3SummReceived: { name: "currentTier3SummReceived", ID: 0x0105, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier4SummDelivered: { name: "currentTier4SummDelivered", ID: 0x0106, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier4SummReceived: { name: "currentTier4SummReceived", ID: 0x0107, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier5SummDelivered: { name: "currentTier5SummDelivered", ID: 0x0108, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier5SummReceived: { name: "currentTier5SummReceived", ID: 0x0109, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier6SummDelivered: { name: "currentTier6SummDelivered", ID: 0x010a, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier6SummReceived: { name: "currentTier6SummReceived", ID: 0x010b, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier7SummDelivered: { name: "currentTier7SummDelivered", ID: 0x010c, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier7SummReceived: { name: "currentTier7SummReceived", ID: 0x010d, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier8SummDelivered: { name: "currentTier8SummDelivered", ID: 0x010e, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier8SummReceived: { name: "currentTier8SummReceived", ID: 0x010f, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier9SummDelivered: { name: "currentTier9SummDelivered", ID: 0x0110, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier9SummReceived: { name: "currentTier9SummReceived", ID: 0x0111, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier10SummDelivered: { name: "currentTier10SummDelivered", ID: 0x0112, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier10SummReceived: { name: "currentTier10SummReceived", ID: 0x0113, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier11SummDelivered: { name: "currentTier11SummDelivered", ID: 0x0114, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier11SummReceived: { name: "currentTier11SummReceived", ID: 0x0115, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier12SummDelivered: { name: "currentTier12SummDelivered", ID: 0x0116, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier12SummReceived: { name: "currentTier12SummReceived", ID: 0x0117, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier13SummDelivered: { name: "currentTier13SummDelivered", ID: 0x0118, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier13SummReceived: { name: "currentTier13SummReceived", ID: 0x0119, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier14SummDelivered: { name: "currentTier14SummDelivered", ID: 0x011a, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier14SummReceived: { name: "currentTier14SummReceived", ID: 0x011b, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier15SummDelivered: { name: "currentTier15SummDelivered", ID: 0x011c, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentTier15SummReceived: { name: "currentTier15SummReceived", ID: 0x011d, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            // XXX: continues to currentTier48
            cpp1SummationDelivered: { name: "cpp1SummationDelivered", ID: 0x01fc, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            cpp2SummationDelivered: { name: "cpp2SummationDelivered", ID: 0x01fe, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            status: { name: "status", ID: 0x0200, type: enums_1.DataType.BITMAP8, required: true, max: 0xff, default: 0x00 },
            remainingBattLife: { name: "remainingBattLife", ID: 0x0201, type: enums_1.DataType.UINT8, max: 0xff },
            hoursInOperation: { name: "hoursInOperation", ID: 0x0202, type: enums_1.DataType.UINT24, max: 0xffffff },
            hoursInFault: { name: "hoursInFault", ID: 0x0203, type: enums_1.DataType.UINT24, max: 0xffffff },
            extendedStatus: { name: "extendedStatus", ID: 0x0204, type: enums_1.DataType.BITMAP64 /* max: 0xfffffffffffffff */ },
            remainingBattLifeInDays: { name: "remainingBattLifeInDays", ID: 0x0205, type: enums_1.DataType.UINT16, max: 0xffff },
            currentMeterId: { name: "currentMeterId", ID: 0x0206, type: enums_1.DataType.OCTET_STR },
            ambientConsumptionIndicator: { name: "ambientConsumptionIndicator", ID: 0x0207, type: enums_1.DataType.ENUM8, max: 0x02 },
            unitOfMeasure: { name: "unitOfMeasure", ID: 0x0300, type: enums_1.DataType.ENUM8, required: true, max: 0xff, default: 0x00 },
            multiplier: { name: "multiplier", ID: 0x0301, type: enums_1.DataType.UINT24, max: 0xffffff },
            divisor: { name: "divisor", ID: 0x0302, type: enums_1.DataType.UINT24, max: 0xffffff },
            summaFormatting: { name: "summaFormatting", ID: 0x0303, type: enums_1.DataType.BITMAP8, required: true, max: 0xff },
            demandFormatting: { name: "demandFormatting", ID: 0x0304, type: enums_1.DataType.BITMAP8, max: 0xff },
            historicalConsumpFormatting: { name: "historicalConsumpFormatting", ID: 0x0305, type: enums_1.DataType.BITMAP8, max: 0xff },
            meteringDeviceType: { name: "meteringDeviceType", ID: 0x0306, type: enums_1.DataType.BITMAP8, max: 0xff },
            siteId: { name: "siteId", ID: 0x0307, type: enums_1.DataType.OCTET_STR, minLen: 1, maxLen: 33 },
            meterSerialNumber: { name: "meterSerialNumber", ID: 0x0308, type: enums_1.DataType.OCTET_STR, minLen: 1, maxLen: 25 },
            energyCarrierUnitOfMeas: { name: "energyCarrierUnitOfMeas", ID: 0x0309, type: enums_1.DataType.ENUM8, max: 0xff },
            energyCarrierSummFormatting: { name: "energyCarrierSummFormatting", ID: 0x030a, type: enums_1.DataType.BITMAP8, max: 0xff },
            energyCarrierDemandFormatting: { name: "energyCarrierDemandFormatting", ID: 0x030b, type: enums_1.DataType.BITMAP8, max: 0xff },
            temperatureUnitOfMeas: { name: "temperatureUnitOfMeas", ID: 0x030c, type: enums_1.DataType.ENUM8, max: 0xff },
            temperatureFormatting: { name: "temperatureFormatting", ID: 0x030d, type: enums_1.DataType.BITMAP8, max: 0xff },
            moduleSerialNumber: { name: "moduleSerialNumber", ID: 0x030e, type: enums_1.DataType.OCTET_STR, minLen: 1, maxLen: 25 },
            operatingTariffLevelDelivered: { name: "operatingTariffLevelDelivered", ID: 0x030f, type: enums_1.DataType.OCTET_STR, minLen: 1, maxLen: 25 },
            operatingTariffLevelReceived: { name: "operatingTariffLevelReceived", ID: 0x0310, type: enums_1.DataType.OCTET_STR, minLen: 1, maxLen: 25 },
            customIdNumber: { name: "customIdNumber", ID: 0x0311, type: enums_1.DataType.OCTET_STR, minLen: 1, maxLen: 25 },
            alternativeUnitOfMeasure: { name: "alternativeUnitOfMeasure", ID: 0x0312, type: enums_1.DataType.ENUM8, default: 0x00 },
            alternativeDemandFormatting: { name: "alternativeDemandFormatting", ID: 0x0312, type: enums_1.DataType.BITMAP8, max: 0xff },
            alternativeConsumptionFormatting: { name: "alternativeConsumptionFormatting", ID: 0x0312, type: enums_1.DataType.BITMAP8, max: 0xff },
            instantaneousDemand: { name: "instantaneousDemand", ID: 0x0400, type: enums_1.DataType.INT24, min: -8388607, max: 8388607, default: 0 },
            currentDayConsumpDelivered: { name: "currentDayConsumpDelivered", ID: 0x0401, type: enums_1.DataType.UINT24, max: 0xffffff },
            currentDayConsumpReceived: { name: "currentDayConsumpReceived", ID: 0x0402, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDayConsumpDelivered: { name: "previousDayConsumpDelivered", ID: 0x0403, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDayConsumpReceived: { name: "previousDayConsumpReceived", ID: 0x0404, type: enums_1.DataType.UINT24, max: 0xffffff },
            curPartProfileIntStartTimeDelivered: { name: "curPartProfileIntStartTimeDelivered", ID: 0x0405, type: enums_1.DataType.UTC },
            curPartProfileIntStartTimeReceived: { name: "curPartProfileIntStartTimeReceived", ID: 0x0406, type: enums_1.DataType.UTC },
            curPartProfileIntValueDelivered: { name: "curPartProfileIntValueDelivered", ID: 0x0407, type: enums_1.DataType.UINT24, max: 0xffffff },
            curPartProfileIntValueReceived: { name: "curPartProfileIntValueReceived", ID: 0x0408, type: enums_1.DataType.UINT24, max: 0xffffff },
            currentDayMaxPressure: { name: "currentDayMaxPressure", ID: 0x0409, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentDayMinPressure: { name: "currentDayMinPressure", ID: 0x040a, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            previousDayMaxPressure: { name: "previousDayMaxPressure", ID: 0x040b, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            previousDayMinPressure: { name: "previousDayMinPressure", ID: 0x040c, type: enums_1.DataType.UINT48, max: 0xffffffffffff },
            currentDayMaxDemand: { name: "currentDayMaxDemand", ID: 0x040d, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            previousDayMaxDemand: { name: "previousDayMaxDemand", ID: 0x040e, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            currentMonthMaxDemand: { name: "currentMonthMaxDemand", ID: 0x040f, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            currentYearMaxDemand: { name: "currentYearMaxDemand", ID: 0x0410, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            currentDayMaxEnergyCarrDemand: { name: "currentDayMaxEnergyCarrDemand", ID: 0x0411, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            previousDayMaxEnergyCarrDemand: { name: "previousDayMaxEnergyCarrDemand", ID: 0x0412, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            curMonthMaxEnergyCarrDemand: { name: "curMonthMaxEnergyCarrDemand", ID: 0x0413, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            curMonthMinEnergyCarrDemand: { name: "curMonthMinEnergyCarrDemand", ID: 0x0414, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            curYearMaxEnergyCarrDemand: { name: "curYearMaxEnergyCarrDemand", ID: 0x0415, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            curYearMinEnergyCarrDemand: { name: "curYearMinEnergyCarrDemand", ID: 0x0416, type: enums_1.DataType.INT24, min: -8388607, max: 8388607 },
            previousDay2ConsumptionDelivered: { name: "previousDay2ConsumptionDelivered", ID: 0x0420, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay2ConsumptionReceived: { name: "previousDay2ConsumptionReceived", ID: 0x0421, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay3ConsumptionDelivered: { name: "previousDay3ConsumptionDelivered", ID: 0x0422, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay3ConsumptionReceived: { name: "previousDay3ConsumptionReceived", ID: 0x0423, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay4ConsumptionDelivered: { name: "previousDay4ConsumptionDelivered", ID: 0x0424, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay4ConsumptionReceived: { name: "previousDay4ConsumptionReceived", ID: 0x0425, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay5ConsumptionDelivered: { name: "previousDay5ConsumptionDelivered", ID: 0x0426, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay5ConsumptionReceived: { name: "previousDay5ConsumptionReceived", ID: 0x0427, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay6ConsumptionDelivered: { name: "previousDay6ConsumptionDelivered", ID: 0x0428, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay6ConsumptionReceived: { name: "previousDay6ConsumptionReceived", ID: 0x0420, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay7ConsumptionDelivered: { name: "previousDay7ConsumptionDelivered", ID: 0x042a, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay7ConsumptionReceived: { name: "previousDay7ConsumptionReceived", ID: 0x042b, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay8ConsumptionDelivered: { name: "previousDay8ConsumptionDelivered", ID: 0x042c, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousDay8ConsumptionReceived: { name: "previousDay8ConsumptionReceived", ID: 0x042d, type: enums_1.DataType.UINT24, max: 0xffffff },
            currentWeekConsumptionDelivered: { name: "currentWeekConsumptionDelivered", ID: 0x0430, type: enums_1.DataType.UINT24, max: 0xffffff },
            currentWeekConsumptionReceived: { name: "currentWeekConsumptionReceived", ID: 0x0431, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeekConsumptionDelivered: { name: "previousWeekConsumptionDelivered", ID: 0x0432, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeekConsumptionReceived: { name: "previousWeekConsumptionReceived", ID: 0x0433, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeek2ConsumptionDelivered: { name: "previousWeek2ConsumptionDelivered", ID: 0x0434, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeek2ConsumptionReceived: { name: "previousWeek2ConsumptionReceived", ID: 0x0435, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeek3ConsumptionDelivered: { name: "previousWeek3ConsumptionDelivered", ID: 0x0436, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeek3ConsumptionReceived: { name: "previousWeek3ConsumptionReceived", ID: 0x0437, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeek4ConsumptionDelivered: { name: "previousWeek4ConsumptionDelivered", ID: 0x0438, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeek4ConsumptionReceived: { name: "previousWeek4ConsumptionReceived", ID: 0x0439, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeek5ConsumptionDelivered: { name: "previousWeek5ConsumptionDelivered", ID: 0x043a, type: enums_1.DataType.UINT24, max: 0xffffff },
            previousWeek5ConsumptionReceived: { name: "previousWeek5ConsumptionReceived", ID: 0x043b, type: enums_1.DataType.UINT24, max: 0xffffff },
            currentMonthConsumptionDelivered: { name: "currentMonthConsumptionDelivered", ID: 0x0440, type: enums_1.DataType.UINT32, max: 0xffffffff },
            currentMonthConsumptionReceived: { name: "currentMonthConsumptionReceived", ID: 0x0441, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonthConsumptionDelivered: { name: "previousMonthConsumptionDelivered", ID: 0x0442, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonthConsumptionReceived: { name: "previousMonthConsumptionReceived", ID: 0x0443, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth2ConsumptionDelivered: { name: "previousMonth2ConsumptionDelivered", ID: 0x0444, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth2ConsumptionReceived: { name: "previousMonth2ConsumptionReceived", ID: 0x0445, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth3ConsumptionDelivered: { name: "previousMonth3ConsumptionDelivered", ID: 0x0446, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth3ConsumptionReceived: { name: "previousMonth3ConsumptionReceived", ID: 0x0447, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth4ConsumptionDelivered: { name: "previousMonth4ConsumptionDelivered", ID: 0x0448, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth4ConsumptionReceived: { name: "previousMonth4ConsumptionReceived", ID: 0x0449, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth5ConsumptionDelivered: { name: "previousMonth5ConsumptionDelivered", ID: 0x044a, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth5ConsumptionReceived: { name: "previousMonth5ConsumptionReceived", ID: 0x044b, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth6ConsumptionDelivered: { name: "previousMonth6ConsumptionDelivered", ID: 0x044c, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth6ConsumptionReceived: { name: "previousMonth6ConsumptionReceived", ID: 0x044d, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth7ConsumptionDelivered: { name: "previousMonth7ConsumptionDelivered", ID: 0x044e, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth7ConsumptionReceived: { name: "previousMonth7ConsumptionReceived", ID: 0x044f, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth8ConsumptionDelivered: { name: "previousMonth8ConsumptionDelivered", ID: 0x0450, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth8ConsumptionReceived: { name: "previousMonth8ConsumptionReceived", ID: 0x0451, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth9ConsumptionDelivered: { name: "previousMonth9ConsumptionDelivered", ID: 0x0452, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth9ConsumptionReceived: { name: "previousMonth9ConsumptionReceived", ID: 0x0453, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth10ConsumptionDelivered: { name: "previousMonth10ConsumptionDelivered", ID: 0x0454, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth10ConsumptionReceived: { name: "previousMonth10ConsumptionReceived", ID: 0x0455, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth11ConsumptionDelivered: { name: "previousMonth11ConsumptionDelivered", ID: 0x0456, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth11ConsumptionReceived: { name: "previousMonth11ConsumptionReceived", ID: 0x0457, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth12ConsumptionDelivered: { name: "previousMonth12ConsumptionDelivered", ID: 0x0458, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth12ConsumptionReceived: { name: "previousMonth12ConsumptionReceived", ID: 0x0459, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth13ConsumptionDelivered: { name: "previousMonth13ConsumptionDelivered", ID: 0x045a, type: enums_1.DataType.UINT32, max: 0xffffffff },
            previousMonth13ConsumptionReceived: { name: "previousMonth13ConsumptionReceived", ID: 0x045b, type: enums_1.DataType.UINT32, max: 0xffffffff },
            historicalFreezeTime: { name: "historicalFreezeTime", ID: 0x045c, type: enums_1.DataType.UINT16, max: 0x173b, default: 0 },
            maxNumberOfPeriodsDelivered: { name: "maxNumberOfPeriodsDelivered", ID: 0x0500, type: enums_1.DataType.UINT8, max: 0xff, default: 0x18 },
            currentDemandDelivered: { name: "currentDemandDelivered", ID: 0x0600, type: enums_1.DataType.UINT24, max: 0xffffff },
            demandLimit: { name: "demandLimit", ID: 0x0601, type: enums_1.DataType.UINT24, max: 0xffffff },
            demandIntegrationPeriod: { name: "demandIntegrationPeriod", ID: 0x0602, type: enums_1.DataType.UINT8, min: 0x01, max: 0xff },
            numberOfDemandSubintervals: { name: "numberOfDemandSubintervals", ID: 0x0603, type: enums_1.DataType.UINT8, min: 0x01, max: 0xff },
            demandLimitArmDuration: { name: "demandLimitArmDuration", ID: 0x0604, type: enums_1.DataType.UINT16, max: 0xffff, default: 0x003c },
            loadLimitSupplyState: { name: "loadLimitSupplyState", ID: 0x0605, type: enums_1.DataType.ENUM8, max: 0xff, default: 0x00 },
            loadLimitCounter: { name: "loadLimitCounter", ID: 0x0606, type: enums_1.DataType.UINT8, max: 0xff, default: 0x01 },
            supplyTamperState: { name: "supplyTamperState", ID: 0x0607, type: enums_1.DataType.ENUM8, max: 0xff, default: 0x00 },
            supplyDepletionState: { name: "supplyDepletionState", ID: 0x0608, type: enums_1.DataType.ENUM8, max: 0xff, default: 0x00 },
            supplyUncontrolledFlowState: { name: "supplyUncontrolledFlowState", ID: 0x0609, type: enums_1.DataType.ENUM8, max: 0xff, default: 0x00 },
            // TODO: Block Information Set (Delivered) (0x700..)
            genericAlarmMask: { name: "genericAlarmMask", ID: 0x0800, type: enums_1.DataType.BITMAP16, max: 0xffff, default: 0xffff },
            electricityAlarmMask: { name: "electricityAlarmMask", ID: 0x0801, type: enums_1.DataType.BITMAP32, max: 0xffffffff, default: 0xffffffff },
            genFlowPressureAlarmMask: { name: "genFlowPressureAlarmMask", ID: 0x0802, type: enums_1.DataType.BITMAP16, max: 0xffff, default: 0xffff },
            waterSpecificAlarmMask: { name: "waterSpecificAlarmMask", ID: 0x0803, type: enums_1.DataType.BITMAP16, max: 0xffff, default: 0xffff },
            heatCoolSpecificAlarmMASK: { name: "heatCoolSpecificAlarmMASK", ID: 0x0804, type: enums_1.DataType.BITMAP16, max: 0xffff, default: 0xffff },
            gasSpecificAlarmMask: { name: "gasSpecificAlarmMask", ID: 0x0805, type: enums_1.DataType.BITMAP16, max: 0xffff, default: 0xffff },
            extendedGenericAlarmMask: {
                name: "extendedGenericAlarmMask",
                ID: 0x0806,
                type: enums_1.DataType.BITMAP48,
                max: 0xffffffffffff,
                default: 0xffffffffffff,
            },
            manufactureAlarmMask: { name: "manufactureAlarmMask", ID: 0x0807, type: enums_1.DataType.BITMAP16, max: 0xffff, default: 0xffff },
            // TODO: Block Information Attribute Set (Received) (0x900..)
            billToDateDelivered: { name: "billToDateDelivered", ID: 0x0a00, type: enums_1.DataType.UINT32, max: 0xffffffff, default: 0 },
            billToDateTimeStampDelivered: { name: "billToDateTimeStampDelivered", ID: 0x0a01, type: enums_1.DataType.UTC, default: 0 },
            projectedBillDelivered: { name: "projectedBillDelivered", ID: 0x0a02, type: enums_1.DataType.UINT32, max: 0xffffffff, default: 0 },
            projectedBillTimeStampDelivered: { name: "projectedBillTimeStampDelivered", ID: 0x0a03, type: enums_1.DataType.UTC, default: 0 },
            billDeliveredTrailingDigit: { name: "billDeliveredTrailingDigit", ID: 0x0a04, type: enums_1.DataType.BITMAP8 },
            billToDateReceived: { name: "billToDateReceived", ID: 0x0a10, type: enums_1.DataType.UINT32, max: 0xffffffff, default: 0 },
            billToDateTimeStampReceived: { name: "billToDateTimeStampReceived", ID: 0x0a11, type: enums_1.DataType.UTC, default: 0 },
            projectedBillReceived: { name: "projectedBillReceived", ID: 0x0a12, type: enums_1.DataType.UINT32, max: 0xffffffff, default: 0 },
            projectedBillTimeStampReceived: { name: "projectedBillTimeStampReceived", ID: 0x0a13, type: enums_1.DataType.UTC, default: 0 },
            billReceivedTrailingDigit: { name: "billReceivedTrailingDigit", ID: 0x0a14, type: enums_1.DataType.BITMAP8 },
            // TODO: Supply Control Attribute Set (0x0b00..)
            // TODO: Alternative Historical Consumption Attribute Set (0x0c00..)
            // TODO: Noti fication At tribute Set (0x0000.., client=true)
        },
        commands: {
            getProfile: {
                name: "getProfile",
                ID: 0x00,
                parameters: [
                    { name: "intervalChannel", type: enums_1.DataType.ENUM8 },
                    { name: "endTime", type: enums_1.DataType.UTC },
                    { name: "numberOfPeriods", type: enums_1.DataType.UINT8 },
                ],
                response: 0x00,
            },
            requestMirrorRsp: { name: "requestMirrorRsp", ID: 0x01, parameters: [{ name: "endpointId", type: enums_1.DataType.UINT16 }], response: 0x01 },
            mirrorRemoved: { name: "mirrorRemoved", ID: 0x02, parameters: [{ name: "removedEndpointId", type: enums_1.DataType.UINT16 }], response: 0x02 },
            requestFastPollMode: {
                name: "requestFastPollMode",
                ID: 0x03,
                parameters: [
                    { name: "fastPollUpdatePeriod", type: enums_1.DataType.UINT8 },
                    { name: "duration", type: enums_1.DataType.UINT8 },
                ],
                response: 0x03,
            },
            schneduleSnapshot: {
                name: "schneduleSnapshot",
                ID: 0x04,
                parameters: [
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    { name: "commandIndex", type: enums_1.DataType.UINT8 },
                    { name: "totalNumberOfCommands", type: enums_1.DataType.UINT8 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "payload", type: DataType.LIST_SCHEDULE_SNAPSHOT},
                    //   {name: "id", type: DataType.UINT8, min: 1, max: 254},
                    //   {name: "startTime", type: DataType.UTC},
                    //   {name: "schedule", type: DataType.UINT24},
                    //   {name: "payloadType", type: DataType.ENUM8},
                    //   {name: "cause", type: DataType.BITMAP32},
                ],
                response: 0x04,
            },
            takeSnapshot: { name: "takeSnapshot", ID: 0x05, parameters: [{ name: "cause", type: enums_1.DataType.BITMAP32 }], response: 0x05 },
            getSnapshot: {
                name: "getSnapshot",
                ID: 0x06,
                parameters: [
                    { name: "earliestStartTime", type: enums_1.DataType.UTC },
                    { name: "latestEndTime", type: enums_1.DataType.UTC },
                    { name: "offset", type: enums_1.DataType.UINT8 },
                    { name: "cause", type: enums_1.DataType.BITMAP32 },
                ],
            },
            startSampling: {
                name: "startSampling",
                ID: 0x07,
                parameters: [
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    { name: "startTime", type: enums_1.DataType.UTC },
                    { name: "type", type: enums_1.DataType.ENUM8 },
                    { name: "requestInterval", type: enums_1.DataType.UINT16 },
                    { name: "maxNumberOfSamples", type: enums_1.DataType.UINT16 },
                ],
                response: 0x0d,
            },
            getSampledData: {
                name: "getSampledData",
                ID: 0x08,
                parameters: [
                    { name: "sampleId", type: enums_1.DataType.UINT16 },
                    { name: "earliestSampleTime", type: enums_1.DataType.UTC },
                    { name: "type", type: enums_1.DataType.ENUM8 },
                    { name: "numberOfSamples", type: enums_1.DataType.UINT16 },
                ],
                response: 0x07,
            },
            mirrorReportAttributeRsp: {
                name: "mirrorReportAttributeRsp",
                ID: 0x09,
                parameters: [
                    { name: "notificationScheme", type: enums_1.DataType.UINT8 },
                    { name: "notificationFlags", type: enums_1.DataType.BITMAP32 },
                ],
            },
            resetLoadLimitCounter: {
                name: "resetLoadLimitCounter",
                ID: 0x0a,
                parameters: [
                    { name: "providerId", type: enums_1.DataType.UINT32 },
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                ],
            },
            changeSupply: {
                name: "changeSupply",
                ID: 0x0b,
                parameters: [
                    { name: "providerId", type: enums_1.DataType.UINT32 },
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    { name: "requestDateTime", type: enums_1.DataType.UTC },
                    { name: "implDateTime", type: enums_1.DataType.UTC },
                    { name: "proposedSupplyStatusAfterImpl", type: enums_1.DataType.ENUM8 },
                    { name: "SupplyControlBits", type: enums_1.DataType.BITMAP8 },
                ],
            },
            localChangeSupply: { name: "localChangeSupply", ID: 0x0c, parameters: [{ name: "proposedSupplyStatus", type: enums_1.DataType.ENUM8 }] },
            setSupplyStatus: {
                name: "setSupplyStatus",
                ID: 0x0d,
                parameters: [
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    { name: "tamperState", type: enums_1.DataType.ENUM8 },
                    { name: "depletionState", type: enums_1.DataType.ENUM8 },
                    { name: "uncontrolledFlowState", type: enums_1.DataType.ENUM8 },
                    { name: "loadLimitSupplyState", type: enums_1.DataType.ENUM8 },
                ],
            },
            setUncontrolledFlowThreshold: {
                name: "setUncontrolledFlowThreshold",
                ID: 0x0e,
                parameters: [
                    { name: "providerId", type: enums_1.DataType.UINT32 },
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    { name: "uncontrolledFlowThreshold", type: enums_1.DataType.UINT16 },
                    { name: "unitOfMeasure", type: enums_1.DataType.ENUM8 },
                    { name: "multiplier", type: enums_1.DataType.UINT16 },
                    { name: "divisor", type: enums_1.DataType.UINT16 },
                    { name: "stabilisationPeriod", type: enums_1.DataType.UINT8 },
                    { name: "measurementPeriod", type: enums_1.DataType.UINT16 },
                ],
            },
        },
        commandsResponse: {
            getProfileRsp: {
                name: "getProfileRsp",
                ID: 0x00,
                parameters: [
                    { name: "endTime", type: enums_1.DataType.UTC },
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "profileIntervalPeriod", type: enums_1.DataType.ENUM8 },
                    { name: "numberOfPeriodsDelivered", type: enums_1.DataType.UINT8 },
                    { name: "intervals", type: enums_1.BuffaloZclDataType.LIST_UINT24 },
                ],
            },
            requestMirror: { name: "requestMirror", ID: 0x01, parameters: [] },
            removeMirror: { name: "removeMirror", ID: 0x02, parameters: [] },
            requestFastPollModeRsp: {
                name: "requestFastPollModeRsp",
                ID: 0x03,
                parameters: [
                    { name: "appliedUpdatePeriod", type: enums_1.DataType.UINT8 },
                    { name: "fastPollModeEndTime", type: enums_1.DataType.UTC },
                ],
            },
            scheduleSnapshotRsp: {
                name: "scheduleSnapshotRsp",
                ID: 0x04,
                parameters: [
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "fastPollModeEndTime", type: DataType.LIST_SCHEDULE_SNAPSHOT_RSP},
                    //   {name: "id", type: DataType.UINT8, min: 1, max: 254},
                    //   {name: "confirmation", type: DataType.UINT8},
                ],
            },
            takeSnapshotRsp: {
                name: "takeSnapshotRsp",
                ID: 0x05,
                parameters: [
                    { name: "id", type: enums_1.DataType.UINT32 },
                    { name: "confirmation", type: enums_1.DataType.UINT8 },
                ],
            },
            publishSnapshot: {
                name: "publishSnapshot",
                ID: 0x06,
                parameters: [
                    { name: "id", type: enums_1.DataType.UINT32 },
                    { name: "time", type: enums_1.DataType.UTC },
                    { name: "totalSnapshotsFound", type: enums_1.DataType.UINT8 },
                    { name: "commandIndex", type: enums_1.DataType.UINT8 },
                    { name: "totalNumberOfCommands", type: enums_1.DataType.UINT8 },
                    { name: "cause", type: enums_1.DataType.BITMAP32 },
                    { name: "payloadType", type: enums_1.DataType.ENUM8 },
                    // TODO: need BuffaloZcl read/write (complex)
                    // {name: "subPayload", type: DataType.LIST_SNAPSHOT_SUBPAYLOAD},
                ],
            },
            getSampledDataRsp: {
                name: "getSampledDataRsp",
                ID: 0x07,
                parameters: [
                    { name: "id", type: enums_1.DataType.UINT16 },
                    { name: "startTime", type: enums_1.DataType.UTC },
                    { name: "type", type: enums_1.DataType.ENUM8 },
                    { name: "requestInterval", type: enums_1.DataType.UINT16 },
                    { name: "numberOfSamples", type: enums_1.DataType.UINT16 },
                    { name: "samples", type: enums_1.BuffaloZclDataType.LIST_UINT24 },
                ],
            },
            configureMirror: {
                name: "configureMirror",
                ID: 0x08,
                parameters: [
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    { name: "reportingInterval", type: enums_1.DataType.UINT24 },
                    { name: "mirrorNotificationReporting", type: enums_1.DataType.BOOLEAN },
                    { name: "notificationScheme", type: enums_1.DataType.UINT8 },
                ],
            },
            configureNotificationScheme: {
                name: "configureNotificationScheme",
                ID: 0x09,
                parameters: [
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    { name: "notificationScheme", type: enums_1.DataType.UINT8 },
                    { name: "notificationFlagOrder", type: enums_1.DataType.BITMAP32 },
                ],
            },
            configureNotificationFlag: {
                name: "configureNotificationFlag",
                ID: 0x0a,
                parameters: [
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    { name: "notificationScheme", type: enums_1.DataType.UINT8 },
                    { name: "notificationFlagAttributeId", type: enums_1.DataType.UINT16 },
                    { name: "clusterId", type: enums_1.DataType.CLUSTER_ID },
                    { name: "manufacturerCode", type: enums_1.DataType.UINT16 },
                    { name: "numberOfCommands", type: enums_1.DataType.UINT8 },
                    { name: "commandIds", type: enums_1.BuffaloZclDataType.LIST_UINT8 },
                ],
            },
            getNotifiedMessage: {
                name: "getNotifiedMessage",
                ID: 0x0b,
                parameters: [
                    { name: "notificationScheme", type: enums_1.DataType.UINT8 },
                    { name: "notificationFlagAttributeId", type: enums_1.DataType.UINT16 },
                    { name: "notificationFlags", type: enums_1.DataType.BITMAP32 },
                ],
            },
            supplyStatusRsp: {
                name: "supplyStatusRsp",
                ID: 0x0c,
                parameters: [
                    { name: "providerId", type: enums_1.DataType.UINT32 },
                    { name: "issuerEventId", type: enums_1.DataType.UINT32 },
                    { name: "implDateTime", type: enums_1.DataType.UTC },
                    { name: "supplyStatusAfterImpl", type: enums_1.DataType.ENUM8 },
                ],
            },
            startSamplingRsp: { name: "startSamplingRsp", ID: 0x0d, parameters: [{ name: "sampleId", type: enums_1.DataType.UINT16 }] },
        },
    },
    // seMessaging: {ID: 0x0703},
    seTunneling: {
        name: "seTunneling",
        ID: 0x0704,
        attributes: {
            closeTunnelTimeout: { name: "closeTunnelTimeout", ID: 0x0000, type: enums_1.DataType.UINT16, required: true, min: 1, default: 0xffff },
        },
        commands: {
            requestTunnel: {
                name: "requestTunnel",
                ID: 0x00,
                response: 0x00,
                parameters: [
                    { name: "protocolId", type: enums_1.DataType.ENUM8, min: 0x01, max: 0xff },
                    { name: "manufacturerCode", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "flowControl", type: enums_1.DataType.BOOLEAN },
                    { name: "maxIncomingTransferSize", type: enums_1.DataType.UINT16, max: 0xffff },
                ],
                required: true,
            },
            closeTunnel: { name: "closeTunnel", ID: 0x01, parameters: [{ name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff }], required: true },
            transferData: {
                name: "transferData",
                ID: 0x02,
                parameters: [
                    { name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "data", type: enums_1.BuffaloZclDataType.BUFFER },
                ],
                required: true,
            },
            transferDataError: {
                name: "transferDataError",
                ID: 0x03,
                parameters: [
                    { name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "status", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            ackTransferData: {
                name: "ackTransferData",
                ID: 0x04,
                parameters: [
                    { name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "numberOfBytesLeft", type: enums_1.DataType.UINT16 },
                ],
            },
            readyData: {
                name: "readyData",
                ID: 0x05,
                parameters: [
                    { name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "numberOfOctetsLeft", type: enums_1.DataType.UINT16 },
                ],
            },
            getSupportedTunnelProtocols: {
                name: "getSupportedTunnelProtocols",
                ID: 0x06,
                parameters: [{ name: "protocolOffset", type: enums_1.DataType.UINT8 }],
            },
        },
        commandsResponse: {
            requestTunnelRsp: {
                name: "requestTunnelRsp",
                ID: 0x00,
                parameters: [
                    { name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "status", type: enums_1.DataType.UINT8 },
                    { name: "maxIncomingTransferSize", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            transferData: {
                name: "transferData",
                ID: 0x01,
                parameters: [
                    { name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "data", type: enums_1.BuffaloZclDataType.BUFFER },
                ],
                required: true,
            },
            transferDataError: {
                name: "transferDataError",
                ID: 0x02,
                parameters: [
                    { name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "status", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            ackTransferData: {
                name: "ackTransferData",
                ID: 0x03,
                parameters: [
                    { name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "numberOfBytesLeft", type: enums_1.DataType.UINT16 },
                ],
            },
            readyData: {
                name: "readyData",
                ID: 0x04,
                parameters: [
                    { name: "tunnelId", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "numberOfOctetsLeft", type: enums_1.DataType.UINT16 },
                ],
            },
            supportedProtocolsRsp: {
                name: "supportedProtocolsRsp",
                ID: 0x05,
                parameters: [
                    { name: "listComplete", type: enums_1.DataType.BOOLEAN },
                    { name: "count", type: enums_1.DataType.UINT8 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "protocols", type: BuffaloZclDataType.LIST_PROTOCOLS},
                    //   {name: "manufacturerCode", type: DataType.UINT16},
                    //   {name: "protocolId", type: DataType.ENUM8},
                ],
            },
            closureNotification: { name: "closureNotification", ID: 0x06, parameters: [{ name: "tunnelId", type: enums_1.DataType.UINT16 }] },
        },
    },
    // sePrepayment: {ID: 0x0705},
    // seCalendar: {ID: 0x0707},
    // seDeviceManagement: {ID: 0x0708},
    // seEvents: {ID: 0x0709},
    // seSubGhz: {ID: 0x070b},
    // seKeyEstablishment: {ID: 0x0800},
    telecommunicationsInformation: {
        name: "telecommunicationsInformation",
        ID: 0x0900,
        attributes: {
            nodeDescription: { name: "nodeDescription", ID: 0x0000, type: enums_1.DataType.CHAR_STR, required: true },
            deliveryEnable: { name: "deliveryEnable", ID: 0x0001, type: enums_1.DataType.BOOLEAN, required: true },
            pushInformationTimer: { name: "pushInformationTimer", ID: 0x0002, type: enums_1.DataType.UINT32 },
            enableSecureConfiguration: { name: "enableSecureConfiguration", ID: 0x0003, type: enums_1.DataType.BOOLEAN, required: true },
            numberOfContents: { name: "numberOfContents", ID: 0x0010, type: enums_1.DataType.UINT16, max: 0xffff },
            contentRootID: { name: "contentRootID", ID: 0x0011, type: enums_1.DataType.UINT16, max: 0xffff },
        },
        commands: {
            // TODO: most of these require custom BuffaloZcl read/write
            requestInfo: { name: "requestInfo", ID: 0x00, parameters: [], response: 0x00, required: true },
            pushInfoResponse: { name: "pushInfoResponse", ID: 0x01, parameters: [], required: true },
            sendPreference: { name: "sendPreference", ID: 0x02, parameters: [], response: 0x02 },
            requestPreferenceRsp: { name: "requestPreferenceRsp", ID: 0x03, parameters: [] },
            update: { name: "update", ID: 0x04, parameters: [], response: 0x05 },
            delete: { name: "delete", ID: 0x05, parameters: [], response: 0x06 },
            configureNodeDescription: { name: "configureNodeDescription", ID: 0x06, parameters: [] },
            configureDeliveryEnable: { name: "configureDeliveryEnable", ID: 0x07, parameters: [] },
            configurePushInfoTimer: { name: "configurePushInfoTimer", ID: 0x08, parameters: [] },
            configureSetRootId: { name: "configureSetRootId", ID: 0x09, parameters: [] },
        },
        commandsResponse: {
            // TODO: most of these require custom BuffaloZcl read/write
            requestInfoRsp: { name: "requestInfoRsp", ID: 0x00, parameters: [], required: true },
            pushInfo: { name: "pushInfo", ID: 0x01, parameters: [], required: true },
            sendPreferenceRsp: { name: "sendPreferenceRsp", ID: 0x02, parameters: [], required: true },
            serverRequestPreference: { name: "serverRequestPreference", ID: 0x03, parameters: [], required: true },
            requestPreferenceConfirmation: { name: "requestPreferenceConfirmation", ID: 0x04, parameters: [], required: true },
            updateRsp: { name: "updateRsp", ID: 0x05, parameters: [], required: true },
            deleteRsp: { name: "deleteRsp", ID: 0x06, parameters: [], required: true },
        },
    },
    telecommunicationsVoiceOverZigbee: {
        name: "telecommunicationsVoiceOverZigbee",
        ID: 0x0904,
        attributes: {
            codecType: { name: "codecType", ID: 0x0000, type: enums_1.DataType.ENUM8, required: true, write: true },
            samplingFrequency: { name: "samplingFrequency", ID: 0x0001, type: enums_1.DataType.ENUM8, required: true, write: true },
            codecrate: { name: "codecrate", ID: 0x0002, type: enums_1.DataType.ENUM8, required: true, write: true },
            establishmentTimeout: { name: "establishmentTimeout", ID: 0x0003, type: enums_1.DataType.UINT8, required: true, min: 0x01, max: 0xff },
            codecTypeSub1: { name: "codecTypeSub1", ID: 0x0004, type: enums_1.DataType.ENUM8, write: true },
            codecTypeSub2: { name: "codecTypeSub2", ID: 0x0005, type: enums_1.DataType.ENUM8, write: true },
            codecTypeSub3: { name: "codecTypeSub3", ID: 0x0006, type: enums_1.DataType.ENUM8, write: true },
            compressionType: { name: "compressionType", ID: 0x0007, type: enums_1.DataType.ENUM8 },
            compressionRate: { name: "compressionRate", ID: 0x0008, type: enums_1.DataType.ENUM8 },
            optionFlags: { name: "optionFlags", ID: 0x0009, type: enums_1.DataType.BITMAP8, write: true, max: 0xff },
            threshold: { name: "threshold", ID: 0x000a, type: enums_1.DataType.UINT8, write: true, max: 0xff },
        },
        commands: {
            establishmentRequest: {
                name: "establishmentRequest",
                ID: 0x00,
                parameters: [
                    /** [3: reserved, 1: compression, 1: codecTypeS3, 1: codecTypeS2, 1: codecTypeS1] */
                    { name: "flag", type: enums_1.DataType.BITMAP8 },
                    { name: "codecType", type: enums_1.DataType.ENUM8 },
                    { name: "sampFreq", type: enums_1.DataType.ENUM8 },
                    { name: "codecRate", type: enums_1.DataType.ENUM8 },
                    { name: "serviceType", type: enums_1.DataType.ENUM8 },
                    { name: "codecTypeS1", type: enums_1.DataType.ENUM8, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "flag", mask: 0b0001 }] },
                    { name: "codecTypeS2", type: enums_1.DataType.ENUM8, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "flag", mask: 0b0010 }] },
                    { name: "codecTypeS3", type: enums_1.DataType.ENUM8, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "flag", mask: 0b0100 }] },
                    { name: "compType", type: enums_1.DataType.ENUM8, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "flag", mask: 0b1000 }] },
                    { name: "compRate", type: enums_1.DataType.ENUM8, conditions: [{ type: enums_1.ParameterCondition.BITMASK_SET, param: "flag", mask: 0b1000 }] },
                ],
                response: 0x00,
                required: true,
            },
            voiceTransmission: { name: "voiceTransmission", ID: 0x00, parameters: [{ name: "voiceData", type: enums_1.DataType.UNKNOWN }], required: true },
            voiceTransmissionCompletion: { name: "voiceTransmissionCompletion", ID: 0x00, parameters: [{ name: "zclHeader", type: enums_1.DataType.UNKNOWN }] },
            controlResponse: { name: "controlResponse", ID: 0x00, parameters: [{ name: "status", type: enums_1.DataType.ENUM8 }] },
        },
        commandsResponse: {
            establishmentRsp: {
                name: "establishmentRsp",
                ID: 0x00,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "codecType", type: enums_1.DataType.ENUM8 },
                ],
                required: true,
            },
            voiceTransmissionRsp: {
                name: "voiceTransmissionRsp",
                ID: 0x01,
                parameters: [
                    { name: "zclHeaderSeqNum", type: enums_1.DataType.UINT8 },
                    { name: "errorFlag", type: enums_1.DataType.ENUM8 },
                ],
                required: true,
            },
            control: { name: "control", ID: 0x02, parameters: [{ name: "controlType", type: enums_1.DataType.ENUM8 }] },
        },
    },
    telecommunicationsChatting: {
        name: "telecommunicationsChatting",
        ID: 0x0905,
        attributes: {
            uID: { name: "uID", ID: 0x0000, type: enums_1.DataType.UINT16, required: true, max: 0xffff },
            nickname: { name: "nickname", ID: 0x0001, type: enums_1.DataType.CHAR_STR, required: true },
            cID: { name: "cID", ID: 0x0010, type: enums_1.DataType.UINT16, required: true, max: 0xffff },
            name: { name: "name", ID: 0x0011, type: enums_1.DataType.CHAR_STR, required: true },
            enableAddChat: { name: "enableAddChat", ID: 0x0012, type: enums_1.DataType.BOOLEAN },
        },
        commands: {
            joinChatReq: {
                name: "joinChatReq",
                ID: 0x00,
                parameters: [
                    { name: "uID", type: enums_1.DataType.UINT16 },
                    { name: "nickname", type: enums_1.DataType.CHAR_STR },
                    { name: "cID", type: enums_1.DataType.UINT16 },
                ],
                response: 0x01,
                required: true,
            },
            leaveChatReq: {
                name: "leaveChatReq",
                ID: 0x01,
                parameters: [
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    { name: "uID", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            searchChatReq: { name: "searchChatReq", ID: 0x02, parameters: [], response: 0x04, required: true },
            switchCharmanRsp: {
                name: "switchCharmanRsp",
                ID: 0x03,
                parameters: [
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    { name: "uID", type: enums_1.DataType.UINT16 },
                ],
            },
            startChatReq: {
                name: "startChatReq",
                ID: 0x04,
                parameters: [
                    { name: "name", type: enums_1.DataType.CHAR_STR },
                    { name: "uID", type: enums_1.DataType.UINT16 },
                    { name: "nickname", type: enums_1.DataType.CHAR_STR },
                ],
                response: 0x00,
            },
            chatMessage: {
                name: "chatMessage",
                ID: 0x05,
                parameters: [
                    { name: "destUID", type: enums_1.DataType.UINT16 },
                    { name: "srcUID", type: enums_1.DataType.UINT16 },
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    { name: "nickname", type: enums_1.DataType.CHAR_STR },
                    { name: "message", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
            getNodeInfoReq: {
                name: "getNodeInfoReq",
                ID: 0x06,
                parameters: [
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    { name: "uID", type: enums_1.DataType.UINT16 },
                ],
                response: 0x08,
            },
        },
        commandsResponse: {
            startChatRsp: {
                name: "startChatRsp",
                ID: 0x00,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "cID", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            joinChatRsp: {
                name: "joinChatRsp",
                ID: 0x01,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    // TODO: need BuffaloZcl read/write
                    // {
                    //     name: "users",
                    //     type: BuffaloZclDataType.LIST_CHAT_NODES,
                    //     conditions: [{type: ParameterCondition.FIELD_EQUAL, field: "status", value: Status.SUCCESS}],
                    // },
                    //   {name: "uId", type: DataType.UINT16},
                    //   {name: "nickname", type: DataType.CHAR_STR},
                ],
                required: true,
            },
            userLeft: {
                name: "userLeft",
                ID: 0x02,
                parameters: [
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    { name: "uID", type: enums_1.DataType.UINT16 },
                    { name: "nickName", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
            userJoined: {
                name: "userJoined",
                ID: 0x03,
                parameters: [
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    { name: "uID", type: enums_1.DataType.UINT16 },
                    { name: "nickName", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
            searchChatRsp: {
                name: "searchChatRsp",
                ID: 0x04,
                parameters: [
                    { name: "options", type: enums_1.DataType.BITMAP8 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "chats", type: BuffaloZclDataType.LIST_CHATS },
                    //   {name: "cID", type: DataType.UINT16},
                    //   {name: "name", type: DataType.CHAR_STR},
                ],
                required: true,
            },
            switchChairmanReq: { name: "switchChairmanReq", ID: 0x05, parameters: [{ name: "cID", type: enums_1.DataType.UINT16 }], required: true },
            switchChairmanConfirm: {
                name: "switchChairmanConfirm",
                ID: 0x06,
                parameters: [
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "nodeInfo", type: BuffaloZclDataType.LIST_CHAT_NODE_INFO},
                    //   {name: "uID", type: DataType.UINT16},
                    //   {name: "address", type: DataType.DATA16},
                    //   {name: "endpoint", type: DataType.UINT8},
                    //   {name: "nickName", type: DataType.CHAR_STR},
                ],
                required: true,
            },
            switchChairmanNotification: {
                name: "switchChairmanNotification",
                ID: 0x07,
                parameters: [
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    { name: "uID", type: enums_1.DataType.UINT16 },
                    { name: "address", type: enums_1.DataType.DATA16 },
                    { name: "endpoint", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            getNodeInfoRsp: {
                name: "getNodeInfoRsp",
                ID: 0x08,
                parameters: [
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "cID", type: enums_1.DataType.UINT16 },
                    { name: "uID", type: enums_1.DataType.UINT16 },
                    { name: "address", type: enums_1.DataType.DATA16 },
                    { name: "endpoint", type: enums_1.DataType.UINT8 },
                    { name: "nickName", type: enums_1.DataType.CHAR_STR },
                ],
                required: true,
            },
        },
    },
    haApplianceIdentification: {
        name: "haApplianceIdentification",
        ID: 0x0b00,
        attributes: {
            basicIdentification: { name: "basicIdentification", ID: 0x0000, type: enums_1.DataType.UINT56, required: true },
            companyName: { name: "companyName", ID: 0x0010, type: enums_1.DataType.CHAR_STR, maxLen: 16 },
            companyId: { name: "companyId", ID: 0x0011, type: enums_1.DataType.UINT16, max: 0xffff },
            brandName: { name: "brandName", ID: 0x0012, type: enums_1.DataType.CHAR_STR, maxLen: 16 },
            brandId: { name: "brandId", ID: 0x0013, type: enums_1.DataType.UINT16, max: 0xffff },
            model: { name: "model", ID: 0x0014, type: enums_1.DataType.OCTET_STR, maxLen: 16 },
            partNumber: { name: "partNumber", ID: 0x0015, type: enums_1.DataType.OCTET_STR, maxLen: 16 },
            productRevision: { name: "productRevision", ID: 0x0016, type: enums_1.DataType.OCTET_STR, maxLen: 6 },
            softwareRevision: { name: "softwareRevision", ID: 0x0017, type: enums_1.DataType.OCTET_STR, maxLen: 6 },
            productTypeName: { name: "productTypeName", ID: 0x0018, type: enums_1.DataType.OCTET_STR, length: 2 },
            productTypeId: { name: "productTypeId", ID: 0x0019, type: enums_1.DataType.UINT16, max: 0xffff },
            cecedSpecificationVersion: { name: "cecedSpecificationVersion", ID: 0x001a, type: enums_1.DataType.UINT8, max: 0xff },
        },
        commands: {},
        commandsResponse: {},
    },
    seMeterIdentification: {
        name: "seMeterIdentification",
        ID: 0x0b01,
        attributes: {
            companyName: { name: "companyName", ID: 0x0000, type: enums_1.DataType.CHAR_STR, required: true, minLen: 0, maxLen: 16 },
            meterTypeId: { name: "meterTypeId", ID: 0x0001, type: enums_1.DataType.UINT16, required: true, max: 0xffff },
            dataQualityId: { name: "dataQualityId", ID: 0x0004, type: enums_1.DataType.UINT16, required: true, max: 0xffff },
            customerName: { name: "customerName", ID: 0x0005, type: enums_1.DataType.CHAR_STR, write: true, minLen: 0, maxLen: 16 },
            model: { name: "model", ID: 0x0006, type: enums_1.DataType.OCTET_STR, minLen: 0, maxLen: 16 },
            partNumber: { name: "partNumber", ID: 0x0007, type: enums_1.DataType.OCTET_STR, minLen: 0, maxLen: 16 },
            productRevision: { name: "productRevision", ID: 0x0008, type: enums_1.DataType.OCTET_STR, minLen: 0, maxLen: 6 },
            softwareRevision: { name: "softwareRevision", ID: 0x000a, type: enums_1.DataType.OCTET_STR, minLen: 0, maxLen: 6 },
            utilityName: { name: "utilityName", ID: 0x000b, type: enums_1.DataType.CHAR_STR, minLen: 0, maxLen: 16 },
            pod: { name: "pod", ID: 0x000c, type: enums_1.DataType.CHAR_STR, required: true, minLen: 0, maxLen: 16 },
            availablePower: { name: "availablePower", ID: 0x000d, type: enums_1.DataType.INT24, required: true, max: 0xffffff },
            powerThreshold: { name: "powerThreshold", ID: 0x000e, type: enums_1.DataType.INT24, required: true, max: 0xffffff },
        },
        commands: {},
        commandsResponse: {},
    },
    haApplianceEventsAlerts: {
        name: "haApplianceEventsAlerts",
        ID: 0x0b02,
        attributes: {},
        commands: {
            getAlerts: { name: "getAlerts", ID: 0x00, parameters: [], required: true },
        },
        commandsResponse: {
            getAlertsRsp: {
                name: "getAlertsRsp",
                ID: 0x00,
                parameters: [
                    { name: "alertscount", type: enums_1.DataType.UINT8 },
                    { name: "aalert", type: enums_1.BuffaloZclDataType.LIST_UINT24 },
                ],
                required: true,
            },
            alertsNotification: {
                name: "alertsNotification",
                ID: 0x01,
                parameters: [
                    { name: "alertscount", type: enums_1.DataType.UINT8 },
                    { name: "aalert", type: enums_1.BuffaloZclDataType.LIST_UINT24 },
                ],
                required: true,
            },
            eventNotification: {
                name: "eventNotification",
                ID: 0x02,
                parameters: [
                    { name: "eventheader", type: enums_1.DataType.UINT8 },
                    { name: "eventid", type: enums_1.DataType.UINT8, max: 0xff },
                ],
                required: true,
            },
        },
    },
    haApplianceStatistics: {
        name: "haApplianceStatistics",
        ID: 0x0b03,
        attributes: {
            logMaxSize: { name: "logMaxSize", ID: 0x0000, type: enums_1.DataType.UINT32, required: true, default: 0x0000003c },
            logQueueMaxSize: { name: "logQueueMaxSize", ID: 0x0001, type: enums_1.DataType.UINT8, required: true, default: 0x01 },
        },
        commands: {
            log: { name: "log", ID: 0x00, parameters: [{ name: "logid", type: enums_1.DataType.UINT32 }], required: true },
            logQueue: { name: "logQueue", ID: 0x01, parameters: [], required: true },
        },
        commandsResponse: {
            logNotification: {
                name: "logNotification",
                ID: 0x00,
                parameters: [
                    { name: "timestamp", type: enums_1.DataType.UTC },
                    { name: "logid", type: enums_1.DataType.UINT32 },
                    { name: "loglength", type: enums_1.DataType.UINT32 },
                    // TODO: LIST_DATA8
                    { name: "logpayload", type: enums_1.BuffaloZclDataType.LIST_UINT8 },
                ],
                required: true,
            },
            logRsp: {
                name: "logRsp",
                ID: 0x01,
                parameters: [
                    { name: "timestamp", type: enums_1.DataType.UTC },
                    { name: "logid", type: enums_1.DataType.UINT32 },
                    { name: "loglength", type: enums_1.DataType.UINT32 },
                    // TODO: LIST_DATA8
                    { name: "logpayload", type: enums_1.BuffaloZclDataType.LIST_UINT8 },
                ],
                required: true,
            },
            logQueueRsp: {
                name: "logQueueRsp",
                ID: 0x02,
                parameters: [
                    { name: "logqueuesize", type: enums_1.DataType.UINT8 },
                    { name: "logid", type: enums_1.BuffaloZclDataType.LIST_UINT32 },
                ],
                required: true,
            },
            statisticsAvailable: {
                name: "statisticsAvailable",
                ID: 0x03,
                parameters: [
                    { name: "logqueuesize", type: enums_1.DataType.UINT8 },
                    { name: "logid", type: enums_1.BuffaloZclDataType.LIST_UINT32 },
                ],
                required: true,
            },
        },
    },
    haElectricalMeasurement: {
        name: "haElectricalMeasurement",
        ID: 0x0b04,
        attributes: {
            measurementType: { name: "measurementType", ID: 0x0000, type: enums_1.DataType.BITMAP32, required: true, max: 0xffffffff, default: 0 },
            dcVoltage: { name: "dcVoltage", ID: 0x0100, type: enums_1.DataType.INT16, report: true, min: -32767 },
            dcVoltageMin: { name: "dcVoltageMin", ID: 0x0101, type: enums_1.DataType.INT16, min: -32767 },
            dcvoltagemax: { name: "dcvoltagemax", ID: 0x0102, type: enums_1.DataType.INT16, min: -32767 },
            dcCurrent: { name: "dcCurrent", ID: 0x0103, type: enums_1.DataType.INT16, report: true, min: -32767 },
            dcCurrentMin: { name: "dcCurrentMin", ID: 0x0104, type: enums_1.DataType.INT16, min: -32767 },
            dcCurrentMax: { name: "dcCurrentMax", ID: 0x0105, type: enums_1.DataType.INT16, min: -32767 },
            dcPower: { name: "dcPower", ID: 0x0106, type: enums_1.DataType.INT16, report: true, min: -32767 },
            dcPowerMin: { name: "dcPowerMin", ID: 0x0107, type: enums_1.DataType.INT16, min: -32767 },
            dcPowerMax: { name: "dcPowerMax", ID: 0x0108, type: enums_1.DataType.INT16, min: -32767 },
            dcVoltageMultiplier: { name: "dcVoltageMultiplier", ID: 0x0200, type: enums_1.DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1 },
            dcVoltageDivisor: { name: "dcVoltageDivisor", ID: 0x0201, type: enums_1.DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1 },
            dcCurrentMultiplier: { name: "dcCurrentMultiplier", ID: 0x0202, type: enums_1.DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1 },
            dcCurrentDivisor: { name: "dcCurrentDivisor", ID: 0x0203, type: enums_1.DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1 },
            dcPowerMultiplier: { name: "dcPowerMultiplier", ID: 0x0204, type: enums_1.DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1 },
            dcPowerDivisor: { name: "dcPowerDivisor", ID: 0x0205, type: enums_1.DataType.UINT16, report: true, min: 1, max: 0xffff, default: 1 },
            acFrequency: { name: "acFrequency", ID: 0x0300, type: enums_1.DataType.UINT16, report: true },
            acFrequencyMin: { name: "acFrequencyMin", ID: 0x0301, type: enums_1.DataType.UINT16 },
            acFrequencyMax: { name: "acFrequencyMax", ID: 0x0302, type: enums_1.DataType.UINT16 },
            neutralCurrent: { name: "neutralCurrent", ID: 0x0303, type: enums_1.DataType.UINT16, report: true },
            totalActivePower: { name: "totalActivePower", ID: 0x0304, type: enums_1.DataType.INT32, report: true, min: -8388607, max: 8388607 },
            totalReactivePower: { name: "totalReactivePower", ID: 0x0305, type: enums_1.DataType.INT32, report: true, min: -8388607, max: 8388607 },
            totalApparentPower: { name: "totalApparentPower", ID: 0x0306, type: enums_1.DataType.UINT32, report: true, max: 0xffffff },
            meas1stHarmonicCurrent: { name: "meas1stHarmonicCurrent", ID: 0x0307, type: enums_1.DataType.INT16, report: true },
            meas3rdHarmonicCurrent: { name: "meas3rdHarmonicCurrent", ID: 0x0308, type: enums_1.DataType.INT16, report: true },
            meas5thHarmonicCurrent: { name: "meas5thHarmonicCurrent", ID: 0x0309, type: enums_1.DataType.INT16, report: true },
            meas7thHarmonicCurrent: { name: "meas7thHarmonicCurrent", ID: 0x030a, type: enums_1.DataType.INT16, report: true },
            meas9thHarmonicCurrent: { name: "meas9thHarmonicCurrent", ID: 0x030b, type: enums_1.DataType.INT16, report: true },
            meas11thHarmonicCurrent: { name: "meas11thHarmonicCurrent", ID: 0x030c, type: enums_1.DataType.INT16, report: true },
            measPhase1stHarmonicCurrent: { name: "measPhase1stHarmonicCurrent", ID: 0x030d, type: enums_1.DataType.INT16, report: true },
            measPhase3rdHarmonicCurrent: { name: "measPhase3rdHarmonicCurrent", ID: 0x030e, type: enums_1.DataType.INT16, report: true },
            measPhase5thHarmonicCurrent: { name: "measPhase5thHarmonicCurrent", ID: 0x030f, type: enums_1.DataType.INT16, report: true },
            measPhase7thHarmonicCurrent: { name: "measPhase7thHarmonicCurrent", ID: 0x0310, type: enums_1.DataType.INT16, report: true },
            measPhase9thHarmonicCurrent: { name: "measPhase9thHarmonicCurrent", ID: 0x0311, type: enums_1.DataType.INT16, report: true },
            measPhase11thHarmonicCurrent: { name: "measPhase11thHarmonicCurrent", ID: 0x0312, type: enums_1.DataType.INT16, report: true },
            acFrequencyMultiplier: { name: "acFrequencyMultiplier", ID: 0x0400, type: enums_1.DataType.UINT16, report: true, min: 1, default: 1 },
            acFrequencyDivisor: { name: "acFrequencyDivisor", ID: 0x0401, type: enums_1.DataType.UINT16, report: true, min: 1, default: 1 },
            powerMultiplier: { name: "powerMultiplier", ID: 0x0402, type: enums_1.DataType.UINT32, report: true, max: 0xffffff, default: 1 },
            powerDivisor: { name: "powerDivisor", ID: 0x0403, type: enums_1.DataType.UINT32, report: true, max: 0xffffff, default: 1 },
            harmonicCurrentMultiplier: { name: "harmonicCurrentMultiplier", ID: 0x0404, type: enums_1.DataType.INT8, report: true, min: -127, default: 0 },
            phaseHarmonicCurrentMultiplier: {
                name: "phaseHarmonicCurrentMultiplier",
                ID: 0x0405,
                type: enums_1.DataType.INT8,
                report: true,
                min: -127,
                default: 0,
            },
            // XXX: does not exist?
            instantaneousVoltage: { name: "instantaneousVoltage", ID: 0x0500, type: enums_1.DataType.INT16 },
            instantaneousLineCurrent: { name: "instantaneousLineCurrent", ID: 0x0501, type: enums_1.DataType.UINT16, report: true },
            instantaneousActiveCurrent: { name: "instantaneousActiveCurrent", ID: 0x0502, type: enums_1.DataType.INT16, report: true },
            instantaneousReactiveCurrent: { name: "instantaneousReactiveCurrent", ID: 0x0503, type: enums_1.DataType.INT16, report: true },
            // XXX: does not exist?
            instantaneousPower: { name: "instantaneousPower", ID: 0x0504, type: enums_1.DataType.INT16 },
            rmsVoltage: { name: "rmsVoltage", ID: 0x0505, type: enums_1.DataType.UINT16, report: true },
            rmsVoltageMin: { name: "rmsVoltageMin", ID: 0x0506, type: enums_1.DataType.UINT16 },
            rmsVoltageMax: { name: "rmsVoltageMax", ID: 0x0507, type: enums_1.DataType.UINT16 },
            rmsCurrent: { name: "rmsCurrent", ID: 0x0508, type: enums_1.DataType.UINT16, report: true },
            rmsCurrentMin: { name: "rmsCurrentMin", ID: 0x0509, type: enums_1.DataType.UINT16 },
            rmsCurrentMax: { name: "rmsCurrentMax", ID: 0x050a, type: enums_1.DataType.UINT16 },
            activePower: { name: "activePower", ID: 0x050b, type: enums_1.DataType.INT16, report: true },
            activePowerMin: { name: "activePowerMin", ID: 0x050c, type: enums_1.DataType.INT16 },
            activePowerMax: { name: "activePowerMax", ID: 0x050d, type: enums_1.DataType.INT16 },
            reactivePower: { name: "reactivePower", ID: 0x050e, type: enums_1.DataType.INT16, report: true },
            apparentPower: { name: "apparentPower", ID: 0x050f, type: enums_1.DataType.UINT16, report: true },
            powerFactor: { name: "powerFactor", ID: 0x0510, type: enums_1.DataType.INT8, min: -100, max: 100, default: 0 },
            averageRmsVoltageMeasPeriod: { name: "averageRmsVoltageMeasPeriod", ID: 0x0511, type: enums_1.DataType.UINT16, write: true, default: 0 },
            averageRmsOverVoltageCounter: { name: "averageRmsOverVoltageCounter", ID: 0x0512, type: enums_1.DataType.UINT16, write: true, default: 0 },
            averageRmsUnderVoltageCounter: { name: "averageRmsUnderVoltageCounter", ID: 0x0513, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsExtremeOverVoltagePeriod: { name: "rmsExtremeOverVoltagePeriod", ID: 0x0514, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsExtremeUnderVoltagePeriod: { name: "rmsExtremeUnderVoltagePeriod", ID: 0x0515, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsVoltageSagPeriod: { name: "rmsVoltageSagPeriod", ID: 0x0516, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsVoltageSwellPeriod: { name: "rmsVoltageSwellPeriod", ID: 0x0517, type: enums_1.DataType.UINT16, write: true, default: 0 },
            acVoltageMultiplier: { name: "acVoltageMultiplier", ID: 0x0600, type: enums_1.DataType.UINT16, report: true, min: 1, default: 1 },
            acVoltageDivisor: { name: "acVoltageDivisor", ID: 0x0601, type: enums_1.DataType.UINT16, report: true, min: 1, default: 1 },
            acCurrentMultiplier: { name: "acCurrentMultiplier", ID: 0x0602, type: enums_1.DataType.UINT16, report: true, min: 1, default: 1 },
            acCurrentDivisor: { name: "acCurrentDivisor", ID: 0x0603, type: enums_1.DataType.UINT16, report: true, min: 1, default: 1 },
            acPowerMultiplier: { name: "acPowerMultiplier", ID: 0x0604, type: enums_1.DataType.UINT16, report: true, min: 1, default: 1 },
            acPowerDivisor: { name: "acPowerDivisor", ID: 0x0605, type: enums_1.DataType.UINT16, report: true, min: 1, default: 1 },
            dcOverloadAlarmsMask: { name: "dcOverloadAlarmsMask", ID: 0x0700, type: enums_1.DataType.BITMAP8, write: true, default: 0 },
            dcVoltageOverload: { name: "dcVoltageOverload", ID: 0x0701, type: enums_1.DataType.INT16 },
            dcCurrentOverload: { name: "dcCurrentOverload", ID: 0x0702, type: enums_1.DataType.INT16 },
            acAlarmsMask: { name: "acAlarmsMask", ID: 0x0800, type: enums_1.DataType.BITMAP16, write: true, default: 0 },
            acVoltageOverload: { name: "acVoltageOverload", ID: 0x0801, type: enums_1.DataType.INT16 },
            acCurrentOverload: { name: "acCurrentOverload", ID: 0x0802, type: enums_1.DataType.INT16 },
            acActivePowerOverload: { name: "acActivePowerOverload", ID: 0x0803, type: enums_1.DataType.INT16 },
            acReactivePowerOverload: { name: "acReactivePowerOverload", ID: 0x0804, type: enums_1.DataType.INT16 },
            averageRmsOverVoltage: { name: "averageRmsOverVoltage", ID: 0x0805, type: enums_1.DataType.INT16 },
            averageRmsUnderVoltage: { name: "averageRmsUnderVoltage", ID: 0x0806, type: enums_1.DataType.INT16 },
            rmsExtremeOverVoltage: { name: "rmsExtremeOverVoltage", ID: 0x0807, type: enums_1.DataType.INT16, write: true },
            rmsExtremeUnderVoltage: { name: "rmsExtremeUnderVoltage", ID: 0x0808, type: enums_1.DataType.INT16, write: true },
            rmsVoltageSag: { name: "rmsVoltageSag", ID: 0x0809, type: enums_1.DataType.INT16, write: true },
            rmsVoltageSwell: { name: "rmsVoltageSwell", ID: 0x080a, type: enums_1.DataType.INT16, write: true },
            lineCurrentPhB: { name: "lineCurrentPhB", ID: 0x0901, type: enums_1.DataType.UINT16, report: true },
            activeCurrentPhB: { name: "activeCurrentPhB", ID: 0x0902, type: enums_1.DataType.INT16, report: true },
            reactiveCurrentPhB: { name: "reactiveCurrentPhB", ID: 0x0903, type: enums_1.DataType.INT16, report: true },
            rmsVoltagePhB: { name: "rmsVoltagePhB", ID: 0x0905, type: enums_1.DataType.UINT16, report: true },
            rmsVoltageMinPhB: { name: "rmsVoltageMinPhB", ID: 0x0906, type: enums_1.DataType.UINT16, default: 32768 },
            rmsVoltageMaxPhB: { name: "rmsVoltageMaxPhB", ID: 0x0907, type: enums_1.DataType.UINT16, default: 32768 },
            rmsCurrentPhB: { name: "rmsCurrentPhB", ID: 0x0908, type: enums_1.DataType.UINT16, report: true },
            rmsCurrentMinPhB: { name: "rmsCurrentMinPhB", ID: 0x0909, type: enums_1.DataType.UINT16 },
            rmsCurrentMaxPhB: { name: "rmsCurrentMaxPhB", ID: 0x090a, type: enums_1.DataType.UINT16 },
            activePowerPhB: { name: "activePowerPhB", ID: 0x090b, type: enums_1.DataType.INT16, report: true },
            activePowerMinPhB: { name: "activePowerMinPhB", ID: 0x090c, type: enums_1.DataType.INT16 },
            activePowerMaxPhB: { name: "activePowerMaxPhB", ID: 0x090d, type: enums_1.DataType.INT16 },
            reactivePowerPhB: { name: "reactivePowerPhB", ID: 0x090e, type: enums_1.DataType.INT16, report: true },
            apparentPowerPhB: { name: "apparentPowerPhB", ID: 0x090f, type: enums_1.DataType.UINT16, report: true },
            powerFactorPhB: { name: "powerFactorPhB", ID: 0x0910, type: enums_1.DataType.INT8, min: -100, max: 100, default: 0 },
            averageRmsVoltageMeasurePeriodPhB: {
                name: "averageRmsVoltageMeasurePeriodPhB",
                ID: 0x0911,
                type: enums_1.DataType.UINT16,
                write: true,
                default: 0,
            },
            averageRmsOverVoltageCounterPhB: { name: "averageRmsOverVoltageCounterPhB", ID: 0x0912, type: enums_1.DataType.UINT16, write: true, default: 0 },
            averageUnderVoltageCounterPhB: { name: "averageUnderVoltageCounterPhB", ID: 0x0913, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsExtremeOverVoltagePeriodPhB: { name: "rmsExtremeOverVoltagePeriodPhB", ID: 0x0914, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsExtremeUnderVoltagePeriodPhB: { name: "rmsExtremeUnderVoltagePeriodPhB", ID: 0x0915, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsVoltageSagPeriodPhB: { name: "rmsVoltageSagPeriodPhB", ID: 0x0916, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsVoltageSwellPeriodPhB: { name: "rmsVoltageSwellPeriodPhB", ID: 0x0917, type: enums_1.DataType.UINT16, write: true, default: 0 },
            lineCurrentPhC: { name: "lineCurrentPhC", ID: 0x0a01, type: enums_1.DataType.UINT16, report: true },
            activeCurrentPhC: { name: "activeCurrentPhC", ID: 0x0a02, type: enums_1.DataType.INT16, report: true },
            reactiveCurrentPhC: { name: "reactiveCurrentPhC", ID: 0x0a03, type: enums_1.DataType.INT16, report: true },
            rmsVoltagePhC: { name: "rmsVoltagePhC", ID: 0x0a05, type: enums_1.DataType.UINT16, report: true },
            rmsVoltageMinPhC: { name: "rmsVoltageMinPhC", ID: 0x0a06, type: enums_1.DataType.UINT16, default: 32768 },
            rmsVoltageMaxPhC: { name: "rmsVoltageMaxPhC", ID: 0x0a07, type: enums_1.DataType.UINT16, default: 32768 },
            rmsCurrentPhC: { name: "rmsCurrentPhC", ID: 0x0a08, type: enums_1.DataType.UINT16, report: true },
            rmsCurrentMinPhC: { name: "rmsCurrentMinPhC", ID: 0x0a09, type: enums_1.DataType.UINT16 },
            rmsCurrentMaxPhC: { name: "rmsCurrentMaxPhC", ID: 0x0a0a, type: enums_1.DataType.UINT16 },
            activePowerPhC: { name: "activePowerPhC", ID: 0x0a0b, type: enums_1.DataType.INT16, report: true },
            activePowerMinPhC: { name: "activePowerMinPhC", ID: 0x0a0c, type: enums_1.DataType.INT16 },
            activePowerMaxPhC: { name: "activePowerMaxPhC", ID: 0x0a0d, type: enums_1.DataType.INT16 },
            reactivePowerPhC: { name: "reactivePowerPhC", ID: 0x0a0e, type: enums_1.DataType.INT16, report: true },
            apparentPowerPhC: { name: "apparentPowerPhC", ID: 0x0a0f, type: enums_1.DataType.UINT16, report: true },
            powerFactorPhC: { name: "powerFactorPhC", ID: 0x0a10, type: enums_1.DataType.INT8, min: -100, max: 100, default: 0 },
            averageRmsVoltageMeasPeriodPhC: { name: "averageRmsVoltageMeasPeriodPhC", ID: 0x0a11, type: enums_1.DataType.UINT16, write: true, default: 0 },
            averageRmsOverVoltageCounterPhC: { name: "averageRmsOverVoltageCounterPhC", ID: 0x0a12, type: enums_1.DataType.UINT16, write: true, default: 0 },
            averageUnderVoltageCounterPhC: { name: "averageUnderVoltageCounterPhC", ID: 0x0a13, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsExtremeOverVoltagePeriodPhC: { name: "rmsExtremeOverVoltagePeriodPhC", ID: 0x0a14, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsExtremeUnderVoltagePeriodPhC: { name: "rmsExtremeUnderVoltagePeriodPhC", ID: 0x0a15, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsVoltageSagPeriodPhC: { name: "rmsVoltageSagPeriodPhC", ID: 0x0a16, type: enums_1.DataType.UINT16, write: true, default: 0 },
            rmsVoltageSwellPeriodPhC: { name: "rmsVoltageSwellPeriodPhC", ID: 0x0a17, type: enums_1.DataType.UINT16, write: true, default: 0 },
        },
        commands: {
            getProfileInfo: { name: "getProfileInfo", ID: 0x00, parameters: [] },
            getMeasurementProfile: {
                name: "getMeasurementProfile",
                ID: 0x01,
                parameters: [
                    { name: "attrId", type: enums_1.DataType.ATTR_ID },
                    { name: "starttime", type: enums_1.DataType.UTC },
                    { name: "numofuntervals", type: enums_1.DataType.UINT8 },
                ],
            },
        },
        commandsResponse: {
            getProfileInfoRsp: {
                name: "getProfileInfoRsp",
                ID: 0x00,
                parameters: [
                    { name: "profilecount", type: enums_1.DataType.UINT8 },
                    { name: "profileintervalperiod", type: enums_1.DataType.ENUM8 },
                    { name: "maxnumofintervals", type: enums_1.DataType.UINT8 },
                    // TODO invalid, no `numofattrs` present?
                    { name: "numofattrs", type: enums_1.DataType.UINT8 },
                    { name: "listofattr", type: enums_1.BuffaloZclDataType.LIST_UINT16 },
                ],
            },
            getMeasurementProfileRsp: {
                name: "getMeasurementProfileRsp",
                ID: 0x01,
                parameters: [
                    { name: "starttime", type: enums_1.DataType.UTC },
                    { name: "status", type: enums_1.DataType.ENUM8 },
                    { name: "profileintervalperiod", type: enums_1.DataType.ENUM8 },
                    { name: "numofintervalsdeliv", type: enums_1.DataType.UINT8 },
                    { name: "attrId", type: enums_1.DataType.ATTR_ID },
                    // content depends on the type of information requested using the `attrId` field in the `getMeasurementProfile` command
                    // invalid intervals should be marked as 0xffff
                    { name: "intervals", type: enums_1.BuffaloZclDataType.BUFFER },
                ],
            },
        },
    },
    haDiagnostic: {
        name: "haDiagnostic",
        ID: 0x0b05,
        attributes: {
            numberOfResets: { name: "numberOfResets", ID: 0x0000, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            persistentMemoryWrites: { name: "persistentMemoryWrites", ID: 0x0001, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            macRxBcast: { name: "macRxBcast", ID: 0x0100, type: enums_1.DataType.UINT32, max: 0xffffffff, default: 0 },
            macTxBcast: { name: "macTxBcast", ID: 0x0101, type: enums_1.DataType.UINT32, max: 0xffffffff, default: 0 },
            macRxUcast: { name: "macRxUcast", ID: 0x0102, type: enums_1.DataType.UINT32, max: 0xffffffff, default: 0 },
            macTxUcast: { name: "macTxUcast", ID: 0x0103, type: enums_1.DataType.UINT32, max: 0xffffffff, default: 0 },
            macTxUcastRetry: { name: "macTxUcastRetry", ID: 0x0104, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            macTxUcastFail: { name: "macTxUcastFail", ID: 0x0105, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            aPSRxBcast: { name: "aPSRxBcast", ID: 0x0106, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            aPSTxBcast: { name: "aPSTxBcast", ID: 0x0107, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            aPSRxUcast: { name: "aPSRxUcast", ID: 0x0108, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            aPSTxUcastSuccess: { name: "aPSTxUcastSuccess", ID: 0x0109, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            aPSTxUcastRetry: { name: "aPSTxUcastRetry", ID: 0x010a, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            aPSTxUcastFail: { name: "aPSTxUcastFail", ID: 0x010b, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            routeDiscInitiated: { name: "routeDiscInitiated", ID: 0x010c, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            neighborAdded: { name: "neighborAdded", ID: 0x010d, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            neighborRemoved: { name: "neighborRemoved", ID: 0x010e, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            neighborStale: { name: "neighborStale", ID: 0x010f, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            joinIndication: { name: "joinIndication", ID: 0x0110, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            childMoved: { name: "childMoved", ID: 0x0111, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            nwkFcFailure: { name: "nwkFcFailure", ID: 0x0112, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            apsFcFailure: { name: "apsFcFailure", ID: 0x0113, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            apsUnauthorizedKey: { name: "apsUnauthorizedKey", ID: 0x0114, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            nwkDecryptFailures: { name: "nwkDecryptFailures", ID: 0x0115, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            apsDecryptFailures: { name: "apsDecryptFailures", ID: 0x0116, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            packetBufferAllocateFailures: { name: "packetBufferAllocateFailures", ID: 0x0117, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            relayedUcast: { name: "relayedUcast", ID: 0x0118, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            phyToMacQueueLimitReached: { name: "phyToMacQueueLimitReached", ID: 0x0119, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            packetValidateDropCount: { name: "packetValidateDropCount", ID: 0x011a, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            averageMacRetryPerApsMessageSent: { name: "averageMacRetryPerApsMessageSent", ID: 0x011b, type: enums_1.DataType.UINT16, max: 0xffff, default: 0 },
            lastMessageLqi: { name: "lastMessageLqi", ID: 0x011c, type: enums_1.DataType.UINT8, max: 0xff, default: 0 },
            lastMessageRssi: { name: "lastMessageRssi", ID: 0x011d, type: enums_1.DataType.INT8, min: -127, max: 127, default: 0 },
        },
        commands: {},
        commandsResponse: {},
    },
    touchlink: {
        name: "touchlink",
        ID: 0x1000,
        attributes: {},
        commands: {
            scanRequest: {
                name: "scanRequest",
                ID: 0x00,
                response: 0x01,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    { name: "zigbeeInformation", type: enums_1.DataType.BITMAP8 },
                    { name: "touchlinkInformation", type: enums_1.DataType.BITMAP8 },
                ],
                required: true,
            },
            deviceInformation: {
                name: "deviceInformation",
                ID: 0x02,
                response: 0x03,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    { name: "startIndex", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            identifyRequest: {
                name: "identifyRequest",
                ID: 0x06,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    {
                        name: "duration",
                        type: enums_1.DataType.UINT16,
                        max: 0xffff,
                        special: [
                            ["ExitIdentifyMode", "0000"],
                            ["IdentifyForReceiverKnownTime", "ffff"],
                        ],
                    },
                ],
                required: true,
            },
            resetToFactoryNew: {
                name: "resetToFactoryNew",
                ID: 0x07,
                parameters: [{ name: "transactionID", type: enums_1.DataType.UINT32, min: 1 }],
                required: true,
            },
            networkStart: {
                name: "networkStart",
                ID: 0x10,
                response: 0x11,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    { name: "extendedPANID", type: enums_1.DataType.IEEE_ADDR },
                    { name: "keyIndex", type: enums_1.DataType.UINT8, max: 0x0f },
                    { name: "encryptedNetworkKey", type: enums_1.DataType.SEC_KEY },
                    { name: "logicalChannel", type: enums_1.DataType.UINT8 },
                    { name: "panID", type: enums_1.DataType.UINT16, max: 0xfffe },
                    { name: "nwkAddr", type: enums_1.DataType.UINT16, min: 0x0001, max: 0xfff7 },
                    { name: "groupIDsBegin", type: enums_1.DataType.UINT16 },
                    { name: "groupIDsEnd", type: enums_1.DataType.UINT16 },
                    { name: "freeNwkAddrRangeBegin", type: enums_1.DataType.UINT16 },
                    { name: "freeNwkAddrRangeEnd", type: enums_1.DataType.UINT16 },
                    { name: "freeGroupIDRangeBegin", type: enums_1.DataType.UINT16 },
                    { name: "freeGroupIDRangeEnd", type: enums_1.DataType.UINT16 },
                    { name: "initiatorIEEE", type: enums_1.DataType.IEEE_ADDR },
                    { name: "initiatorNwkAddr", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            networkJoinRouter: {
                name: "networkJoinRouter",
                ID: 0x12,
                response: 0x13,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    { name: "extendedPANID", type: enums_1.DataType.IEEE_ADDR },
                    { name: "keyIndex", type: enums_1.DataType.UINT8, max: 0x0f },
                    { name: "encryptedNetworkKey", type: enums_1.DataType.SEC_KEY },
                    { name: "networkUpdateID", type: enums_1.DataType.UINT8 },
                    { name: "logicalChannel", type: enums_1.DataType.UINT8 },
                    { name: "panID", type: enums_1.DataType.UINT16, min: 0x0001, max: 0xfffe },
                    { name: "nwkAddr", type: enums_1.DataType.UINT16, min: 0x0001, max: 0xfff7 },
                    { name: "groupIDsBegin", type: enums_1.DataType.UINT16 },
                    { name: "groupIDsEnd", type: enums_1.DataType.UINT16 },
                    { name: "freeNwkAddrRangeBegin", type: enums_1.DataType.UINT16 },
                    { name: "freeNwkAddrRangeEnd", type: enums_1.DataType.UINT16 },
                    { name: "freeGroupIDRangeBegin", type: enums_1.DataType.UINT16 },
                    { name: "freeGroupIDRangeEnd", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            networkJoinEndDevice: {
                name: "networkJoinEndDevice",
                ID: 0x14,
                response: 0x15,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    { name: "extendedPANID", type: enums_1.DataType.IEEE_ADDR },
                    { name: "keyIndex", type: enums_1.DataType.UINT8, max: 0x0f },
                    { name: "encryptedNetworkKey", type: enums_1.DataType.SEC_KEY },
                    { name: "networkUpdateID", type: enums_1.DataType.UINT8 },
                    { name: "logicalChannel", type: enums_1.DataType.UINT8 },
                    { name: "panID", type: enums_1.DataType.UINT16, min: 0x0001, max: 0xfffe },
                    { name: "nwkAddr", type: enums_1.DataType.UINT16, min: 0x0001, max: 0xfff7 },
                    { name: "groupIDsBegin", type: enums_1.DataType.UINT16 },
                    { name: "groupIDsEnd", type: enums_1.DataType.UINT16 },
                    { name: "freeNwkAddrRangeBegin", type: enums_1.DataType.UINT16 },
                    { name: "freeNwkAddrRangeEnd", type: enums_1.DataType.UINT16 },
                    { name: "freeGroupIDRangeBegin", type: enums_1.DataType.UINT16 },
                    { name: "freeGroupIDRangeEnd", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            networkUpdate: {
                name: "networkUpdate",
                ID: 0x16,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    { name: "extendedPANID", type: enums_1.DataType.IEEE_ADDR },
                    { name: "networkUpdateID", type: enums_1.DataType.UINT8 },
                    { name: "logicalChannel", type: enums_1.DataType.UINT8 },
                    { name: "panID", type: enums_1.DataType.UINT16, min: 0x0001, max: 0xfffe },
                    { name: "nwkAddr", type: enums_1.DataType.UINT16, min: 0x0001, max: 0xfff7 },
                ],
                required: true,
            },
            getGroupIdentifiers: { name: "getGroupIdentifiers", ID: 0x41, response: 0x41, parameters: [{ name: "startIndex", type: enums_1.DataType.UINT8 }] },
            getEndpointList: { name: "getEndpointList", ID: 0x42, response: 0x42, parameters: [{ name: "startIndex", type: enums_1.DataType.UINT8 }] },
        },
        commandsResponse: {
            scanResponse: {
                name: "scanResponse",
                ID: 0x01,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    { name: "rssiCorrection", type: enums_1.DataType.UINT8, min: 0, max: 20 },
                    { name: "zigbeeInformation", type: enums_1.DataType.BITMAP8 },
                    { name: "touchlinkInformation", type: enums_1.DataType.BITMAP8 },
                    { name: "keyBitmask", type: enums_1.DataType.BITMAP16 },
                    { name: "responseID", type: enums_1.DataType.UINT32 },
                    { name: "extendedPanID", type: enums_1.DataType.IEEE_ADDR },
                    { name: "networkUpdateID", type: enums_1.DataType.UINT8 },
                    { name: "logicalChannel", type: enums_1.DataType.UINT8 },
                    { name: "panID", type: enums_1.DataType.UINT16 },
                    { name: "networkAddress", type: enums_1.DataType.UINT16, min: 0x0001, max: 0xfff7 },
                    { name: "numberOfSubDevices", type: enums_1.DataType.UINT8 },
                    { name: "totalGroupIdentifiers", type: enums_1.DataType.UINT8 },
                    {
                        name: "endpointID",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "numberOfSubDevices", value: 1 }],
                    },
                    {
                        name: "profileID",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "numberOfSubDevices", value: 1 }],
                    },
                    {
                        name: "deviceID",
                        type: enums_1.DataType.UINT16,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "numberOfSubDevices", value: 1 }],
                    },
                    {
                        name: "version",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "numberOfSubDevices", value: 1 }],
                    },
                    {
                        name: "groupIDCount",
                        type: enums_1.DataType.UINT8,
                        conditions: [{ type: enums_1.ParameterCondition.FIELD_EQUAL, field: "numberOfSubDevices", value: 1 }],
                    },
                ],
                required: true,
            },
            deviceInformation: {
                name: "deviceInformation",
                ID: 0x03,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    { name: "numberOfSubDevices", type: enums_1.DataType.UINT8 },
                    { name: "startIndex", type: enums_1.DataType.UINT8 },
                    { name: "deviceInfoCount", type: enums_1.DataType.UINT8, max: 5 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "deviceInfoRecords", type: BuffaloZclDataType.LIST_TOUCHLINK_DEVICE_INFO},
                    //   {name: "ieeeAddress", type: DataType.IEEE_ADDR},
                    //   {name: "endpointID", type: DataType.UINT8},
                    //   {name: "profileID", type: DataType.UINT16},
                    //   {name: "deviceID", type: DataType.UINT16},
                    //   {name: "version", type: DataType.UINT8},
                    //   {name: "groupIdCount", type: DataType.UINT8},
                    //   {name: "sort", type: DataType.UINT8},
                ],
                required: true,
            },
            networkStart: {
                name: "networkStart",
                ID: 0x11,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    /** 0x00 Success, 0x01 Failure, 0x02 – 0xff Reserved */
                    { name: "status", type: enums_1.DataType.UINT8 },
                    { name: "extendedPANID", type: enums_1.DataType.IEEE_ADDR },
                    { name: "networkUpdateID", type: enums_1.DataType.UINT8 },
                    { name: "logicalChannel", type: enums_1.DataType.UINT8 },
                    { name: "panID", type: enums_1.DataType.UINT16 },
                ],
                required: true,
            },
            networkJoinRouter: {
                name: "networkJoinRouter",
                ID: 0x13,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    /** 0x00 Success, 0x01 Failure, 0x02 – 0xff Reserved */
                    { name: "status", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            networkJoinEndDevice: {
                name: "networkJoinEndDevice",
                ID: 0x15,
                parameters: [
                    { name: "transactionID", type: enums_1.DataType.UINT32, min: 1 },
                    /** 0x00 Success, 0x01 Failure, 0x02 – 0xff Reserved */
                    { name: "status", type: enums_1.DataType.UINT8 },
                ],
                required: true,
            },
            endpointInformation: {
                name: "endpointInformation",
                ID: 0x40,
                parameters: [
                    { name: "ieeeAddress", type: enums_1.DataType.IEEE_ADDR },
                    { name: "networkAddress", type: enums_1.DataType.UINT16 },
                    { name: "endpointID", type: enums_1.DataType.UINT8 },
                    { name: "profileID", type: enums_1.DataType.UINT16 },
                    { name: "deviceID", type: enums_1.DataType.UINT16 },
                    { name: "version", type: enums_1.DataType.UINT8 },
                ],
            },
            getGroupIdentifiers: {
                name: "getGroupIdentifiers",
                ID: 0x41,
                parameters: [
                    { name: "total", type: enums_1.DataType.UINT8 },
                    { name: "startIndex", type: enums_1.DataType.UINT8 },
                    { name: "count", type: enums_1.DataType.UINT8 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "groupInfoRecords", type: BuffaloZclDataType.LIST_TOUCHLINK_GROUP_INFO},
                    //   {name: "id", type: DataType.UINT16},
                    //   {name: "type", type: DataType.UINT8},
                ],
                // required: true only if request supported
            },
            getEndpointList: {
                name: "getEndpointList",
                ID: 0x42,
                parameters: [
                    { name: "total", type: enums_1.DataType.UINT8 },
                    { name: "startIndex", type: enums_1.DataType.UINT8 },
                    { name: "count", type: enums_1.DataType.UINT8 },
                    // TODO: need BuffaloZcl read/write
                    // {name: "endpointInfoRecords", type: BuffaloZclDataType.LIST_TOUCHLINK_ENDPOINT_INFO},
                    //   {name: "networkAddress", type: DataType.UINT16},
                    //   {name: "endpointID", type: DataType.UINT8},
                    //   {name: "profileID", type: DataType.UINT16},
                    //   {name: "deviceID", type: DataType.UINT16},
                    //   {name: "version", type: DataType.UINT8},
                ],
                // required: true only if request supported
            },
        },
    },
    /**
     * Tuya cluster
     *
     * Common parameters:
     *
     *  seq -  Sequence number of transmitted data, range 0-65535, revert to 0 after reaching 65535
     *
     * Official Tuya documentation: https://developer.tuya.com/en/docs/iot-device-dev/tuya-zigbee-universal-docking-access-standard?id=K9ik6zvofpzql#subtitle-6-Private%20cluster
     *
     */
    manuSpecificTuya: {
        name: "manuSpecificTuya",
        ID: 0xef00, // 61184
        attributes: {},
        commands: {
            /**
             * Gateway-side data request
             */
            dataRequest: {
                name: "dataRequest",
                ID: 0x00,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "dpValues", type: enums_1.BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES },
                ],
            },
            /**
             * GW send, trigger MCU side to report all current information, no zcl payload.
             * Note: Device side can make a policy, data better not to report centrally
             */
            dataQuery: { name: "dataQuery", ID: 0x03, parameters: [] },
            /**
             * Gw->Zigbee gateway query MCU version
             */
            mcuVersionRequest: { name: "mcuVersionRequest", ID: 0x10, parameters: [{ name: "seq", type: enums_1.DataType.UINT16, max: 0xffff }] },
            /**
             * FIXME: This command is not listed in Tuya zigbee cluster description,
             *  but there is some command 0x04 (description is: Command Issuance)
             *  in `Serial command list` section of the same document
             *  So, need to investigate more information about it
             */
            sendData: {
                name: "sendData",
                ID: 0x04,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "dpValues", type: enums_1.BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES },
                ],
            },
            /**
             * Gw->Zigbee gateway notifies MCU of upgrade
             */
            mcuOtaNotify: {
                name: "mcuOtaNotify",
                ID: 0x12,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    // FIXME: key is fixed (8 byte) uint8 array
                    //  Ask Koen is there any type to read fixed size uint_8t.
                    //  currently there is `length` property in options but sems it is
                    //  ignored in `writePayloadCluster()` and other methods.
                    //  So, as workaround we use hi/low for key, which is not best solution
                    { name: "key_hi", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "key_lo", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "version", type: enums_1.DataType.UINT8, max: 0xff },
                    { name: "imageSize", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "crc", type: enums_1.DataType.UINT32, max: 0xffffffff },
                ],
            },
            /**
             * Gw->Zigbee gateway returns the requested upgrade package for MCU
             */
            mcuOtaBlockDataResponse: {
                name: "mcuOtaBlockDataResponse",
                ID: 0x14,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "status", type: enums_1.DataType.UINT8, max: 0xff },
                    { name: "key_hi", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "key_lo", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "version", type: enums_1.DataType.UINT8, max: 0xff },
                    { name: "offset", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "imageData", type: enums_1.BuffaloZclDataType.LIST_UINT8 },
                ],
            },
            /**
             * Time synchronization (bidirectional)
             */
            mcuSyncTime: {
                name: "mcuSyncTime",
                ID: 0x24,
                parameters: [
                    { name: "payloadSize", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "payload", type: enums_1.BuffaloZclDataType.LIST_UINT8 },
                ],
            },
            /**
             * Gateway connection status (bidirectional)
             */
            mcuGatewayConnectionStatus: {
                name: "mcuGatewayConnectionStatus",
                ID: 0x25,
                parameters: [
                    { name: "payloadSize", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "payload", type: enums_1.DataType.UINT8, max: 0xff },
                ],
            },
            /**
             * Weather forecast synchronization (check requestWeatherInformation)
             */
            tuyaWeatherSync: { name: "tuyaWeatherSync", ID: 0x61, parameters: [{ name: "payload", type: enums_1.BuffaloZclDataType.BUFFER }] },
        },
        commandsResponse: {
            /**
             * Reply to MCU-side data request
             */
            dataResponse: {
                name: "dataResponse",
                ID: 0x01,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "dpValues", type: enums_1.BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES },
                ],
            },
            /**
             * MCU-side data active upload (bidirectional)
             */
            dataReport: {
                name: "dataReport",
                ID: 0x02,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "dpValues", type: enums_1.BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES },
                ],
            },
            /**
             * FIXME: This command is not listed in Tuya zigbee cluster description,
             *  but there is some command 0x05 (description is: Status query)
             *  in `Serial command list` section of the same document
             *  So, need to investigate more information about it
             */
            activeStatusReportAlt: {
                name: "activeStatusReportAlt",
                ID: 0x05,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "dpValues", type: enums_1.BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES },
                ],
            },
            /**
             * FIXME: This command is not listed in Tuya zigbee cluster description,
             *  but there is some command 0x06 (description is: Status query)
             *  in `Serial command list` section of the same document
             *  So, need to investigate more information about it
             */
            activeStatusReport: {
                name: "activeStatusReport",
                ID: 0x06,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "dpValues", type: enums_1.BuffaloZclDataType.LIST_TUYA_DATAPOINT_VALUES },
                ],
            },
            /**
             * Zigbee->Gw MCU return version or actively report version
             */
            mcuVersionResponse: {
                name: "mcuVersionResponse",
                ID: 0x11,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "version", type: enums_1.DataType.UINT8, max: 0xff },
                ],
            },
            /**
             * Zigbee->Gw requests an upgrade package for the MCU
             */
            mcuOtaBlockDataRequest: {
                name: "mcuOtaBlockDataRequest",
                ID: 0x13,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "key_hi", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "key_lo", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "version", type: enums_1.DataType.UINT8, max: 0xff },
                    { name: "offset", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "size", type: enums_1.DataType.UINT32, max: 0xffffffff },
                ],
            },
            /**
             * Zigbee->Gw returns the upgrade result for the mcu
             */
            mcuOtaResult: {
                name: "mcuOtaResult",
                ID: 0x15,
                parameters: [
                    { name: "seq", type: enums_1.DataType.UINT16, max: 0xffff },
                    { name: "status", type: enums_1.DataType.UINT8, max: 0xff },
                    { name: "key_hi", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "key_lo", type: enums_1.DataType.UINT32, max: 0xffffffff },
                    { name: "version", type: enums_1.DataType.UINT8, max: 0xff },
                ],
            },
            /**
             * Time synchronization (bidirectional)
             */
            mcuSyncTime: { name: "mcuSyncTime", ID: 0x24, parameters: [{ name: "payloadSize", type: enums_1.DataType.UINT16, max: 0xffff }] },
            /**
             * Gateway connection status (bidirectional)
             */
            mcuGatewayConnectionStatus: {
                name: "mcuGatewayConnectionStatus",
                ID: 0x25,
                parameters: [{ name: "payloadSize", type: enums_1.DataType.UINT16, max: 0xffff }],
            },
            /**
             * Device can request weather forecast information and expects response respecting given parameters.
             * This command ID seem to be device speciffic, because there is simmilar structure documented in Tuya Serial Communication Protocol,
             * but with different ID (0x3a and 0x3b respectively). In this case, I'm not sure if the name should reflect the one from
             * docs or be also speciffic (providing space for the implementation of the correct one in the future)?
             *
             */
            tuyaWeatherRequest: { name: "tuyaWeatherRequest", ID: 0x60, parameters: [{ name: "payload", type: enums_1.BuffaloZclDataType.BUFFER }] },
        },
    },
    manuSpecificAmazonWWAH: {
        name: "manuSpecificAmazonWWAH",
        ID: 0xfc57,
        manufacturerCode: manufacturerCode_1.ManufacturerCode.AMAZON_LAB126,
        attributes: {
            disableOTADowngrades: { name: "disableOTADowngrades", ID: 0x0002, type: enums_1.DataType.BOOLEAN, write: true },
            mgmtLeaveWithoutRejoinEnabled: { name: "mgmtLeaveWithoutRejoinEnabled", ID: 0x0003, type: enums_1.DataType.BOOLEAN, write: true },
            nwkRetryCount: { name: "nwkRetryCount", ID: 0x0004, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            macRetryCount: { name: "macRetryCount", ID: 0x0005, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            routerCheckInEnabled: { name: "routerCheckInEnabled", ID: 0x0006, type: enums_1.DataType.BOOLEAN, write: true },
            touchlinkInterpanEnabled: { name: "touchlinkInterpanEnabled", ID: 0x0007, type: enums_1.DataType.BOOLEAN, write: true },
            wwahParentClassificationEnabled: { name: "wwahParentClassificationEnabled", ID: 0x0008, type: enums_1.DataType.BOOLEAN, write: true },
            wwahAppEventRetryEnabled: { name: "wwahAppEventRetryEnabled", ID: 0x0009, type: enums_1.DataType.BOOLEAN, write: true },
            wwahAppEventRetryQueueSize: { name: "wwahAppEventRetryQueueSize", ID: 0x000a, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            wwahRejoinEnabled: { name: "wwahRejoinEnabled", ID: 0x000b, type: enums_1.DataType.BOOLEAN, write: true },
            macPollFailureWaitTime: { name: "macPollFailureWaitTime", ID: 0x000c, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            configurationModeEnabled: { name: "configurationModeEnabled", ID: 0x000d, type: enums_1.DataType.BOOLEAN, write: true },
            currentDebugReportID: { name: "currentDebugReportID", ID: 0x000e, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            tcSecurityOnNwkKeyRotationEnabled: { name: "tcSecurityOnNwkKeyRotationEnabled", ID: 0x000f, type: enums_1.DataType.BOOLEAN, write: true },
            wwahBadParentRecoveryEnabled: { name: "wwahBadParentRecoveryEnabled", ID: 0x0010, type: enums_1.DataType.BOOLEAN, write: true },
            pendingNetworkUpdateChannel: { name: "pendingNetworkUpdateChannel", ID: 0x0011, type: enums_1.DataType.UINT8, write: true, max: 0xff },
            pendingNetworkUpdatePANID: { name: "pendingNetworkUpdatePANID", ID: 0x0012, type: enums_1.DataType.UINT16, write: true, max: 0xffff },
            otaMaxOfflineDuration: { name: "otaMaxOfflineDuration", ID: 0x0013, type: enums_1.DataType.UINT16, write: true, max: 0xffff },
            clusterRevision: { name: "clusterRevision", ID: 0xfffd, type: enums_1.DataType.UINT16, write: true, max: 0xffff },
        },
        commands: {
            clearBindingTable: { name: "clearBindingTable", ID: 0x0a, parameters: [] },
        },
        commandsResponse: {},
    },
};
//# sourceMappingURL=cluster.js.map