Koenkk / zigbee2mqtt

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

[New device support]: multi endpoint and choose one point to light #17974

Closed llhappier closed 1 year ago

llhappier commented 1 year ago

Link

https://github.com/Koenkk/zigbee2mqtt.io/blob/master/public/images/devices/3RSNL02043Z.jpg

Database entry

{"id":2,"type":"Router","ieeeAddr":"0xb83dfb085b820000","nwkAddr":53096,"manufId":4877,"manufName":"Third Reality, Inc","powerSource":"Unknown","modelId":"3RSNL02043Z","epList":[3,1,2],"endpoints":{"1":{"profId":260,"epId":1,"devId":258,"inClusterList":[0,3,4,5,6,8,768,4096],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"stackVersion":0,"hwVersion":0}}},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":1026,"inClusterList":[0,3,1280],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"stackVersion":0,"hwVersion":0}},"ssIasZone":{"attributes":{"iasCieAddr":"0xb83dfb08577e0000","zoneState":1,"zoneStatus":1}}},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":262,"inClusterList":[0,3,1024],"outClusterList":[],"clusters":{"msIlluminanceMeasurement":{"attributes":{"measuredValue":25154}},"genBasic":{"attributes":{"stackVersion":0,"hwVersion":0}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":14,"stackVersion":0,"hwVersion":0,"dateCode":"20210610-BL","swBuildId":"v0.00.14","zclVersion":8,"interviewCompleted":true,"meta":{},"lastSeen":1686297818127,"defaultSendRequestWhen":"immediate"}

Comments

Hi, I have a zigbee device and this device have three endpoint. The end point 1 is for color light. Endpoint 2 is ias Zone motion sensor and endpoint 3 is illuminace. When I want to control light, it's should control endpoint 1. However, it send on/off to endpoint 3. How can I fix this problem? thanks. (I try the multiEndpointEnforce, but it no use)

eg: { zigbeeModel: ['3RSNL02043Z'], model: '3RSNL02043Z', vendor: 'Third Reality', description: 'Zigbee multi-Function night light', ota: ota.zigbeeOTA, fromZigbee: [ extend.light_onoff_brightness_colortemp_color().fromZigbee, fz.ias_occupancy_alarm_1, fz.illuminance], toZigbee: [ extend.light_onoff_brightness_colortemp_color().toZigbee], exposes: [e.light_brightness_colortemp_color().removeFeature('color_temp_startup').withEndpoint('light'), e.occupancy().withEndpoint('iaszone'), e.illuminance().withEndpoint('illuminance'), e.illuminance_lux().withUnit('lx').withEndpoint('illuminance'),], endpoint: (device) => { return {'light': 1, 'iaszone': 2, 'illuminance': 3}; }, meta: {multiEndpointEnforce: {'state' : 1, 'brightness': 1, 'color_temp': 1, 'color_xy': 1, 'color_hs': 1, 'occupancy' : 2, 'illuminance' : 3, 'illuminance_lux': 3}}, },

External converter

No response

Supported color modes

No response

Color temperature range

No response

Koenkk commented 1 year ago

Try changing return {'light': 1, 'iaszone': 2, 'illuminance': 3}; to return {default: 1, 'iaszone': 2, 'illuminance': 3};

llhappier commented 1 year ago

Thank you, it works. I will retry the iaszone and illuminance, thanks

llhappier commented 1 year ago

Thanks.