Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.11k stars 1.68k forks source link

[New device support]: Modular 'friends of Hue' dim module #21629

Closed laurensdehoorne closed 7 months ago

laurensdehoorne commented 8 months ago

Link

https://www.supermodular.com/en/products/hue-dim-module-150-300w-1-10v--p-108043/?pageSize9862_Lister=10

Database entry

{"id":35,"type":"Router","ieeeAddr":"0x0017880106d5a0c5","nwkAddr":33034,"manufId":4107,"manufName":"Modular","powerSource":"Mains (single phase)","modelId":"MWM002","epList":[11,242],"endpoints":{"11":{"profId":49246,"epId":11,"devId":256,"inClusterList":[0,3,4,5,6,8,4096,64515,64516],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"MWM002","manufacturerName":"Modular","powerSource":1,"zclVersion":1,"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20230606","swBuild":"1.108.5"}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0xbc026efffefdee17","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20230606","swBuildId":"1.108.5","zclVersion":1,"interviewCompleted":true,"meta":{},"lastSeen":1709301620047}

Comments

024-03-01 10:47:29MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Automatically generated definition","exposes":[{"features":[{"access":7,"description":"On/off state of the switch","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"}],"type":"switch"},{"access":1,"category":"diagnostic","description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"MWM002","options":[{"access":2,"description":"State actions will also be published as 'action' when true (default false).","label":"State action","name":"state_action","property":"state_action","type":"binary","value_off":false,"value_on":true}],"supports_ota":false,"vendor":"Modular"},"friendly_name":"0x0017880106d5a0c5","ieee_address":"0x0017880106d5a0c5","status":"successful","supported":false},"type":"device_interview"}' Info 2024-03-01 10:47:29Configuring '0x0017880106d5a0c5' Info 2024-03-01 10:47:29MQTT publish: topic 'homeassistant/switch/0x0017880106d5a0c5/switch/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/0x0017880106d5a0c5/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/0x0017880106d5a0c5/set","device":{"identifiers":["zigbee2mqtt_0x0017880106d5a0c5"],"manufacturer":"Modular","model":"Automatically generated definition (MWM002)","name":"0x0017880106d5a0c5","sw_version":"1.108.5","via_device":"zigbee2mqtt_bridge_0xbc026efffefdee17"},"name":null,"object_id":"0x0017880106d5a0c5","origin":{"name":"Zigbee2MQTT","sw":"1.35.3","url":"https://www.zigbee2mqtt.io"},"payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/0x0017880106d5a0c5","unique_id":"0x0017880106d5a0c5_switch_zigbee2mqtt","value_template":"{{ value_json.state }}"}' Info 2024-03-01 10:47:29MQTT publish: topic 'homeassistant/sensor/0x0017880106d5a0c5/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/0x0017880106d5a0c5/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x0017880106d5a0c5"],"manufacturer":"Modular","model":"Automatically generated definition (MWM002)","name":"0x0017880106d5a0c5","sw_version":"1.108.5","via_device":"zigbee2mqtt_bridge_0xbc026efffefdee17"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"Linkquality","object_id":"0x0017880106d5a0c5_linkquality","origin":{"name":"Zigbee2MQTT","sw":"1.35.3","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/0x0017880106d5a0c5","unique_id":"0x0017880106d5a0c5_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}' Error 2024-03-01 10:47:49Failed to configure '0x0017880106d5a0c5', attempt 1 (Error: ConfigureReporting 0x0017880106d5a0c5/11 genOnOff([{"minimumReportInterval":0,"maximumReportInterval":65000,"reportableChange":1,"attribute":"onOff"}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 5983 - 11 - 69 - 6 - 7 after 10000ms) at Object.start (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:63:23) at EZSPAdapter.sendZclFrameToEndpointInternal (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:486:47) at Queue.execute (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:35:20) at Request.send (/app/node_modules/zigbee-herdsman/src/controller/helpers/request.ts:79:20) at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:669:28) at setupAttributes (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:55:13) at result.configure (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:126:13) at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts:141:25) at Configure.configure (/app/lib/extension/configure.ts:120:13) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17)) Info 2024-03-01 10:51:11Configuring '0x0017880106d5a0c5' Info 2024-03-01 10:51:11MQTT publish: topic 'zigbee2mqtt/0x0017880106d5a0c5', payload '{"linkquality":144,"state":"ON"}' Error 2024-03-01 10:51:31Failed to configure '0x0017880106d5a0c5', attempt 2 (Error: ConfigureReporting 0x0017880106d5a0c5/11 genOnOff([{"minimumReportInterval":0,"maximumReportInterval":65000,"reportableChange":1,"attribute":"onOff"}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 5983 - 11 - 78 - 6 - 7 after 10000ms) at Object.start (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:63:23) at EZSPAdapter.sendZclFrameToEndpointInternal (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:486:47) at Queue.execute (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:35:20) at Request.send (/app/node_modules/zigbee-herdsman/src/controller/helpers/request.ts:79:20) at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:669:28) at setupAttributes (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:55:13) at result.configure (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:126:13) at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts:141:25) at Configure.configure (/app/lib/extension/configure.ts:120:13) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17)) Info 2024-03-01 10:51:31Configuring '0x0017880106d5a0c5' Info 2024-03-01 10:51:31MQTT publish: topic 'zigbee2mqtt/0x0017880106d5a0c5', payload '{"linkquality":148,"state":"OFF"}' Info 2024-03-01 10:51:31MQTT publish: topic 'zigbee2mqtt/0x0017880106d5a0c5', payload '{"linkquality":144,"state":"ON"}' Error 2024-03-01 10:51:51Failed to configure '0x0017880106d5a0c5', attempt 3 (Error: ConfigureReporting 0x0017880106d5a0c5/11 genOnOff([{"minimumReportInterval":0,"maximumReportInterval":65000,"reportableChange":1,"attribute":"onOff"}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 5983 - 11 - 83 - 6 - 7 after 10000ms) at Object.start (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:63:23) at EZSPAdapter.sendZclFrameToEndpointInternal (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:486:47) at Queue.execute (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:35:20) at Request.send (/app/node_modules/zigbee-herdsman/src/controller/helpers/request.ts:79:20) at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:669:28) at setupAttributes (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:55:13) at result.configure (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:126:13) at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts:141:25) at Configure.configure (/app/lib/extension/configure.ts:120:13) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17)) Info 2024-03-01 10:51:56MQTT publish: topic 'zigbee2mqtt/bridge/response/device/generate_external_definition', payload '{"data":{"id":"0x0017880106d5a0c5","source":"const {onOff} = require('zigbee-herdsman-converters/lib/modernExtend');\n\nconst definition = {\n zigbeeModel: ['MWM002'],\n model: 'MWM002',\n vendor: 'Modular',\n description: 'Automatically generated definition',\n extend: [onOff({\"powerOnBehavior\":false})],\n meta: {},\n};\n\nmodule.exports = definition;"},"status":"ok","transaction":"8tgk0-10"}'

External definition

const {onOff} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['MWM002'],
    model: 'MWM002',
    vendor: 'Modular',
    description: 'Automatically generated definition',
    extend: [onOff({"powerOnBehavior":false})],
    meta: {},
};

module.exports = definition;
laurensdehoorne commented 8 months ago

correct database entry

{"id":35,"type":"Router","ieeeAddr":"0x0017880106d5a0c5","nwkAddr":33034,"manufId":4107,"manufName":"Modular","powerSource":"Mains (single phase)","modelId":"MWM002","epList":[11,242],"endpoints":{"11":{"profId":49246,"epId":11,"devId":256,"inClusterList":[0,3,4,5,6,8,4096,64515,64516],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"MWM002","manufacturerName":"Modular","powerSource":1,"zclVersion":1,"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20230606","swBuild":"1.108.5"}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0xbc026efffefdee17","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20230606","swBuildId":"1.108.5","zclVersion":1,"interviewCompleted":true,"meta":{},"lastSeen":1709301620047}

laurensdehoorne commented 7 months ago

Will try this external definition...

const {light} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = { zigbeeModel: ['MWM002'], model: 'MWM002', vendor: 'Modular', description: '0-10v dimmer', extend: [light()], };

module.exports = definition;

laurensdehoorne commented 7 months ago

works