domoticz-zigbee2mqtt-plugin
domoticz-zigbee2mqtt-plugin copied to clipboard
Add Z2M Scene support to plug-in
Hi,
Would it be possible to add Z2M Scene support in the domoticz-Zigbee2mqtt-plug-in https://www.zigbee2mqtt.io/information/scenes.html
The scenes are stored in database.db (not at the group id, but at each device id of that group), so maybe they can be discovered automatically?
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b00216005b6","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6,8,11,12,13,47,110,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"8":{"profId":260,"epId":8,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"11":{"profId":260,"epId":11,"devId":1024,"inClusterList":[1281],"outClusterList":[1280,1282],"clusters":{},"binds":[],"meta":{}},"12":{"profId":49246,"epId":12,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"13":{"profId":260,"epId":13,"devId":5,"inClusterList":[25],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"47":{"profId":260,"epId":47,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"110":{"profId":260,"epId":110,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"meta":{}}},"interviewCompleted":true,"meta":{},"lastSeen":null}
{"id":2,"type":"Group","groupID":100,"members":[{"deviceIeeeAddr":"0x14b457fffe4594ed","endpointID":1},{"deviceIeeeAddr":"0x14b457fffe266637","endpointID":1},{"deviceIeeeAddr":"0x14b457fffe437ffb","endpointID":1}],"meta":{}}
{"id":5,"type":"Router","ieeeAddr":"0x14b457fffe437ffb","nwkAddr":36243,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb GU10 WS 400lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768,4096,64636],"outClusterList":[5,25,32,4096],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb GU10 WS 400lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":2,"appVersion":32,"stackVersion":98,"hwVersion":1,"dateCode":"20200312","swBuildId":"2.0.029"}},"genOnOff":{"attributes":{"onOff":0}},"genLevelCtrl":{"attributes":{"currentLevel":120}},"lightingColorCtrl":{"attributes":{"currentX":30138,"currentY":26909,"colorTemperature":350}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00216005b6","endpointID":1},{"cluster":8,"type":"endpoint","deviceIeeeAddress":"0x00124b00216005b6","endpointID":1},{"cluster":768,"type":"endpoint","deviceIeeeAddress":"0x00124b00216005b6","endpointID":1}],"meta":{"scenes":{"1_100":{"state":{"state":"ON","brightness":120,"color":{"x":0.447991567541816,"y":0.407559831563923}}},"2_100":{"state":{"state":"ON","brightness":5,"color":{"x":0.447991567541816,"y":0.407559831563923}}}}}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"meta":{}}},"appVersion":32,"stackVersion":98,"hwVersion":1,"dateCode":"20200312","swBuildId":"2.0.029","zclVersion":2,"interviewCompleted":true,"meta":{"reporting":1},"lastSeen":1607376181746}
{"id":6,"type":"Router","ieeeAddr":"0x14b457fffe4594ed","nwkAddr":19396,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb GU10 WS 400lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768,4096,64636],"outClusterList":[5,25,32,4096],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb GU10 WS 400lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":2,"appVersion":32,"stackVersion":98,"hwVersion":1,"dateCode":"20200312","swBuildId":"2.0.029"}},"genOnOff":{"attributes":{"onOff":0}},"genLevelCtrl":{"attributes":{"currentLevel":120}},"lightingColorCtrl":{"attributes":{"currentX":30138,"currentY":26909,"colorTemperature":350}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00216005b6","endpointID":1},{"cluster":8,"type":"endpoint","deviceIeeeAddress":"0x00124b00216005b6","endpointID":1},{"cluster":768,"type":"endpoint","deviceIeeeAddress":"0x00124b00216005b6","endpointID":1}],"meta":{"scenes":{"1_100":{"state":{"state":"ON","brightness":120,"color":{"x":0.447991567541816,"y":0.407559831563923}}},"2_100":{"state":{"state":"ON","brightness":5,"color":{"x":0.447991567541816,"y":0.407559831563923}}}}}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"meta":{}}},"appVersion":32,"stackVersion":98,"hwVersion":1,"dateCode":"20200312","swBuildId":"2.0.029","zclVersion":2,"interviewCompleted":true,"meta":{"reporting":1},"lastSeen":1607376181728}
{"id":7,"type":"Router","ieeeAddr":"0x14b457fffe266637","nwkAddr":62032,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb GU10 WS 400lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768,4096,64636],"outClusterList":[5,25,32,4096],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb GU10 WS 400lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":2,"appVersion":32,"stackVersion":98,"hwVersion":1,"dateCode":"20200312","swBuildId":"2.0.029"}},"genOnOff":{"attributes":{"onOff":0}},"genLevelCtrl":{"attributes":{"currentLevel":120}},"lightingColorCtrl":{"attributes":{"currentX":30138,"currentY":26909,"colorTemperature":350}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00216005b6","endpointID":1},{"cluster":8,"type":"endpoint","deviceIeeeAddress":"0x00124b00216005b6","endpointID":1},{"cluster":768,"type":"endpoint","deviceIeeeAddress":"0x00124b00216005b6","endpointID":1}],"meta":{"scenes":{"1_100":{"state":{"state":"ON","brightness":120,"color":{"x":0.447991567541816,"y":0.407559831563923}}},"2_100":{"state":{"state":"ON","brightness":5,"color":{"x":0.447991567541816,"y":0.407559831563923}}}}}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"meta":{}}},"appVersion":32,"stackVersion":98,"hwVersion":1,"dateCode":"20200312","swBuildId":"2.0.029","zclVersion":2,"interviewCompleted":true,"meta":{"reporting":1},"lastSeen":1607376181761}
Possibility to add scenes option at the domoticz/Zigbee2mqtt page. Would be nice if a recall function could implemented, or set as a default state when device or group is turned on. Most people want to have an intitial state for groups or devices if turned on.
@stas-demydiuk, would it be possible to convert Z2M scenes to domoticz “Scenes” or another method to send a {"scene_recall": SCENE_ID} to Z2M?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.