diff --git a/server/services/zwavejs-ui/lib/constants.js b/server/services/zwavejs-ui/lib/constants.js index 0131b1b352..de46954b6a 100644 --- a/server/services/zwavejs-ui/lib/constants.js +++ b/server/services/zwavejs-ui/lib/constants.js @@ -3,6 +3,7 @@ const { DEVICE_FEATURE_TYPES, OPENING_SENSOR_STATE, STATE, + COVER_STATE, DEVICE_FEATURE_UNITS, } = require('../../../utils/constants'); @@ -16,65 +17,240 @@ const PARAMS = { LOCATION: `location`, }; +const multilevelSwitchCurtainsStateDefault = { + currentvalue: [ + { + feature_name: 'position', + converter: (val) => val, + }, + ], +}; + /** * Convert a zWave value format to the * Gladys format. */ const STATES = { binary_switch: { - currentvalue: (val) => { - switch (val) { - case false: - return STATE.OFF; - case true: - return STATE.ON; - default: - return null; - } - }, + currentvalue: [ + { + converter: (val) => { + switch (val) { + case false: + return STATE.OFF; + case true: + return STATE.ON; + default: + return null; + } + }, + }, + ], }, multilevel_sensor: { - air_temperature: (val) => val, - power: (val) => val, + air_temperature: [{ converter: (val) => val }], + power: [{ converter: (val) => val }], + }, + multilevel_switch: { + currentvalue: [ + { + feature_name: 'position', + converter: (val) => val, + }, + { + feature_name: 'state', + converter: (val) => (val > 0 ? STATE.ON : STATE.OFF), + }, + { + property_name: 'restoreprevious', + converter: (val) => (val > 0 ? STATE.ON : STATE.OFF), + }, + ], + '17-5': multilevelSwitchCurtainsStateDefault, + '17-6': multilevelSwitchCurtainsStateDefault, + '17-7': multilevelSwitchCurtainsStateDefault, }, notification: { access_control: { - door_state_simple: (val) => { - switch (val) { - case 22: - return OPENING_SENSOR_STATE.OPEN; - case 23: - return OPENING_SENSOR_STATE.CLOSE; - default: - return null; - } - }, + door_state_simple: [ + { + converter: (val) => { + switch (val) { + case 22: + return OPENING_SENSOR_STATE.OPEN; + case 23: + return OPENING_SENSOR_STATE.CLOSE; + default: + return null; + } + }, + }, + ], }, }, }; +/** + * @description Build a command action. + * @param {string} name - Command name. + * @param {any[]} value - Value to send to the command. + * @param {Array|null} stateUpdate - State synchronization. + * @returns {object} Action to perform. + * @example buildCommandAction('stopLevelChange', []); + */ +function buildCommandAction(name, value, stateUpdate = null) { + return { + isCommand: true, + name, + value, + stateUpdate: stateUpdate || [], + }; +} + +/** + * @description Build a writeValue action. + * @param {string} property - Property name. + * @param {any} value - Value to write. + * @param {Array|null} stateUpdate - State synchronization. + * @returns {object} Action to perform. + * @example buildWriteValueAction('targetValue', 99, [{property_name: 'position', feature_name: 'position', value: 99}]) + */ +function buildWriteValueAction(property, value, stateUpdate = null) { + return { + isCommand: false, + name: property, + value, + stateUpdate: stateUpdate || [], + }; +} +const multilevelSwitchCurtainsActionsDefault = { + currentvalue: { + state: (value, _nodeContext) => { + if (value === COVER_STATE.STOP) { + return buildCommandAction('stopLevelChange', []); + } + + if (value === COVER_STATE.OPEN) { + return buildCommandAction( + 'set', + [99], + [ + { + feature_name: 'position', + value: 99, + }, + ], + ); + } + + // COVER_STATE.CLOSE + return buildCommandAction( + 'set', + [0], + [ + { + feature_name: 'position', + value: 0, + }, + ], + ); + }, + position: (value, _nodeContext) => buildCommandAction('set', [value]), + }, +}; /** * Convert value from Gladys format to * the Zwave MQTT expected format. */ -const COMMANDS = { +const ACTIONS = { binary_switch: { + currentvalue: (value, _nodeContext) => buildCommandAction('set', [value === STATE.ON]), + }, + multilevel_switch: { currentvalue: { - getName: (_nodeFeature) => 'set', - getArgs: (value, _nodeFeature) => { - switch (value) { - case STATE.OFF: - return [false]; - case STATE.ON: - return [true]; - default: - return null; + state: (value, _nodeContext) => { + if (value === STATE.ON) { + return buildCommandAction( + 'set', + [99], + [ + { + feature_name: 'position', + value: 99, + }, + { + property_name: 'restoreprevious', + value: STATE.ON, + }, + ], + ); } + + return buildCommandAction( + 'set', + [0], + [ + { + feature_name: 'position', + value: 0, + }, + { + property_name: 'restoreprevious', + value: STATE.OFF, + }, + ], + ); }, + position: (value, _nodeContext) => + buildCommandAction( + 'set', + [value], + [ + { + feature_name: 'state', + value: value > 0 ? STATE.ON : STATE.OFF, + }, + { + property_name: 'restoreprevious', + value: value > 0 ? STATE.ON : STATE.OFF, + }, + ], + ), + }, + restoreprevious: (value, _nodeContext) => { + if (value === STATE.ON) { + // On multilevel switch dimmers, when turning ON, let's go back + // to the latest value. Same behavior as pushing the real button. + // Position is automatically updated by the device (through a targetvalue update) + return buildWriteValueAction('restorePrevious', true); + } + + return buildCommandAction( + 'set', + [0], + [ + { + property_name: 'currentvalue', + feature_name: 'state', + value: STATE.OFF, + }, + { + property_name: 'currentvalue', + feature_name: 'position', + value: 0, + }, + ], + ); }, + '17-5': multilevelSwitchCurtainsActionsDefault, + '17-6': multilevelSwitchCurtainsActionsDefault, + '17-7': multilevelSwitchCurtainsActionsDefault, }, }; +/** + * List of supported features. + */ const EXPOSES = { binary_switch: { currentvalue: { @@ -84,7 +260,7 @@ const EXPOSES = { max: 1, keep_history: true, read_only: false, - has_feedback: true, + has_feedback: false, }, }, multilevel_sensor: { @@ -109,6 +285,144 @@ const EXPOSES = { has_feedback: false, }, }, + multilevel_switch: { + // Default deviceClass refers to SWITCH + currentvalue: [ + { + name: 'position', + feature: { + category: DEVICE_FEATURE_CATEGORIES.SWITCH, + type: DEVICE_FEATURE_TYPES.SWITCH.DIMMER, + unit: DEVICE_FEATURE_UNITS.PERCENT, + min: 0, + max: 99, + keep_history: true, + read_only: false, + has_feedback: false, + }, + }, + { + name: 'state', + feature: { + category: DEVICE_FEATURE_CATEGORIES.SWITCH, + type: DEVICE_FEATURE_TYPES.SWITCH.BINARY, + min: 0, + max: 1, + keep_history: true, + read_only: false, + has_feedback: false, + }, + }, + ], + /// Dimmers + '17-1': { + // We explicitly expose the restorePrevious. + // It's up to the user to choose the one he would like: + // restorePrevious or full ON/OFF + restoreprevious: { + category: DEVICE_FEATURE_CATEGORIES.SWITCH, + type: DEVICE_FEATURE_TYPES.SWITCH.BINARY, + min: 0, + max: 1, + keep_history: true, + read_only: false, + has_feedback: false, + }, + }, + /// Curtains + // Class A Motor: Window Covering No Position/Endpoint Device Type + '17-5': { + currentvalue: [ + { + name: 'position', + feature: { + category: DEVICE_FEATURE_CATEGORIES.SHUTTER, + type: DEVICE_FEATURE_TYPES.SHUTTER.POSITION, + unit: DEVICE_FEATURE_UNITS.PERCENT, + min: 0, + max: 99, + keep_history: true, + read_only: false, + has_feedback: false, + }, + }, + { + name: 'state', + feature: { + category: DEVICE_FEATURE_CATEGORIES.SHUTTER, + type: DEVICE_FEATURE_TYPES.SHUTTER.STATE, + min: 0, + max: 1, + keep_history: true, + read_only: false, + has_feedback: false, + }, + }, + ], + }, + /// Curtains + // Class B Motor : Window Covering Endpoint Aware Device Type + '17-6': { + currentvalue: [ + { + name: 'position', + feature: { + category: DEVICE_FEATURE_CATEGORIES.SHUTTER, + type: DEVICE_FEATURE_TYPES.SHUTTER.POSITION, + unit: DEVICE_FEATURE_UNITS.PERCENT, + min: 0, + max: 99, + keep_history: true, + read_only: false, + has_feedback: false, + }, + }, + { + name: 'state', + feature: { + category: DEVICE_FEATURE_CATEGORIES.SHUTTER, + type: DEVICE_FEATURE_TYPES.SHUTTER.STATE, + min: 0, + max: 1, + keep_history: true, + read_only: false, + has_feedback: false, + }, + }, + ], + }, + /// Curtains + // Class C Motor : Window Covering Position/Endpoint Aware Device Type + '17-7': { + currentvalue: [ + { + name: 'position', + feature: { + category: DEVICE_FEATURE_CATEGORIES.SHUTTER, + type: DEVICE_FEATURE_TYPES.SHUTTER.POSITION, + unit: DEVICE_FEATURE_UNITS.PERCENT, + min: 0, + max: 99, + keep_history: true, + read_only: false, + has_feedback: false, + }, + }, + { + name: 'state', + feature: { + category: DEVICE_FEATURE_CATEGORIES.SHUTTER, + type: DEVICE_FEATURE_TYPES.SHUTTER.STATE, + min: 0, + max: 1, + keep_history: true, + read_only: false, + has_feedback: false, + }, + }, + ], + }, + }, notification: { access_control: { door_state_simple: { @@ -124,10 +438,16 @@ const EXPOSES = { }, }; +const COMMANDCLASS = { + BINARY_SWITCH: 37, + MULTILEVEL_SWITCH: 38, +}; + module.exports = { - COMMANDS, + ACTIONS, CONFIGURATION, EXPOSES, STATES, PARAMS, + COMMANDCLASS, }; diff --git a/server/services/zwavejs-ui/lib/index.js b/server/services/zwavejs-ui/lib/index.js index c36c3924eb..4782eb1334 100644 --- a/server/services/zwavejs-ui/lib/index.js +++ b/server/services/zwavejs-ui/lib/index.js @@ -9,6 +9,8 @@ const { publish } = require('./zwaveJSUI.publish'); const { scan } = require('./zwaveJSUI.scan'); const { saveConfiguration } = require('./zwaveJSUI.saveConfiguration'); const { setValue } = require('./zwaveJSUI.setValue'); +const { getZwaveJsDevice } = require('./zwaveJSUI.getZwaveJsDevice'); +const { getDevice } = require('./zwaveJSUI.getDevice'); /** * @description Z-Wave JS UI handler. @@ -26,12 +28,15 @@ const ZwaveJSUIHandler = function ZwaveJSUIHandler(gladys, mqttLibrary, serviceI this.configured = false; this.connected = false; this.devices = []; + this.zwaveJSDevices = []; }; ZwaveJSUIHandler.prototype.init = init; ZwaveJSUIHandler.prototype.connect = connect; ZwaveJSUIHandler.prototype.disconnect = disconnect; ZwaveJSUIHandler.prototype.getConfiguration = getConfiguration; +ZwaveJSUIHandler.prototype.getDevice = getDevice; +ZwaveJSUIHandler.prototype.getZwaveJsDevice = getZwaveJsDevice; ZwaveJSUIHandler.prototype.handleNewMessage = handleNewMessage; ZwaveJSUIHandler.prototype.onNewDeviceDiscover = onNewDeviceDiscover; ZwaveJSUIHandler.prototype.onNodeValueUpdated = onNodeValueUpdated; diff --git a/server/services/zwavejs-ui/lib/zwaveJSUI.getDevice.js b/server/services/zwavejs-ui/lib/zwaveJSUI.getDevice.js new file mode 100644 index 0000000000..2f13219da4 --- /dev/null +++ b/server/services/zwavejs-ui/lib/zwaveJSUI.getDevice.js @@ -0,0 +1,13 @@ +/** + * @description This will return the Gladys device. + * @param {string} nodeId - The gladys device id. + * @returns {object} The Gladys Device. + * @example zwaveJSUI.getDevice('zwavejs-ui:5'); + */ +function getDevice(nodeId) { + return this.devices.find((n) => n.external_id === nodeId); +} + +module.exports = { + getDevice, +}; diff --git a/server/services/zwavejs-ui/lib/zwaveJSUI.getZwaveJsDevice.js b/server/services/zwavejs-ui/lib/zwaveJSUI.getZwaveJsDevice.js new file mode 100644 index 0000000000..190abeb041 --- /dev/null +++ b/server/services/zwavejs-ui/lib/zwaveJSUI.getZwaveJsDevice.js @@ -0,0 +1,15 @@ +/** + * @description This will return the zwaveJs device. + * @param {string} gladysDeviceId - The gladys device id. + * @returns {object} The zwaveJsDevice. + * @example zwaveJSUI.getZwaveJsDevice("zwavejs-ui:5"); + */ +function getZwaveJsDevice(gladysDeviceId) { + const deviceId = parseInt(gladysDeviceId.split(':')[1], 10); + + return this.zwaveJSDevices.find((n) => n.id === deviceId); +} + +module.exports = { + getZwaveJsDevice, +}; diff --git a/server/services/zwavejs-ui/lib/zwaveJSUI.onNewDeviceDiscover.js b/server/services/zwavejs-ui/lib/zwaveJSUI.onNewDeviceDiscover.js index 47bbb888ee..f7d0b180ff 100644 --- a/server/services/zwavejs-ui/lib/zwaveJSUI.onNewDeviceDiscover.js +++ b/server/services/zwavejs-ui/lib/zwaveJSUI.onNewDeviceDiscover.js @@ -8,12 +8,16 @@ const { convertToGladysDevice } = require('../utils/convertToGladysDevice'); */ async function onNewDeviceDiscover(data) { const devices = []; + const zwaveDevices = []; data.result.forEach((zwaveJSDevice) => { if (zwaveJSDevice.name && zwaveJSDevice.name.length > 0) { + zwaveDevices.push(zwaveJSDevice); devices.push(convertToGladysDevice(this.serviceId, zwaveJSDevice)); } }); this.devices = devices; + this.zwaveJSDevices = zwaveDevices; + await this.gladys.event.emit(EVENTS.WEBSOCKET.SEND_ALL, { type: WEBSOCKET_MESSAGE_TYPES.ZWAVEJS_UI.SCAN_COMPLETED, }); diff --git a/server/services/zwavejs-ui/lib/zwaveJSUI.onNodeValueUpdated.js b/server/services/zwavejs-ui/lib/zwaveJSUI.onNodeValueUpdated.js index 139a33fb9f..22685213a2 100644 --- a/server/services/zwavejs-ui/lib/zwaveJSUI.onNodeValueUpdated.js +++ b/server/services/zwavejs-ui/lib/zwaveJSUI.onNodeValueUpdated.js @@ -1,47 +1,62 @@ -const get = require('get-value'); +const Promise = require('bluebird'); const { EVENTS } = require('../../../utils/constants'); const { STATES } = require('./constants'); -const { cleanNames, getDeviceFeatureId } = require('../utils/convertToGladysDevice'); +const { getDeviceFeatureId } = require('../utils/convertToGladysDevice'); +const getProperty = require('../utils/getProperty'); /** * @description This will be called when new Z-Wave node value is updated. * @param {object} message - Data sent by ZWave JS UI. + * @returns {Promise} - Promise execution. * @example zwaveJSUI.onNodeValueUpdated({data: [{node}, {value}]}); */ -async function onNodeValueUpdated(message) { +function onNodeValueUpdated(message) { // A value has been updated: https://zwave-js.github.io/node-zwave-js/#/api/node?id=quotvalue-addedquot-quotvalue-updatedquot-quotvalue-removedquot const messageNode = message.data[0]; const updatedValue = message.data[1]; const { commandClassName, propertyName, propertyKeyName, endpoint, newValue } = updatedValue; - const comClassNameClean = cleanNames(commandClassName); - const propertyNameClean = cleanNames(propertyName); - const propertyKeyNameClean = cleanNames(propertyKeyName); - let statePath = `${comClassNameClean}.${propertyNameClean}`; - if (propertyKeyNameClean !== '') { - statePath += `.${propertyKeyNameClean}`; - } const nodeId = `zwavejs-ui:${messageNode.id}`; - const node = this.devices.find((n) => n.external_id === nodeId); + const node = this.getDevice(nodeId); if (!node) { - return; + return Promise.resolve(); } - const featureId = getDeviceFeatureId(messageNode.id, commandClassName, endpoint, propertyName, propertyKeyName); - const nodeFeature = node.features.find((f) => f.external_id === featureId); - if (!nodeFeature) { - return; + const zwaveJSNode = this.getZwaveJsDevice(nodeId); + if (!zwaveJSNode) { + return Promise.resolve(); } - const valueConverter = get(STATES, statePath); - const convertedValue = valueConverter !== undefined ? valueConverter(newValue) : null; + const valueConverters = getProperty(STATES, commandClassName, propertyName, propertyKeyName, zwaveJSNode.deviceClass); - if (convertedValue !== null) { - await this.gladys.event.emit(EVENTS.DEVICE.NEW_STATE, { - device_feature_external_id: nodeFeature.external_id, - state: convertedValue, - }); + if (!valueConverters) { + return Promise.resolve(); } + + return Promise.map( + valueConverters, + async (valueConverter) => { + const externalId = getDeviceFeatureId( + messageNode.id, + commandClassName, + endpoint, + valueConverter.property_name || propertyName, + valueConverter.property_name ? valueConverter.property_key_name || '' : propertyKeyName, + valueConverter.feature_name || '', + ); + + if (node.features.some((f) => f.external_id === externalId)) { + const convertedValue = valueConverter.converter(newValue); + if (convertedValue !== null) { + await this.gladys.event.emit(EVENTS.DEVICE.NEW_STATE, { + device_feature_external_id: externalId, + state: convertedValue, + }); + } + } + }, + { concurrency: 2 }, + ); } module.exports = { diff --git a/server/services/zwavejs-ui/lib/zwaveJSUI.setValue.js b/server/services/zwavejs-ui/lib/zwaveJSUI.setValue.js index ab929e35b2..e52321b90e 100644 --- a/server/services/zwavejs-ui/lib/zwaveJSUI.setValue.js +++ b/server/services/zwavejs-ui/lib/zwaveJSUI.setValue.js @@ -1,35 +1,29 @@ -const get = require('get-value'); +const Promise = require('bluebird'); const { BadParameters } = require('../../../utils/coreErrors'); -const { COMMANDS } = require('./constants'); -const { cleanNames } = require('../utils/convertToGladysDevice'); +const { ACTIONS } = require('./constants'); +const { getDeviceFeatureId } = require('../utils/convertToGladysDevice'); +const getProperty = require('../utils/getProperty'); /** - * @description Returns the command wrapper. + * @description Returns the action wrapper. + * @param {object} zwaveJsNode - The zWaveJsDevice node. * @param {object} nodeFeature - The feature. - * @returns {object} The Command Class command. + * @returns {object} The Command Class action. * @example - * getCommand({command_class_name: 'Notification', property: 'Home Security', property_key: 'Cover Status'}) + * getAction( + * {id: 5, deviceClass: { basic: 4, generic: 17, specific: 6}}, + * {command_class_name: 'Notification', property: 'Home Security', property_key: 'Cover Status'} + * ) */ -function getCommand(nodeFeature) { - let commandPath = `${cleanNames(nodeFeature.command_class_name)}.${cleanNames(nodeFeature.property_name)}`; - const propertyKeyNameClean = cleanNames(nodeFeature.property_key_name); - if (propertyKeyNameClean !== '') { - commandPath += `.${propertyKeyNameClean}`; - } - - return get(COMMANDS, commandPath); -} - -/** - * @description Returns a node from its external id. - * @param {Array} nodes - All nodes available. - * @param {string} nodeId - The node to find. - * @returns {object} The node if found. - * @example - * getNode([{external_id: 'zwavejs-ui:3'}], 'zwavejs-ui:3') - */ -function getNode(nodes, nodeId) { - return nodes.find((n) => n.external_id === nodeId); +function getAction(zwaveJsNode, nodeFeature) { + return getProperty( + ACTIONS, + nodeFeature.command_class_name, + nodeFeature.property_name, + nodeFeature.property_key_name, + zwaveJsNode.deviceClass, + nodeFeature.feature_name, + ); } /** @@ -49,57 +43,97 @@ function getNodeFeature(node, nodeFeatureId) { /** * @description Set the new device value from Gladys to MQTT. - * @param {object} device - Updated Gladys device. - * @param {object} deviceFeature - Updated Gladys device feature. + * @param {object} gladysDevice - Updated Gladys device. + * @param {object} gladysFeature - Updated Gladys device feature. * @param {string|number} value - The new device feature value. * @returns {Promise} - The execution promise. * @example * setValue(device, deviceFeature, 0); */ -function setValue(device, deviceFeature, value) { - if (!deviceFeature.external_id.startsWith('zwavejs-ui:')) { +async function setValue(gladysDevice, gladysFeature, value) { + if (!gladysFeature.external_id.startsWith('zwavejs-ui:')) { throw new BadParameters( - `ZWaveJs-UI deviceFeature external_id is invalid: "${deviceFeature.external_id}" should starts with "zwavejs-ui:"`, + `ZWaveJs-UI deviceFeature external_id is invalid: "${gladysFeature.external_id}" should starts with "zwavejs-ui:"`, ); } - const node = getNode(this.devices, device.external_id); + const node = this.getDevice(gladysDevice.external_id); if (!node) { - throw new BadParameters(`ZWaveJs-UI node not found: "${device.external_id}".`); + throw new BadParameters(`ZWaveJs-UI Gladys node not found: "${gladysDevice.external_id}".`); } - const nodeFeature = getNodeFeature(node, deviceFeature.external_id); + const zwaveJsNode = this.getZwaveJsDevice(node.external_id); + if (!zwaveJsNode) { + throw new BadParameters(`ZWaveJs-UI node not found: "${node.external_id}".`); + } + + const nodeFeature = getNodeFeature(node, gladysFeature.external_id); if (!nodeFeature) { - throw new BadParameters(`ZWaveJs-UI feature not found: "${deviceFeature.external_id}".`); + throw new BadParameters(`ZWaveJs-UI feature not found: "${gladysFeature.external_id}".`); } - const command = getCommand(nodeFeature); - if (!command) { - // We do not manage this feature for writing - throw new BadParameters(`ZWaveJS-UI command not found: "${deviceFeature.external_id}"`); + const actionDescriptor = getAction(zwaveJsNode, nodeFeature); + if (!actionDescriptor) { + // We do not manage this feature for setValue + throw new BadParameters(`ZWaveJS-UI action not found: "${gladysFeature.external_id}"`); } - const commandArgs = command.getArgs(value, nodeFeature); - if (commandArgs === null) { - throw new BadParameters(`ZWaveJS-UI command value not supported: "${value}"`); + const nodeContext = { node, nodeFeature, zwaveJsNode, gladysDevice, gladysFeature }; + const action = actionDescriptor(value, nodeContext); + if (action.isCommand) { + // API sendCommand + // https://zwave-js.github.io/zwave-js-ui/#/guide/mqtt?id=sendcommand + const mqttPayload = { + args: [ + { + nodeId: nodeFeature.node_id, + commandClass: nodeFeature.command_class, + endpoint: nodeFeature.endpoint, + }, + action.name, + action.value, + ], + }; + this.publish('zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', JSON.stringify(mqttPayload)); + } else { + // API writeValue + // https://zwave-js.github.io/zwave-js-ui/#/guide/mqtt?id=writevalue + const mqttPayload = { + args: [ + { + nodeId: nodeFeature.node_id, + commandClass: nodeFeature.command_class, + endpoint: nodeFeature.endpoint, + property: action.name, + }, + action.value, + ], + }; + this.publish('zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/writeValue/set', JSON.stringify(mqttPayload)); } - // https://zwave-js.github.io/zwave-js-ui/#/guide/mqtt?id=send-command - // https://zwave-js.github.io/zwave-js-ui/#/guide/mqtt?id=sendcommand - const mqttPayload = { - args: [ - { - nodeId: nodeFeature.node_id, - commandClass: nodeFeature.command_class, - endpoint: nodeFeature.endpoint, - }, - command.getName(nodeFeature), - commandArgs, - ], - }; - this.publish('zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', JSON.stringify(mqttPayload)); + if (action.stateUpdate) { + await Promise.map( + action.stateUpdate, + async (stateUpdate) => { + const featureId = getDeviceFeatureId( + zwaveJsNode.id, + nodeFeature.command_class_name, + nodeFeature.endpoint, + stateUpdate.property_name || nodeFeature.property_name, + stateUpdate.property_name ? stateUpdate.property_key_name || '' : nodeFeature.property_key_name || '', + stateUpdate.feature_name || '', + ); - return Promise.resolve(); + // Only if the device has the expected feature, apply the local change + if (getNodeFeature(node, featureId)) { + const gladysUpdatedFeature = gladysDevice.features.find((f) => f.external_id === featureId); + await this.gladys.device.saveState(gladysUpdatedFeature, stateUpdate.value); + } + }, + { concurrency: 2 }, + ); + } } module.exports = { diff --git a/server/services/zwavejs-ui/package-lock.json b/server/services/zwavejs-ui/package-lock.json index af1369d94d..8c78d16a78 100644 --- a/server/services/zwavejs-ui/package-lock.json +++ b/server/services/zwavejs-ui/package-lock.json @@ -16,6 +16,7 @@ "win32" ], "dependencies": { + "bluebird": "^3.7.2", "get-value": "^3.0.1", "mqtt": "^4.0.0" } @@ -54,6 +55,11 @@ "readable-stream": "^3.4.0" } }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", diff --git a/server/services/zwavejs-ui/package.json b/server/services/zwavejs-ui/package.json index d12dad8b81..cc7fe31c62 100644 --- a/server/services/zwavejs-ui/package.json +++ b/server/services/zwavejs-ui/package.json @@ -12,6 +12,7 @@ "arm64" ], "dependencies": { + "bluebird": "^3.7.2", "get-value": "^3.0.1", "mqtt": "^4.0.0" } diff --git a/server/services/zwavejs-ui/utils/cleanNames.js b/server/services/zwavejs-ui/utils/cleanNames.js new file mode 100644 index 0000000000..f9e4b48615 --- /dev/null +++ b/server/services/zwavejs-ui/utils/cleanNames.js @@ -0,0 +1,12 @@ +const cleanNames = (text) => { + if (!text || typeof text !== 'string') { + return ''; + } + return text + .replaceAll(' ', '_') + .replaceAll('(', '') + .replaceAll(')', '') + .toLowerCase(); +}; + +module.exports = cleanNames; diff --git a/server/services/zwavejs-ui/utils/convertToGladysDevice.js b/server/services/zwavejs-ui/utils/convertToGladysDevice.js index 4147ac75aa..eed1577534 100644 --- a/server/services/zwavejs-ui/utils/convertToGladysDevice.js +++ b/server/services/zwavejs-ui/utils/convertToGladysDevice.js @@ -1,73 +1,111 @@ -const get = require('get-value'); +const cleanNames = require('./cleanNames'); -const { EXPOSES, PARAMS } = require('../lib/constants'); +const { EXPOSES, PARAMS, COMMANDCLASS } = require('../lib/constants'); +const getProperty = require('./getProperty'); -const cleanNames = (text) => { - if (!text || typeof text !== 'string') { - return ''; - } - return text - .replaceAll(' ', '_') - .replaceAll('(', '') - .replaceAll(')', '') - .toLowerCase(); -}; - -const getDeviceFeatureId = (nodeId, commandClassName, endpoint, propertyName, propertyKeyName) => { +const getDeviceFeatureId = (nodeId, commandClassName, endpoint, propertyName, propertyKeyName, featureName) => { const propertyKeyNameClean = cleanNames(propertyKeyName); return `zwavejs-ui:${nodeId}:${endpoint}:${cleanNames(commandClassName)}:${cleanNames(propertyName)}${ propertyKeyNameClean !== '' ? `:${propertyKeyNameClean}` : '' - }`; + }${featureName !== '' ? `:${featureName}` : ''}`; }; -const convertToGladysDevice = (serviceId, device) => { +/** + * @description Cleanup features. + * For example: remove a Binary Switch sent by a device on a + * Multilevel Switch (we do manage a virtual one on Gladys). + * @param {Array} features - Detected features on the node. + * @returns {Array} The cleaned up features. + * @example cleanupFeatures(features) + */ +function cleanupFeatures(features) { + let localFeatures = features; + // ------------------------------ + // Multilevel Switch special case + // Some Multilevel Switch device have an explicit Binary Switch + // exposed some others not (Qubino vs Fibaro for example). As for + // devices that do not expose any Binary Switch value, we manage + // a virtual one through the Multilevel Switch. In order to improve + // the user experience, we so cleanup any explicit Binary Switch + // so the user doesn't see too many options when managing their device + // (we keep the virtual one because it is correctly synchronized with + // others features - state & position - and keeps code simpler) + if (localFeatures.some((f) => f.command_class === COMMANDCLASS.MULTILEVEL_SWITCH)) { + localFeatures = localFeatures.filter((f) => f.command_class !== COMMANDCLASS.BINARY_SWITCH); + } + + // Add any other special cleanup necessary... Please, provide an explanation + + return localFeatures; +} + +const convertToGladysDevice = (serviceId, zwaveJsDevice) => { const features = []; let params = []; // Foreach value, we check if there is a matching feature in Gladys - Object.keys(device.values).forEach((valueKey) => { - const value = device.values[valueKey]; + Object.keys(zwaveJsDevice.values).forEach((valueKey) => { + const value = zwaveJsDevice.values[valueKey]; const { commandClass, commandClassName, propertyName, propertyKeyName, endpoint, commandClassVersion = 1 } = value; - const commandClassNameClean = cleanNames(commandClassName); - const propertyClean = cleanNames(propertyName); - const propertyKeyClean = cleanNames(propertyKeyName); - let exposePath = `${commandClassNameClean}.${propertyClean}`; - if (propertyKeyClean !== '') { - exposePath += `.${propertyKeyClean}`; - } - const exposeFound = get(EXPOSES, exposePath); - if (exposeFound) { - features.push({ - ...exposeFound, - name: value.id, - external_id: getDeviceFeatureId(device.id, commandClassName, endpoint, propertyName, propertyKeyName), - selector: getDeviceFeatureId(device.id, commandClassName, endpoint, propertyName, propertyKeyName), - node_id: device.id, - // These are custom properties only available on the object in memory (not in DB) - command_class_version: commandClassVersion, - command_class_name: commandClassName, - command_class: commandClass, - endpoint, - property_name: propertyName, - property_key_name: propertyKeyName, + + let exposes = getProperty(EXPOSES, commandClassName, propertyName, propertyKeyName, zwaveJsDevice.deviceClass); + if (exposes) { + if (!Array.isArray(exposes)) { + exposes = [ + { + name: '', + feature: exposes, + }, + ]; + } + + exposes.forEach((exposeFound) => { + features.push({ + ...exposeFound.feature, + name: `${value.id}${exposeFound.name !== '' ? `:${exposeFound.name}` : ''}`, + external_id: getDeviceFeatureId( + zwaveJsDevice.id, + commandClassName, + endpoint, + propertyName, + propertyKeyName, + exposeFound.name, + ), + selector: getDeviceFeatureId( + zwaveJsDevice.id, + commandClassName, + endpoint, + propertyName, + propertyKeyName, + exposeFound.name, + ), + node_id: zwaveJsDevice.id, + // These are custom properties only available on the object in memory (not in DB) + command_class_version: commandClassVersion, + command_class_name: commandClassName, + command_class: commandClass, + endpoint, + property_name: propertyName, + property_key_name: propertyKeyName, + feature_name: exposeFound.name, + }); }); } - params = [{ name: PARAMS.LOCATION, value: device.loc }]; + params = [{ name: PARAMS.LOCATION, value: zwaveJsDevice.loc }]; }); return { - name: device.name, - external_id: `zwavejs-ui:${device.id}`, - selector: `zwavejs-ui:${device.id}`, + name: zwaveJsDevice.name, + external_id: `zwavejs-ui:${zwaveJsDevice.id}`, + selector: `zwavejs-ui:${zwaveJsDevice.id}`, service_id: serviceId, should_poll: false, - features, + features: cleanupFeatures(features), params, }; }; module.exports = { - cleanNames, getDeviceFeatureId, convertToGladysDevice, }; diff --git a/server/services/zwavejs-ui/utils/getProperty.js b/server/services/zwavejs-ui/utils/getProperty.js new file mode 100644 index 0000000000..5e3c883f82 --- /dev/null +++ b/server/services/zwavejs-ui/utils/getProperty.js @@ -0,0 +1,30 @@ +const get = require('get-value'); +const cleanNames = require('./cleanNames'); + +const getProperty = (source, commandClassName, propertyName, propertyKeyName, deviceClass, featureName) => { + const commandClassNameClean = cleanNames(commandClassName); + const propertyClean = cleanNames(propertyName); + const propertyKeyClean = cleanNames(propertyKeyName); + + let basePropertyPath = propertyClean; + if (propertyKeyClean !== '') { + basePropertyPath += `.${propertyKeyClean}`; + } + + if (featureName) { + basePropertyPath += `.${featureName}`; + } + + // Some devices have the same command class and property. But we need to classify + // the device to map to the right CATEGORY. We use for that the deviceClass property. + // We try to find an exposed feature specific to the deviceClass first. + // For example: Multilevel Switch devices. They might be curtains or light switch. + // They use the same command class. Only the deviceClass could provide some hints + // about the real intention of the device. + return ( + get(source, `${commandClassNameClean}.${deviceClass.generic}-${deviceClass.specific}.${basePropertyPath}`) || + get(source, `${commandClassNameClean}.${basePropertyPath}`) + ); +}; + +module.exports = getProperty; diff --git a/server/test/services/zwavejs-ui/lib/exampleData.json b/server/test/services/zwavejs-ui/lib/exampleData.json index e7a1d91c5b..0d1ce7366c 100644 --- a/server/test/services/zwavejs-ui/lib/exampleData.json +++ b/server/test/services/zwavejs-ui/lib/exampleData.json @@ -2434,1674 +2434,8061 @@ "hassDevices": {}, "failed": false, "inited": true, - "eventsQueue": [ + "eventsQueue": [], + "status": "Asleep", + "interviewStage": "Complete", + "priorityReturnRoute": {}, + "customReturnRoute": {}, + "prioritySUCReturnRoute": null, + "customSUCReturnRoutes": [], + "hexId": "0x010f 0x0702-0x1000", + "dbLink": "https://devices.zwave-js.io/?jumpTo=0x010f:0x0702:0x1000:3.2", + "manufacturerId": 271, + "productId": 4096, + "productType": 1794, + "deviceConfig": { + "filename": "/Users/pierregilles/code/zwave-js-ui/node_modules/@zwave-js/config/config/devices/0x010f/fgdw002.json", + "isEmbedded": true, + "manufacturer": "Fibargroup", + "manufacturerId": 271, + "label": "FGDW002", + "description": "Fibaro Door Window Sensor 2", + "devices": [ + { "productType": 1794, "productId": 4096 }, + { "productType": 1794, "productId": 8192 }, + { "productType": 1794, "productId": 12288 }, + { "productType": 1794, "productId": 16384 }, + { "productType": 1794, "productId": 28672 } + ], + "firmwareVersion": { "min": "0.0", "max": "255.255" }, + "preferred": false, + "paramInformation": { "_map": {} } + }, + "productLabel": "FGDW002", + "productDescription": "Fibaro Door Window Sensor 2", + "manufacturer": "Fibargroup", + "firmwareVersion": "3.2", + "protocolVersion": 3, + "zwavePlusVersion": 1, + "zwavePlusNodeType": 0, + "zwavePlusRoleType": 6, + "nodeType": 1, + "endpointsCount": 0, + "endpoints": [{ "index": 0, "label": "Root Endpoint" }], + "isSecure": false, + "security": "None", + "supportsSecurity": false, + "supportsBeaming": true, + "isControllerNode": false, + "isListening": false, + "isFrequentListening": false, + "isRouting": true, + "keepAwake": false, + "maxDataRate": 100000, + "deviceClass": { "basic": 4, "generic": 7, "specific": 1 }, + "lastActive": 1702651498694, + "firmwareCapabilities": { + "firmwareUpgradable": true, + "firmwareTargets": [0] + }, + "deviceId": "271-4096-1794", + "hasDeviceConfigChanged": false, + "batteryLevels": { "0": 100 }, + "minBatteryLevel": 100, + "supportsTime": false, + "statistics": { + "commandsTX": 0, + "commandsRX": 35, + "commandsDroppedRX": 0, + "commandsDroppedTX": 0, + "timeoutResponse": 0, + "lwr": { "repeaters": [], "protocolDataRate": 3 }, + "lastSeen": "2023-12-15T14:44:58.694Z" + } + }, + { + "id": 5, + "name": "Volet Roulant", + "loc": "salon", + "values": { + "91-0-scene-001": { + "id": "5-91-0-scene-001", + "nodeId": 5, + "toUpdate": false, + "commandClass": 91, + "commandClassName": "Central Scene", + "endpoint": 0, + "property": "scene", + "propertyName": "scene", + "propertyKey": "001", + "propertyKeyName": "001", + "type": "number", + "readable": true, + "writeable": false, + "label": "Scene 001", + "stateless": false, + "commandClassVersion": 3, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "KeyPressed", + "value": 0 + }, + { + "text": "KeyReleased", + "value": 1 + }, + { + "text": "KeyHeldDown", + "value": 2 + }, + { + "text": "KeyPressed2x", + "value": 3 + }, + { + "text": "KeyPressed3x", + "value": 4 + } + ], + "lastUpdate": 1714157121775 + }, + "91-0-scene-002": { + "id": "5-91-0-scene-002", + "nodeId": 5, + "toUpdate": false, + "commandClass": 91, + "commandClassName": "Central Scene", + "endpoint": 0, + "property": "scene", + "propertyName": "scene", + "propertyKey": "002", + "propertyKeyName": "002", + "type": "number", + "readable": true, + "writeable": false, + "label": "Scene 002", + "stateless": false, + "commandClassVersion": 3, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "KeyPressed", + "value": 0 + }, + { + "text": "KeyReleased", + "value": 1 + }, + { + "text": "KeyHeldDown", + "value": 2 + }, + { + "text": "KeyPressed2x", + "value": 3 + }, + { + "text": "KeyPressed3x", + "value": 4 + } + ], + "lastUpdate": 1714157121776 + }, + "91-0-slowRefresh": { + "id": "5-91-0-slowRefresh", + "nodeId": 5, + "toUpdate": false, + "commandClass": 91, + "commandClassName": "Central Scene", + "endpoint": 0, + "property": "slowRefresh", + "propertyName": "slowRefresh", + "type": "boolean", + "readable": true, + "writeable": true, + "description": "When this is true, KeyHeldDown notifications are sent every 55s. When this is false, the notifications are sent every 200ms.", + "label": "Send held down notifications at a slow rate", + "stateless": false, + "commandClassVersion": 3, + "list": false, + "lastUpdate": 1714157121776 + }, + "108-0-ccSupported-91": { + "id": "5-108-0-ccSupported-91", + "nodeId": 5, + "toUpdate": false, + "commandClass": 108, + "commandClassName": "Supervision", + "endpoint": 0, + "property": "ccSupported", + "propertyName": "ccSupported", + "propertyKey": 91, + "propertyKeyName": "91", + "type": "any", + "readable": true, + "writeable": true, + "label": "ccSupported (property)", + "stateless": false, + "commandClassVersion": 1, + "list": false, + "value": false, + "lastUpdate": 1713717644663 + }, + "112-0-11": { + "id": "5-112-0-11", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 11, + "propertyName": "LED Indicator: Color When Moving", + "type": "number", + "readable": true, + "writeable": true, + "label": "LED Indicator: Color When Moving", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 7, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "White", + "value": 1 + }, + { + "text": "Red", + "value": 2 + }, + { + "text": "Green", + "value": 3 + }, + { + "text": "Blue", + "value": 4 + }, + { + "text": "Yellow", + "value": 5 + }, + { + "text": "Cyan", + "value": 6 + }, + { + "text": "Magenta", + "value": 7 + } + ], + "value": 1, + "lastUpdate": 1713717643302 + }, + "112-0-12": { + "id": "5-112-0-12", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 12, + "propertyName": "LED Indicator: Standby Color", + "type": "number", + "readable": true, + "writeable": true, + "label": "LED Indicator: Standby Color", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 7, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "White", + "value": 1 + }, + { + "text": "Red", + "value": 2 + }, + { + "text": "Green", + "value": 3 + }, + { + "text": "Blue", + "value": 4 + }, + { + "text": "Yellow", + "value": 5 + }, + { + "text": "Cyan", + "value": 6 + }, + { + "text": "Magenta", + "value": 7 + } + ], + "value": 0, + "lastUpdate": 1713717643338 + }, + "112-0-13": { + "id": "5-112-0-13", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 13, + "propertyName": "LED Indicator: Brightness", + "type": "number", + "readable": true, + "writeable": true, + "label": "LED Indicator: Brightness", + "default": 100, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 100, + "unit": "%", + "list": false, + "value": 100, + "lastUpdate": 1713717643375 + }, + "112-0-24": { + "id": "5-112-0-24", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 24, + "propertyName": "Inverted Orientation", + "type": "number", + "readable": true, + "writeable": true, + "label": "Inverted Orientation", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643412 + }, + "112-0-25": { + "id": "5-112-0-25", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 25, + "propertyName": "Output Orientation", + "type": "number", + "readable": true, + "writeable": true, + "label": "Output Orientation", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Q1 up, Q2 down", + "value": 0 + }, + { + "text": "Q1 down, Q2 up", + "value": 1 + } + ], + "value": 1, + "lastUpdate": 1713718340342 + }, + "112-0-30-4278190080": { + "id": "5-112-0-30-4278190080", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 30, + "propertyName": "Alarm Configuration: 1st Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 1st Slot: Notification Type", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 0, + "lastUpdate": 1713717643488 + }, + "112-0-30-16711680": { + "id": "5-112-0-30-16711680", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 30, + "propertyName": "Alarm Configuration: 1st Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 1st Slot: Notification Event", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 0, + "lastUpdate": 1713717643491 + }, + "112-0-30-3": { + "id": "5-112-0-30-3", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 30, + "propertyName": "Alarm Configuration: 1st Slot: Blinds Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 1st Slot: Blinds Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Open", + "value": 1 + }, + { + "text": "Close", + "value": 2 + } + ], + "value": 0, + "lastUpdate": 1713717643494 + }, + "112-0-30-240": { + "id": "5-112-0-30-240", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 30, + "propertyName": "Alarm Configuration: 1st Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 1st Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1713717643497 + }, + "112-0-31-4278190080": { + "id": "5-112-0-31-4278190080", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 31, + "propertyName": "Alarm Configuration: 2nd Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 2nd Slot: Notification Type", + "default": 5, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 5, + "lastUpdate": 1713717643535 + }, + "112-0-31-16711680": { + "id": "5-112-0-31-16711680", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 31, + "propertyName": "Alarm Configuration: 2nd Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 2nd Slot: Notification Event", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 255, + "lastUpdate": 1713717643538 + }, + "112-0-31-3": { + "id": "5-112-0-31-3", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 31, + "propertyName": "Alarm Configuration: 2nd Slot: Blinds Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 2nd Slot: Blinds Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Open", + "value": 1 + }, + { + "text": "Close", + "value": 2 + } + ], + "value": 0, + "lastUpdate": 1713717643540 + }, + "112-0-31-240": { + "id": "5-112-0-31-240", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 31, + "propertyName": "Alarm Configuration: 2nd Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 2nd Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1713717643542 + }, + "112-0-32-4278190080": { + "id": "5-112-0-32-4278190080", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 32, + "propertyName": "Alarm Configuration: 3rd Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 3rd Slot: Notification Type", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 1, + "lastUpdate": 1713717643581 + }, + "112-0-32-16711680": { + "id": "5-112-0-32-16711680", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 32, + "propertyName": "Alarm Configuration: 3rd Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 3rd Slot: Notification Event", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 255, + "lastUpdate": 1713717643584 + }, + "112-0-32-3": { + "id": "5-112-0-32-3", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 32, + "propertyName": "Alarm Configuration: 3rd Slot: Blinds Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 3rd Slot: Blinds Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Open", + "value": 1 + }, + { + "text": "Close", + "value": 2 + } + ], + "value": 0, + "lastUpdate": 1713717643586 + }, + "112-0-32-240": { + "id": "5-112-0-32-240", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 32, + "propertyName": "Alarm Configuration: 3rd Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 3rd Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1713717643588 + }, + "112-0-33-4278190080": { + "id": "5-112-0-33-4278190080", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 33, + "propertyName": "Alarm Configuration: 4th Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 4th Slot: Notification Type", + "default": 2, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 2, + "lastUpdate": 1713717643625 + }, + "112-0-33-16711680": { + "id": "5-112-0-33-16711680", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 33, + "propertyName": "Alarm Configuration: 4th Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 4th Slot: Notification Event", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 255, + "lastUpdate": 1713717643628 + }, + "112-0-33-3": { + "id": "5-112-0-33-3", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 33, + "propertyName": "Alarm Configuration: 4th Slot: Blinds Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 4th Slot: Blinds Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Open", + "value": 1 + }, + { + "text": "Close", + "value": 2 + } + ], + "value": 0, + "lastUpdate": 1713717643636 + }, + "112-0-33-240": { + "id": "5-112-0-33-240", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 33, + "propertyName": "Alarm Configuration: 4th Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 4th Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1713717643641 + }, + "112-0-34-4278190080": { + "id": "5-112-0-34-4278190080", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 34, + "propertyName": "Alarm Configuration: 5th Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 5th Slot: Notification Type", + "default": 4, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 4, + "lastUpdate": 1713717643680 + }, + "112-0-34-16711680": { + "id": "5-112-0-34-16711680", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 34, + "propertyName": "Alarm Configuration: 5th Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 5th Slot: Notification Event", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 255, + "lastUpdate": 1713717643683 + }, + "112-0-34-3": { + "id": "5-112-0-34-3", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 34, + "propertyName": "Alarm Configuration: 5th Slot: Blinds Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 5th Slot: Blinds Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Open", + "value": 1 + }, + { + "text": "Close", + "value": 2 + } + ], + "value": 0, + "lastUpdate": 1713717643685 + }, + "112-0-34-240": { + "id": "5-112-0-34-240", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 34, + "propertyName": "Alarm Configuration: 5th Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 5th Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1713717643687 + }, + "112-0-35": { + "id": "5-112-0-35", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 35, + "propertyName": "Alarm Duration", + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Duration", + "default": 600, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 32400, + "unit": "seconds", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Infinite", + "value": 0 + } + ], + "value": 600, + "lastUpdate": 1713717643725 + }, + "112-0-40-1": { + "id": "5-112-0-40-1", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 40, + "propertyName": "Key S1 Central Scene: Pressed 1x", + "propertyKey": 1, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S1 Central Scene: Pressed 1x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643763 + }, + "112-0-40-2": { + "id": "5-112-0-40-2", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 40, + "propertyName": "Key S1 Central Scene: Pressed 2x", + "propertyKey": 2, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S1 Central Scene: Pressed 2x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643766 + }, + "112-0-40-4": { + "id": "5-112-0-40-4", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 40, + "propertyName": "Key S1 Central Scene: Pressed 3x", + "propertyKey": 4, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S1 Central Scene: Pressed 3x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643768 + }, + "112-0-40-8": { + "id": "5-112-0-40-8", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 40, + "propertyName": "Key S1 Central Scene: Hold and Released", + "propertyKey": 8, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S1 Central Scene: Hold and Released", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643770 + }, + "112-0-41-1": { + "id": "5-112-0-41-1", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 41, + "propertyName": "Key S2 Central Scene: Pressed 1x", + "propertyKey": 1, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S2 Central Scene: Pressed 1x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643807 + }, + "112-0-41-2": { + "id": "5-112-0-41-2", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 41, + "propertyName": "Key S2 Central Scene: Pressed 2x", + "propertyKey": 2, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S2 Central Scene: Pressed 2x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643809 + }, + "112-0-41-4": { + "id": "5-112-0-41-4", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 41, + "propertyName": "Key S2 Central Scene: Pressed 3x", + "propertyKey": 4, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S2 Central Scene: Pressed 3x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643812 + }, + "112-0-41-8": { + "id": "5-112-0-41-8", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 41, + "propertyName": "Key S2 Central Scene: Hold and Released", + "propertyKey": 8, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S2 Central Scene: Hold and Released", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643815 + }, + "112-0-60": { + "id": "5-112-0-60", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 60, + "propertyName": "Power Report: Include Self-Consumption", + "type": "number", + "readable": true, + "writeable": true, + "label": "Power Report: Include Self-Consumption", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717643851 + }, + "112-0-61": { + "id": "5-112-0-61", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 61, + "propertyName": "Power Reports: Relative Change Threshold", + "type": "number", + "readable": true, + "writeable": true, + "label": "Power Reports: Relative Change Threshold", + "default": 15, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 500, + "unit": "%", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 15, + "lastUpdate": 1713717643889 + }, + "112-0-62": { + "id": "5-112-0-62", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 62, + "propertyName": "Power Reports: Interval", + "type": "number", + "readable": true, + "writeable": true, + "label": "Power Reports: Interval", + "default": 3600, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 32400, + "unit": "seconds", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 3600, + "lastUpdate": 1713717643927 + }, + "112-0-65": { + "id": "5-112-0-65", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 65, + "propertyName": "Energy Reports: Threshold", + "type": "number", + "readable": true, + "writeable": true, + "label": "Energy Reports: Threshold", + "default": 10, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 500, + "unit": "0.01 kWh", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 10, + "lastUpdate": 1713717643965 + }, + "112-0-66": { + "id": "5-112-0-66", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 66, + "propertyName": "Energy Reports: Interval", + "type": "number", + "readable": true, + "writeable": true, + "label": "Energy Reports: Interval", + "default": 3600, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 32400, + "unit": "seconds", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 3600, + "lastUpdate": 1713717644004 + }, + "112-0-150-1": { + "id": "5-112-0-150-1", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 150, + "propertyName": "Calibration Status", + "propertyKey": 1, + "type": "number", + "readable": true, + "writeable": false, + "label": "Calibration Status", + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Uncalibrated", + "value": 0 + }, + { + "text": "Calibrated", + "value": 1 + } + ], + "value": 1, + "lastUpdate": 1713718259967 + }, + "112-0-150-2": { + "id": "5-112-0-150-2", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 150, + "propertyName": "Force Calibration", + "propertyKey": 2, + "type": "number", + "readable": true, + "writeable": true, + "label": "Force Calibration", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713718259971 + }, + "112-0-151": { + "id": "5-112-0-151", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 151, + "propertyName": "Operating Mode", + "type": "number", + "readable": true, + "writeable": true, + "label": "Operating Mode", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 1, + "max": 6, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Roller blind with positioning", + "value": 1 + }, + { + "text": "Venetian blind with positioning", + "value": 2 + }, + { + "text": "Roller blind with built-in driver", + "value": 5 + }, + { + "text": "Roller blind with built-in driver (Impulse)", + "value": 6 + } + ], + "value": 1, + "lastUpdate": 1713717644084 + }, + "112-0-152": { + "id": "5-112-0-152", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 152, + "propertyName": "Venetian Blinds: Full Turn Duration", + "type": "number", + "readable": true, + "writeable": true, + "label": "Venetian Blinds: Full Turn Duration", + "default": 150, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 65535, + "unit": "0.01 seconds", + "list": false, + "value": 0, + "lastUpdate": 1713717644122 + }, + "112-0-153": { + "id": "5-112-0-153", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 153, + "propertyName": "Venetian Blinds: Reset Slats Position", + "type": "number", + "readable": true, + "writeable": true, + "label": "Venetian Blinds: Reset Slats Position", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Controller command only", + "value": 0 + }, + { + "text": "Controller, momentary or limit switch operation", + "value": 1 + }, + { + "text": "Controlled, momentary or limit switch operation, or Multilevel Switch stop command", + "value": 2 + } + ], + "value": 1, + "lastUpdate": 1713717644160 + }, + "112-0-154": { + "id": "5-112-0-154", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 154, + "propertyName": "Motor Overrun", + "type": "number", + "readable": true, + "writeable": true, + "description": "Duration for which motor will continue to run after end switch is hit.", + "label": "Motor Overrun", + "default": 10, + "stateless": false, + "commandClassVersion": 1, + "min": 1, + "max": 255, + "unit": "0.1 seconds", + "list": false, + "value": 10, + "lastUpdate": 1713717644199 + }, + "112-0-155": { + "id": "5-112-0-155", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 155, + "propertyName": "Limit Switch Power Threshold", + "type": "number", + "readable": true, + "writeable": true, + "description": "Power threshold interpreted as reaching a limit switch.", + "label": "Limit Switch Power Threshold", + "default": 10, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "unit": "W", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 10, + "lastUpdate": 1713717644238 + }, + "112-0-156": { + "id": "5-112-0-156", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 156, + "propertyName": "Blind Up Duration", + "type": "number", + "readable": true, + "writeable": true, + "label": "Blind Up Duration", + "default": 6000, + "stateless": false, + "commandClassVersion": 1, + "min": 1, + "max": 65535, + "unit": "0.01 seconds", + "list": false, + "value": 2558, + "lastUpdate": 1713718260074 + }, + "112-0-157": { + "id": "5-112-0-157", + "nodeId": 5, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 157, + "propertyName": "Blind Down Duration", + "type": "number", + "readable": true, + "writeable": true, + "label": "Blind Down Duration", + "default": 6000, + "stateless": false, + "commandClassVersion": 1, + "min": 1, + "max": 65535, + "unit": "0.01 seconds", + "list": false, + "value": 2415, + "lastUpdate": 1713718260200 + }, + "113-0-Power Management-Over-current status": { + "id": "5-113-0-Power Management-Over-current status", + "nodeId": 5, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 0, + "property": "Power Management", + "propertyName": "Power Management", + "propertyKey": "Over-current status", + "propertyKeyName": "Over-current status", + "type": "number", + "readable": true, + "writeable": false, + "label": "Over-current status", + "ccSpecific": { + "notificationType": 8 + }, + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "idle", + "value": 0 + }, + { + "text": "Over-current detected", + "value": 6 + } + ], + "lastUpdate": 1714157121797 + }, + "114-0-manufacturerId": { + "id": "5-114-0-manufacturerId", + "nodeId": 5, + "toUpdate": false, + "commandClass": 114, + "commandClassName": "Manufacturer Specific", + "endpoint": 0, + "property": "manufacturerId", + "propertyName": "manufacturerId", + "type": "number", + "readable": true, + "writeable": false, + "label": "Manufacturer ID", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 65535, + "list": false, + "value": 271, + "lastUpdate": 1713717634756 + }, + "114-0-productType": { + "id": "5-114-0-productType", + "nodeId": 5, + "toUpdate": false, + "commandClass": 114, + "commandClassName": "Manufacturer Specific", + "endpoint": 0, + "property": "productType", + "propertyName": "productType", + "type": "number", + "readable": true, + "writeable": false, + "label": "Product type", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 65535, + "list": false, + "value": 7425, + "lastUpdate": 1713717634764 + }, + "114-0-productId": { + "id": "5-114-0-productId", + "nodeId": 5, + "toUpdate": false, + "commandClass": 114, + "commandClassName": "Manufacturer Specific", + "endpoint": 0, + "property": "productId", + "propertyName": "productId", + "type": "number", + "readable": true, + "writeable": false, + "label": "Product ID", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 65535, + "list": false, + "value": 4096, + "lastUpdate": 1713717634770 + }, + "117-0-local": { + "id": "5-117-0-local", + "nodeId": 5, + "toUpdate": false, + "commandClass": 117, + "commandClassName": "Protection", + "endpoint": 0, + "property": "local", + "propertyName": "local", + "type": "number", + "readable": true, + "writeable": true, + "label": "Local protection state", + "stateless": false, + "commandClassVersion": 2, + "list": true, + "states": [ + { + "text": "Unprotected", + "value": 0 + }, + { + "text": "NoOperationPossible", + "value": 2 + } + ], + "value": 0, + "lastUpdate": 1713717644580 + }, + "117-0-rf": { + "id": "5-117-0-rf", + "nodeId": 5, + "toUpdate": false, + "commandClass": 117, + "commandClassName": "Protection", + "endpoint": 0, + "property": "rf", + "propertyName": "rf", + "type": "number", + "readable": true, + "writeable": true, + "label": "RF protection state", + "stateless": false, + "commandClassVersion": 2, + "list": true, + "states": [ + { + "text": "Unprotected", + "value": 0 + }, + { + "text": "NoControl", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1713717644582 + }, + "117-0-exclusiveControlNodeId": { + "id": "5-117-0-exclusiveControlNodeId", + "nodeId": 5, + "toUpdate": false, + "commandClass": 117, + "commandClassName": "Protection", + "endpoint": 0, + "property": "exclusiveControlNodeId", + "propertyName": "exclusiveControlNodeId", + "type": "number", + "readable": true, + "writeable": true, + "label": "Node ID with exclusive control", + "stateless": false, + "commandClassVersion": 2, + "min": 1, + "max": 232, + "list": false, + "lastUpdate": 1714157121799 + }, + "117-0-timeout": { + "id": "5-117-0-timeout", + "nodeId": 5, + "toUpdate": false, + "commandClass": 117, + "commandClassName": "Protection", + "endpoint": 0, + "property": "timeout", + "propertyName": "timeout", + "type": "number", + "readable": true, + "writeable": true, + "label": "RF protection timeout", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 255, + "list": false, + "lastUpdate": 1714157121799 + }, + "134-0-libraryType": { + "id": "5-134-0-libraryType", + "nodeId": 5, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "libraryType", + "propertyName": "libraryType", + "type": "number", + "readable": true, + "writeable": false, + "label": "Library type", + "stateless": false, + "commandClassVersion": 2, + "list": true, + "states": [ + { + "text": "Unknown", + "value": 0 + }, + { + "text": "Static Controller", + "value": 1 + }, + { + "text": "Controller", + "value": 2 + }, + { + "text": "Enhanced Slave", + "value": 3 + }, + { + "text": "Slave", + "value": 4 + }, + { + "text": "Installer", + "value": 5 + }, + { + "text": "Routing Slave", + "value": 6 + }, + { + "text": "Bridge Controller", + "value": 7 + }, + { + "text": "Device under Test", + "value": 8 + }, + { + "text": "N/A", + "value": 9 + }, + { + "text": "AV Remote", + "value": 10 + }, + { + "text": "AV Device", + "value": 11 + } + ], + "value": 3, + "lastUpdate": 1713717634893 + }, + "134-0-protocolVersion": { + "id": "5-134-0-protocolVersion", + "nodeId": 5, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "protocolVersion", + "propertyName": "protocolVersion", + "type": "string", + "readable": true, + "writeable": false, + "label": "Z-Wave protocol version", + "stateless": false, + "commandClassVersion": 2, + "list": false, + "value": "6.2", + "lastUpdate": 1713717634900 + }, + "134-0-firmwareVersions": { + "id": "5-134-0-firmwareVersions", + "nodeId": 5, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "firmwareVersions", + "propertyName": "firmwareVersions", + "type": "string[]", + "readable": true, + "writeable": false, + "label": "Z-Wave chip firmware versions", + "stateless": false, + "commandClassVersion": 2, + "list": false, + "value": ["5.1", "5.1"], + "lastUpdate": 1713717634905 + }, + "134-0-hardwareVersion": { + "id": "5-134-0-hardwareVersion", + "nodeId": 5, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "hardwareVersion", + "propertyName": "hardwareVersion", + "type": "number", + "readable": true, + "writeable": false, + "label": "Z-Wave chip hardware version", + "stateless": false, + "commandClassVersion": 2, + "list": false, + "value": 1, + "lastUpdate": 1713717634910 + }, + "38-1-targetValue": { + "id": "5-38-1-targetValue", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 1, + "property": "targetValue", + "propertyName": "targetValue", + "type": "number", + "readable": true, + "writeable": true, + "label": "Target value", + "stateless": false, + "commandClassVersion": 4, + "min": 0, + "max": 99, + "list": false, + "value": 0, + "lastUpdate": 1714157277589 + }, + "38-1-duration": { + "id": "5-38-1-duration", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 1, + "property": "duration", + "propertyName": "duration", + "type": "duration", + "readable": true, + "writeable": false, + "label": "Remaining duration", + "stateless": false, + "commandClassVersion": 4, + "list": false, + "value": "unknown", + "lastUpdate": 1714157277593 + }, + "38-1-currentValue": { + "id": "5-38-1-currentValue", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 1, + "property": "currentValue", + "propertyName": "currentValue", + "type": "number", + "readable": true, + "writeable": false, + "label": "Current value", + "stateless": false, + "commandClassVersion": 4, + "min": 0, + "max": 99, + "list": false, + "value": 0, + "isCurrentValue": true, + "targetValue": "38-1-targetValue", + "lastUpdate": 1714157277597 + }, + "38-1-Up": { + "id": "5-38-1-Up", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 1, + "property": "Up", + "propertyName": "Up", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Perform a level change (Up)", + "ccSpecific": { + "switchType": 2 + }, + "stateless": false, + "commandClassVersion": 4, + "list": true, + "states": [ + { + "text": "Start", + "value": true + }, + { + "text": "Stop", + "value": false + } + ], + "lastUpdate": 1714157121803 + }, + "38-1-Down": { + "id": "5-38-1-Down", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 1, + "property": "Down", + "propertyName": "Down", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Perform a level change (Down)", + "ccSpecific": { + "switchType": 2 + }, + "stateless": false, + "commandClassVersion": 4, + "list": true, + "states": [ + { + "text": "Start", + "value": true + }, + { + "text": "Stop", + "value": false + } + ], + "lastUpdate": 1714157121803 + }, + "38-1-restorePrevious": { + "id": "5-38-1-restorePrevious", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 1, + "property": "restorePrevious", + "propertyName": "restorePrevious", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Restore previous value", + "stateless": false, + "commandClassVersion": 4, + "list": true, + "states": [ + { + "text": "Restore", + "value": true + } + ], + "lastUpdate": 1714157121804 + }, + "50-1-value-66049": { + "id": "5-50-1-value-66049", + "nodeId": 5, + "toUpdate": false, + "commandClass": 50, + "commandClassName": "Meter", + "endpoint": 1, + "property": "value", + "propertyName": "value", + "propertyKey": 66049, + "propertyKeyName": "Electric_W_Consumed", + "type": "number", + "readable": true, + "writeable": false, + "label": "Electric Consumption [W]", + "ccSpecific": { + "meterType": 1, + "scale": 2, + "rateType": 1 + }, + "stateless": false, + "commandClassVersion": 3, + "unit": "W", + "list": false, + "value": 0, + "lastUpdate": 1714157310180 + }, + "50-1-value-65537": { + "id": "5-50-1-value-65537", + "nodeId": 5, + "toUpdate": false, + "commandClass": 50, + "commandClassName": "Meter", + "endpoint": 1, + "property": "value", + "propertyName": "value", + "propertyKey": 65537, + "propertyKeyName": "Electric_kWh_Consumed", + "type": "number", + "readable": true, + "writeable": false, + "label": "Electric Consumption [kWh]", + "ccSpecific": { + "meterType": 1, + "scale": 0, + "rateType": 1 + }, + "stateless": false, + "commandClassVersion": 3, + "unit": "kWh", + "list": false, + "value": 0, + "lastUpdate": 1713764471527 + }, + "50-1-reset": { + "id": "5-50-1-reset", + "nodeId": 5, + "toUpdate": false, + "commandClass": 50, + "commandClassName": "Meter", + "endpoint": 1, + "property": "reset", + "propertyName": "reset", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Reset accumulated values", + "stateless": false, + "commandClassVersion": 3, + "list": true, + "states": [ + { + "text": "Reset", + "value": true + } + ], + "lastUpdate": 1714157121805 + }, + "113-1-alarmType": { + "id": "5-113-1-alarmType", + "nodeId": 5, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 1, + "property": "alarmType", + "propertyName": "alarmType", + "type": "number", + "readable": true, + "writeable": false, + "label": "Alarm Type", + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": false, + "value": 0, + "lastUpdate": 1713742770496 + }, + "113-1-alarmLevel": { + "id": "5-113-1-alarmLevel", + "nodeId": 5, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 1, + "property": "alarmLevel", + "propertyName": "alarmLevel", + "type": "number", + "readable": true, + "writeable": false, + "label": "Alarm Level", + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": false, + "value": 0, + "lastUpdate": 1713742770502 + }, + "113-1-Power Management-unknown": { + "id": "5-113-1-Power Management-unknown", + "nodeId": 5, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 1, + "property": "Power Management", + "propertyName": "Power Management", + "propertyKey": "unknown", + "propertyKeyName": "unknown", + "type": "any", + "readable": true, + "writeable": true, + "label": "Power Management (property)", + "stateless": false, + "commandClassVersion": 8, + "list": false, + "value": 254, + "lastUpdate": 1713742770456 + }, + "113-1-System-unknown": { + "id": "5-113-1-System-unknown", + "nodeId": 5, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 1, + "property": "System", + "propertyName": "System", + "propertyKey": "unknown", + "propertyKeyName": "unknown", + "type": "any", + "readable": true, + "writeable": true, + "label": "System (property)", + "stateless": false, + "commandClassVersion": 8, + "list": false, + "value": 254, + "lastUpdate": 1713742770506 + }, + "113-1-System-Hardware status": { + "id": "5-113-1-System-Hardware status", + "nodeId": 5, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 1, + "property": "System", + "propertyName": "System", + "propertyKey": "Hardware status", + "propertyKeyName": "Hardware status", + "type": "number", + "readable": true, + "writeable": false, + "label": "Hardware status", + "ccSpecific": { + "notificationType": 9 + }, + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "idle", + "value": 0 + }, + { + "text": "System hardware failure (with failure code)", + "value": 3 + } + ], + "lastUpdate": 1714157121807 + }, + "38-2-targetValue": { + "id": "5-38-2-targetValue", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 2, + "property": "targetValue", + "propertyName": "targetValue", + "type": "number", + "readable": true, + "writeable": true, + "label": "Target value", + "stateless": false, + "commandClassVersion": 4, + "min": 0, + "max": 99, + "list": false, + "value": null, + "lastUpdate": 1713717642075 + }, + "38-2-duration": { + "id": "5-38-2-duration", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 2, + "property": "duration", + "propertyName": "duration", + "type": "duration", + "readable": true, + "writeable": false, + "label": "Remaining duration", + "stateless": false, + "commandClassVersion": 4, + "list": false, + "value": "unknown", + "lastUpdate": 1713717642080 + }, + "38-2-currentValue": { + "id": "5-38-2-currentValue", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 2, + "property": "currentValue", + "propertyName": "currentValue", + "type": "number", + "readable": true, + "writeable": false, + "label": "Current value", + "stateless": false, + "commandClassVersion": 4, + "min": 0, + "max": 99, + "list": false, + "value": null, + "isCurrentValue": true, + "targetValue": "38-2-targetValue", + "lastUpdate": 1713717642088 + }, + "38-2-Up": { + "id": "5-38-2-Up", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 2, + "property": "Up", + "propertyName": "Up", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Perform a level change (Up)", + "ccSpecific": { + "switchType": 2 + }, + "stateless": false, + "commandClassVersion": 4, + "list": true, + "states": [ + { + "text": "Start", + "value": true + }, + { + "text": "Stop", + "value": false + } + ], + "lastUpdate": 1714157121808 + }, + "38-2-Down": { + "id": "5-38-2-Down", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 2, + "property": "Down", + "propertyName": "Down", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Perform a level change (Down)", + "ccSpecific": { + "switchType": 2 + }, + "stateless": false, + "commandClassVersion": 4, + "list": true, + "states": [ + { + "text": "Start", + "value": true + }, + { + "text": "Stop", + "value": false + } + ], + "lastUpdate": 1714157121809 + }, + "38-2-restorePrevious": { + "id": "5-38-2-restorePrevious", + "nodeId": 5, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 2, + "property": "restorePrevious", + "propertyName": "restorePrevious", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Restore previous value", + "stateless": false, + "commandClassVersion": 4, + "list": true, + "states": [ + { + "text": "Restore", + "value": true + } + ], + "lastUpdate": 1714157121809 + } + }, + "groups": [ + { + "text": "Lifeline", + "endpoint": 0, + "value": 1, + "maxNodes": 1, + "isLifeline": true, + "multiChannel": true + }, + { + "text": "Roller Shutter", + "endpoint": 0, + "value": 2, + "maxNodes": 5, + "isLifeline": false, + "multiChannel": true + }, + { + "text": "Slats", + "endpoint": 0, + "value": 3, + "maxNodes": 5, + "isLifeline": false, + "multiChannel": true + }, + { + "text": "Lifeline", + "endpoint": 1, + "value": 1, + "maxNodes": 1, + "isLifeline": true, + "multiChannel": true + }, + { + "text": "Roller Shutter", + "endpoint": 1, + "value": 2, + "maxNodes": 5, + "isLifeline": false, + "multiChannel": true + }, + { + "text": "Lifeline", + "endpoint": 2, + "value": 1, + "maxNodes": 1, + "isLifeline": true, + "multiChannel": true + }, + { + "text": "Slats", + "endpoint": 2, + "value": 2, + "maxNodes": 5, + "isLifeline": false, + "multiChannel": true + } + ], + "neighbors": [], + "ready": true, + "available": true, + "hassDevices": {}, + "failed": false, + "inited": true, + "eventsQueue": [], + "status": "Alive", + "interviewStage": "Complete", + "priorityReturnRoute": {}, + "customReturnRoute": {}, + "prioritySUCReturnRoute": null, + "customSUCReturnRoutes": [], + "hexId": "0x010f 0x1d01-0x1000", + "dbLink": "https://devices.zwave-js.io/?jumpTo=0x010f:0x1d01:0x1000:5.1", + "manufacturerId": 271, + "productId": 4096, + "productType": 7425, + "deviceConfig": { + "filename": "E:\\domotique\\zwave-js-ui\\node_modules\\@zwave-js\\config\\config\\devices\\0x010f\\fgwreu-111.json", + "isEmbedded": true, + "manufacturer": "Fibargroup", + "manufacturerId": 271, + "label": "FGWREU-111", + "description": "Fibaro Walli Roller Shutter", + "devices": [ + { + "productType": 7425, + "productId": 4096 + } + ], + "firmwareVersion": { + "min": "0.0", + "max": "255.255" + }, + "preferred": false, + "paramInformation": { + "_map": {} + } + }, + "productLabel": "FGWREU-111", + "productDescription": "Fibaro Walli Roller Shutter", + "manufacturer": "Fibargroup", + "firmwareVersion": "5.1", + "protocolVersion": 3, + "zwavePlusVersion": 1, + "zwavePlusNodeType": 0, + "zwavePlusRoleType": 5, + "nodeType": 1, + "endpointsCount": 2, + "endpoints": [ + { + "index": 0, + "label": "Root Endpoint" + }, + { + "index": 1, + "label": "Endpoint 1" + }, + { + "index": 2, + "label": "Endpoint 2" + } + ], + "isSecure": false, + "security": "None", + "supportsSecurity": false, + "supportsBeaming": true, + "isControllerNode": false, + "isListening": true, + "isFrequentListening": false, + "isRouting": true, + "keepAwake": false, + "maxDataRate": 100000, + "deviceClass": { + "basic": 4, + "generic": 17, + "specific": 6 + }, + "lastActive": 1714157310172, + "firmwareCapabilities": { + "firmwareUpgradable": true, + "firmwareTargets": [0, 1] + }, + "deviceId": "271-4096-7425", + "hasDeviceConfigChanged": false, + "statistics": { + "commandsTX": 3, + "commandsRX": 5, + "commandsDroppedRX": 0, + "commandsDroppedTX": 0, + "timeoutResponse": 0, + "rtt": 30.7, + "lastSeen": "2024-04-26T18:48:30.172Z", + "rssi": -87, + "lwr": { + "protocolDataRate": 3, + "repeaters": [], + "rssi": -87, + "repeaterRSSI": [] + } + }, + "supportsTime": false + }, + { + "id": 6, + "name": "inter-01", + "loc": "", + "values": [ + { + "id": "6-38-0-targetValue", + "nodeId": 6, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "targetValue", + "propertyName": "targetValue", + "type": "number", + "readable": true, + "writeable": true, + "label": "Target value", + "stateless": false, + "commandClassVersion": 4, + "min": 0, + "max": 99, + "list": false, + "value": 0, + "lastUpdate": 1714290879286, + "newValue": 0 + }, + { + "id": "6-38-0-duration", + "nodeId": 6, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "duration", + "propertyName": "duration", + "type": "duration", + "readable": true, + "writeable": false, + "label": "Remaining duration", + "stateless": false, + "commandClassVersion": 4, + "list": false, + "value": { + "value": 0, + "unit": "seconds" + }, + "lastUpdate": 1714290879290, + "newValue": { + "value": 0, + "unit": "seconds" + } + }, + { + "id": "6-38-0-currentValue", + "nodeId": 6, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "currentValue", + "propertyName": "currentValue", + "type": "number", + "readable": true, + "writeable": false, + "label": "Current value", + "stateless": false, + "commandClassVersion": 4, + "min": 0, + "max": 99, + "list": false, + "value": 0, + "isCurrentValue": true, + "targetValue": "38-0-targetValue", + "lastUpdate": 1714290879293, + "newValue": 0 + }, + { + "id": "6-38-0-Up", + "nodeId": 6, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "Up", + "propertyName": "Up", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Perform a level change (Up)", + "ccSpecific": { + "switchType": 2 + }, + "stateless": false, + "commandClassVersion": 4, + "list": true, + "states": [ + { + "text": "Start", + "value": true + }, + { + "text": "Stop", + "value": false + } + ], + "value": true, + "lastUpdate": 1714163129623, + "newValue": true + }, + { + "id": "6-38-0-Down", + "nodeId": 6, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "Down", + "propertyName": "Down", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Perform a level change (Down)", + "ccSpecific": { + "switchType": 2 + }, + "stateless": false, + "commandClassVersion": 4, + "list": true, + "states": [ + { + "text": "Start", + "value": true + }, + { + "text": "Stop", + "value": false + } + ], + "value": false, + "lastUpdate": 1714163132743, + "newValue": false + }, + { + "id": "6-38-0-restorePrevious", + "nodeId": 6, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "restorePrevious", + "propertyName": "restorePrevious", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Restore previous value", + "stateless": false, + "commandClassVersion": 4, + "list": true, + "states": [ + { + "text": "Restore", + "value": true + } + ], + "lastUpdate": 1714251097946 + }, + { + "id": "6-50-0-value-65537", + "nodeId": 6, + "toUpdate": false, + "commandClass": 50, + "commandClassName": "Meter", + "endpoint": 0, + "property": "value", + "propertyName": "value", + "propertyKey": 65537, + "propertyKeyName": "Electric_kWh_Consumed", + "type": "number", + "readable": true, + "writeable": false, + "label": "Electric Consumption [kWh]", + "ccSpecific": { + "meterType": 1, + "scale": 0, + "rateType": 1 + }, + "stateless": false, + "commandClassVersion": 3, + "unit": "kWh", + "list": false, + "value": 0.06, + "lastUpdate": 1714331581340, + "newValue": 0.06 + }, + { + "id": "6-50-0-value-66049", + "nodeId": 6, + "toUpdate": false, + "commandClass": 50, + "commandClassName": "Meter", + "endpoint": 0, + "property": "value", + "propertyName": "value", + "propertyKey": 66049, + "propertyKeyName": "Electric_W_Consumed", + "type": "number", + "readable": true, + "writeable": false, + "label": "Electric Consumption [W]", + "ccSpecific": { + "meterType": 1, + "scale": 2, + "rateType": 1 + }, + "stateless": false, + "commandClassVersion": 3, + "unit": "W", + "list": false, + "value": 0, + "lastUpdate": 1714331988151, + "newValue": 0 + }, + { + "id": "6-50-0-reset", + "nodeId": 6, + "toUpdate": false, + "commandClass": 50, + "commandClassName": "Meter", + "endpoint": 0, + "property": "reset", + "propertyName": "reset", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Reset accumulated values", + "stateless": false, + "commandClassVersion": 3, + "list": true, + "states": [ + { + "text": "Reset", + "value": true + } + ], + "lastUpdate": 1714251097947 + }, + { + "id": "6-91-0-scene-001", + "nodeId": 6, + "toUpdate": false, + "commandClass": 91, + "commandClassName": "Central Scene", + "endpoint": 0, + "property": "scene", + "propertyName": "scene", + "propertyKey": "001", + "propertyKeyName": "001", + "type": "number", + "readable": true, + "writeable": false, + "label": "Scene 001", + "stateless": false, + "commandClassVersion": 3, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "KeyPressed", + "value": 0 + }, + { + "text": "KeyReleased", + "value": 1 + }, + { + "text": "KeyHeldDown", + "value": 2 + }, + { + "text": "KeyPressed2x", + "value": 3 + }, + { + "text": "KeyPressed3x", + "value": 4 + } + ], + "lastUpdate": 1714251097947 + }, + { + "id": "6-91-0-scene-002", + "nodeId": 6, + "toUpdate": false, + "commandClass": 91, + "commandClassName": "Central Scene", + "endpoint": 0, + "property": "scene", + "propertyName": "scene", + "propertyKey": "002", + "propertyKeyName": "002", + "type": "number", + "readable": true, + "writeable": false, + "label": "Scene 002", + "stateless": false, + "commandClassVersion": 3, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "KeyPressed", + "value": 0 + }, + { + "text": "KeyReleased", + "value": 1 + }, + { + "text": "KeyHeldDown", + "value": 2 + }, + { + "text": "KeyPressed2x", + "value": 3 + }, + { + "text": "KeyPressed3x", + "value": 4 + } + ], + "lastUpdate": 1714251097947 + }, + { + "id": "6-91-0-slowRefresh", + "nodeId": 6, + "toUpdate": false, + "commandClass": 91, + "commandClassName": "Central Scene", + "endpoint": 0, + "property": "slowRefresh", + "propertyName": "slowRefresh", + "type": "boolean", + "readable": true, + "writeable": true, + "description": "When this is true, KeyHeldDown notifications are sent every 55s. When this is false, the notifications are sent every 200ms.", + "label": "Send held down notifications at a slow rate", + "stateless": false, + "commandClassVersion": 3, + "list": false, + "lastUpdate": 1714251097948 + }, + { + "id": "6-108-0-ccSupported-91", + "nodeId": 6, + "toUpdate": false, + "commandClass": 108, + "commandClassName": "Supervision", + "endpoint": 0, + "property": "ccSupported", + "propertyName": "ccSupported", + "propertyKey": 91, + "propertyKeyName": "91", + "type": "any", + "readable": true, + "writeable": true, + "label": "ccSupported (property)", + "stateless": false, + "commandClassVersion": 1, + "list": false, + "value": false, + "lastUpdate": 1714163019489, + "newValue": false + }, + { + "id": "6-112-0-1", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 1, + "propertyName": "State After Power Failure", + "type": "number", + "readable": true, + "writeable": true, + "label": "State After Power Failure", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Always off", + "value": 0 + }, + { + "text": "Previous state", + "value": 1 + } + ], + "value": 1, + "lastUpdate": 1714163016394, + "newValue": 1 + }, + { + "id": "6-112-0-2", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 2, + "propertyName": "Overload Threshold", + "type": "number", + "readable": true, + "writeable": true, + "description": "Turn off the controlled device in case of exceeding threshold.", + "label": "Overload Threshold", + "default": 3500, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 5000, + "unit": "0.1 W", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 3500, + "lastUpdate": 1714163016446, + "newValue": 3500 + }, + { + "id": "6-112-0-10", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 10, + "propertyName": "LED Indicator: Overload Threshold", + "type": "number", + "readable": true, + "writeable": true, + "description": "Indicator flashes violet in case of exceeding threshold.", + "label": "LED Indicator: Overload Threshold", + "default": 3500, + "stateless": false, + "commandClassVersion": 1, + "min": 100, + "max": 5000, + "unit": "0.1 W", + "list": false, + "value": 3500, + "lastUpdate": 1714163016502, + "newValue": 3500 + }, + { + "id": "6-112-0-11", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 11, + "propertyName": "LED Indicator: Load On Color", + "type": "number", + "readable": true, + "writeable": true, + "label": "LED Indicator: Load On Color", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 9, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "White", + "value": 1 + }, + { + "text": "Red", + "value": 2 + }, + { + "text": "Green", + "value": 3 + }, + { + "text": "Blue", + "value": 4 + }, + { + "text": "Yellow", + "value": 5 + }, + { + "text": "Cyan", + "value": 6 + }, + { + "text": "Magenta", + "value": 7 + }, + { + "text": "Smooth gradient based on measured power", + "value": 8 + }, + { + "text": "Stepped gradient based on measured power", + "value": 9 + } + ], + "value": 1, + "lastUpdate": 1714163016557, + "newValue": 1 + }, + { + "id": "6-112-0-12", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 12, + "propertyName": "LED Indicator: Load Off Color", + "type": "number", + "readable": true, + "writeable": true, + "label": "LED Indicator: Load Off Color", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 7, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "White", + "value": 1 + }, + { + "text": "Red", + "value": 2 + }, + { + "text": "Green", + "value": 3 + }, + { + "text": "Blue", + "value": 4 + }, + { + "text": "Yellow", + "value": 5 + }, + { + "text": "Cyan", + "value": 6 + }, + { + "text": "Magenta", + "value": 7 + } + ], + "value": 0, + "lastUpdate": 1714163016612, + "newValue": 0 + }, + { + "id": "6-112-0-13", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 13, + "propertyName": "LED Indicator: Brightness", + "type": "number", + "readable": true, + "writeable": true, + "label": "LED Indicator: Brightness", + "default": 100, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 102, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Proportional to set level", + "value": 101 + }, + { + "text": "Inversely proportial to set level", + "value": 102 + } + ], + "value": 100, + "lastUpdate": 1714163016666, + "newValue": 100 + }, + { + "id": "6-112-0-24", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 24, + "propertyName": "Switch Inverted Orientation", + "type": "number", + "readable": true, + "writeable": true, + "label": "Switch Inverted Orientation", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163016720, + "newValue": 0 + }, + { + "id": "6-112-0-30-4278190080", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 30, + "propertyName": "Alarm Configuration: 1st Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 1st Slot: Notification Type", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 0, + "lastUpdate": 1714163016774, + "newValue": 0 + }, + { + "id": "6-112-0-30-16711680", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 30, + "propertyName": "Alarm Configuration: 1st Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 1st Slot: Notification Event", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 0, + "lastUpdate": 1714163016776, + "newValue": 0 + }, + { + "id": "6-112-0-30-3", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 30, + "propertyName": "Alarm Configuration: 1st Slot: Load Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 1st Slot: Load Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 3, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "On", + "value": 1 + }, + { + "text": "Off", + "value": 2 + }, + { + "text": "Flash", + "value": 3 + } + ], + "value": 0, + "lastUpdate": 1714163016778, + "newValue": 0 + }, + { + "id": "6-112-0-30-240", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 30, + "propertyName": "Alarm Configuration: 1st Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 1st Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1714163016781, + "newValue": 0 + }, + { + "id": "6-112-0-31-4278190080", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 31, + "propertyName": "Alarm Configuration: 2nd Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 2nd Slot: Notification Type", + "default": 5, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 5, + "lastUpdate": 1714163016835, + "newValue": 5 + }, + { + "id": "6-112-0-31-16711680", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 31, + "propertyName": "Alarm Configuration: 2nd Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 2nd Slot: Notification Event", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 255, + "lastUpdate": 1714163016837, + "newValue": 255 + }, + { + "id": "6-112-0-31-3", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 31, + "propertyName": "Alarm Configuration: 2nd Slot: Load Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 2nd Slot: Load Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 3, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "On", + "value": 1 + }, + { + "text": "Off", + "value": 2 + }, + { + "text": "Flash", + "value": 3 + } + ], + "value": 0, + "lastUpdate": 1714163016839, + "newValue": 0 + }, + { + "id": "6-112-0-31-240", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 31, + "propertyName": "Alarm Configuration: 2nd Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 2nd Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1714163016841, + "newValue": 0 + }, + { + "id": "6-112-0-32-4278190080", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 32, + "propertyName": "Alarm Configuration: 3rd Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 3rd Slot: Notification Type", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 1, + "lastUpdate": 1714163016896, + "newValue": 1 + }, + { + "id": "6-112-0-32-16711680", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 32, + "propertyName": "Alarm Configuration: 3rd Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 3rd Slot: Notification Event", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 255, + "lastUpdate": 1714163016900, + "newValue": 255 + }, + { + "id": "6-112-0-32-3", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 32, + "propertyName": "Alarm Configuration: 3rd Slot: Load Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 3rd Slot: Load Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 3, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "On", + "value": 1 + }, + { + "text": "Off", + "value": 2 + }, + { + "text": "Flash", + "value": 3 + } + ], + "value": 0, + "lastUpdate": 1714163016904, + "newValue": 0 + }, + { + "id": "6-112-0-32-240", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 32, + "propertyName": "Alarm Configuration: 3rd Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 3rd Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1714163016907, + "newValue": 0 + }, + { + "id": "6-112-0-33-4278190080", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 33, + "propertyName": "Alarm Configuration: 4th Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 4th Slot: Notification Type", + "default": 2, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 2, + "lastUpdate": 1714163016960, + "newValue": 2 + }, + { + "id": "6-112-0-33-16711680", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 33, + "propertyName": "Alarm Configuration: 4th Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 4th Slot: Notification Event", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 255, + "lastUpdate": 1714163016967, + "newValue": 255 + }, + { + "id": "6-112-0-33-3", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 33, + "propertyName": "Alarm Configuration: 4th Slot: Load Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 4th Slot: Load Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 3, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "On", + "value": 1 + }, + { + "text": "Off", + "value": 2 + }, + { + "text": "Flash", + "value": 3 + } + ], + "value": 0, + "lastUpdate": 1714163016973, + "newValue": 0 + }, + { + "id": "6-112-0-33-240", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 33, + "propertyName": "Alarm Configuration: 4th Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 4th Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1714163016976, + "newValue": 0 + }, + { + "id": "6-112-0-34-4278190080", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 34, + "propertyName": "Alarm Configuration: 5th Slot: Notification Type", + "propertyKey": 4278190080, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 5th Slot: Notification Type", + "default": 4, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 22, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Smoke Alarm", + "value": 1 + }, + { + "text": "CO Alarm", + "value": 2 + }, + { + "text": "CO2 Alarm", + "value": 3 + }, + { + "text": "Heat Alarm", + "value": 4 + }, + { + "text": "Water Alarm", + "value": 5 + }, + { + "text": "Access Control", + "value": 6 + }, + { + "text": "Home Security", + "value": 7 + }, + { + "text": "Power Management", + "value": 8 + }, + { + "text": "System", + "value": 9 + }, + { + "text": "Emergency Alarm", + "value": 10 + }, + { + "text": "Clock", + "value": 11 + }, + { + "text": "Appliance", + "value": 12 + }, + { + "text": "Home Health", + "value": 13 + }, + { + "text": "Siren", + "value": 14 + }, + { + "text": "Water Valve", + "value": 15 + }, + { + "text": "Weather Alarm", + "value": 16 + }, + { + "text": "Irrigation", + "value": 17 + }, + { + "text": "Gas Alarm", + "value": 18 + }, + { + "text": "Pest Control", + "value": 19 + }, + { + "text": "Light Sensor", + "value": 20 + }, + { + "text": "Water Quality Monitoring", + "value": 21 + }, + { + "text": "Home Monitoring", + "value": 22 + } + ], + "value": 4, + "lastUpdate": 1714163017029, + "newValue": 4 + }, + { + "id": "6-112-0-34-16711680", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 34, + "propertyName": "Alarm Configuration: 5th Slot: Notification Event", + "propertyKey": 16711680, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 5th Slot: Notification Event", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disabled", + "value": 0 + }, + { + "text": "Any Notification", + "value": 255 + } + ], + "value": 255, + "lastUpdate": 1714163017034, + "newValue": 255 + }, + { + "id": "6-112-0-34-3", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 34, + "propertyName": "Alarm Configuration: 5th Slot: Load Action", + "propertyKey": 3, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 5th Slot: Load Action", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 3, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "On", + "value": 1 + }, + { + "text": "Off", + "value": 2 + }, + { + "text": "Flash", + "value": 3 + } + ], + "value": 0, + "lastUpdate": 1714163017039, + "newValue": 0 + }, + { + "id": "6-112-0-34-240", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 34, + "propertyName": "Alarm Configuration: 5th Slot: LED Indicator", + "propertyKey": 240, + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Configuration: 5th Slot: LED Indicator", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 15, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "No change", + "value": 0 + }, + { + "text": "Blink red", + "value": 1 + }, + { + "text": "Blink green", + "value": 2 + }, + { + "text": "Blink blue", + "value": 4 + }, + { + "text": "Disable LED", + "value": 8 + }, + { + "text": "Blink red-white-blue", + "value": 15 + } + ], + "value": 0, + "lastUpdate": 1714163017042, + "newValue": 0 + }, + { + "id": "6-112-0-35", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 35, + "propertyName": "Alarm Duration", + "type": "number", + "readable": true, + "writeable": true, + "label": "Alarm Duration", + "default": 600, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 32400, + "unit": "seconds", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Infinite", + "value": 0 + } + ], + "value": 600, + "lastUpdate": 1714163017097, + "newValue": 600 + }, + { + "id": "6-112-0-40-1", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 40, + "propertyName": "Key S1 Central Scene: Pressed 1x", + "propertyKey": 1, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S1 Central Scene: Pressed 1x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163017154, + "newValue": 0 + }, + { + "id": "6-112-0-40-2", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 40, + "propertyName": "Key S1 Central Scene: Pressed 2x", + "propertyKey": 2, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S1 Central Scene: Pressed 2x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163017158, + "newValue": 0 + }, + { + "id": "6-112-0-40-4", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 40, + "propertyName": "Key S1 Central Scene: Pressed 3x", + "propertyKey": 4, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S1 Central Scene: Pressed 3x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163017160, + "newValue": 0 + }, + { + "id": "6-112-0-40-8", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 40, + "propertyName": "Key S1 Central Scene: Hold and Released", + "propertyKey": 8, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S1 Central Scene: Hold and Released", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163017162, + "newValue": 0 + }, + { + "id": "6-112-0-41-1", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 41, + "propertyName": "Key S2 Central Scene: Pressed 1x", + "propertyKey": 1, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S2 Central Scene: Pressed 1x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163017214, + "newValue": 0 + }, + { + "id": "6-112-0-41-2", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 41, + "propertyName": "Key S2 Central Scene: Pressed 2x", + "propertyKey": 2, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S2 Central Scene: Pressed 2x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163017223, + "newValue": 0 + }, + { + "id": "6-112-0-41-4", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 41, + "propertyName": "Key S2 Central Scene: Pressed 3x", + "propertyKey": 4, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S2 Central Scene: Pressed 3x", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163017226, + "newValue": 0 + }, + { + "id": "6-112-0-41-8", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 41, + "propertyName": "Key S2 Central Scene: Hold and Released", + "propertyKey": 8, + "type": "number", + "readable": true, + "writeable": true, + "label": "Key S2 Central Scene: Hold and Released", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163017228, + "newValue": 0 + }, + { + "id": "6-112-0-60", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 60, + "propertyName": "Power Report: Include Self-Consumption", + "type": "number", + "readable": true, + "writeable": true, + "label": "Power Report: Include Self-Consumption", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Enable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163017282, + "newValue": 0 + }, + { + "id": "6-112-0-61", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 61, + "propertyName": "Power Reports: Relative Change Threshold", + "type": "number", + "readable": true, + "writeable": true, + "label": "Power Reports: Relative Change Threshold", + "default": 15, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 500, + "unit": "%", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 15, + "lastUpdate": 1714163017341, + "newValue": 15 + }, + { + "id": "6-112-0-62", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 62, + "propertyName": "Power Reports: Interval", + "type": "number", + "readable": true, + "writeable": true, + "label": "Power Reports: Interval", + "default": 3600, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 32400, + "unit": "seconds", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 3600, + "lastUpdate": 1714163017396, + "newValue": 3600 + }, + { + "id": "6-112-0-65", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 65, + "propertyName": "Energy Reports: Threshold", + "type": "number", + "readable": true, + "writeable": true, + "label": "Energy Reports: Threshold", + "default": 10, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 500, + "unit": "0.01 kWh", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 10, + "lastUpdate": 1714163017456, + "newValue": 10 + }, + { + "id": "6-112-0-66", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 66, + "propertyName": "Energy Reports: Interval", + "type": "number", + "readable": true, + "writeable": true, + "label": "Energy Reports: Interval", + "default": 3600, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 32400, + "unit": "seconds", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 3600, + "lastUpdate": 1714163017509, + "newValue": 3600 + }, + { + "id": "6-112-0-150", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 150, + "propertyName": "Minimum Dim Level", + "type": "number", + "readable": true, + "writeable": true, + "label": "Minimum Dim Level", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 1, + "max": 98, + "list": false, + "value": 1, + "lastUpdate": 1714163405608, + "newValue": 1 + }, + { + "id": "6-112-0-151", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 151, + "propertyName": "Maximum Dim Level", + "type": "number", + "readable": true, + "writeable": true, + "label": "Maximum Dim Level", + "default": 99, + "stateless": false, + "commandClassVersion": 1, + "min": 2, + "max": 99, + "list": false, + "value": 70, + "lastUpdate": 1714163406200, + "newValue": 70 + }, + { + "id": "6-112-0-152", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 152, + "propertyName": "Fluorescent Lamp: Startup Brightness", + "type": "number", + "readable": true, + "writeable": true, + "label": "Fluorescent Lamp: Startup Brightness", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 1, + "max": 99, + "list": false, + "value": 1, + "lastUpdate": 1714163017673, + "newValue": 1 + }, + { + "id": "6-112-0-153", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 153, + "propertyName": "Fluorescent Lamp: Startup Time", + "type": "number", + "readable": true, + "writeable": true, + "label": "Fluorescent Lamp: Startup Time", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "unit": "0.1 seconds", + "list": false, + "value": 0, + "lastUpdate": 1714163017725, + "newValue": 0 + }, + { + "id": "6-112-0-154", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 154, + "propertyName": "Automatic Control: Dimming Step Size", + "type": "number", + "readable": true, + "writeable": true, + "label": "Automatic Control: Dimming Step Size", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 1, + "max": 99, + "list": false, + "value": 1, + "lastUpdate": 1714163017778, + "newValue": 1 + }, + { + "id": "6-112-0-155", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 155, + "propertyName": "Automatic Control: Dimming Step Duration", + "type": "number", + "readable": true, + "writeable": true, + "label": "Automatic Control: Dimming Step Duration", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "unit": "0.01 seconds", + "list": false, + "value": 1, + "lastUpdate": 1714163017830, + "newValue": 1 + }, + { + "id": "6-112-0-156", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 156, + "propertyName": "Manual Control: Dimming Step Size", + "type": "number", + "readable": true, + "writeable": true, + "label": "Manual Control: Dimming Step Size", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 1, + "max": 99, + "list": false, + "value": 1, + "lastUpdate": 1714163017885, + "newValue": 1 + }, + { + "id": "6-112-0-157", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 157, + "propertyName": "Manual Control: Dimming Step Duration", + "type": "number", + "readable": true, + "writeable": true, + "label": "Manual Control: Dimming Step Duration", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "unit": "0.01 seconds", + "list": false, + "value": 5, + "lastUpdate": 1714163017940, + "newValue": 5 + }, + { + "id": "6-112-0-158", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 158, + "propertyName": "Auto-Off Timer", + "type": "number", + "readable": true, + "writeable": true, + "label": "Auto-Off Timer", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 32767, + "unit": "seconds", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 0, + "lastUpdate": 1714163017994, + "newValue": 0 + }, + { + "id": "6-112-0-159", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 159, + "propertyName": "Force Calibration", + "type": "number", + "readable": true, + "writeable": true, + "label": "Force Calibration", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Without Fibaro Bypass 2", + "value": 1 + }, + { + "text": "With Fibaro Bypass 2", + "value": 2 + } + ], + "value": 0, + "lastUpdate": 1714163406788, + "newValue": 0 + }, + { + "id": "6-112-0-160", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 160, + "propertyName": "Calibration Status", + "type": "number", + "readable": true, + "writeable": false, + "label": "Calibration Status", + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Uncalibrated or overridden", + "value": 0 + }, + { + "text": "Calibrated", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163407389, + "newValue": 0 + }, + { + "id": "6-112-0-161", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 161, + "propertyName": "Burnt Out Bulb Detection: Power Variation", + "type": "number", + "readable": true, + "writeable": true, + "label": "Burnt Out Bulb Detection: Power Variation", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 99, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + } + ], + "value": 0, + "lastUpdate": 1714163018157, + "newValue": 0 + }, + { + "id": "6-112-0-162", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 162, + "propertyName": "Burnt Out Bulb and Overload Detection: Time Delay", + "type": "number", + "readable": true, + "writeable": true, + "label": "Burnt Out Bulb and Overload Detection: Time Delay", + "default": 5, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "unit": "seconds", + "list": false, + "value": 5, + "lastUpdate": 1714163018213, + "newValue": 5 + }, + { + "id": "6-112-0-163", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 163, + "propertyName": "First Button ON: Value Sent to Association Groups", + "type": "number", + "readable": true, + "writeable": true, + "label": "First Button ON: Value Sent to Association Groups", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Current level", + "value": 254 + } + ], + "value": 255, + "lastUpdate": 1714163018269, + "newValue": 255 + }, + { + "id": "6-112-0-164", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 164, + "propertyName": "Second Button OFF: Value Sent to Association Groups", + "type": "number", + "readable": true, + "writeable": true, + "label": "Second Button OFF: Value Sent to Association Groups", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Current level", + "value": 254 + } + ], + "value": 0, + "lastUpdate": 1714163018324, + "newValue": 0 + }, + { + "id": "6-112-0-165", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 165, + "propertyName": "Double Click: Set Level", + "type": "number", + "readable": true, + "writeable": true, + "label": "Double Click: Set Level", + "default": 99, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 99, + "list": false, + "value": 99, + "lastUpdate": 1714163018378, + "newValue": 99 + }, + { + "id": "6-112-0-170", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 170, + "propertyName": "Dimmer Mode", + "type": "number", + "readable": true, + "writeable": true, + "label": "Dimmer Mode", + "default": 2, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Force leading edge", + "value": 0 + }, + { + "text": "Force trailing edge", + "value": 1 + }, + { + "text": "Auto-Detect", + "value": 2 + } + ], + "value": 2, + "lastUpdate": 1714163018440, + "newValue": 2 + }, + { + "id": "6-112-0-171", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 171, + "propertyName": "Detected Dimmer Mode", + "type": "number", + "readable": true, + "writeable": false, + "label": "Detected Dimmer Mode", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Leading edge", + "value": 0 + }, + { + "text": "Trailing edge", + "value": 1 + } + ], + "value": 1, + "lastUpdate": 1714163407973, + "newValue": 1 + }, + { + "id": "6-112-0-172", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 172, + "propertyName": "Load Type", + "type": "number", + "readable": true, + "writeable": true, + "label": "Load Type", + "default": 2, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Dimmable", + "value": 0 + }, + { + "text": "Non-Dimmable (Dimming is disabled)", + "value": 1 + }, + { + "text": "Auto-Detect", + "value": 2 + } + ], + "value": 2, + "lastUpdate": 1714163018562, + "newValue": 2 + }, + { + "id": "6-112-0-173", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 173, + "propertyName": "Detected Load Type", + "type": "number", + "readable": true, + "writeable": false, + "label": "Detected Load Type", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Dimmable", + "value": 0 + }, + { + "text": "Non-Dimmable", + "value": 1 + } + ], + "value": 0, + "lastUpdate": 1714163018622, + "newValue": 0 + }, + { + "id": "6-112-0-174", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 174, + "propertyName": "Soft-Start Duration", + "type": "number", + "readable": true, + "writeable": true, + "label": "Soft-Start Duration", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "0.1 seconds", + "value": 1 + }, + { + "text": "0.5 seconds", + "value": 2 + } + ], + "value": 1, + "lastUpdate": 1714163018677, + "newValue": 1 + }, + { + "id": "6-112-0-175", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 175, + "propertyName": "Auto-Calibration Trigger", + "type": "number", + "readable": true, + "writeable": true, + "label": "Auto-Calibration Trigger", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 4, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "None", + "value": 0 + }, + { + "text": "Power on", + "value": 2 + }, + { + "text": "Load error", + "value": 3 + }, + { + "text": "Power on and load error", + "value": 4 + } + ], + "value": 0, + "lastUpdate": 1714163018737, + "newValue": 0 + }, + { + "id": "6-112-0-176", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 176, + "propertyName": "Behaviour After Overcurrent or Surge", + "type": "number", + "readable": true, + "writeable": true, + "label": "Behaviour After Overcurrent or Surge", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Disable load", + "value": 0 + }, + { + "text": "Three attempts to turn on the load", + "value": 1 + } + ], + "value": 1, + "isCurrentValue": true, + "lastUpdate": 1714163018794, + "newValue": 1 + }, + { + "id": "6-112-0-177", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 177, + "propertyName": "Brightness Level Correction Duration for Flickering Loads", + "type": "number", + "readable": true, + "writeable": true, + "label": "Brightness Level Correction Duration for Flickering Loads", + "default": 255, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 255, + "unit": "seconds", + "list": true, + "allowManualEntry": true, + "states": [ + { + "text": "Disable", + "value": 0 + }, + { + "text": "Automatic correction", + "value": 255 + } + ], + "value": 255, + "lastUpdate": 1714163018847, + "newValue": 255 + }, + { + "id": "6-112-0-178", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 178, + "propertyName": "Active Power Calculation Method", + "type": "number", + "readable": true, + "writeable": true, + "label": "Active Power Calculation Method", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 2, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Standard algorithm", + "value": 0 + }, + { + "text": "Calibration data approximation", + "value": 1 + }, + { + "text": "Control angle approximation", + "value": 2 + } + ], + "value": 0, + "lastUpdate": 1714163018900, + "newValue": 0 + }, + { + "id": "6-112-0-179", + "nodeId": 6, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 179, + "propertyName": "Approximated Power At Maximum Brightness", + "type": "number", + "readable": true, + "writeable": true, + "label": "Approximated Power At Maximum Brightness", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 500, + "unit": "W", + "list": false, + "value": 0, + "lastUpdate": 1714163018953, + "newValue": 0 + }, + { + "id": "6-113-0-Power Management-Over-current status", + "nodeId": 6, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 0, + "property": "Power Management", + "propertyName": "Power Management", + "propertyKey": "Over-current status", + "propertyKeyName": "Over-current status", + "type": "number", + "readable": true, + "writeable": false, + "label": "Over-current status", + "ccSpecific": { + "notificationType": 8 + }, + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "idle", + "value": 0 + }, + { + "text": "Over-current detected", + "value": 6 + } + ], + "value": 0, + "lastUpdate": 1714163019189, + "newValue": 0 + }, + { + "id": "6-113-0-Power Management-Over-load status", + "nodeId": 6, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 0, + "property": "Power Management", + "propertyName": "Power Management", + "propertyKey": "Over-load status", + "propertyKeyName": "Over-load status", + "type": "number", + "readable": true, + "writeable": false, + "label": "Over-load status", + "ccSpecific": { + "notificationType": 8 + }, + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "idle", + "value": 0 + }, + { + "text": "Over-load detected", + "value": 8 + } + ], + "value": 0, + "lastUpdate": 1714163019193, + "newValue": 0 + }, { - "time": "2023-12-15T14:24:13.158Z", - "event": "value updated", - "args": [ + "id": "6-113-0-Power Management-Load error status", + "nodeId": 6, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 0, + "property": "Power Management", + "propertyName": "Power Management", + "propertyKey": "Load error status", + "propertyKeyName": "Load error status", + "type": "number", + "readable": true, + "writeable": false, + "label": "Load error status", + "ccSpecific": { + "notificationType": 8 + }, + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "idle", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" + "text": "Load error", + "value": 9 } - ] + ], + "value": 0, + "lastUpdate": 1714163019195, + "newValue": 0 }, { - "time": "2023-12-15T14:24:30.186Z", - "event": "value updated", - "args": [ + "id": "6-113-0-System-Hardware status", + "nodeId": 6, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 0, + "property": "System", + "propertyName": "System", + "propertyKey": "Hardware status", + "propertyKeyName": "Hardware status", + "type": "number", + "readable": true, + "writeable": false, + "label": "Hardware status", + "ccSpecific": { + "notificationType": 9 + }, + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": true, + "states": [ + { + "text": "idle", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" + "text": "System hardware failure (with failure code)", + "value": 3 } - ] + ], + "value": 0, + "lastUpdate": 1714163019250, + "newValue": 0 }, { - "time": "2023-12-15T14:24:30.187Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] + "id": "6-113-0-alarmType", + "nodeId": 6, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 0, + "property": "alarmType", + "propertyName": "alarmType", + "type": "number", + "readable": true, + "writeable": false, + "label": "Alarm Type", + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": false, + "lastUpdate": 1714251097977 }, { - "time": "2023-12-15T14:24:30.189Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] + "id": "6-113-0-alarmLevel", + "nodeId": 6, + "toUpdate": false, + "commandClass": 113, + "commandClassName": "Notification", + "endpoint": 0, + "property": "alarmLevel", + "propertyName": "alarmLevel", + "type": "number", + "readable": true, + "writeable": false, + "label": "Alarm Level", + "stateless": false, + "commandClassVersion": 8, + "min": 0, + "max": 255, + "list": false, + "lastUpdate": 1714251097978 }, { - "time": "2023-12-15T14:24:30.190Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] + "id": "6-114-0-manufacturerId", + "nodeId": 6, + "toUpdate": false, + "commandClass": 114, + "commandClassName": "Manufacturer Specific", + "endpoint": 0, + "property": "manufacturerId", + "propertyName": "manufacturerId", + "type": "number", + "readable": true, + "writeable": false, + "label": "Manufacturer ID", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 65535, + "list": false, + "value": 271, + "lastUpdate": 1714163013457, + "newValue": 271 }, { - "time": "2023-12-15T14:24:30.642Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] + "id": "6-114-0-productType", + "nodeId": 6, + "toUpdate": false, + "commandClass": 114, + "commandClassName": "Manufacturer Specific", + "endpoint": 0, + "property": "productType", + "propertyName": "productType", + "type": "number", + "readable": true, + "writeable": false, + "label": "Product type", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 65535, + "list": false, + "value": 7169, + "lastUpdate": 1714163013462, + "newValue": 7169 }, { - "time": "2023-12-15T14:24:30.642Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] + "id": "6-114-0-productId", + "nodeId": 6, + "toUpdate": false, + "commandClass": 114, + "commandClassName": "Manufacturer Specific", + "endpoint": 0, + "property": "productId", + "propertyName": "productId", + "type": "number", + "readable": true, + "writeable": false, + "label": "Product ID", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 65535, + "list": false, + "value": 4096, + "lastUpdate": 1714163013467, + "newValue": 4096 }, { - "time": "2023-12-15T14:24:30.643Z", - "event": "value updated", - "args": [ + "id": "6-117-0-local", + "nodeId": 6, + "toUpdate": false, + "commandClass": 117, + "commandClassName": "Protection", + "endpoint": 0, + "property": "local", + "propertyName": "local", + "type": "number", + "readable": true, + "writeable": true, + "label": "Local protection state", + "stateless": false, + "commandClassVersion": 2, + "list": true, + "states": [ + { + "text": "Unprotected", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" + "text": "NoOperationPossible", + "value": 2 } - ] + ], + "value": 0, + "lastUpdate": 1714163019370, + "newValue": 0 }, { - "time": "2023-12-15T14:24:30.644Z", - "event": "value updated", - "args": [ + "id": "6-117-0-rf", + "nodeId": 6, + "toUpdate": false, + "commandClass": 117, + "commandClassName": "Protection", + "endpoint": 0, + "property": "rf", + "propertyName": "rf", + "type": "number", + "readable": true, + "writeable": true, + "label": "RF protection state", + "stateless": false, + "commandClassVersion": 2, + "list": true, + "states": [ + { + "text": "Unprotected", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" + "text": "NoControl", + "value": 1 } - ] + ], + "value": 0, + "lastUpdate": 1714163019374, + "newValue": 0 }, { - "time": "2023-12-15T14:24:31.341Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] + "id": "6-117-0-exclusiveControlNodeId", + "nodeId": 6, + "toUpdate": false, + "commandClass": 117, + "commandClassName": "Protection", + "endpoint": 0, + "property": "exclusiveControlNodeId", + "propertyName": "exclusiveControlNodeId", + "type": "number", + "readable": true, + "writeable": true, + "label": "Node ID with exclusive control", + "stateless": false, + "commandClassVersion": 2, + "min": 1, + "max": 232, + "list": false, + "lastUpdate": 1714251097979 }, { - "time": "2023-12-15T14:24:31.342Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] + "id": "6-117-0-timeout", + "nodeId": 6, + "toUpdate": false, + "commandClass": 117, + "commandClassName": "Protection", + "endpoint": 0, + "property": "timeout", + "propertyName": "timeout", + "type": "number", + "readable": true, + "writeable": true, + "label": "RF protection timeout", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 255, + "list": false, + "lastUpdate": 1714251097980 }, { - "time": "2023-12-15T14:24:31.343Z", - "event": "value updated", - "args": [ + "id": "6-134-0-libraryType", + "nodeId": 6, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "libraryType", + "propertyName": "libraryType", + "type": "number", + "readable": true, + "writeable": false, + "label": "Library type", + "stateless": false, + "commandClassVersion": 2, + "list": true, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:31.344Z", - "event": "value updated", - "args": [ + "text": "Unknown", + "value": 0 + }, + { + "text": "Static Controller", + "value": 1 + }, + { + "text": "Controller", + "value": 2 + }, + { + "text": "Enhanced Slave", + "value": 3 + }, + { + "text": "Slave", + "value": 4 + }, + { + "text": "Installer", + "value": 5 + }, + { + "text": "Routing Slave", + "value": 6 + }, + { + "text": "Bridge Controller", + "value": 7 + }, + { + "text": "Device under Test", + "value": 8 + }, + { + "text": "N/A", + "value": 9 + }, + { + "text": "AV Remote", + "value": 10 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" + "text": "AV Device", + "value": 11 } - ] + ], + "value": 3, + "lastUpdate": 1714163013575, + "newValue": 3 }, { - "time": "2023-12-15T14:24:31.740Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] + "id": "6-134-0-protocolVersion", + "nodeId": 6, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "protocolVersion", + "propertyName": "protocolVersion", + "type": "string", + "readable": true, + "writeable": false, + "label": "Z-Wave protocol version", + "stateless": false, + "commandClassVersion": 2, + "list": false, + "value": "6.2", + "lastUpdate": 1714163013580, + "newValue": "6.2" }, { - "time": "2023-12-15T14:24:31.740Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] + "id": "6-134-0-firmwareVersions", + "nodeId": 6, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "firmwareVersions", + "propertyName": "firmwareVersions", + "type": "string[]", + "readable": true, + "writeable": false, + "label": "Z-Wave chip firmware versions", + "stateless": false, + "commandClassVersion": 2, + "list": false, + "value": ["5.1", "5.1", "3.6"], + "lastUpdate": 1714163013586, + "newValue": ["5.1", "5.1", "3.6"] }, { - "time": "2023-12-15T14:24:31.741Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] + "id": "6-134-0-hardwareVersion", + "nodeId": 6, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "hardwareVersion", + "propertyName": "hardwareVersion", + "type": "number", + "readable": true, + "writeable": false, + "label": "Z-Wave chip hardware version", + "stateless": false, + "commandClassVersion": 2, + "list": false, + "value": 1, + "lastUpdate": 1714163013591, + "newValue": 1 + } + ], + "groups": [ + { + "text": "Lifeline", + "endpoint": 0, + "value": 1, + "maxNodes": 1, + "isLifeline": true, + "multiChannel": true }, { - "time": "2023-12-15T14:24:31.742Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] + "text": "On/Off", + "endpoint": 0, + "value": 2, + "maxNodes": 5, + "isLifeline": false, + "multiChannel": true }, { - "time": "2023-12-15T14:24:32.437Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] + "text": "Dimmer", + "endpoint": 0, + "value": 3, + "maxNodes": 5, + "isLifeline": false, + "multiChannel": true + } + ], + "neighbors": [], + "ready": true, + "available": true, + "hassDevices": {}, + "failed": false, + "inited": true, + "eventsQueue": [], + "status": "Alive", + "interviewStage": "Complete", + "priorityReturnRoute": {}, + "customReturnRoute": {}, + "prioritySUCReturnRoute": false, + "customSUCReturnRoutes": [], + "hexId": "0x010f 0x1c01-0x1000", + "dbLink": "https://devices.zwave-js.io/?jumpTo=0x010f:0x1c01:0x1000:5.1", + "manufacturerId": 271, + "productId": 4096, + "productType": 7169, + "deviceConfig": { + "filename": "E:\\domotique\\zwave-js-ui\\node_modules\\@zwave-js\\config\\config\\devices\\0x010f\\fgwdeu.json", + "isEmbedded": true, + "manufacturer": "Fibargroup", + "manufacturerId": 271, + "label": "FGWDEU", + "description": "Fibaro Walli Dimmer", + "devices": [ + { + "productType": 271, + "productId": 7169 + }, + { + "productType": 7169, + "productId": 4096 + } + ], + "firmwareVersion": { + "min": "0.0", + "max": "255.255" }, + "preferred": false, + "paramInformation": { + "_map": {} + } + }, + "productLabel": "FGWDEU", + "productDescription": "Fibaro Walli Dimmer", + "manufacturer": "Fibargroup", + "firmwareVersion": "5.1", + "protocolVersion": 3, + "zwavePlusVersion": 1, + "zwavePlusNodeType": 0, + "zwavePlusRoleType": 5, + "nodeType": 1, + "endpointsCount": 0, + "endpoints": [ { - "time": "2023-12-15T14:24:32.438Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, + "index": 0, + "label": "Root Endpoint" + } + ], + "isSecure": true, + "security": "S2_Authenticated", + "supportsSecurity": false, + "supportsBeaming": true, + "isControllerNode": false, + "isListening": true, + "isFrequentListening": false, + "isRouting": true, + "keepAwake": false, + "maxDataRate": 100000, + "deviceClass": { + "basic": 4, + "generic": 17, + "specific": 1 + }, + "lastActive": 1714331988139, + "firmwareCapabilities": { + "firmwareUpgradable": true, + "firmwareTargets": [0, 1, 2] + }, + "deviceId": "271-4096-7169", + "hasDeviceConfigChanged": false, + "statistics": { + "commandsTX": 122, + "commandsRX": 261, + "commandsDroppedRX": 4, + "commandsDroppedTX": 0, + "timeoutResponse": 0, + "lastSeen": "2024-04-28T19:19:48.139Z", + "lwr": { + "protocolDataRate": 2, + "repeaters": [3], + "rssi": -41, + "repeaterRSSI": [127] + }, + "rtt": 76.2, + "rssi": -41, + "nlwr": { + "protocolDataRate": 3, + "repeaters": [], + "rssi": -69, + "repeaterRSSI": [] + } + }, + "supportsTime": false, + "_name": "inter-01", + "applicationRoute": false, + "lastReceive": 1714331988139, + "lastTransmit": 1714330842415, + "errorReceive": false, + "errorTransmit": false + }, + { + "id": 8, + "name": "Radiateur", + "loc": "Bureau", + "values": [ { - "time": "2023-12-15T14:24:32.444Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] + "id": "8-37-0-currentValue", + "nodeId": 8, + "toUpdate": false, + "commandClass": 37, + "commandClassName": "Binary Switch", + "endpoint": 0, + "property": "currentValue", + "propertyName": "currentValue", + "type": "boolean", + "readable": true, + "writeable": false, + "label": "Current value", + "stateless": false, + "commandClassVersion": 1, + "list": false, + "value": false, + "isCurrentValue": true, + "targetValue": "37-0-targetValue", + "lastUpdate": 1714853230143, + "newValue": false }, { - "time": "2023-12-15T14:24:32.444Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] + "id": "8-37-0-targetValue", + "nodeId": 8, + "toUpdate": false, + "commandClass": 37, + "commandClassName": "Binary Switch", + "endpoint": 0, + "property": "targetValue", + "propertyName": "targetValue", + "type": "boolean", + "readable": true, + "writeable": true, + "label": "Target value", + "stateless": false, + "commandClassVersion": 1, + "list": false, + "value": false, + "lastUpdate": 1714853230140, + "newValue": false }, { - "time": "2023-12-15T14:24:32.935Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] + "id": "8-38-0-currentValue", + "nodeId": 8, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "currentValue", + "propertyName": "currentValue", + "type": "number", + "readable": true, + "writeable": false, + "label": "Current value", + "stateless": false, + "commandClassVersion": 3, + "min": 0, + "max": 99, + "list": false, + "value": 30, + "isCurrentValue": true, + "targetValue": "38-0-targetValue", + "lastUpdate": 1714900657808, + "newValue": 30 }, { - "time": "2023-12-15T14:24:32.936Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] + "id": "8-38-0-targetValue", + "nodeId": 8, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "targetValue", + "propertyName": "targetValue", + "type": "number", + "readable": true, + "writeable": true, + "label": "Target value", + "stateless": false, + "commandClassVersion": 3, + "min": 0, + "max": 99, + "list": false, + "value": 30, + "lastUpdate": 1714900653764, + "newValue": 30 }, { - "time": "2023-12-15T14:24:32.938Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] + "id": "8-38-0-Up", + "nodeId": 8, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "Up", + "propertyName": "Up", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Perform a level change (Up)", + "ccSpecific": { + "switchType": 2 + }, + "stateless": false, + "commandClassVersion": 3, + "list": false, + "value": true, + "lastUpdate": 1714424589362, + "newValue": true }, { - "time": "2023-12-15T14:24:32.939Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] + "id": "8-38-0-Down", + "nodeId": 8, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "Down", + "propertyName": "Down", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Perform a level change (Down)", + "ccSpecific": { + "switchType": 2 + }, + "stateless": false, + "commandClassVersion": 3, + "list": false, + "lastUpdate": 1714424589364 }, { - "time": "2023-12-15T14:24:33.033Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] + "id": "8-38-0-duration", + "nodeId": 8, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "duration", + "propertyName": "duration", + "type": "duration", + "readable": true, + "writeable": false, + "label": "Remaining duration", + "stateless": false, + "commandClassVersion": 3, + "list": false, + "value": { + "unit": "seconds" + }, + "lastUpdate": 1714424589365, + "newValue": { + "unit": "seconds" + } }, { - "time": "2023-12-15T14:24:33.033Z", - "event": "value updated", - "args": [ + "id": "8-38-0-restorePrevious", + "nodeId": 8, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "restorePrevious", + "propertyName": "restorePrevious", + "type": "boolean", + "readable": false, + "writeable": true, + "label": "Restore previous value", + "stateless": false, + "commandClassVersion": 3, + "list": true, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" + "text": "Restore", + "value": true } - ] + ], + "value": true, + "lastUpdate": 1714853287177, + "newValue": true }, { - "time": "2023-12-15T14:24:33.034Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] + "id": "8-49-0-Air temperature", + "nodeId": 8, + "toUpdate": false, + "commandClass": 49, + "commandClassName": "Multilevel Sensor", + "endpoint": 0, + "property": "Air temperature", + "propertyName": "Air temperature", + "type": "number", + "readable": true, + "writeable": false, + "label": "Air temperature", + "ccSpecific": { + "sensorType": 1, + "scale": 0 + }, + "stateless": false, + "commandClassVersion": 3, + "unit": "°C", + "list": false, + "value": -999.9, + "lastUpdate": 1714891799442, + "newValue": -999.9 }, { - "time": "2023-12-15T14:24:33.035Z", - "event": "value updated", - "args": [ + "id": "8-112-0-1", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 1, + "propertyName": "Input 1 switch type", + "type": "number", + "readable": true, + "writeable": true, + "label": "Input 1 switch type", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:33.132Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:24:33.133Z", - "event": "value updated", - "args": [ + "text": "mono-stable switch type (push button)", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" + "text": "bi-stable switch type", + "value": 1 } - ] + ], + "lastUpdate": 1714424589378 }, { - "time": "2023-12-15T14:24:33.134Z", - "event": "value updated", - "args": [ + "id": "8-112-0-2", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 2, + "propertyName": "Input 2 switch type", + "type": "number", + "readable": true, + "writeable": true, + "label": "Input 2 switch type", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:33.135Z", - "event": "value updated", - "args": [ + "text": "mono-stable switch type (push button)", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" + "text": "bi-stable switch type", + "value": 1 } - ] + ], + "lastUpdate": 1714424589380 }, { - "time": "2023-12-15T14:24:33.232Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" + "id": "8-112-0-3", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 3, + "propertyName": "Input 3 switch type", + "type": "number", + "readable": true, + "writeable": true, + "label": "Input 3 switch type", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "mono-stable switch type (push button)", + "value": 0 + }, + { + "text": "bi-stable switch type", + "value": 1 } - ] + ], + "lastUpdate": 1714424589381 }, { - "time": "2023-12-15T14:24:33.233Z", - "event": "value updated", - "args": [ + "id": "8-112-0-4", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 4, + "propertyName": "Input 1 contact type", + "type": "number", + "readable": true, + "writeable": true, + "label": "Input 1 contact type", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:24:33.235Z", - "event": "value updated", - "args": [ + "text": "NO (normally open) input type", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" + "text": "NC (normally close) input type", + "value": 1 } - ] + ], + "lastUpdate": 1714424589383 }, { - "time": "2023-12-15T14:24:33.235Z", - "event": "value updated", - "args": [ + "id": "8-112-0-5", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 5, + "propertyName": "Input 2 contact type", + "type": "number", + "readable": true, + "writeable": true, + "label": "Input 2 contact type", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:33.332Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:24:33.333Z", - "event": "value updated", - "args": [ + "text": "NO (normally open) input type", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" + "text": "NC (normally close) input type", + "value": 1 } - ] + ], + "lastUpdate": 1714424589384 }, { - "time": "2023-12-15T14:24:33.334Z", - "event": "value updated", - "args": [ + "id": "8-112-0-6", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 6, + "propertyName": "Input 3 contact type", + "type": "number", + "readable": true, + "writeable": true, + "label": "Input 3 contact type", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:33.335Z", - "event": "value updated", - "args": [ + "text": "NO (normally open) input type", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:33.431Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" + "text": "NC (normally close) input type", + "value": 1 } - ] + ], + "lastUpdate": 1714424589386 }, { - "time": "2023-12-15T14:24:33.432Z", - "event": "value updated", - "args": [ + "id": "8-112-0-11", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 11, + "propertyName": "Input 1 operation mode selection", + "type": "number", + "readable": true, + "writeable": true, + "label": "Input 1 operation mode selection", + "default": 1, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 6, + "list": true, + "allowManualEntry": false, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:24:33.433Z", - "event": "value updated", - "args": [ + "text": "Button does not influence on selected mode", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:33.434Z", - "event": "value updated", - "args": [ + "text": "Comfort", + "value": 1 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:33.534Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:24:33.535Z", - "event": "value updated", - "args": [ + "text": "Comfort-1°C", + "value": 2 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:24:33.536Z", - "event": "value updated", - "args": [ + "text": "Comfort-2°C", + "value": 3 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:33.536Z", - "event": "value updated", - "args": [ + "text": "Eco Mode", + "value": 4 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:52.116Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:24:52.117Z", - "event": "value updated", - "args": [ + "text": "Frost Protection", + "value": 5 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" + "text": "Stop", + "value": 6 } - ] + ], + "lastUpdate": 1714424589388 }, { - "time": "2023-12-15T14:24:52.119Z", - "event": "value updated", - "args": [ + "id": "8-112-0-12", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 12, + "propertyName": "Input 2 operation mode selection", + "type": "number", + "readable": true, + "writeable": true, + "label": "Input 2 operation mode selection", + "default": 4, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 6, + "list": true, + "allowManualEntry": false, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:52.120Z", - "event": "value updated", - "args": [ + "text": "Button does not influence on selected mode", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:52.209Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:24:52.210Z", - "event": "value updated", - "args": [ + "text": "Comfort", + "value": 1 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:24:52.211Z", - "event": "value updated", - "args": [ + "text": "Comfort-1°C", + "value": 2 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:52.211Z", - "event": "value updated", - "args": [ + "text": "Comfort-2°C", + "value": 3 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:52.613Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:24:52.614Z", - "event": "value updated", - "args": [ + "text": "Eco Mode", + "value": 4 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:24:52.615Z", - "event": "value updated", - "args": [ + "text": "Frost Protection", + "value": 5 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" + "text": "Stop", + "value": 6 } - ] + ], + "lastUpdate": 1714424589389 }, { - "time": "2023-12-15T14:24:52.616Z", - "event": "value updated", - "args": [ + "id": "8-112-0-13", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 13, + "propertyName": "Input 3 operation mode selection", + "type": "number", + "readable": true, + "writeable": true, + "label": "Input 3 operation mode selection", + "default": 5, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 6, + "list": true, + "allowManualEntry": false, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:52.812Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:24:52.812Z", - "event": "value updated", - "args": [ + "text": "Button does not influence on selected mode", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:24:52.814Z", - "event": "value updated", - "args": [ + "text": "Comfort", + "value": 1 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:52.815Z", - "event": "value updated", - "args": [ + "text": "Comfort-1°C", + "value": 2 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:53.113Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:24:53.114Z", - "event": "value updated", - "args": [ + "text": "Comfort-2°C", + "value": 3 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:24:53.116Z", - "event": "value updated", - "args": [ + "text": "Eco Mode", + "value": 4 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:53.116Z", - "event": "value updated", - "args": [ + "text": "Frost Protection", + "value": 5 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:24:53.312Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" + "text": "Stop", + "value": 6 } - ] + ], + "lastUpdate": 1714424589391 }, { - "time": "2023-12-15T14:24:53.312Z", - "event": "value updated", - "args": [ + "id": "8-112-0-30", + "nodeId": 8, + "toUpdate": false, + "commandClass": 112, + "commandClassName": "Configuration", + "endpoint": 0, + "property": 30, + "propertyName": "State After Power Failure", + "type": "number", + "readable": true, + "writeable": true, + "label": "State After Power Failure", + "default": 0, + "stateless": false, + "commandClassVersion": 1, + "min": 0, + "max": 1, + "list": true, + "allowManualEntry": false, + "states": [ + { + "text": "Previous state", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" + "text": "Always off", + "value": 1 } - ] + ], + "lastUpdate": 1714424589392 }, { - "time": "2023-12-15T14:24:53.314Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] + "id": "8-114-0-manufacturerId", + "nodeId": 8, + "toUpdate": false, + "commandClass": 114, + "commandClassName": "Manufacturer Specific", + "endpoint": 0, + "property": "manufacturerId", + "propertyName": "manufacturerId", + "type": "number", + "readable": true, + "writeable": false, + "label": "Manufacturer ID", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 65535, + "list": false, + "value": 345, + "lastUpdate": 1683240051004, + "newValue": 345 }, { - "time": "2023-12-15T14:24:53.315Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] + "id": "8-114-0-productType", + "nodeId": 8, + "toUpdate": false, + "commandClass": 114, + "commandClassName": "Manufacturer Specific", + "endpoint": 0, + "property": "productType", + "propertyName": "productType", + "type": "number", + "readable": true, + "writeable": false, + "label": "Product type", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 65535, + "list": false, + "value": 4, + "lastUpdate": 1683240051006, + "newValue": 4 }, { - "time": "2023-12-15T14:24:54.614Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] + "id": "8-114-0-productId", + "nodeId": 8, + "toUpdate": false, + "commandClass": 114, + "commandClassName": "Manufacturer Specific", + "endpoint": 0, + "property": "productId", + "propertyName": "productId", + "type": "number", + "readable": true, + "writeable": false, + "label": "Product ID", + "stateless": false, + "commandClassVersion": 2, + "min": 0, + "max": 65535, + "list": false, + "value": 81, + "lastUpdate": 1683240051008, + "newValue": 81 }, { - "time": "2023-12-15T14:24:54.615Z", - "event": "value updated", - "args": [ + "id": "8-134-0-libraryType", + "nodeId": 8, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "libraryType", + "propertyName": "libraryType", + "type": "number", + "readable": true, + "writeable": false, + "label": "Library type", + "stateless": false, + "commandClassVersion": 2, + "list": true, + "states": [ { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:24:54.618Z", - "event": "value updated", - "args": [ + "text": "Unknown", + "value": 0 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:24:54.618Z", - "event": "value updated", - "args": [ + "text": "Static Controller", + "value": 1 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:25:01.320Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:25:01.321Z", - "event": "value updated", - "args": [ + "text": "Controller", + "value": 2 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:25:01.322Z", - "event": "value updated", - "args": [ + "text": "Enhanced Slave", + "value": 3 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:25:01.323Z", - "event": "value updated", - "args": [ + "text": "Slave", + "value": 4 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:25:58.157Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:25:58.158Z", - "event": "value updated", - "args": [ + "text": "Installer", + "value": 5 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:25:58.159Z", - "event": "value updated", - "args": [ + "text": "Routing Slave", + "value": 6 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:25:58.164Z", - "event": "value updated", - "args": [ + "text": "Bridge Controller", + "value": 7 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:25:58.250Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, - { - "time": "2023-12-15T14:25:58.251Z", - "event": "value updated", - "args": [ + "text": "Device under Test", + "value": 8 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] - }, - { - "time": "2023-12-15T14:25:58.252Z", - "event": "value updated", - "args": [ + "text": "N/A", + "value": 9 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] - }, - { - "time": "2023-12-15T14:25:58.253Z", - "event": "value updated", - "args": [ + "text": "AV Remote", + "value": 10 + }, { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] - }, - { - "time": "2023-12-15T14:26:00.056Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" + "text": "AV Device", + "value": 11 } - ] + ], + "value": 3, + "lastUpdate": 1683240054168, + "newValue": 3 }, { - "time": "2023-12-15T14:26:00.061Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] + "id": "8-134-0-protocolVersion", + "nodeId": 8, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "protocolVersion", + "propertyName": "protocolVersion", + "type": "string", + "readable": true, + "writeable": false, + "label": "Z-Wave protocol version", + "stateless": false, + "commandClassVersion": 2, + "list": false, + "value": "5.3", + "lastUpdate": 1683240054170, + "newValue": "5.3" }, { - "time": "2023-12-15T14:26:00.062Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] + "id": "8-134-0-firmwareVersions", + "nodeId": 8, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "firmwareVersions", + "propertyName": "firmwareVersions", + "type": "string[]", + "readable": true, + "writeable": false, + "label": "Z-Wave chip firmware versions", + "stateless": false, + "commandClassVersion": 2, + "list": false, + "value": ["2.0", "1.0"], + "lastUpdate": 1683240054172, + "newValue": ["2.0", "1.0"] }, { - "time": "2023-12-15T14:26:00.064Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 23, - "prevValue": 22, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] + "id": "8-134-0-hardwareVersion", + "nodeId": 8, + "toUpdate": false, + "commandClass": 134, + "commandClassName": "Version", + "endpoint": 0, + "property": "hardwareVersion", + "propertyName": "hardwareVersion", + "type": "number", + "readable": true, + "writeable": false, + "label": "Z-Wave chip hardware version", + "stateless": false, + "commandClassVersion": 2, + "list": false, + "value": 1, + "lastUpdate": 1683240054173, + "newValue": 1 }, { - "time": "2023-12-15T14:26:00.960Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmType", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmType" - } - ] - }, + "id": "8-38-0-event", + "nodeId": 8, + "toUpdate": false, + "commandClass": 38, + "commandClassName": "Multilevel Switch", + "endpoint": 0, + "property": "event", + "propertyName": "event", + "type": "number", + "readable": true, + "writeable": false, + "label": "Event value", + "stateless": true, + "commandClassVersion": 3, + "min": 0, + "max": 255, + "list": false, + "lastUpdate": 1714708022222 + } + ], + "groups": [ { - "time": "2023-12-15T14:26:00.960Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "alarmLevel", - "endpoint": 0, - "newValue": 0, - "prevValue": 0, - "propertyName": "alarmLevel" - } - ] + "text": "Lifeline", + "endpoint": 0, + "value": 1, + "maxNodes": 1, + "isLifeline": true, + "multiChannel": true }, { - "time": "2023-12-15T14:26:00.961Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state (simple)", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state (simple)" - } - ] + "text": "Multilevel", + "endpoint": 0, + "value": 2, + "maxNodes": 16, + "isLifeline": false, + "multiChannel": true }, { - "time": "2023-12-15T14:26:00.962Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Notification", - "commandClass": 113, - "property": "Access Control", - "propertyKey": "Door state", - "endpoint": 0, - "newValue": 22, - "prevValue": 23, - "propertyName": "Access Control", - "propertyKeyName": "Door state" - } - ] + "text": "Basic on/off", + "endpoint": 0, + "value": 3, + "maxNodes": 16, + "isLifeline": false, + "multiChannel": true }, { - "time": "2023-12-15T14:44:58.704Z", - "event": "value updated", - "args": [ - { - "commandClassName": "Multilevel Sensor", - "commandClass": 49, - "property": "Air temperature", - "endpoint": 0, - "newValue": 19.2, - "prevValue": 21.3, - "propertyName": "Air temperature" - } - ] + "text": "Basic on/off - input I2", + "endpoint": 0, + "value": 4, + "maxNodes": 16, + "isLifeline": false, + "multiChannel": true }, { - "time": "2023-12-15T15:12:34.780Z", - "event": "value added", - "args": [ - { - "commandClassName": "Node Naming and Location", - "commandClass": 119, - "property": "name", - "newValue": "Capteur ouverture/porte salon", - "propertyName": "name", - "nodeId": 2 - } - ] + "text": "Basic on/off - input I3", + "endpoint": 0, + "value": 5, + "maxNodes": 16, + "isLifeline": false, + "multiChannel": true }, { - "time": "2023-12-15T15:13:11.310Z", - "event": "value added", - "args": [ - { - "commandClassName": "Node Naming and Location", - "commandClass": 119, - "property": "location", - "newValue": "salon", - "propertyName": "location", - "nodeId": 2 - } - ] + "text": "Unnamed group 6", + "endpoint": 0, + "value": 6, + "maxNodes": 16, + "isLifeline": false, + "multiChannel": true } ], - "status": "Asleep", + "neighbors": [], + "ready": true, + "available": true, + "hassDevices": {}, + "failed": false, + "inited": true, + "eventsQueue": [], + "status": "Alive", "interviewStage": "Complete", "priorityReturnRoute": {}, "customReturnRoute": {}, - "prioritySUCReturnRoute": null, + "prioritySUCReturnRoute": false, "customSUCReturnRoutes": [], - "hexId": "0x010f 0x0702-0x1000", - "dbLink": "https://devices.zwave-js.io/?jumpTo=0x010f:0x0702:0x1000:3.2", - "manufacturerId": 271, - "productId": 4096, - "productType": 1794, + "hexId": "0x0159 0x0004-0x0051", + "dbLink": "https://devices.zwave-js.io/?jumpTo=0x0159:0x0004:0x0051:2.0", + "manufacturerId": 345, + "productId": 81, + "productType": 4, "deviceConfig": { - "filename": "/Users/pierregilles/code/zwave-js-ui/node_modules/@zwave-js/config/config/devices/0x010f/fgdw002.json", + "filename": "/usr/src/app/store/.config-db/devices/0x0159/zmnhjd.json", "isEmbedded": true, - "manufacturer": "Fibargroup", - "manufacturerId": 271, - "label": "FGDW002", - "description": "Fibaro Door Window Sensor 2", + "manufacturer": "Qubino", + "manufacturerId": 345, + "label": "ZMNHJD", + "description": "Flush Pilot", "devices": [ - { "productType": 1794, "productId": 4096 }, - { "productType": 1794, "productId": 8192 }, - { "productType": 1794, "productId": 12288 }, - { "productType": 1794, "productId": 16384 }, - { "productType": 1794, "productId": 28672 } + { + "productType": 4, + "productId": 81 + } ], - "firmwareVersion": { "min": "0.0", "max": "255.255" }, + "firmwareVersion": { + "min": "0.0", + "max": "255.255" + }, "preferred": false, - "paramInformation": { "_map": {} } + "associations": {}, + "paramInformation": { + "_map": {} + } }, - "productLabel": "FGDW002", - "productDescription": "Fibaro Door Window Sensor 2", - "manufacturer": "Fibargroup", - "firmwareVersion": "3.2", + "productLabel": "ZMNHJD", + "productDescription": "Flush Pilot", + "manufacturer": "Qubino", + "firmwareVersion": "2.0", "protocolVersion": 3, "zwavePlusVersion": 1, "zwavePlusNodeType": 0, - "zwavePlusRoleType": 6, + "zwavePlusRoleType": 5, "nodeType": 1, - "endpointsCount": 0, - "endpoints": [{ "index": 0, "label": "Root Endpoint" }], + "endpointsCount": 3, + "endpoints": [ + { + "index": 0, + "label": "Root Endpoint" + } + ], "isSecure": false, "security": "None", "supportsSecurity": false, "supportsBeaming": true, "isControllerNode": false, - "isListening": false, + "isListening": true, "isFrequentListening": false, "isRouting": true, "keepAwake": false, "maxDataRate": 100000, - "deviceClass": { "basic": 4, "generic": 7, "specific": 1 }, - "lastActive": 1702651498694, + "deviceClass": { + "basic": 4, + "generic": 17, + "specific": 1 + }, + "lastActive": 1714901379459, "firmwareCapabilities": { - "firmwareUpgradable": true, - "firmwareTargets": [0] + "firmwareUpgradable": false }, - "deviceId": "271-4096-1794", - "hasDeviceConfigChanged": false, - "batteryLevels": { "0": 100 }, - "minBatteryLevel": 100, - "supportsTime": false, + "protocol": 0, + "deviceId": "345-81-4", "statistics": { - "commandsTX": 0, - "commandsRX": 35, + "commandsTX": 8836, + "commandsRX": 18183, "commandsDroppedRX": 0, "commandsDroppedTX": 0, - "timeoutResponse": 0, - "lwr": { "repeaters": [], "protocolDataRate": 3 }, - "lastSeen": "2023-12-15T14:44:58.694Z" - } + "timeoutResponse": 482, + "rtt": 126, + "lastSeen": "2024-05-05T09:29:39.459Z", + "rssi": -66, + "lwr": { + "protocolDataRate": 2, + "repeaters": [2, 4], + "rssi": -65, + "repeaterRSSI": [-65, -44] + }, + "nlwr": { + "protocolDataRate": 2, + "repeaters": [20, 17], + "rssi": -69, + "repeaterRSSI": [127, 127] + } + }, + "supportsTime": false, + "_name": "Radiateur (Bureau)", + "applicationRoute": false, + "lastReceive": 1714901320998, + "lastTransmit": 1714901379459, + "errorReceive": false, + "errorTransmit": true } ], "args": [], diff --git a/server/test/services/zwavejs-ui/lib/zwaveJSUI.onNewDeviceDiscover.test.js b/server/test/services/zwavejs-ui/lib/zwaveJSUI.onNewDeviceDiscover.test.js index acc2993210..2d5acf7988 100644 --- a/server/test/services/zwavejs-ui/lib/zwaveJSUI.onNewDeviceDiscover.test.js +++ b/server/test/services/zwavejs-ui/lib/zwaveJSUI.onNewDeviceDiscover.test.js @@ -45,6 +45,7 @@ describe('zwaveJSUIHandler.onNewDeviceDiscover.js', () => { command_class_version: 5, endpoint: 0, external_id: 'zwavejs-ui:2:0:multilevel_sensor:air_temperature', + feature_name: '', has_feedback: false, keep_history: true, max: 150, @@ -72,6 +73,7 @@ describe('zwaveJSUIHandler.onNewDeviceDiscover.js', () => { command_class_version: 5, endpoint: 0, external_id: 'zwavejs-ui:2:0:notification:access_control:door_state_simple', + feature_name: '', selector: 'zwavejs-ui:2:0:notification:access_control:door_state_simple', node_id: 2, property_name: 'Access Control', @@ -85,6 +87,276 @@ describe('zwaveJSUIHandler.onNewDeviceDiscover.js', () => { }, ], }, + { + external_id: 'zwavejs-ui:5', + features: [ + { + category: 'shutter', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 1, + external_id: 'zwavejs-ui:5:1:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '5-38-1-currentValue:position', + node_id: 5, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:5:1:multilevel_switch:currentvalue:position', + type: 'position', + unit: 'percent', + }, + { + category: 'shutter', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 1, + external_id: 'zwavejs-ui:5:1:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '5-38-1-currentValue:state', + node_id: 5, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:5:1:multilevel_switch:currentvalue:state', + type: 'state', + }, + { + category: 'shutter', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 2, + external_id: 'zwavejs-ui:5:2:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '5-38-2-currentValue:position', + node_id: 5, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:5:2:multilevel_switch:currentvalue:position', + type: 'position', + unit: 'percent', + }, + { + category: 'shutter', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 2, + external_id: 'zwavejs-ui:5:2:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '5-38-2-currentValue:state', + node_id: 5, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:5:2:multilevel_switch:currentvalue:state', + type: 'state', + }, + ], + name: 'Volet Roulant', + params: [ + { + name: 'location', + value: 'salon', + }, + ], + selector: 'zwavejs-ui:5', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + should_poll: false, + }, + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + feature_name: '', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-restorePrevious', + node_id: 6, + property_key_name: undefined, + property_name: 'restorePrevious', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + type: 'binary', + }, + ], + name: 'inter-01', + params: [ + { + name: 'location', + value: '', + }, + ], + selector: 'zwavejs-ui:6', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + should_poll: false, + }, + { + external_id: 'zwavejs-ui:8', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 3, + endpoint: 0, + external_id: 'zwavejs-ui:8:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '8-38-0-currentValue:position', + node_id: 8, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:8:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 3, + endpoint: 0, + external_id: 'zwavejs-ui:8:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '8-38-0-currentValue:state', + node_id: 8, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:8:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 3, + endpoint: 0, + external_id: 'zwavejs-ui:8:0:multilevel_switch:restoreprevious', + feature_name: '', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '8-38-0-restorePrevious', + node_id: 8, + property_key_name: undefined, + property_name: 'restorePrevious', + read_only: false, + selector: 'zwavejs-ui:8:0:multilevel_switch:restoreprevious', + type: 'binary', + }, + { + category: 'temperature-sensor', + command_class: 49, + command_class_name: 'Multilevel Sensor', + command_class_version: 3, + endpoint: 0, + external_id: 'zwavejs-ui:8:0:multilevel_sensor:air_temperature', + feature_name: '', + has_feedback: false, + keep_history: true, + max: 150, + min: -100, + name: '8-49-0-Air temperature', + node_id: 8, + property_key_name: undefined, + property_name: 'Air temperature', + read_only: true, + selector: 'zwavejs-ui:8:0:multilevel_sensor:air_temperature', + type: 'decimal', + unit: 'celsius', + }, + ], + name: 'Radiateur', + params: [ + { + name: 'location', + value: 'Bureau', + }, + ], + selector: 'zwavejs-ui:8', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + should_poll: false, + }, ]); }); }); diff --git a/server/test/services/zwavejs-ui/lib/zwaveJSUI.onNodeValueUpdated.test.js b/server/test/services/zwavejs-ui/lib/zwaveJSUI.onNodeValueUpdated.test.js index 1e7e996e2a..733be25917 100644 --- a/server/test/services/zwavejs-ui/lib/zwaveJSUI.onNodeValueUpdated.test.js +++ b/server/test/services/zwavejs-ui/lib/zwaveJSUI.onNodeValueUpdated.test.js @@ -3,6 +3,7 @@ const sinon = require('sinon'); const { assert, fake } = sinon; const ZwaveJSUIHandler = require('../../../../services/zwavejs-ui/lib'); +const { STATE } = require('../../../../utils/constants'); const serviceId = 'ffa13430-df93-488a-9733-5c540e9558e0'; @@ -24,7 +25,7 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { sinon.reset(); }); - it('should not fail on unknown device', async () => { + it('should not fail on unknown Gladys device', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); zwaveJSUIHandler.devices = [ { @@ -36,6 +37,16 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -54,7 +65,47 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { }); }); - it('should not fail on unknown feature', async () => { + it('should not fail on unknown zWave device', async () => { + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:2', + features: [ + { + external_id: 'zwavejs-ui:2:0:notification:access_control:door_state_simple', + }, + ], + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 3, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; + + await zwaveJSUIHandler.onNodeValueUpdated({ + data: [ + { id: 2 }, + { + commandClassName: 'Notification', + commandClass: 113, + property: 'Access Control', + endpoint: 0, + newValue: 22, + prevValue: 23, + propertyName: 'Access Control', + propertyKey: 'Door state (simple)', + }, + ], + }); + }); + + it('should not fail on unknown state updated', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); zwaveJSUIHandler.devices = [ { @@ -62,6 +113,51 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { features: [], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; + + await zwaveJSUIHandler.onNodeValueUpdated({ + data: [ + { id: 2 }, + { + commandClassName: 'Notification', + commandClass: 1150, + property: 'Unexisting', + endpoint: 0, + newValue: 22, + prevValue: 23, + propertyName: 'Unexisting', + }, + ], + }); + }); + + it('should not fail on unknown feature on device', async () => { + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:2', + features: [], + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -75,6 +171,7 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { prevValue: 23, propertyName: 'Access Control', propertyKey: 'Door state (simple)', + propertyKeyName: 'Door state (simple)', }, ], }); @@ -92,6 +189,16 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -114,6 +221,7 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { state: 0, }); }); + it('should save a new closed value', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); zwaveJSUIHandler.devices = [ @@ -126,6 +234,16 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -148,6 +266,7 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { state: 1, }); }); + it('should not fail on unsupported door value', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); zwaveJSUIHandler.devices = [ @@ -160,6 +279,16 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -179,6 +308,7 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { }); assert.notCalled(gladys.event.emit); }); + it('should save a new true binary value', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); zwaveJSUIHandler.devices = [ @@ -191,6 +321,16 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 3, + deviceClass: { + basic: 4, + generic: 16, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -211,6 +351,7 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { state: 1, }); }); + it('should save a new false binary value', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); zwaveJSUIHandler.devices = [ @@ -223,6 +364,16 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 3, + deviceClass: { + basic: 4, + generic: 16, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -256,6 +407,16 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 3, + deviceClass: { + basic: 4, + generic: 16, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -273,6 +434,7 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { }); assert.notCalled(gladys.event.emit); }); + it('should save a new air temperature value', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); zwaveJSUIHandler.devices = [ @@ -285,6 +447,16 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -318,6 +490,16 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; await zwaveJSUIHandler.onNodeValueUpdated({ data: [ @@ -338,4 +520,291 @@ describe('zwaveJSUIHandler.onNodeValueUpdated', () => { state: 1.7, }); }); + + it('should save a new multilevel switch value', async () => { + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + feature_name: '', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-restorePrevious', + node_id: 6, + property_key_name: undefined, + property_name: 'restorePrevious', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + type: 'binary', + }, + ], + name: 'inter-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 1, + }, + }, + ]; + + await zwaveJSUIHandler.onNodeValueUpdated({ + data: [ + { id: 6 }, + { + commandClassName: 'Multilevel Switch', + commandClass: 38, + property: 'currentValue', + endpoint: 0, + newValue: 45, + prevValue: 0, + propertyName: 'currentvalue', + }, + ], + }); + + gladys.event.emit.firstCall.calledWith('device.new-state', { + device_feature_external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + state: 45, + }); + + gladys.event.emit.secondCall.calledWith('device.new-state', { + device_feature_external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + state: STATE.ON, + }); + + gladys.event.emit.thirdCall.calledWith('device.new-state', { + device_feature_external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + state: STATE.ON, + }); + }); + + it('should turn off state on a new multilevel switch value of 0', async () => { + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + ], + name: 'inter-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 1, + }, + }, + ]; + + await zwaveJSUIHandler.onNodeValueUpdated({ + data: [ + { id: 6 }, + { + commandClassName: 'Multilevel Switch', + commandClass: 38, + property: 'currentValue', + endpoint: 0, + newValue: 0, + prevValue: 99, + propertyName: 'currentvalue', + }, + ], + }); + + gladys.event.emit.firstCall.calledWith('device.new-state', { + device_feature_external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + state: 0, + }); + + gladys.event.emit.secondCall.calledWith('device.new-state', { + device_feature_external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + state: STATE.OFF, + }); + }); + + it('should save a new curtain multilevel switch value', async () => { + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + ], + name: 'curtain-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 6, + }, + }, + ]; + + await zwaveJSUIHandler.onNodeValueUpdated({ + data: [ + { id: 6 }, + { + commandClassName: 'Multilevel Switch', + commandClass: 38, + property: 'currentValue', + endpoint: 0, + newValue: 45, + prevValue: 0, + propertyName: 'currentvalue', + }, + ], + }); + + assert.calledWith(gladys.event.emit, 'device.new-state', { + device_feature_external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + state: 45, + }); + }); }); diff --git a/server/test/services/zwavejs-ui/lib/zwaveJSUI.setValue.test.js b/server/test/services/zwavejs-ui/lib/zwaveJSUI.setValue.test.js index 76ee7c28f1..e2c0da4c06 100644 --- a/server/test/services/zwavejs-ui/lib/zwaveJSUI.setValue.test.js +++ b/server/test/services/zwavejs-ui/lib/zwaveJSUI.setValue.test.js @@ -5,7 +5,7 @@ const { assert, fake } = sinon; const ZwaveJSUIHandler = require('../../../../services/zwavejs-ui/lib'); const { BadParameters } = require('../../../../utils/coreErrors'); -const { STATE } = require('../../../../utils/constants'); +const { STATE, COVER_STATE } = require('../../../../utils/constants'); const serviceId = 'ffa13430-df93-488a-9733-5c540e9558e0'; @@ -16,6 +16,9 @@ const gladys = { event: { emit: fake.returns(null), }, + device: { + saveState: fake.returns(Promise.resolve()), + }, }; describe('zwaveJSUIHandler.setValue', () => { @@ -27,13 +30,13 @@ describe('zwaveJSUIHandler.setValue', () => { sinon.reset(); }); - it('should fail on unknown node', async () => { + it('should fail on non zwavejs-ui feature', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); try { await zwaveJSUIHandler.setValue( - { external_id: 'zwavejs-ui:2' }, + {}, { - external_id: 'zwavejs-ui:42:0:notification:unused:unused', + external_id: 'not-zwavejs-ui:42:0:unused:unused:unused', }, '1', ); @@ -46,13 +49,13 @@ describe('zwaveJSUIHandler.setValue', () => { assert.fail(); }); - it('should fail on invalid feature', async () => { + it('should fail on unknown Gladys device', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); try { await zwaveJSUIHandler.setValue( { external_id: 'zwavejs-ui:2' }, { - external_id: 'not-zwavejs-ui:42:0:unused:unused:unused', + external_id: 'zwavejs-ui:42:0:notification:unused:unused', }, '1', ); @@ -65,6 +68,53 @@ describe('zwaveJSUIHandler.setValue', () => { assert.fail(); }); + it('should fail on unknown zWave device', async () => { + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:2', + features: [ + { + external_id: 'zwavejs-ui:2:0:notification:access_control:door_state_simple', + }, + ], + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 3, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; + try { + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:2', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:2:0:notification:access_control:door_state_simple', + }, + ], + }; + + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[0], '1'); + } catch (e) { + expect(e).instanceOf(BadParameters); + + return; + } + + assert.fail(); + }); + it('should fail on unknown feature', async () => { const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); zwaveJSUIHandler.devices = [ @@ -77,10 +127,35 @@ describe('zwaveJSUIHandler.setValue', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, + }, + }, + ]; try { + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:2', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:2:0:notification:access_control:door_state_simple', + }, + ], + }; await zwaveJSUIHandler.setValue( - { external_id: 'zwavejs-ui:2' }, + gladysDevice, { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', external_id: 'zwavejs-ui:2:0:other:not_known:not_known', }, '1', @@ -109,14 +184,32 @@ describe('zwaveJSUIHandler.setValue', () => { ], }, ]; - try { - await zwaveJSUIHandler.setValue( - { external_id: 'zwavejs-ui:2' }, - { - external_id: 'zwavejs-ui:2:0:notification:access_control:door_state_simple', + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 2, + deviceClass: { + basic: 4, + generic: 7, + specific: 1, }, - '1', - ); + }, + ]; + + try { + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:2', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:2:0:notification:access_control:door_state_simple', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[0], '1'); } catch (e) { expect(e).instanceOf(BadParameters); @@ -162,12 +255,31 @@ describe('zwaveJSUIHandler.setValue', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 3, + deviceClass: { + basic: 4, + generic: 16, + specific: 1, + }, + }, + ]; - await zwaveJSUIHandler.setValue( - { external_id: 'zwavejs-ui:3' }, - { external_id: 'zwavejs-ui:3:0:binary_switch:currentvalue' }, - STATE.OFF, - ); + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:3', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:3:0:binary_switch:currentvalue', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[0], STATE.OFF); const mqttPayload = { args: [{ nodeId: 3, commandClass: 37, endpoint: 0 }, 'set', [false]], @@ -215,12 +327,31 @@ describe('zwaveJSUIHandler.setValue', () => { ], }, ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 3, + deviceClass: { + basic: 4, + generic: 16, + specific: 1, + }, + }, + ]; - await zwaveJSUIHandler.setValue( - { external_id: 'zwavejs-ui:3' }, - { external_id: 'zwavejs-ui:3:0:binary_switch:currentvalue' }, - STATE.ON, - ); + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:3', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:3:0:binary_switch:currentvalue', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[0], STATE.ON); const mqttPayload = { args: [{ nodeId: 3, commandClass: 37, endpoint: 0 }, 'set', [true]], @@ -232,53 +363,1225 @@ describe('zwaveJSUIHandler.setValue', () => { ); }); - it('should fail on invalid binary switch value', async () => { + it('should set multilevel switch currentvalue to 0 on state OFF', async () => { const mqttClient = { publish: fake.returns(null), }; + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); zwaveJSUIHandler.mqttClient = mqttClient; zwaveJSUIHandler.devices = [ { - name: 'prise01-wp', - external_id: 'zwavejs-ui:3', - service_id: 'ee03cc7e-8551-4774-bd47-ca7565f6665d', - should_poll: false, + external_id: 'zwavejs-ui:6', features: [ { category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + ], + name: 'inter-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 1, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[0], STATE.OFF); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'set', [0]], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); + + // Assert position state has been updated + assert.calledWith(gladys.device.saveState, gladysDevice.features[1], 0); + }); + + it('should set multilevel switch currentValue to 99 on state ON', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler({ ...gladys }, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', read_only: false, - has_feedback: true, - name: '3-37-0-currentValue', - external_id: 'zwavejs-ui:3:0:binary_switch:currentvalue', - node_id: 3, - command_class_version: 1, - command_class_name: 'Binary Switch', - command_class: 37, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + ], + name: 'inter-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 1, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[0], STATE.ON); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'set', [99]], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); + }); + + it('should set multilevel switch currentValue to 0 and synchronize states on position set to 0', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + feature_name: '', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-restorePrevious', + node_id: 6, property_key_name: undefined, + property_name: 'restorePrevious', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + type: 'binary', }, ], + name: 'inter-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 1, + }, }, ]; - try { - await zwaveJSUIHandler.setValue( - { external_id: 'zwavejs-ui:3' }, - { external_id: 'zwavejs-ui:3:0:binary_switch:currentvalue' }, - 4, - ); - } catch (e) { - expect(e).instanceOf(BadParameters); + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + { + id: 'gladys-device-feature-db-id-003', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[1], 0); - return; - } + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'set', [0]], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); - assert.fail(); + // Assert states have been updated + gladys.device.saveState.firstCall.calledWith(gladysDevice.features[0], STATE.OFF); + gladys.device.saveState.secondCall.calledWith(gladysDevice.features[2], STATE.OFF); + }); + + it('should set multilevel switch currentValue to value and synchronize states on positive position updated', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + feature_name: '', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-restorePrevious', + node_id: 6, + property_key_name: undefined, + property_name: 'restorePrevious', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + type: 'binary', + }, + ], + name: 'inter-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 1, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + { + id: 'gladys-device-feature-db-id-003', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[1], 42); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'set', [42]], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); + + // Assert states have been updated + gladys.device.saveState.firstCall.calledWith(gladysDevice.features[0], STATE.ON); + gladys.device.saveState.secondCall.calledWith(gladysDevice.features[2], STATE.ON); + }); + + it('should turn on dimmer on restoredPrevious set to STATE.ON without states synchronisation', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + feature_name: '', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-restorePrevious', + node_id: 6, + property_key_name: undefined, + property_name: 'restorePrevious', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + type: 'binary', + }, + ], + name: 'inter-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 1, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + { + id: 'gladys-device-feature-db-id-003', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[2], STATE.ON); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0, property: 'restorePrevious' }, true], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/writeValue/set', + JSON.stringify(mqttPayload), + ); + + // Assert state has not been updated + assert.notCalled(gladys.device.saveState); + }); + + it('should turn off dimmer on restorePrevious set to STATE.OFF and synchronize states', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + feature_name: '', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-restorePrevious', + node_id: 6, + property_key_name: undefined, + property_name: 'restorePrevious', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + type: 'binary', + }, + ], + name: 'inter-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 1, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + { + id: 'gladys-device-feature-db-id-003', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:restoreprevious', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[2], STATE.OFF); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'set', [0]], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); + + // Assert states have been updated + gladys.device.saveState.firstCall.calledWith(gladysDevice.features[0], STATE.OFF); + gladys.device.saveState.secondCall.calledWith(gladysDevice.features[1], 0); + }); + + it('should set curtains multilevel switch currentValue to 0 and synchronize position on state CLOSE', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + ], + name: 'curtain-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 5, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[0], COVER_STATE.CLOSE); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'set', [0]], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); + + // Assert position state has been updated + assert.calledWith(gladys.device.saveState, gladysDevice.features[1], 0); + }); + + it('should set curtains multilevel switch currentValue to 99 and synchronize position on state OPEN', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + ], + name: 'curtain-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 6, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[0], COVER_STATE.OPEN); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'set', [99]], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); + + // Assert position state has been updated + assert.calledWith(gladys.device.saveState, gladysDevice.features[1], 99); + }); + + it('should stop curtains multilevel switch on state STOP', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + ], + name: 'curtain-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 7, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[0], COVER_STATE.STOP); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'stopLevelChange', []], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); + + // Asserts we do not try to update the position. + assert.neverCalledWith(gladys.device.saveState, gladysDevice.features[1], sinon.match.any); + }); + + it('should set curtain multilevel switch currentValue to 0 on position set to 0', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + ], + name: 'curtain-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 6, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[1], 0); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'set', [0]], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); + + // Assert state has not been updated + assert.neverCalledWith(gladys.device.saveState, gladysDevice.features[0], sinon.match.any); + }); + + it('should set curtain multilevel switch currentvalue to value on positive position updated', async () => { + const mqttClient = { + publish: fake.returns(null), + }; + + const zwaveJSUIHandler = new ZwaveJSUIHandler(gladys, {}, serviceId); + zwaveJSUIHandler.mqttClient = mqttClient; + zwaveJSUIHandler.devices = [ + { + external_id: 'zwavejs-ui:6', + features: [ + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + feature_name: 'state', + has_feedback: false, + keep_history: true, + max: 1, + min: 0, + name: '6-38-0-currentValue:state', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + type: 'binary', + }, + { + category: 'switch', + command_class: 38, + command_class_name: 'Multilevel Switch', + command_class_version: 4, + endpoint: 0, + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + feature_name: 'position', + has_feedback: false, + keep_history: true, + max: 99, + min: 0, + name: '6-38-0-currentValue:position', + node_id: 6, + property_key_name: undefined, + property_name: 'currentValue', + read_only: false, + selector: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + type: 'dimmer', + unit: 'percent', + }, + ], + name: 'curtain-01', + service_id: 'ffa13430-df93-488a-9733-5c540e9558e0', + }, + ]; + zwaveJSUIHandler.zwaveJSDevices = [ + { + id: 6, + deviceClass: { + basic: 4, + generic: 17, + specific: 6, + }, + }, + ]; + + // On setValue, Gladys uses its own object (different than the ones on the zwave service) + // Gladys doesn't have all properties. Let be sure to reflect this behavior in tests + const gladysDevice = { + id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6', + features: [ + { + id: 'gladys-device-feature-db-id-001', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:state', + }, + { + id: 'gladys-device-feature-db-id-002', + device_id: 'gladys-device-db-id-001', + external_id: 'zwavejs-ui:6:0:multilevel_switch:currentvalue:position', + }, + ], + }; + await zwaveJSUIHandler.setValue(gladysDevice, gladysDevice.features[1], 42); + + // Assert message published + const mqttPayload = { + args: [{ nodeId: 6, commandClass: 38, endpoint: 0 }, 'set', [42]], + }; + assert.calledWith( + mqttClient.publish, + 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/api/sendCommand/set', + JSON.stringify(mqttPayload), + ); + + // Assert state has not been updated + assert.neverCalledWith(gladys.device.saveState, gladysDevice.features[0], sinon.match.any); }); });