Koenkk / zigbee2mqtt

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

TuYa TS0505B_1 misinterpretation #20126

Open talbx opened 10 months ago

talbx commented 10 months ago

What happened?

As reported in #19656 The TuYa TS0505B_1 RGB Controller with fingerprint _TZ3210_eejm8dcr gets misinterpreted and leaves the network shortly after device announce.

All my tries using a custom external converter failed, it just won't get picked up, probably because the device is interpreted as the TS0505B_1 which has a converter already set (for converter details see the linked issue #19656). The only thing I could find out is the fingerprint / manufacturer name which doesn't seem to be considered before (https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/devices/tuya.ts)

Based on the pictures for TS0505B_1 in the docs, I would tell that this is not the same device.

The device I bought on amazon: link

What did you expect to happen?

Either

How to reproduce it (minimal and precise)

Zigbee2MQTT version

1.33.2-dev commit: d26ea1a

Adapter firmware version

20210708

Adapter

Slaesh's CC2652RB stick

Debug log

Info 2023-11-10 15:31:35MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0xa4c138df7485dce8","ieee_address":"0xa4c138df7485dce8"},"type":"device_announce"}'
Debug 2023-11-10 15:31:35Received MQTT message on 'zigbee2mqtt/0xa4c138df7485dce8/get' with data '{"state":0,"brightness":0,"color_temp":0,"color":0}'
Debug 2023-11-10 15:31:35Publishing get 'get' 'brightness' to '0xa4c138df7485dce8'
Debug 2023-11-10 15:31:35Received Zigbee message from '0xa4c138df7485dce8', type 'readResponse', cluster 'genLevelCtrl', data '{"currentLevel":1}' from endpoint 1 with groupID 0
Info 2023-11-10 15:31:35MQTT publish: topic 'zigbee2mqtt/0xa4c138df7485dce8', payload '{"brightness":1,"color_power_on_behavior":null,"do_not_disturb":null,"linkquality":90,"state":"ON"}'
Debug 2023-11-10 15:31:35Publishing get 'get' 'state' to '0xa4c138df7485dce8'
Debug 2023-11-10 15:31:36Received Zigbee message from '0xa4c138df7485dce8', type 'readResponse', cluster 'genOnOff', data '{"onOff":1}' from endpoint 1 with groupID 0
Info 2023-11-10 15:31:36MQTT publish: topic 'zigbee2mqtt/0xa4c138df7485dce8', payload '{"brightness":1,"color_power_on_behavior":null,"do_not_disturb":null,"linkquality":93,"state":"ON"}'
Debug 2023-11-10 15:31:36Publishing get 'get' 'color_temp' to '0xa4c138df7485dce8'
Debug 2023-11-10 15:31:36Received Zigbee message from '0xa4c138df7485dce8', type 'readResponse', cluster 'genBasic', data '{"stackVersion":0}' from endpoint 1 with groupID 0
Debug 2023-11-10 15:31:36Received Zigbee message from '0xa4c138df7485dce8', type 'readResponse', cluster 'lightingColorCtrl', data '{"colorMode":2,"colorTemperature":0,"currentHue":16,"currentSaturation":16,"currentX":0,"currentY":0}' from endpoint 1 with groupID 0
Debug 2023-11-10 15:31:36Missing colorTempPhysicalMin and/or colorTempPhysicalMax for endpoint 0xa4c138df7485dce8!
Error 2023-11-10 15:31:36Exception while calling fromZigbee converter: Cannot read properties of undefined (reading 'hasOwnProperty')}
Debug 2023-11-10 15:31:36TypeError: Cannot read properties of undefined (reading 'hasOwnProperty') at Function.fromObject (/app/node_modules/zigbee-herdsman-converters/src/lib/color.ts:226:17) at Function.fromMireds (/app/node_modules/zigbee-herdsman-converters/src/lib/color.ts:239:24) at Object.syncColorState (/app/node_modules/zigbee-herdsman-converters/src/lib/color.ts:773:32) at Object.convert (/app/node_modules/zigbee-herdsman-converters/src/converters/fromZigbee.ts:679:51) at Receive.onDeviceMessage (/app/lib/extension/receive.ts:150:51) at EventEmitter.emit (node:events:529:35) at EventBus.emitDeviceMessage (/app/lib/eventBus.ts:102:22) at Controller.<anonymous> (/app/lib/zigbee.ts:108:27) at Controller.emit (node:events:517:28) at Controller.selfAndDeviceEmit (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:527:14)
Debug 2023-11-10 15:31:36Publishing get 'get' 'color' to '0xa4c138df7485dce8'
Debug 2023-11-10 15:31:36Received Zigbee message from '0xa4c138df7485dce8', type 'readResponse', cluster 'genBasic', data '{"dateCode":""}' from endpoint 1 with groupID 0
Debug 2023-11-10 15:31:36Received Zigbee message from '0xa4c138df7485dce8', type 'readResponse', cluster 'lightingColorCtrl', data '{"colorMode":2,"colorTemperature":0,"currentHue":16,"currentSaturation":16,"currentX":0,"currentY":0}' from endpoint 1 with groupID 0
Debug 2023-11-10 15:31:36Missing colorTempPhysicalMin and/or colorTempPhysicalMax for endpoint 0xa4c138df7485dce8!
Error 2023-11-10 15:31:36Exception while calling fromZigbee converter: Cannot read properties of undefined (reading 'hasOwnProperty')}
Debug 2023-11-10 15:31:36TypeError: Cannot read properties of undefined (reading 'hasOwnProperty') at Function.fromObject (/app/node_modules/zigbee-herdsman-converters/src/lib/color.ts:226:17) at Function.fromMireds (/app/node_modules/zigbee-herdsman-converters/src/lib/color.ts:239:24) at Object.syncColorState (/app/node_modules/zigbee-herdsman-converters/src/lib/color.ts:773:32) at Object.convert (/app/node_modules/zigbee-herdsman-converters/src/converters/fromZigbee.ts:679:51) at Receive.onDeviceMessage (/app/lib/extension/receive.ts:150:51) at EventEmitter.emit (node:events:529:35) at EventBus.emitDeviceMessage (/app/lib/eventBus.ts:102:22) at Controller.<anonymous> (/app/lib/zigbee.ts:108:27) at Controller.emit (node:events:517:28) at Controller.selfAndDeviceEmit (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:527:14)
Debug 2023-11-10 15:31:36Received Zigbee message from '0xa4c138df7485dce8', type 'readResponse', cluster 'genBasic', data '{}' from endpoint 1 with groupID 0
Info 2023-11-10 15:31:36Successfully interviewed '0xa4c138df7485dce8', device has successfully been paired
Info 2023-11-10 15:31:36Device '0xa4c138df7485dce8' is supported, identified as: TuYa Zigbee RGB+CCT light (TS0505B_1)
Info 2023-11-10 15:31:36MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Zigbee RGB+CCT light","exposes":[{"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},{"access":7,"description":"Color temperature of this light","label":"Color temp","name":"color_temp","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":500}],"property":"color_temp","type":"numeric","unit":"mired","value_max":500,"value_min":153},{"access":7,"description":"Color of this light in the CIE 1931 color space (x/y)","features":[{"access":7,"label":"X","name":"x","property":"x","type":"numeric"},{"access":7,"label":"Y","name":"y","property":"y","type":"numeric"}],"label":"Color (X/Y)","name":"color_xy","property":"color","type":"composite"}],"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":3,"description":"Do not disturb mode, when enabled this function will keep the light OFF after a power outage","label":"Do not disturb","name":"do_not_disturb","property":"do_not_disturb","type":"binary","value_off":false,"value_on":true},{"access":3,"description":"Power on behavior state","label":"Color power on behavior","name":"color_power_on_behavior","property":"color_power_on_behavior","type":"enum","values":["initial","previous","cutomized"]},{"access":1,"description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"TS0505B_1","options":[{"access":2,"description":"Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).","label":"Transition","name":"transition","property":"transition","type":"numeric","value_min":0},{"access":2,"description":"When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).","label":"Color sync","name":"color_sync","property":"color_sync","type":"binary","value_off":false,"value_on":true},{"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":"TuYa"},"friendly_name":"0xa4c138df7485dce8","ieee_address":"0xa4c138df7485dce8","status":"successful","supported":true},"type":"device_interview"}'
Info 2023-11-10 15:31:36Configuring '0xa4c138df7485dce8'
Info 2023-11-10 15:31:36Successfully configured '0xa4c138df7485dce8'
github-actions[bot] commented 4 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days

talbx commented 3 months ago

not stale