diff --git a/Modules/schneider_wiser.py b/Modules/schneider_wiser.py index 71ce101b1..dc5d4baf8 100755 --- a/Modules/schneider_wiser.py +++ b/Modules/schneider_wiser.py @@ -1136,27 +1136,28 @@ def schneiderRenforceent(self, NWKID): return rescheduleAction -def schneider_multiple_read_attribute_request(self, Devices, nwkid, src_ep, dst_ep, sqn, cluster_id, manuf_specif, mabnuf_code, MsgData, nbAttribute): +def schneider_multiple_read_attribute_request(self, Devices, nwkid, src_ep, dst_ep, sqn, cluster_id, manuf_specif, manuf_code, MsgData, nbAttribute): + """ Handle a read request with multiple attributes on cluster 0x0201""" payload = None cmd = "01" status = "00" - # Extract additional message components, and build a response + # Extract all attributes, and build a response for idx in range(0, len(MsgData), 4): attribute = MsgData[idx:idx + 4] - self.log.logging("Schneider", "Debug", f"schneider_multiple_read_attribute_request - nwkid {nwkid} attribute {attribute}", nwkid) + self.log.logging("Schneider", "Debug", f"Decode0100 - schneider_multiple_read_attribute_request - nwkid {nwkid} attribute {attribute}", nwkid) # Handle different cluster IDs and attributes zigate_ep, cluster_frame, data_type, data = get_response_data_for_schneider_thermostat_request(self, Devices, nwkid, src_ep, attribute) - self.log.logging("Schneider", "Debug", f"schneider_multiple_read_attribute_request - response {data_type} {data}", nwkid) + self.log.logging("Schneider", "Debug", f"Decode0100 - schneider_multiple_read_attribute_request - response {data_type} {data}", nwkid) if payload is None: payload = cluster_frame + sqn + cmd payload += attribute[2:4] + attribute[:2] + status + data_type payload += data[2:4] + data[:2] if data_type == "29" else data - self.log.logging("Schneider", "Debug", f"schneider_multiple_read_attribute_request Response - nwkid {nwkid} ep: {src_ep} , clusterId: {cluster_id}, sqn: {sqn},payload: {payload}", nwkid) + self.log.logging("Schneider", "Debug", f"Decode0100 - schneider_multiple_read_attribute_request Response - nwkid {nwkid} ep: {src_ep} , clusterId: {cluster_id}, sqn: {sqn},payload: {payload}", nwkid) raw_APS_request( self, nwkid, src_ep, cluster_id, "0104", payload, zigate_ep=zigate_ep, ackIsDisabled=is_ack_tobe_disabled(self, nwkid), ) diff --git a/Z4D_decoders/z4d_decoder_Read_Attribute_Request.py b/Z4D_decoders/z4d_decoder_Read_Attribute_Request.py index 46a08444a..1836fc2b4 100644 --- a/Z4D_decoders/z4d_decoder_Read_Attribute_Request.py +++ b/Z4D_decoders/z4d_decoder_Read_Attribute_Request.py @@ -65,7 +65,7 @@ def Decode0100(self, Devices, MsgData, MsgLQI): manuf_name = self.ListOfDevices[MsgSrcAddr].get('Manufacturer Name', '') if MsgClusterId == '0201' and (manuf == '105e' or manuf_name in ('Schneider', 'Schneider Electric')) and int(nbAttribute) > 1: - self.log.logging('Input', 'Debug', 'Decode0100 - specific ---- schneider_multiple_read_attribute_request') + self.log.logging(['Input', 'Schneider'], 'Debug', 'Decode0100 - specific ---- schneider_multiple_read_attribute_request') schneider_multiple_read_attribute_request(self, Devices, MsgSrcAddr, MsgSrcEp, MsgDstEp, MsgSqn, MsgClusterId, MsgManufSpec, MsgManufCode, MsgData[24:], nbAttribute) return