diff --git a/Classes/GroupMgtv2/GrpDomoticz.py b/Classes/GroupMgtv2/GrpDomoticz.py index 128705dc9..c22f1a95e 100644 --- a/Classes/GroupMgtv2/GrpDomoticz.py +++ b/Classes/GroupMgtv2/GrpDomoticz.py @@ -19,6 +19,7 @@ zcl_group_onoff_on, zcl_group_window_covering_off, zcl_group_window_covering_on, + zcl_group_move_to_level_stop, zcl_group_window_covering_stop) WIDGET_STYLE = { @@ -684,6 +685,14 @@ def processCommand(self, unit, GrpId, Command, Level, Color_): sValue = "On" self.Devices[unit].Update(nValue=int(nValue), sValue=str(sValue)) + elif Command in ( "Stop",) and self.ListOfGroups[GrpId]["Cluster"] == "0102": + # Windowscovering Stop + zcl_group_window_covering_stop(self, GrpId, "01", EPout) + + elif Command in ( "Stop",) and self.ListOfGroups[GrpId]["Cluster"] == "0008": + # SetLevel Off + zcl_group_move_to_level_stop(self, GrpId, EPout) + elif Command == "Set Level": # Level: % value of move # Converted to value , raw value from 0 to 255 diff --git a/Zigbee/zclCommands.py b/Zigbee/zclCommands.py index 2f58a6f42..28637ba78 100644 --- a/Zigbee/zclCommands.py +++ b/Zigbee/zclCommands.py @@ -447,6 +447,11 @@ def zcl_move_to_level_with_onoff(self, nwkid, EPout, OnOff, level, transition="0 return send_zigatecmd_zcl_noack(self, nwkid, "0081", data) return send_zigatecmd_zcl_ack(self, nwkid, "0081", data) +def zcl_move_to_level_stop(self, nwkid, EPout, ackIsDisabled=DEFAULT_ACK_MODE): + self.log.logging("zclCommand", "Debug", "zcl_move_to_level_stop %s %s" % (nwkid, EPout, )) + zcl_command_formated_logging( self, "zcl_move_to_level_stop", nwkid, EPout, "0008", "Stop", ackIsDisabled) + if "ControllerInRawMode" in self.pluginconf.pluginConf and self.pluginconf.pluginConf["ControllerInRawMode"]: + return zcl_raw_level_move_to_level(self, nwkid, ZIGATE_EP, EPout, "Stop") def zcl_group_move_to_level_with_onoff(self, nwkid, EPout, OnOff, level, transition="0000", ackIsDisabled=DEFAULT_ACK_MODE): self.log.logging("zclCommand", "Debug", "zcl_move_to_level_with_onoff %s %s %s %s %s" % (nwkid, EPout, OnOff, level, transition)) @@ -457,7 +462,11 @@ def zcl_group_move_to_level_with_onoff(self, nwkid, EPout, OnOff, level, transit data = "%02d" % ADDRESS_MODE["group"] + nwkid + ZIGATE_EP + EPout + OnOff + level + transition return send_zigatecmd_raw(self, "0081", data) - +def zcl_group_move_to_level_stop(self, nwkid, EPout, ackIsDisabled=DEFAULT_ACK_MODE): + self.log.logging("zclCommand", "Debug", "zcl_move_to_level_stop %s %s" % (nwkid, EPout, )) + zcl_command_formated_logging( self, "zcl_move_to_level_stop", nwkid, EPout, "0008", "Stop", ackIsDisabled) + if "ControllerInRawMode" in self.pluginconf.pluginConf and self.pluginconf.pluginConf["ControllerInRawMode"]: + return zcl_raw_level_move_to_level(self, nwkid, ZIGATE_EP, EPout, "Stop", groupaddrmode=True) # Cluster 0102 ( Window Covering ) ##################################