Koenkk / zigbee2mqtt

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

Eco-Dim.05 Zigbee duodimmer works only on one side #23375

Open xsienix opened 4 months ago

xsienix commented 4 months ago

What happened?

Problem

After making a ext_converter for this type dimmer and pairing, the dimmer is supported but works only on one side. SuperDimmer

As a test, i deleted the device and paired it again. Now my device is unsupported. Supprted or not supported, i can only operate one dimmer.

There are no error in the logs.

My ext_converter looks like: `const {} = require('zigbee-herdsman-converters/lib/modernExtend'); // Add the lines below const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); const tz = require('zigbee-herdsman-converters/converters/toZigbee'); const exposes = require('zigbee-herdsman-converters/lib/exposes'); const reporting = require('zigbee-herdsman-converters/lib/reporting'); const ota = require('zigbee-herdsman-converters/lib/ota'); const utils = require('zigbee-herdsman-converters/lib/utils'); const globalStore = require('zigbee-herdsman-converters/lib/store'); const e = exposes.presets; const ea = exposes.access; const modernExtend = require('zigbee-herdsman-converters/lib/modernExtend');

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

const definition = { zigbeeModel: ['Eco-Dim.05 Zigbee'], model: 'Eco-Dim.05 Zigbee', vendor: 'EcoDim BV', description: 'SuperDimmer', extend: [deviceEndpoints({"endpoints":{"1":1,"2":2}}), identify(), light(), light()], meta: {"multiEndpoint":true}, exposes: [e.light_brightness().withEndpoint('1'), e.light_brightness().withEndpoint('2')], configure: async (device, coordinatorEndpoint, logger) => { await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger); for (const ep of [1, 2]) { const endpoint = device.getEndpoint(ep); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']); await reporting.onOff(endpoint); await reporting.brightness(endpoint); } }, endpoint: (device) => { return {'left': 2, 'right': 1}; }, };

module.exports = definition; };

`

Database

Database db

What did you expect to happen?

Working on 2 sides

How to reproduce it (minimal and precise)

I know, that Ecodim05 is supported, but i have the Ecodim05 Zigbee model. So reparing, deleting about 10X gives me no result. Also using the Ecodim05 code, wich is supported, leads to the exact same results.

There are no errors in the logs.

Zigbee2MQTT version

1.39.0

Adapter firmware version

See picture above

Adapter

SLBZ-6

Setup

Ass addon for Home Assistant.

Debug log

The log is not under data/log, but in the zgbee2mqtt config directory

debug log

[2024-07-19 12:48:32] info: zh:controller: Succesfully interviewed '0x6c5cb1fffe20b1b8' [2024-07-19 12:48:32] info: z2m: Successfully interviewed '0x6c5cb1fffe20b1b8', device has successfully been paired [2024-07-19 12:48:32] warning: z2m: Device '0x6c5cb1fffe20b1b8' with Zigbee model 'Eco-Dim.05 Zigbee' and manufacturer name 'EcoDim BV' is NOT supported, please follow https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html [2024-07-19 12:48:32] info: z2m: Configuring '0x6c5cb1fffe20b1b8' [2024-07-19 12:48:32] info: z2m:mqtt: MQTT publish: topic 'homeassistant/select/0x6c5cb1fffe20b1b8/identify/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x6c5cb1fffe20b1b8/set/identify","device":{"identifiers":["zigbee2mqtt_0x6c5cb1fffe20b1b8"],"manufacturer":"EcoDim BV","model":"Automatically generated definition (Eco-Dim.05 Zigbee)","name":"0x6c5cb1fffe20b1b8","sw_version":"1.00","via_device":"zigbee2mqtt_bridge_0x00124b00258cd02e"},"device_class":"identify","enabled_by_default":false,"entity_category":"config","object_id":"0x6c5cb1fffe20b1b8_identify","options":["identify"],"origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"unique_id":"0x6c5cb1fffe20b1b8_identify_zigbee2mqtt"}' [2024-07-19 12:48:32] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Automatically generated definition","exposes":[{"access":2,"category":"config","description":"Initiate device identification","label":"Identify","name":"identify","property":"identify","type":"enum","values":["identify"]},{"features":[{"access":7,"description":"On/off state of this light","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"},{"access":7,"description":"Brightness of this light","label":"Brightness","name":"brightness","property":"brightness","type":"numeric","value_max":254,"value_min":0}],"type":"light"},{"access":2,"description":"Triggers an effect on the light (e.g. make light blink for a few seconds)","label":"Effect","name":"effect","property":"effect","type":"enum","values":["blink","breathe","okay","channel_change","finish_effect","stop_effect"]},{"access":7,"category":"config","description":"Controls the behavior when the device is powered on after power loss. If you get anUNSUPPORTED_ATTRIBUTEerror, the device does not support it.","label":"Power-on behavior","name":"power_on_behavior","property":"power_on_behavior","type":"enum","values":["off","on","toggle","previous"]},{"features":[{"access":7,"description":"On/off state of this light","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"},{"access":7,"description":"Brightness of this light","label":"Brightness","name":"brightness","property":"brightness","type":"numeric","value_max":254,"value_min":0}],"type":"light"},{"access":2,"description":"Triggers an effect on the light (e.g. make light blink for a few seconds)","label":"Effect","name":"effect","property":"effect","type":"enum","values":["blink","breathe","okay","channel_change","finish_effect","stop_effect"]},{"access":7,"category":"config","description":"Controls the behavior when the device is powered on after power loss. If you get anUNSUPPORTED_ATTRIBUTEerror, the device does not support it.","label":"Power-on behavior","name":"power_on_behavior","property":"power_on_behavior","type":"enum","values":["off","on","toggle","previous"]},{"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":"Eco-Dim.05 Zigbee","options":[{"access":2,"description":"Sets the duration of the identification procedure in seconds (i.e., how long the device would flash).The value ranges from 1 to 30 seconds (default: 3).","label":"Identify timeout","name":"identify_timeout","property":"identify_timeout","type":"numeric","value_max":30,"value_min":1},{"access":2,"description":"Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to0(no transition).","label":"Transition","name":"transition","property":"transition","type":"numeric","value_min":0},{"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":"EcoDim BV"},"friendly_name":"0x6c5cb1fffe20b1b8","ieee_address":"0x6c5cb1fffe20b1b8","status":"successful","supported":false},"type":"device_interview"}' [2024-07-19 12:48:32] info: z2m: Successfully configured '0x6c5cb1fffe20b1b8' [2024-07-19 12:48:32] debug: zh:controller:database: Writing database to '/config/zigbee2mqtt/database.db' [2024-07-19 12:48:33] info: z2m:mqtt: MQTT publish: topic 'homeassistant/button/0x6c5cb1fffe20b1b8/identify/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x6c5cb1fffe20b1b8/set/identify","device":{"identifiers":["zigbee2mqtt_0x6c5cb1fffe20b1b8"],"manufacturer":"EcoDim BV","model":"Automatically generated definition (Eco-Dim.05 Zigbee)","name":"0x6c5cb1fffe20b1b8","sw_version":"1.00","via_device":"zigbee2mqtt_bridge_0x00124b00258cd02e"},"device_class":"identify","entity_category":"config","object_id":"0x6c5cb1fffe20b1b8_identify","origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"payload_press":"identify","unique_id":"0x6c5cb1fffe20b1b8_identify_zigbee2mqtt"}' [2024-07-19 12:48:33] info: z2m:mqtt: MQTT publish: topic 'homeassistant/light/0x6c5cb1fffe20b1b8/light/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"brightness":true,"brightness_scale":254,"command_topic":"zigbee2mqtt/0x6c5cb1fffe20b1b8/set","device":{"identifiers":["zigbee2mqtt_0x6c5cb1fffe20b1b8"],"manufacturer":"EcoDim BV","model":"Automatically generated definition (Eco-Dim.05 Zigbee)","name":"0x6c5cb1fffe20b1b8","sw_version":"1.00","via_device":"zigbee2mqtt_bridge_0x00124b00258cd02e"},"effect":true,"effect_list":["blink","breathe","okay","channel_change","finish_effect","stop_effect"],"name":null,"object_id":"0x6c5cb1fffe20b1b8","origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"schema":"json","state_topic":"zigbee2mqtt/0x6c5cb1fffe20b1b8","unique_id":"0x6c5cb1fffe20b1b8_light_zigbee2mqtt"}' [2024-07-19 12:48:33] info: z2m:mqtt: MQTT publish: topic 'homeassistant/select/0x6c5cb1fffe20b1b8/effect/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x6c5cb1fffe20b1b8/set/effect","device":{"identifiers":["zigbee2mqtt_0x6c5cb1fffe20b1b8"],"manufacturer":"EcoDim BV","model":"Automatically generated definition (Eco-Dim.05 Zigbee)","name":"0x6c5cb1fffe20b1b8","sw_version":"1.00","via_device":"zigbee2mqtt_bridge_0x00124b00258cd02e"},"enabled_by_default":false,"icon":"mdi:palette","name":"Effect","object_id":"0x6c5cb1fffe20b1b8_effect","options":["blink","breathe","okay","channel_change","finish_effect","stop_effect"],"origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"unique_id":"0x6c5cb1fffe20b1b8_effect_zigbee2mqtt"}' [2024-07-19 12:48:33] info: z2m:mqtt: MQTT publish: topic 'homeassistant/sensor/0x6c5cb1fffe20b1b8/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x6c5cb1fffe20b1b8"],"manufacturer":"EcoDim BV","model":"Automatically generated definition (Eco-Dim.05 Zigbee)","name":"0x6c5cb1fffe20b1b8","sw_version":"1.00","via_device":"zigbee2mqtt_bridge_0x00124b00258cd02e"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:power-settings","name":"Power-on behavior","object_id":"0x6c5cb1fffe20b1b8_power_on_behavior","origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/0x6c5cb1fffe20b1b8","unique_id":"0x6c5cb1fffe20b1b8_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}' [2024-07-19 12:48:33] info: z2m:mqtt: MQTT publish: topic 'homeassistant/select/0x6c5cb1fffe20b1b8/power_on_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/0x6c5cb1fffe20b1b8/set/power_on_behavior","device":{"identifiers":["zigbee2mqtt_0x6c5cb1fffe20b1b8"],"manufacturer":"EcoDim BV","model":"Automatically generated definition (Eco-Dim.05 Zigbee)","name":"0x6c5cb1fffe20b1b8","sw_version":"1.00","via_device":"zigbee2mqtt_bridge_0x00124b00258cd02e"},"enabled_by_default":true,"entity_category":"config","icon":"mdi:power-settings","name":"Power-on behavior","object_id":"0x6c5cb1fffe20b1b8_power_on_behavior","options":["off","on","toggle","previous"],"origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/0x6c5cb1fffe20b1b8","unique_id":"0x6c5cb1fffe20b1b8_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}' [2024-07-19 12:48:33] debug: z2m: Skipping discovery of 'light/0x6c5cb1fffe20b1b8/light/config', already discovered [2024-07-19 12:48:33] debug: z2m: Skipping discovery of 'select/0x6c5cb1fffe20b1b8/effect/config', already discovered [2024-07-19 12:48:33] debug: z2m: Skipping discovery of 'sensor/0x6c5cb1fffe20b1b8/power_on_behavior/config', already discovered [2024-07-19 12:48:33] debug: z2m: Skipping discovery of 'select/0x6c5cb1fffe20b1b8/power_on_behavior/config', already discovered [2024-07-19 12:48:33] info: z2m:mqtt: MQTT publish: topic 'homeassistant/sensor/0x6c5cb1fffe20b1b8/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x6c5cb1fffe20b1b8"],"manufacturer":"EcoDim BV","model":"Automatically generated definition (Eco-Dim.05 Zigbee)","name":"0x6c5cb1fffe20b1b8","sw_version":"1.00","via_device":"zigbee2mqtt_bridge_0x00124b00258cd02e"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"Linkquality","object_id":"0x6c5cb1fffe20b1b8_linkquality","origin":{"name":"Zigbee2MQTT","sw":"1.39.0","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/0x6c5cb1fffe20b1b8","unique_id":"0x6c5cb1fffe20b1b8_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}' [2024-07-19 12:51:20] debug: zh:zstack:znp: SREQ: --> ZDO - mgmtPermitJoinReq - {"addrmode":2,"dstaddr":65532,"duration":254,"tcsignificance":0} [2024-07-19 12:51:20] debug: zh:zstack:unpi:writer: --> frame [254,5,37,54,2,252,255,254,0,233] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: <-- [254,1,101,54,0,82] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --- parseNext [254,1,101,54,0,82] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 5 - 54 - [0] - 82 [2024-07-19 12:51:20] debug: zh:zstack:znp: SRSP: <-- ZDO - mgmtPermitJoinReq - {"status":0} [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 12:51:20] debug: zh:zstack: sendZclFrameToEndpointInternal null:0/242 (0,0,1) [2024-07-19 12:51:20] debug: zh:zstack:znp: SREQ: --> AF - dataRequest - {"dstaddr":0,"destendpoint":242,"srcendpoint":242,"clusterid":33,"transid":16,"options":0,"radius":30,"len":6,"data":{"type":"Buffer","data":[25,17,2,43,254,0]}} [2024-07-19 12:51:20] debug: zh:zstack:unpi:writer: --> frame [254,16,36,1,0,0,242,242,33,0,16,0,30,6,25,17,2,43,254,0,195] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: <-- [254,3,69,182,0,0,0,240] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --- parseNext [254,3,69,182,0,0,0,240] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 5 - 182 - [0,0,0] - 240 [2024-07-19 12:51:20] debug: zh:zstack:znp: AREQ: <-- ZDO - mgmtPermitJoinRsp - {"srcaddr":0,"status":0} [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100,254,3,68,128,0,242,16,37] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100,254,3,68,128,0,242,16,37] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100 [2024-07-19 12:51:20] debug: zh:zstack:znp: SRSP: <-- AF - dataRequest - {"status":0} [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,242,16,37] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,242,16] - 37 [2024-07-19 12:51:20] debug: zh:zstack:znp: AREQ: <-- AF - dataConfirm - {"status":0,"endpoint":242,"transid":16} [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: <-- [254,26,68,129,0,0,33,0,0,0,242,242,0,255,0,0,0,0,0,0,6,25,17,2,43,254,0,0,0,0,216] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --- parseNext [254,26,68,129,0,0,33,0,0,0,242,242,0,255,0,0,0,0,0,0,6,25,17,2,43,254,0,0,0,0,216] [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --> parsed 26 - 2 - 4 - 129 - [0,0,33,0,0,0,242,242,0,255,0,0,0,0,0,0,6,25,17,2,43,254,0,0,0,0] - 216 [2024-07-19 12:51:20] debug: zh:zstack:znp: AREQ: <-- AF - incomingMsg - {"groupid":0,"clusterid":33,"srcaddr":0,"srcendpoint":242,"dstendpoint":242,"wasbroadcast":0,"linkquality":255,"securityuse":0,"timestamp":0,"transseqnumber":0,"len":6,"data":{"type":"Buffer","data":[25,17,2,43,254,0]}} [2024-07-19 12:51:20] debug: zh:controller:greenpower: Received unhandled command '0x2' from '0' [2024-07-19 12:51:20] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 12:51:20] debug: zh:controller: Received payload: clusterID=33, address=0, groupID=0, endpoint=242, destinationEndpoint=242, wasBroadcast=false, linkQuality=255, frame={"header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"manufacturerCode":null,"transactionSequenceNumber":17,"commandIdentifier":2},"payload":{"options":43,"commisioningWindow":254},"command":{"ID":2,"parameters":[{"name":"options","type":32},{"name":"commisioningWindow","type":33}],"name":"commisioningMode"}} [2024-07-19 12:51:20] debug: z2m: Received Zigbee message from 'Coordinator', type 'commandCommisioningMode', cluster 'greenPower', data '{"commisioningWindow":254,"options":43}' from endpoint 242 with groupID 0, ignoring since it is from coordinator [2024-07-19 12:51:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 12:52:14] debug: zh:controller: Disable joining [2024-07-19 12:52:14] debug: zh:zstack:znp: SREQ: --> AF - dataRequestExt - {"dstaddrmode":2,"dstaddr":"0x000000000000fffd","destendpoint":242,"dstpanid":0,"srcendpoint":242,"clusterid":33,"transid":17,"options":0,"radius":30,"len":6,"data":{"type":"Buffer","data":[25,18,2,10,0,0]}} [2024-07-19 12:52:14] debug: zh:zstack:unpi:writer: --> frame [254,26,36,2,2,253,255,0,0,0,0,0,0,242,0,0,242,33,0,17,0,30,6,0,25,18,2,10,0,0,23] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: <-- [254,1,100,2,0,103] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,2,0,103] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 2 - [0] - 103 [2024-07-19 12:52:14] debug: zh:zstack:znp: SRSP: <-- AF - dataRequestExt - {"status":0} [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,242,17,36] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,242,17,36] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,242,17] - 36 [2024-07-19 12:52:14] debug: zh:zstack:znp: AREQ: <-- AF - dataConfirm - {"status":0,"endpoint":242,"transid":17} [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 12:52:14] debug: zh:zstack:znp: SREQ: --> ZDO - mgmtPermitJoinReq - {"addrmode":15,"dstaddr":65532,"duration":0,"tcsignificance":0} [2024-07-19 12:52:14] debug: zh:zstack:unpi:writer: --> frame [254,5,37,54,15,252,255,0,0,26] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: <-- [254,1,101,54,0,82,254,3,69,182,0,0,0,240] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --- parseNext [254,1,101,54,0,82,254,3,69,182,0,0,0,240] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 5 - 54 - [0] - 82 [2024-07-19 12:52:14] debug: zh:zstack:znp: SRSP: <-- ZDO - mgmtPermitJoinReq - {"status":0} [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --- parseNext [254,3,69,182,0,0,0,240] [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 5 - 182 - [0,0,0] - 240 [2024-07-19 12:52:14] debug: zh:zstack:znp: AREQ: <-- ZDO - mgmtPermitJoinRsp - {"srcaddr":0,"status":0} [2024-07-19 12:52:14] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 12:56:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:01:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:06:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:11:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:16:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:21:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:26:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: <-- [254,3,69,196,119,211,0,38] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --- parseNext [254,3,69,196,119,211,0,38] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 5 - 196 - [119,211,0] - 38 [2024-07-19 13:29:27] debug: zh:zstack:znp: AREQ: <-- ZDO - srcRtgInd - {"dstaddr":54135,"relaycount":0,"relaylist":[]} [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: <-- [254,32,68,129,0,0,25,0,119,211,1,13,0,123,0,222,44,144,0,0,12,17,41,1,0,2,16,45,0,1,0,0,0,119,211,29,255] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --- parseNext [254,32,68,129,0,0,25,0,119,211,1,13,0,123,0,222,44,144,0,0,12,17,41,1,0,2,16,45,0,1,0,0,0,119,211,29,255] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --> parsed 32 - 2 - 4 - 129 - [0,0,25,0,119,211,1,13,0,123,0,222,44,144,0,0,12,17,41,1,0,2,16,45,0,1,0,0,0,119,211,29] - 255 [2024-07-19 13:29:27] debug: zh:zstack:znp: AREQ: <-- AF - incomingMsg - {"groupid":0,"clusterid":25,"srcaddr":54135,"srcendpoint":1,"dstendpoint":13,"wasbroadcast":0,"linkquality":123,"securityuse":0,"timestamp":9448670,"transseqnumber":0,"len":12,"data":{"type":"Buffer","data":[17,41,1,0,2,16,45,0,1,0,0,0]}} [2024-07-19 13:29:27] debug: zh:controller: Received payload: clusterID=25, address=54135, groupID=0, endpoint=1, destinationEndpoint=13, wasBroadcast=false, linkQuality=123, frame={"header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":0,"disableDefaultResponse":true,"reservedBits":0},"manufacturerCode":null,"transactionSequenceNumber":41,"commandIdentifier":1},"payload":{"fieldControl":0,"manufacturerCode":4098,"imageType":45,"fileVersion":1},"command":{"ID":1,"response":2,"parameters":[{"name":"fieldControl","type":32},{"name":"manufacturerCode","type":33},{"name":"imageType","type":33},{"name":"fileVersion","type":35}],"name":"queryNextImageRequest"}} [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 13:29:27] debug: z2m: Received Zigbee message from '0x6c5cb1fffe20b1b8', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":1,"imageType":45,"manufacturerCode":4098}' from endpoint 1 with groupID 0 [2024-07-19 13:29:27] debug: z2m: Device '0x6c5cb1fffe20b1b8' requested OTA [2024-07-19 13:29:27] debug: zh:controller:endpoint: CommandResponse 0x6c5cb1fffe20b1b8/1 genOta.queryNextImageResponse({"status":152}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":1,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) [2024-07-19 13:29:27] debug: zh:zstack: sendZclFrameToEndpointInternal 0x6c5cb1fffe20b1b8:54135/1 (0,0,1) [2024-07-19 13:29:27] debug: zh:zstack:znp: SREQ: --> AF - dataRequest - {"dstaddr":54135,"destendpoint":1,"srcendpoint":1,"clusterid":25,"transid":18,"options":0,"radius":30,"len":4,"data":{"type":"Buffer","data":[25,41,2,152]}} [2024-07-19 13:29:27] debug: zh:zstack:unpi:writer: --> frame [254,14,36,1,119,211,1,1,25,0,18,0,30,4,25,41,2,152,52] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100 [2024-07-19 13:29:27] debug: zh:zstack:znp: SRSP: <-- AF - dataRequest - {"status":0} [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,18,212] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,18,212] [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,18] - 212 [2024-07-19 13:29:27] debug: zh:zstack:znp: AREQ: <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":18} [2024-07-19 13:29:27] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 13:29:27] debug: z2m: Responded to OTA request of '0x6c5cb1fffe20b1b8' with 'NO_IMAGE_AVAILABLE' [2024-07-19 13:31:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:36:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:41:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:46:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:46:40] debug: zh:controller:database: Writing database to '/config/zigbee2mqtt/database.db' [2024-07-19 13:51:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 13:56:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 14:01:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 14:06:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 14:11:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 14:16:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: <-- [254,3,69,196,119,211,0,38] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --- parseNext [254,3,69,196,119,211,0,38] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 5 - 196 - [119,211,0] - 38 [2024-07-19 14:19:18] debug: zh:zstack:znp: AREQ: <-- ZDO - srcRtgInd - {"dstaddr":54135,"relaycount":0,"relaylist":[]} [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: <-- [254,32,68,129,0,0,25,0,119,211,1,13,0,123,0,178,241,116,0,0,12,17,42,1,0,2,16,45,0,1,0,0,0,119,211,29,169] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --- parseNext [254,32,68,129,0,0,25,0,119,211,1,13,0,123,0,178,241,116,0,0,12,17,42,1,0,2,16,45,0,1,0,0,0,119,211,29,169] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --> parsed 32 - 2 - 4 - 129 - [0,0,25,0,119,211,1,13,0,123,0,178,241,116,0,0,12,17,42,1,0,2,16,45,0,1,0,0,0,119,211,29] - 169 [2024-07-19 14:19:18] debug: zh:zstack:znp: AREQ: <-- AF - incomingMsg - {"groupid":0,"clusterid":25,"srcaddr":54135,"srcendpoint":1,"dstendpoint":13,"wasbroadcast":0,"linkquality":123,"securityuse":0,"timestamp":7664050,"transseqnumber":0,"len":12,"data":{"type":"Buffer","data":[17,42,1,0,2,16,45,0,1,0,0,0]}} [2024-07-19 14:19:18] debug: zh:controller: Received payload: clusterID=25, address=54135, groupID=0, endpoint=1, destinationEndpoint=13, wasBroadcast=false, linkQuality=123, frame={"header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":0,"disableDefaultResponse":true,"reservedBits":0},"manufacturerCode":null,"transactionSequenceNumber":42,"commandIdentifier":1},"payload":{"fieldControl":0,"manufacturerCode":4098,"imageType":45,"fileVersion":1},"command":{"ID":1,"response":2,"parameters":[{"name":"fieldControl","type":32},{"name":"manufacturerCode","type":33},{"name":"imageType","type":33},{"name":"fileVersion","type":35}],"name":"queryNextImageRequest"}} [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 14:19:18] debug: z2m: Received Zigbee message from '0x6c5cb1fffe20b1b8', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":1,"imageType":45,"manufacturerCode":4098}' from endpoint 1 with groupID 0 [2024-07-19 14:19:18] debug: z2m: Device '0x6c5cb1fffe20b1b8' requested OTA [2024-07-19 14:19:18] debug: zh:controller:endpoint: CommandResponse 0x6c5cb1fffe20b1b8/1 genOta.queryNextImageResponse({"status":152}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":1,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) [2024-07-19 14:19:18] debug: zh:zstack: sendZclFrameToEndpointInternal 0x6c5cb1fffe20b1b8:54135/1 (0,0,1) [2024-07-19 14:19:18] debug: zh:zstack:znp: SREQ: --> AF - dataRequest - {"dstaddr":54135,"destendpoint":1,"srcendpoint":1,"clusterid":25,"transid":19,"options":0,"radius":30,"len":4,"data":{"type":"Buffer","data":[25,42,2,152]}} [2024-07-19 14:19:18] debug: zh:zstack:unpi:writer: --> frame [254,14,36,1,119,211,1,1,25,0,19,0,30,4,25,42,2,152,54] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100 [2024-07-19 14:19:18] debug: zh:zstack:znp: SRSP: <-- AF - dataRequest - {"status":0} [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,19,213] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,19,213] [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,19] - 213 [2024-07-19 14:19:18] debug: zh:zstack:znp: AREQ: <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":19} [2024-07-19 14:19:18] debug: zh:zstack:unpi:parser: --- parseNext [] [2024-07-19 14:19:18] debug: z2m: Responded to OTA request of '0x6c5cb1fffe20b1b8' with 'NO_IMAGE_AVAILABLE' [2024-07-19 14:21:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 14:26:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 14:31:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json [2024-07-19 14:36:38] debug: z2m: Saving state to file /config/zigbee2mqtt/state.json

ozanmakes commented 4 months ago

Continuing from #22370. After playing with this, I noticed I can set the brightness. I used the following config to make this device "work". Setting brightness of left and right works, and setting brightness to 0 turns the light off.

If I set the light to be "off" instead, however, I can't turn it back on by setting the state to "on". For now I am working around this by only using brightness. I would love to have it fully supported though. This is my first day with zigbee2mqtt and zigbee devices in general, so feedback very welcome!

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

const definition = {
    zigbeeModel: ['Eco-Dim.05 Zigbee'],
    model: 'Eco-Dim.05 Zigbee',
    vendor: 'EcoDim BV',
    description: 'LED dimmer duo 2x 0-100W',
    extend: [
        deviceEndpoints({endpoints: {"Left": 1, "Right": 2}}),
        light({ endpointNames:["Left"] }),
        light({ endpointNames:["Right"] })
    ],
    meta: {"multiEndpoint":true},
};

module.exports = definition;
ozanmakes commented 4 months ago

I had some luck by using a custom toZigbee method that sends brightness events when it encounters state changes. This gets me much closer to where I want to be:

const {
  deviceEndpoints,
  identify,
  light,
} = require("zigbee-herdsman-converters/lib/modernExtend");

const customToZigbee = [
  {
    key: ["state"],
    convertSet: async (entity, key, value, meta) => {
      console.log("set state custom", { entity, key, value, meta });
      if (value === "OFF") {
        await entity.command("genLevelCtrl", "moveToLevelWithOnOff", {
          level: 0,
          transtime: 0,
        });
      } else if (value === "ON") {
        // Don't set the brightness value if explicit one is provided
        if (!meta.message.hasOwnProperty("brightness")) {
          await entity.command("genLevelCtrl", "moveToLevelWithOnOff", {
            level: 128, // Update the default brightness value to one you prefer (between 0-254)
            transtime: 0,
          });
        }
      }
    },
  },
];

const ecoDimLight = light({ endpointNames: ["left", "right"] });

const ecoDimLightCustom = {
  ...ecoDimLight,
  toZigbee: [...customToZigbee, ...ecoDimLight.toZigbee],
};

const definition = {
  zigbeeModel: ["Eco-Dim.05 Zigbee"],
  model: "Eco-Dim.05 Zigbee",
  vendor: "EcoDim BV",
  description: "LED dimmer duo 2x 0-100W",
  extend: [
    deviceEndpoints({ endpoints: { left: 1, right: 2 } }),
    identify(),
    ecoDimLightCustom,
  ],
  meta: { multiEndpoint: true },
};

module.exports = definition;

Of course, with this the state of the light is not correctly represented in the dashboard. There are also other edge cases such as Home Assistant sending current/new brightness together with state changes. I handled this for some cases but not all.

xsienix commented 4 months ago

THIS IS AWSOME !!!

I'm sitting here for more then a week now, turning my head around, used different code, and all of them did not work properly.

  1. how do you manage to fill in that code so nicely on this page, with colors and all?
  2. what was the trick, that your code is working?
  3. are you able to give me a hand, because i'm not a code genius, but try to understand what it was that your code works.

Turning the knob on the dimmer itself, didn't change the brightness level in Home Assistant. But hey, you make my weekend! Thanks so much!

ozanmakes commented 4 months ago

Glad to hear it worked for you @xsienix. You can use triple backtick (``js ... \``) syntax for posting code snippet here.

I am a programmer by trade, but new to home automation in general. Your threads here tipped me off to possibilities of zigbee2mqtt and that I can create "converters" that change behavior of the device.

After I observed setting brightness worked, but toggling off/on caused buggy behavior, I implemented a custom "set off" and "set on" behavior for the device using custom converters. When the state is set to OFF or ON, this code issues a "set brightness" command instead.

xsienix commented 4 months ago

Glad to hear it worked for you @xsienix. You can use triple backtick (js ...) syntax for posting code snippet here.

I am a programmer by trade, but new to home automation in general. Your threads here tipped me off to possibilities of zigbee2mqtt and that I can create "converters" that change behavior of the device.

After I observed setting brightness worked, but toggling off/on caused buggy behavior, I implemented a custom "set off" and "set on" behavior for the device using custom converters. When the state is set to OFF or ON, this code issues a "set brightness" command instead.

Thank you!

I'm not a programmer but eager to learn what is needed to understand al this. Meanwhile my learning curve is verticaly :) Zigbee2mqtt converts zigbee information to mqtt information en vice versa. Herdman converters make this happen i presume.

The dimmer works perfect! Now i'm searching to get the turning knobs of the device working, so if you turn the knob on the device (or when you push the knob, you activate the dimmer) the state of the dimmer will changer in zigbee2mqtt. Somehow the dimmer doesn't send any states.