From 89ea58d6789b920d2b35bfdcf0b9114514d6d572 Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Tue, 23 Aug 2022 23:49:50 +0200 Subject: [PATCH 01/15] Add skeleton --- tests/test_schneiderelectric.py | 178 ++++++++++++++++++++++++ zhaquirks/schneiderelectric/__init__.py | 47 +++++++ zhaquirks/schneiderelectric/shutters.py | 88 ++++++++++++ zhaquirks/schneiderelectric/switches.py | 146 +++++++++++++++++++ 4 files changed, 459 insertions(+) create mode 100644 tests/test_schneiderelectric.py create mode 100644 zhaquirks/schneiderelectric/__init__.py create mode 100644 zhaquirks/schneiderelectric/shutters.py create mode 100644 zhaquirks/schneiderelectric/switches.py diff --git a/tests/test_schneiderelectric.py b/tests/test_schneiderelectric.py new file mode 100644 index 0000000000..04b1a87893 --- /dev/null +++ b/tests/test_schneiderelectric.py @@ -0,0 +1,178 @@ +"""Tests for Schneider Electric.""" +from unittest import mock + +import zigpy.device +import zigpy.endpoint +import zigpy.quirks +from zigpy.zcl import foundation +import zigpy.zdo.types as zdo_t + +import zhaquirks +import zhaquirks.kof.kof_mr101z + +from tests.conftest import CoroutineMock + +zhaquirks.setup() + +Default_Response = foundation.GENERAL_COMMANDS[ + foundation.GeneralCommand.Default_Response +].schema + + +async def test_nhpb_shutter_1_signature(assert_signature_matches_quirk): + signature = { + "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", + "endpoints": { + "5": { + "profile_id": 260, + "device_type": "0x0202", + "in_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0102", + "0x0b05", + ], + "out_clusters": ["0x0019"], + }, + "21": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": ["0x0000", "0x0003", "0x0b05", "0xff17"], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102", + ], + }, + "242": { + "profile_id": 41440, + "device_type": "0x0061", + "in_clusters": [], + "out_clusters": ["0x0021"], + }, + }, + "manufacturer": "Schneider Electric", + "model": "NHPB/SHUTTER/1", + "class": "zigpy.device.Device", + } + assert_signature_matches_quirk( + zhaquirks.schneiderelectric.shutter.NHPBShutter1, signature + ) + + +async def test_fls_air_link_4_signature(assert_signature_matches_quirk): + signature = { + "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", + "endpoints": { + "21": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": ["0x0000", "0x0001", "0x0003", "0x0020", "0xff17"], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0019", + "0x0102", + ], + }, + "22": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": ["0x0000", "0x0001", "0x0003", "0xff17"], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102", + ], + }, + "23": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": ["0x0000", "0x0001", "0x0003", "0xff17"], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102", + ], + }, + "24": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": ["0x0000", "0x0001", "0x0003", "0xff17"], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102", + ], + }, + }, + "manufacturer": "Schneider Electric", + "model": "FLS/AIRLINK/4", + "class": "zigpy.device.Device", + } + assert_signature_matches_quirk( + zhaquirks.schneiderelectric.switches.FLSAirlink4, signature + ) + + +async def test_fls_air_link_4_signature(assert_signature_matches_quirk): + signature = { + "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", + "endpoints": { + "1": { + "profile_id": 260, + "device_type": "0x0100", + "in_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0b05", + ], + "out_clusters": ["0x0019"], + }, + "21": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": ["0x0000", "0x0003", "0x0b05", "0xff17"], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102", + ], + }, + "242": { + "profile_id": 41440, + "device_type": "0x0061", + "in_clusters": [], + "out_clusters": ["0x0021"], + }, + }, + "manufacturer": "Schneider Electric", + "model": "CH10AX/SWITCH/1", + "class": "zigpy.device.Device", + } + assert_signature_matches_quirk( + zhaquirks.schneiderelectric.switches.CH10AXSwitch1, signature + ) diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py new file mode 100644 index 0000000000..9141d359aa --- /dev/null +++ b/zhaquirks/schneiderelectric/__init__.py @@ -0,0 +1,47 @@ +"""Module for Schneider Electric devices quirks.""" +import logging + +from zigpy.quirks import CustomCluster, CustomDevice +import zigpy.types as t +from zigpy.zcl.clusters.closures import WindowCovering + +from zhaquirks import Bus, EventableCluster, LocalDataCluster + +_LOGGER = logging.getLogger(__name__) + +SE = "Schneider Electric" + +class SEManufCluster(CustomCluster): + """Schneider Electric manufacturer specific cluster.""" + + name = "Schneider Electric Manufacturer Specicific" + ep_attribute = "schneider_electric_manufacturer" + + +class SEManufSwitchCluster(SEManufCluster): + name = "Schneider Electric Manufacturer Specicific" + cluster_id = 0xFF17 + + +class SEWindowCoverControl(CustomCluster, WindowCovering): + """Manufacturer Specific Cluster of Device cover.""" + + attributes = WindowCovering.attributes.copy() + + attributes.update({0xE000: ("lift_duration", t.uint16_t)}) + + # def __init__(self, *args, **kwargs): + # """Initialize instance.""" + # super().__init__(*args, **kwargs) + # self.endpoint.device.cover_bus.add_listener(self) + + # def cover_event(self, attribute, value): + # """Event listener for cover events.""" + # if attribute == "lift_duration": + # lift_duration_attr = self._attr_cache.get("lift_duration") == 1 + # self._update_attribute(attribute, value) + # _LOGGER.debug( + # "%s Schneider Attribute Cache : [%s]", + # self.endpoint.device.ieee, + # self._attr_cache, + # ) diff --git a/zhaquirks/schneiderelectric/shutters.py b/zhaquirks/schneiderelectric/shutters.py new file mode 100644 index 0000000000..a5c61786cd --- /dev/null +++ b/zhaquirks/schneiderelectric/shutters.py @@ -0,0 +1,88 @@ +"""Quirk for shutters.""" +from zigpy.profiles import zha +from zigpy.quirks import CustomCluster, CustomDevice +from zigpy.zcl.clusters.closures import WindowCovering +from zigpy.zcl.clusters.general import ( + Basic, + GreenPowerProxy, + Groups, + Identify, + LevelControl, + OnOff, + Ota, + Scenes, +) +from zigpy.zcl.clusters.homeautomation import ( + Diagnostic, + ElectricalMeasurement, + MeterIdentification, +) +from zigpy.zcl.clusters.smartenergy import Metering + +from zhaquirks.const import ( + DEVICE_TYPE, + ENDPOINTS, + INPUT_CLUSTERS, + MODELS_INFO, + OUTPUT_CLUSTERS, + PROFILE_ID, +) +from zhaquirks.schneiderelectric import SE, SEManufSwitchCluster + + +class NHPBShutter1(CustomDevice): + """NHPB/SHUTTER/1 from Schneider Electric.""" + + # NodeDescriptor(logical_type=, complex_descriptor_available=0, + # user_descriptor_available=0, reserved=0, aps_flags=0, + # frequency_band=, + # mac_capability_flags=, + # manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, + # server_mask=11264, maximum_outgoing_transfer_size=82, + # descriptor_capability_field=, *allocate_address=True, + # *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, + # *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, + # *is_router=True, *is_security_capable=False) + signature = { + MODELS_INFO: [(SE, "NHPB/SHUTTER/1")], + ENDPOINTS: { + 5: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.WINDOW_COVERING_DEVICE, # 0x0202 + INPUT_CLUSTERS: [ + Basic.cluster_id, # 0x0000 + Identify.cluster_id, # 0x0003 + Groups.cluster_id, # 0x0004 + Scenes.cluster_id, # 0x0005 + WindowCovering.cluster_id, # 0x0102 + Diagnostic.cluster_id, # 0x0B05 + ], + OUTPUT_CLUSTERS: [Ota.cluster_id], # 0x0019 + }, + 21: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH, # 0x0104 + INPUT_CLUSTERS: [ + Basic.cluster_id, # 0x0000 + Identify.cluster_id, # 0x0003 + Diagnostic.cluster_id, # 0x0B05 + SEManufSwitchCluster.cluster_id, # 0xff17 + ], + OUTPUT_CLUSTERS: [ + Identify.cluster_id, # 0x0003 + Groups.cluster_id, # 0x0004 + Scenes.cluster_id, # 0x0005 + OnOff.cluster_id, # 0x0006 + LevelControl.cluster_id, # 0x0008 + WindowCovering.cluster_id, # 0x0102 + ], + }, + 242: { + PROFILE_ID: 41440, + DEVICE_TYPE: 0x0061, + INPUT_CLUSTERS: [], + OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id], # 0x0021 + }, + }, + } + replacement = {} diff --git a/zhaquirks/schneiderelectric/switches.py b/zhaquirks/schneiderelectric/switches.py new file mode 100644 index 0000000000..4b87c55695 --- /dev/null +++ b/zhaquirks/schneiderelectric/switches.py @@ -0,0 +1,146 @@ +"""Quirk for shutters.""" +from zigpy.profiles import zha +from zigpy.quirks import CustomCluster, CustomDevice +from zigpy.zcl.clusters.closures import WindowCovering +from zigpy.zcl.clusters.general import ( + Basic, + GreenPowerProxy, + Groups, + Identify, + LevelControl, + OnOff, + Ota, + Scenes, +) +from zigpy.zcl.clusters.homeautomation import ( + Diagnostic, + ElectricalMeasurement, + MeterIdentification, +) +from zigpy.zcl.clusters.smartenergy import Metering + +from zhaquirks.const import ( + DEVICE_TYPE, + ENDPOINTS, + INPUT_CLUSTERS, + MODELS_INFO, + OUTPUT_CLUSTERS, + PROFILE_ID, +) +from zhaquirks.schneiderelectric import SE, SEManufSwitchCluster + + +class FLSAirlink4(CustomDevice): + """FLS/AIRLINK/4 from Schneider Electric.""" + + # NodeDescriptor(logical_type=, complex_descriptor_available=0, + # user_descriptor_available=0, reserved=0, aps_flags=0, + # frequency_band=, + # mac_capability_flags=, + # manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, + # server_mask=11264, maximum_outgoing_transfer_size=82, + # descriptor_capability_field=, *allocate_address=True, + # *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, + # *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, + # *is_router=False, *is_security_capable=False) + signature = { + MODELS_INFO: [(SE, "FLS/AIRLINK/4")], + ENDPOINTS: { + 1: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT, # 0x0100 + INPUT_CLUSTERS: [ + Basic.cluster_id, # 0x0000 + Identify.cluster_id, # 0x0003 + Groups.cluster_id, # 0x0004 + Scenes.cluster_id, # 0x0005 + OnOff.cluster_id, # 0x0006 + Diagnostic.cluster_id, # 0x0b05 + ], + OUTPUT_CLUSTERS: [Ota.cluster_id], # 0x0019 + }, + 21: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH, # 0x0104 + INPUT_CLUSTERS: [ + Basic.cluster_id, # 0x0000 + Identify.cluster_id, # 0x0003 + Diagnostic.cluster_id, # 0x0B05 + SEManufSwitchCluster.cluster_id, # 0xff17 + ], + OUTPUT_CLUSTERS: [ + Identify.cluster_id, # 0x0003 + Groups.cluster_id, # 0x0004 + Scenes.cluster_id, # 0x0005 + OnOff.cluster_id, # 0x0006 + LevelControl.cluster_id, # 0x0008 + WindowCovering.cluster_id, # 0x0102 + ], + }, + 242: { + PROFILE_ID: 41440, + DEVICE_TYPE: 0x0061, + INPUT_CLUSTERS: [], + OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id], # 0x0021 + }, + }, + } + + +class CH10AXSwitch1(CustomDevice): + """CH10AX/SWITCH/1 from Schneider Electric.""" + + # NodeDescriptor(logical_type=, complex_descriptor_available=0, + # user_descriptor_available=0, reserved=0, aps_flags=0, + # frequency_band=, + # mac_capability_flags=, + # manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, + # server_mask=11264, maximum_outgoing_transfer_size=82, + # descriptor_capability_field=, + # *allocate_address=True, *is_alternate_pan_coordinator=False, + # *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, + # *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, + # *is_security_capable=False) + signature = { + MODELS_INFO: [(SE, "CH10AX/SWITCH/1")], + ENDPOINTS: { + 1: { + PROFILE_ID: zha.PROFILE_ID, + "device_type": "0x0100", + "in_clusters": [ + Basic.cluster_id, # 0x0000 + Identify.cluster_id, # 0x0003 + Groups.cluster_id, # 0x0004 + Scenes.cluster_id, # 0x0005 + OnOff.cluster_id, # 0x0006 + Diagnostic.cluster_id, # 0x0b05 + ], + "out_clusters": [Ota.cluster_id], # 0x0019 + }, + 21: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH, + INPUT_CLUSTERS: [ + Basic.cluster_id, # 0x0000 + Identify.cluster_id, # 0x0003 + Diagnostic.cluster_id, # 0x0b05 + SEManufSwitchCluster.cluster_id, # 0xff17 + ], + OUTPUT_CLUSTERS: [ + Identify.cluster_id, # 0x0003 + Groups.cluster_id, # 0x0004 + Scenes.cluster_id, # 0x0005 + OnOff.cluster_id, # 0x0006 + LevelControl.cluster_id, # 0x0008 + WindowCovering.cluster_id, # 0x0102 + ], + }, + "242": { + PROFILE_ID: 41440, + DEVICE_TYPE: 0x0061, + INPUT_CLUSTERS: [], + OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id], # 0x0021 + }, + }, + } + replacement = {} From e9a9e8840e28d102dffce502afa9f7c4d4f794c7 Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Fri, 26 Aug 2022 20:10:37 +0200 Subject: [PATCH 02/15] Add SE shutter related attributes - Fixed test definition --- tests/test_schneiderelectric.py | 9 +- zhaquirks/schneiderelectric/__init__.py | 115 +++++++++++++++++++----- zhaquirks/schneiderelectric/shutters.py | 5 +- zhaquirks/schneiderelectric/switches.py | 5 +- 4 files changed, 97 insertions(+), 37 deletions(-) diff --git a/tests/test_schneiderelectric.py b/tests/test_schneiderelectric.py index 04b1a87893..fc1f52e155 100644 --- a/tests/test_schneiderelectric.py +++ b/tests/test_schneiderelectric.py @@ -1,17 +1,10 @@ """Tests for Schneider Electric.""" -from unittest import mock -import zigpy.device -import zigpy.endpoint -import zigpy.quirks from zigpy.zcl import foundation -import zigpy.zdo.types as zdo_t import zhaquirks import zhaquirks.kof.kof_mr101z -from tests.conftest import CoroutineMock - zhaquirks.setup() Default_Response = foundation.GENERAL_COMMANDS[ @@ -132,7 +125,7 @@ async def test_fls_air_link_4_signature(assert_signature_matches_quirk): ) -async def test_fls_air_link_4_signature(assert_signature_matches_quirk): +async def test_ch10ax_switch_1_signature(assert_signature_matches_quirk): signature = { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index 9141d359aa..d10ce31f72 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -1,16 +1,17 @@ """Module for Schneider Electric devices quirks.""" import logging -from zigpy.quirks import CustomCluster, CustomDevice +from zigpy.quirks import CustomCluster import zigpy.types as t from zigpy.zcl.clusters.closures import WindowCovering - -from zhaquirks import Bus, EventableCluster, LocalDataCluster +from zigpy.zcl.clusters.general import Basic +from zigpy.zcl.clusters.homeautomation import Diagnostic _LOGGER = logging.getLogger(__name__) SE = "Schneider Electric" + class SEManufCluster(CustomCluster): """Schneider Electric manufacturer specific cluster.""" @@ -18,30 +19,102 @@ class SEManufCluster(CustomCluster): ep_attribute = "schneider_electric_manufacturer" +class SEBasicCluster(SEManufCluster, Basic): + ATT_ID_E001 = 0xE001 + ATT_ID_E002 = 0xE002 + ATT_ID_E004 = 0xE004 + ATT_ID_E007 = 0xE007 + ATT_ID_E008 = 0xE008 + ATT_ID_E009 = 0xE009 + ATT_ID_E00A = 0xE00A + ATT_ID_E00B = 0xE00B + + attributes = Basic.attributes.copy() + + attributes.update( + { + ATT_ID_E001: ("57345", t.CharacterString) + }, # attribute_name:"57345" # ex: "002.004.016 R + { + ATT_ID_E002: ("57346", t.CharacterString) + }, # attribute_name:"57346" # ex: "001.000.000" + { + ATT_ID_E004: ("57348", t.CharacterString) + }, # attribute_name:"57348" # ex: "213249FEFF5ECFD" + {ATT_ID_E007: ("57351", t.enum16)}, # attribute_name:"57351" + { + ATT_ID_E008: ("57352", t.CharacterString) + }, # attribute_name:"57352" # ex: "Wiser Light" + { + ATT_ID_E009: ("57353", t.CharacterString) + }, # attribute_name:"57353" # ex: "NHPB/SHUTTER/1" + { + ATT_ID_E00A: ("57354", t.CharacterString) + }, # attribute_name:"57354" # ex: "Wiser Home" + {ATT_ID_E00B: ("57355", t.CharacterString)}, # attribute_name:"57355" + ) + + class SEManufSwitchCluster(SEManufCluster): name = "Schneider Electric Manufacturer Specicific" cluster_id = 0xFF17 + ATT_ID_0000 = 0x0000 + ATT_ID_0001 = 0x0001 + ATT_ID_0010 = 0x0010 + ATT_ID_0011 = 0x0011 + ATT_ID_0020 = 0x0020 + ATT_ID_0021 = 0x0021 + ATT_ID_FFFD = 0xFFFD + + attributes = { + {ATT_ID_0000: ("0", t.enum8)}, # attribute_name:"0" + {ATT_ID_0001: ("1", t.enum8)}, # attribute_name:"1" + {ATT_ID_0010: ("16", t.uint8_t)}, # attribute_name:"16" + {ATT_ID_0011: ("17", t.uint16_t)}, # attribute_name:"17" + {ATT_ID_0020: ("32", t.uint8_t)}, # attribute_name:"32" + {ATT_ID_0021: ("33", t.uint16_t)}, # attribute_name:"33" + {ATT_ID_FFFD: ("65533", t.uint16_t)}, # attribute_name:"65533" + } -class SEWindowCoverControl(CustomCluster, WindowCovering): + +class SEWindowCover(CustomCluster, WindowCovering): """Manufacturer Specific Cluster of Device cover.""" + ATT_ID_FFFD = 0xFFFD + ATT_ID_E000 = 0xE000 + ATT_ID_E010 = 0xE010 + ATT_ID_E012 = 0xE012 + ATT_ID_E013 = 0xE013 + ATT_ID_E014 = 0xE014 + ATT_ID_E015 = 0xE015 + ATT_ID_E016 = 0xE016 + ATT_ID_E017 = 0xE017 + attributes = WindowCovering.attributes.copy() - attributes.update({0xE000: ("lift_duration", t.uint16_t)}) - - # def __init__(self, *args, **kwargs): - # """Initialize instance.""" - # super().__init__(*args, **kwargs) - # self.endpoint.device.cover_bus.add_listener(self) - - # def cover_event(self, attribute, value): - # """Event listener for cover events.""" - # if attribute == "lift_duration": - # lift_duration_attr = self._attr_cache.get("lift_duration") == 1 - # self._update_attribute(attribute, value) - # _LOGGER.debug( - # "%s Schneider Attribute Cache : [%s]", - # self.endpoint.device.ieee, - # self._attr_cache, - # ) + attributes.update( + { + ATT_ID_FFFD: ("57344", t.uint16_t) + }, # attribute_name:"57344" # seems to be lift_duration + {ATT_ID_E000: ("65533", t.uint16_t)}, # attribute_name:"65533" + {ATT_ID_E010: ("57360", t.bitmap8)}, # attribute_name:"57360" + {ATT_ID_E012: ("57362", t.uint16_t)}, # attribute_name:"57362" + {ATT_ID_E013: ("57363", t.bitmap8)}, # attribute_name:"57363" + {ATT_ID_E014: ("57364", t.uint16_t)}, # attribute_name:"57364" + {ATT_ID_E015: ("57365", t.uint16_t)}, # attribute_name:"57365" + {ATT_ID_E016: ("57366", t.uint16_t)}, # attribute_name:"57366" + {ATT_ID_E017: ("57367", t.uint8_t)}, # attribute_name:"57367" + ) + + +class SEDiagnostic(CustomCluster, Diagnostic): + + ATT_ID_FFFD = 0xFFFD + + attributes = Diagnostic.attributes.copy() + + # TODO: Check -> this attr don't seems to be manufacturer related (no "manf_id") + attributes.update( + {ATT_ID_FFFD: ("65533", t.uint16_t)}, # attribute_name:"65533" + ) diff --git a/zhaquirks/schneiderelectric/shutters.py b/zhaquirks/schneiderelectric/shutters.py index a5c61786cd..4124d99adc 100644 --- a/zhaquirks/schneiderelectric/shutters.py +++ b/zhaquirks/schneiderelectric/shutters.py @@ -1,6 +1,6 @@ """Quirk for shutters.""" from zigpy.profiles import zha -from zigpy.quirks import CustomCluster, CustomDevice +from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.closures import WindowCovering from zigpy.zcl.clusters.general import ( Basic, @@ -14,10 +14,7 @@ ) from zigpy.zcl.clusters.homeautomation import ( Diagnostic, - ElectricalMeasurement, - MeterIdentification, ) -from zigpy.zcl.clusters.smartenergy import Metering from zhaquirks.const import ( DEVICE_TYPE, diff --git a/zhaquirks/schneiderelectric/switches.py b/zhaquirks/schneiderelectric/switches.py index 4b87c55695..9d28a737ad 100644 --- a/zhaquirks/schneiderelectric/switches.py +++ b/zhaquirks/schneiderelectric/switches.py @@ -1,6 +1,6 @@ """Quirk for shutters.""" from zigpy.profiles import zha -from zigpy.quirks import CustomCluster, CustomDevice +from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.closures import WindowCovering from zigpy.zcl.clusters.general import ( Basic, @@ -14,10 +14,7 @@ ) from zigpy.zcl.clusters.homeautomation import ( Diagnostic, - ElectricalMeasurement, - MeterIdentification, ) -from zigpy.zcl.clusters.smartenergy import Metering from zhaquirks.const import ( DEVICE_TYPE, From ca5559d3ed58c198ecbedf5ded186f9a7559db31 Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Fri, 26 Aug 2022 22:39:12 +0200 Subject: [PATCH 03/15] Edit lift_duration attribute - Use ZCLAttributeDef for attribute --- zhaquirks/schneiderelectric/__init__.py | 278 +++++++++++++++++++----- zhaquirks/schneiderelectric/shutters.py | 6 +- zhaquirks/schneiderelectric/switches.py | 12 +- 3 files changed, 228 insertions(+), 68 deletions(-) diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index d10ce31f72..3beefc34c4 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -6,10 +6,12 @@ from zigpy.zcl.clusters.closures import WindowCovering from zigpy.zcl.clusters.general import Basic from zigpy.zcl.clusters.homeautomation import Diagnostic +from zigpy.zcl.foundation import ZCLAttributeDef _LOGGER = logging.getLogger(__name__) -SE = "Schneider Electric" +SE_MANUF_NAME = "Schneider Electric" +SE_MANUF_ID = 4190 class SEManufCluster(CustomCluster): @@ -20,101 +22,259 @@ class SEManufCluster(CustomCluster): class SEBasicCluster(SEManufCluster, Basic): - ATT_ID_E001 = 0xE001 - ATT_ID_E002 = 0xE002 - ATT_ID_E004 = 0xE004 - ATT_ID_E007 = 0xE007 - ATT_ID_E008 = 0xE008 - ATT_ID_E009 = 0xE009 - ATT_ID_E00A = 0xE00A - ATT_ID_E00B = 0xE00B - attributes = Basic.attributes.copy() + attributes: dict[int, ZCLAttributeDef] = Basic.attributes.copy() attributes.update( { - ATT_ID_E001: ("57345", t.CharacterString) + 0xE001: ZCLAttributeDef( + id=0xE001, + name="57345", + type=t.CharacterString, + access="r", + is_manufacturer_specific=True, + ) }, # attribute_name:"57345" # ex: "002.004.016 R { - ATT_ID_E002: ("57346", t.CharacterString) + 0xE002: ZCLAttributeDef( + id=0xE002, + name="57346", + type=t.CharacterString, + is_manufacturer_specific=True, + ) }, # attribute_name:"57346" # ex: "001.000.000" { - ATT_ID_E004: ("57348", t.CharacterString) + 0xE004: ZCLAttributeDef( + id=0xE004, + name="57348", + type=t.CharacterString, + access="r", + is_manufacturer_specific=True, + ) }, # attribute_name:"57348" # ex: "213249FEFF5ECFD" - {ATT_ID_E007: ("57351", t.enum16)}, # attribute_name:"57351" { - ATT_ID_E008: ("57352", t.CharacterString) + 0xE007: ZCLAttributeDef( + id=0xE007, + name="57351", + type=t.enum16, + access="r", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57351" + { + 0xE008: ZCLAttributeDef( + id=0xE008, + name="57352", + type=t.CharacterString, + access="r", + is_manufacturer_specific=True, + ) }, # attribute_name:"57352" # ex: "Wiser Light" { - ATT_ID_E009: ("57353", t.CharacterString) + 0xE009: ZCLAttributeDef( + id=0xE009, + name="57353", + type=t.CharacterString, + access="r", + is_manufacturer_specific=True, + ) }, # attribute_name:"57353" # ex: "NHPB/SHUTTER/1" { - ATT_ID_E00A: ("57354", t.CharacterString) + 0xE00A: ZCLAttributeDef( + id=0xE00A, + name="57354", + type=t.CharacterString, + access="r", + is_manufacturer_specific=True, + ) }, # attribute_name:"57354" # ex: "Wiser Home" - {ATT_ID_E00B: ("57355", t.CharacterString)}, # attribute_name:"57355" + { + 0xE00B: ZCLAttributeDef( + id=0xE00B, + name="57355", + type=t.CharacterString, + access="r", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57355" ) -class SEManufSwitchCluster(SEManufCluster): - name = "Schneider Electric Manufacturer Specicific" +class SESpecificCluster(SEManufCluster): cluster_id = 0xFF17 - ATT_ID_0000 = 0x0000 - ATT_ID_0001 = 0x0001 - ATT_ID_0010 = 0x0010 - ATT_ID_0011 = 0x0011 - ATT_ID_0020 = 0x0020 - ATT_ID_0021 = 0x0021 - ATT_ID_FFFD = 0xFFFD - attributes = { - {ATT_ID_0000: ("0", t.enum8)}, # attribute_name:"0" - {ATT_ID_0001: ("1", t.enum8)}, # attribute_name:"1" - {ATT_ID_0010: ("16", t.uint8_t)}, # attribute_name:"16" - {ATT_ID_0011: ("17", t.uint16_t)}, # attribute_name:"17" - {ATT_ID_0020: ("32", t.uint8_t)}, # attribute_name:"32" - {ATT_ID_0021: ("33", t.uint16_t)}, # attribute_name:"33" - {ATT_ID_FFFD: ("65533", t.uint16_t)}, # attribute_name:"65533" + { + 0x0000: ZCLAttributeDef( + id=0x0000, + name="0", + type=t.enum8, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"0" + { + 0x0001: ZCLAttributeDef( + id=0x0001, + name="1", + type=t.enum8, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"1" + { + 0x0010: ZCLAttributeDef( + id=0x0010, + name="16", + type=t.uint8_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"16" + { + 0x0011: ZCLAttributeDef( + id=0x0011, + name="17", + type=t.uint16_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"17" + { + 0x0020: ZCLAttributeDef( + id=0x0020, + name="32", + type=t.uint8_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"32" + { + 0x0021: ZCLAttributeDef( + id=0x0021, + name="33", + type=t.uint16_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"33" + { + 0xFFFD: ZCLAttributeDef( + id=0xFFFD, + name="65533", + type=t.uint16_t, + access="r", + is_manufacturer_specific=True, + ) + }, # attribute_name:"65533" } class SEWindowCover(CustomCluster, WindowCovering): """Manufacturer Specific Cluster of Device cover.""" - ATT_ID_FFFD = 0xFFFD - ATT_ID_E000 = 0xE000 - ATT_ID_E010 = 0xE010 - ATT_ID_E012 = 0xE012 - ATT_ID_E013 = 0xE013 - ATT_ID_E014 = 0xE014 - ATT_ID_E015 = 0xE015 - ATT_ID_E016 = 0xE016 - ATT_ID_E017 = 0xE017 + # TODO: Reverse lift percentage - attributes = WindowCovering.attributes.copy() + attributes: dict[int, ZCLAttributeDef] = WindowCovering.attributes.copy() attributes.update( { - ATT_ID_FFFD: ("57344", t.uint16_t) - }, # attribute_name:"57344" # seems to be lift_duration - {ATT_ID_E000: ("65533", t.uint16_t)}, # attribute_name:"65533" - {ATT_ID_E010: ("57360", t.bitmap8)}, # attribute_name:"57360" - {ATT_ID_E012: ("57362", t.uint16_t)}, # attribute_name:"57362" - {ATT_ID_E013: ("57363", t.bitmap8)}, # attribute_name:"57363" - {ATT_ID_E014: ("57364", t.uint16_t)}, # attribute_name:"57364" - {ATT_ID_E015: ("57365", t.uint16_t)}, # attribute_name:"57365" - {ATT_ID_E016: ("57366", t.uint16_t)}, # attribute_name:"57366" - {ATT_ID_E017: ("57367", t.uint8_t)}, # attribute_name:"57367" + 0xFFFD: ZCLAttributeDef( + id=0xFFFD, + name="lift_duration", + type=t.uint16_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"65533" + { + 0xE000: ZCLAttributeDef( + id=0xE000, + name="57344", + type=t.uint16_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57344" + { + 0xE010: ZCLAttributeDef( + id=0xE010, + name="57360", + type=t.bitmap8, + access="r", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57360" + { + 0xE012: ZCLAttributeDef( + id=0xE012, + name="57362", + type=t.uint16_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57362" + { + 0xE013: ZCLAttributeDef( + id=0xE013, + name="57363", + type=t.bitmap8, + access="r", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57363" + { + 0xE014: ZCLAttributeDef( + id=0xE014, + name="57364", + type=t.uint16_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57364" + { + 0xE015: ZCLAttributeDef( + id=0xE015, + name="57365", + type=t.uint16_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57365" + { + 0xE016: ZCLAttributeDef( + id=0xE016, + name="57366", + type=t.uint16_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57366" + { + 0xE017: ZCLAttributeDef( + id=0xE017, + name="57367", + type=t.uint8_t, + access="rw", + is_manufacturer_specific=True, + ) + }, # attribute_name:"57367" ) class SEDiagnostic(CustomCluster, Diagnostic): - ATT_ID_FFFD = 0xFFFD - - attributes = Diagnostic.attributes.copy() + attributes: dict[int, ZCLAttributeDef] = Diagnostic.attributes.copy() # TODO: Check -> this attr don't seems to be manufacturer related (no "manf_id") attributes.update( - {ATT_ID_FFFD: ("65533", t.uint16_t)}, # attribute_name:"65533" + { + 0xFFFD: ZCLAttributeDef( + id=0xFFFD, + name="65533", + type=t.uint16_t, + access="r", + is_manufacturer_specific=True, + ) + }, # attribute_name:"65533" ) diff --git a/zhaquirks/schneiderelectric/shutters.py b/zhaquirks/schneiderelectric/shutters.py index 4124d99adc..1c6b4053b5 100644 --- a/zhaquirks/schneiderelectric/shutters.py +++ b/zhaquirks/schneiderelectric/shutters.py @@ -24,7 +24,7 @@ OUTPUT_CLUSTERS, PROFILE_ID, ) -from zhaquirks.schneiderelectric import SE, SEManufSwitchCluster +from zhaquirks.schneiderelectric import SE_MANUF_NAME, SESpecificCluster class NHPBShutter1(CustomDevice): @@ -41,7 +41,7 @@ class NHPBShutter1(CustomDevice): # *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, # *is_router=True, *is_security_capable=False) signature = { - MODELS_INFO: [(SE, "NHPB/SHUTTER/1")], + MODELS_INFO: [(SE_MANUF_NAME, "NHPB/SHUTTER/1")], ENDPOINTS: { 5: { PROFILE_ID: zha.PROFILE_ID, @@ -63,7 +63,7 @@ class NHPBShutter1(CustomDevice): Basic.cluster_id, # 0x0000 Identify.cluster_id, # 0x0003 Diagnostic.cluster_id, # 0x0B05 - SEManufSwitchCluster.cluster_id, # 0xff17 + SESpecificCluster.cluster_id, # 0xff17 ], OUTPUT_CLUSTERS: [ Identify.cluster_id, # 0x0003 diff --git a/zhaquirks/schneiderelectric/switches.py b/zhaquirks/schneiderelectric/switches.py index 9d28a737ad..65930f74ff 100644 --- a/zhaquirks/schneiderelectric/switches.py +++ b/zhaquirks/schneiderelectric/switches.py @@ -24,7 +24,7 @@ OUTPUT_CLUSTERS, PROFILE_ID, ) -from zhaquirks.schneiderelectric import SE, SEManufSwitchCluster +from zhaquirks.schneiderelectric import SE_MANUF_NAME, SESpecificCluster class FLSAirlink4(CustomDevice): @@ -41,7 +41,7 @@ class FLSAirlink4(CustomDevice): # *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, # *is_router=False, *is_security_capable=False) signature = { - MODELS_INFO: [(SE, "FLS/AIRLINK/4")], + MODELS_INFO: [(SE_MANUF_NAME, "FLS/AIRLINK/4")], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, @@ -63,7 +63,7 @@ class FLSAirlink4(CustomDevice): Basic.cluster_id, # 0x0000 Identify.cluster_id, # 0x0003 Diagnostic.cluster_id, # 0x0B05 - SEManufSwitchCluster.cluster_id, # 0xff17 + SESpecificCluster.cluster_id, # 0xff17 ], OUTPUT_CLUSTERS: [ Identify.cluster_id, # 0x0003 @@ -99,7 +99,7 @@ class CH10AXSwitch1(CustomDevice): # *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, # *is_security_capable=False) signature = { - MODELS_INFO: [(SE, "CH10AX/SWITCH/1")], + MODELS_INFO: [(SE_MANUF_NAME, "CH10AX/SWITCH/1")], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, @@ -121,7 +121,7 @@ class CH10AXSwitch1(CustomDevice): Basic.cluster_id, # 0x0000 Identify.cluster_id, # 0x0003 Diagnostic.cluster_id, # 0x0b05 - SEManufSwitchCluster.cluster_id, # 0xff17 + SESpecificCluster.cluster_id, # 0xff17 ], OUTPUT_CLUSTERS: [ Identify.cluster_id, # 0x0003 @@ -132,7 +132,7 @@ class CH10AXSwitch1(CustomDevice): WindowCovering.cluster_id, # 0x0102 ], }, - "242": { + 242: { PROFILE_ID: 41440, DEVICE_TYPE: 0x0061, INPUT_CLUSTERS: [], From 4d9771d5feb79b9d77600ff83efedba2c00fe806 Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Fri, 26 Aug 2022 22:48:58 +0200 Subject: [PATCH 04/15] Fix attribute name --- tests/test_schneiderelectric.py | 4 +-- zhaquirks/schneiderelectric/__init__.py | 48 ++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/test_schneiderelectric.py b/tests/test_schneiderelectric.py index fc1f52e155..b0d05856e4 100644 --- a/tests/test_schneiderelectric.py +++ b/tests/test_schneiderelectric.py @@ -2,8 +2,8 @@ from zigpy.zcl import foundation -import zhaquirks -import zhaquirks.kof.kof_mr101z +import zhaquirks.schneiderelectric.shutters +import zhaquirks.schneiderelectric.switches zhaquirks.setup() diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index 3beefc34c4..b545f4eb0e 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -29,7 +29,7 @@ class SEBasicCluster(SEManufCluster, Basic): { 0xE001: ZCLAttributeDef( id=0xE001, - name="57345", + name="unknown_attribute_57345", type=t.CharacterString, access="r", is_manufacturer_specific=True, @@ -38,7 +38,7 @@ class SEBasicCluster(SEManufCluster, Basic): { 0xE002: ZCLAttributeDef( id=0xE002, - name="57346", + name="unknown_attribute_57346", type=t.CharacterString, is_manufacturer_specific=True, ) @@ -46,7 +46,7 @@ class SEBasicCluster(SEManufCluster, Basic): { 0xE004: ZCLAttributeDef( id=0xE004, - name="57348", + name="unknown_attribute_57348", type=t.CharacterString, access="r", is_manufacturer_specific=True, @@ -55,7 +55,7 @@ class SEBasicCluster(SEManufCluster, Basic): { 0xE007: ZCLAttributeDef( id=0xE007, - name="57351", + name="unknown_attribute_57351", type=t.enum16, access="r", is_manufacturer_specific=True, @@ -64,7 +64,7 @@ class SEBasicCluster(SEManufCluster, Basic): { 0xE008: ZCLAttributeDef( id=0xE008, - name="57352", + name="unknown_attribute_57352", type=t.CharacterString, access="r", is_manufacturer_specific=True, @@ -73,7 +73,7 @@ class SEBasicCluster(SEManufCluster, Basic): { 0xE009: ZCLAttributeDef( id=0xE009, - name="57353", + name="unknown_attribute_57353", type=t.CharacterString, access="r", is_manufacturer_specific=True, @@ -82,7 +82,7 @@ class SEBasicCluster(SEManufCluster, Basic): { 0xE00A: ZCLAttributeDef( id=0xE00A, - name="57354", + name="unknown_attribute_57354", type=t.CharacterString, access="r", is_manufacturer_specific=True, @@ -91,7 +91,7 @@ class SEBasicCluster(SEManufCluster, Basic): { 0xE00B: ZCLAttributeDef( id=0xE00B, - name="57355", + name="unknown_attribute_57355", type=t.CharacterString, access="r", is_manufacturer_specific=True, @@ -107,7 +107,7 @@ class SESpecificCluster(SEManufCluster): { 0x0000: ZCLAttributeDef( id=0x0000, - name="0", + name="unknown_attribute_0", type=t.enum8, access="rw", is_manufacturer_specific=True, @@ -116,7 +116,7 @@ class SESpecificCluster(SEManufCluster): { 0x0001: ZCLAttributeDef( id=0x0001, - name="1", + name="unknown_attribute_1", type=t.enum8, access="rw", is_manufacturer_specific=True, @@ -125,7 +125,7 @@ class SESpecificCluster(SEManufCluster): { 0x0010: ZCLAttributeDef( id=0x0010, - name="16", + name="unknown_attribute_16", type=t.uint8_t, access="rw", is_manufacturer_specific=True, @@ -134,7 +134,7 @@ class SESpecificCluster(SEManufCluster): { 0x0011: ZCLAttributeDef( id=0x0011, - name="17", + name="unknown_attribute_17", type=t.uint16_t, access="rw", is_manufacturer_specific=True, @@ -143,7 +143,7 @@ class SESpecificCluster(SEManufCluster): { 0x0020: ZCLAttributeDef( id=0x0020, - name="32", + name="unknown_attribute_32", type=t.uint8_t, access="rw", is_manufacturer_specific=True, @@ -152,7 +152,7 @@ class SESpecificCluster(SEManufCluster): { 0x0021: ZCLAttributeDef( id=0x0021, - name="33", + name="unknown_attribute_33", type=t.uint16_t, access="rw", is_manufacturer_specific=True, @@ -161,7 +161,7 @@ class SESpecificCluster(SEManufCluster): { 0xFFFD: ZCLAttributeDef( id=0xFFFD, - name="65533", + name="unknown_attribute_65533", type=t.uint16_t, access="r", is_manufacturer_specific=True, @@ -190,7 +190,7 @@ class SEWindowCover(CustomCluster, WindowCovering): { 0xE000: ZCLAttributeDef( id=0xE000, - name="57344", + name="unknown_attribute_57344", type=t.uint16_t, access="rw", is_manufacturer_specific=True, @@ -199,7 +199,7 @@ class SEWindowCover(CustomCluster, WindowCovering): { 0xE010: ZCLAttributeDef( id=0xE010, - name="57360", + name="unknown_attribute_57360", type=t.bitmap8, access="r", is_manufacturer_specific=True, @@ -208,7 +208,7 @@ class SEWindowCover(CustomCluster, WindowCovering): { 0xE012: ZCLAttributeDef( id=0xE012, - name="57362", + name="unknown_attribute_57362", type=t.uint16_t, access="rw", is_manufacturer_specific=True, @@ -217,7 +217,7 @@ class SEWindowCover(CustomCluster, WindowCovering): { 0xE013: ZCLAttributeDef( id=0xE013, - name="57363", + name="unknown_attribute_57363", type=t.bitmap8, access="r", is_manufacturer_specific=True, @@ -226,7 +226,7 @@ class SEWindowCover(CustomCluster, WindowCovering): { 0xE014: ZCLAttributeDef( id=0xE014, - name="57364", + name="unknown_attribute_57364", type=t.uint16_t, access="rw", is_manufacturer_specific=True, @@ -235,7 +235,7 @@ class SEWindowCover(CustomCluster, WindowCovering): { 0xE015: ZCLAttributeDef( id=0xE015, - name="57365", + name="unknown_attribute_57365", type=t.uint16_t, access="rw", is_manufacturer_specific=True, @@ -244,7 +244,7 @@ class SEWindowCover(CustomCluster, WindowCovering): { 0xE016: ZCLAttributeDef( id=0xE016, - name="57366", + name="unknown_attribute_57366", type=t.uint16_t, access="rw", is_manufacturer_specific=True, @@ -253,7 +253,7 @@ class SEWindowCover(CustomCluster, WindowCovering): { 0xE017: ZCLAttributeDef( id=0xE017, - name="57367", + name="unknown_attribute_57367", type=t.uint8_t, access="rw", is_manufacturer_specific=True, @@ -271,7 +271,7 @@ class SEDiagnostic(CustomCluster, Diagnostic): { 0xFFFD: ZCLAttributeDef( id=0xFFFD, - name="65533", + name="unknown_attribute_65533", type=t.uint16_t, access="r", is_manufacturer_specific=True, From 9ff2ed15a04b102d2ad1d18ca96121f7d626298a Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Fri, 26 Aug 2022 23:26:44 +0200 Subject: [PATCH 05/15] Revert covering lift percentage --- zhaquirks/schneiderelectric/__init__.py | 31 ++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index b545f4eb0e..05aa74db7f 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -13,6 +13,11 @@ SE_MANUF_NAME = "Schneider Electric" SE_MANUF_ID = 4190 +# Attribute IDs +ATTR_CURRENT_POSITION_LIFT_PERCENTAGE=0x0008 + +# Command IDs +CMD_GO_TO_LIFT_PERCENTAGE = 0x0005 class SEManufCluster(CustomCluster): """Schneider Electric manufacturer specific cluster.""" @@ -170,11 +175,9 @@ class SESpecificCluster(SEManufCluster): } -class SEWindowCover(CustomCluster, WindowCovering): +class SEWindowCovering(SEManufCluster, WindowCovering): """Manufacturer Specific Cluster of Device cover.""" - # TODO: Reverse lift percentage - attributes: dict[int, ZCLAttributeDef] = WindowCovering.attributes.copy() attributes.update( @@ -261,6 +264,28 @@ class SEWindowCover(CustomCluster, WindowCovering): }, # attribute_name:"57367" ) + def _update_attribute(self, attrid, value): + if attrid == self.ATTR_CURRENT_POSITION_LIFT_PERCENTAGE: + # Invert the percentage value + value = 100 - value + super()._update_attribute(attrid, value) + + async def command( + self, command_id, *args, manufacturer=None, expect_reply=True, tsn=None + ): + """Override default command to invert percent lift value.""" + if command_id == self.CMD_GO_TO_LIFT_PERCENTAGE: + percent = args[0] + percent = 100 - percent + v = (percent,) + return await super().command(command_id, *v) + return await super().command( + command_id, + *args, + manufacturer=manufacturer, + expect_reply=expect_reply, + tsn=tsn + ) class SEDiagnostic(CustomCluster, Diagnostic): From 1afe73e72a1522f4b927f3ab701b518c97e8e550 Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Sat, 27 Aug 2022 11:41:56 +0200 Subject: [PATCH 06/15] Remove ZCLAttributeDef use for attribute - Fix constant use --- zhaquirks/schneiderelectric/__init__.py | 247 ++++-------------------- zhaquirks/schneiderelectric/shutters.py | 52 ++++- 2 files changed, 83 insertions(+), 216 deletions(-) diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index 05aa74db7f..a82dd8a21f 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -14,11 +14,12 @@ SE_MANUF_ID = 4190 # Attribute IDs -ATTR_CURRENT_POSITION_LIFT_PERCENTAGE=0x0008 +ATTR_CURRENT_POSITION_LIFT_PERCENTAGE = 0x0008 # Command IDs CMD_GO_TO_LIFT_PERCENTAGE = 0x0005 + class SEManufCluster(CustomCluster): """Schneider Electric manufacturer specific cluster.""" @@ -32,75 +33,26 @@ class SEBasicCluster(SEManufCluster, Basic): attributes.update( { - 0xE001: ZCLAttributeDef( - id=0xE001, - name="unknown_attribute_57345", - type=t.CharacterString, - access="r", - is_manufacturer_specific=True, - ) + 0xE001: ("unknown_attribute_57345", t.CharacterString) }, # attribute_name:"57345" # ex: "002.004.016 R { - 0xE002: ZCLAttributeDef( - id=0xE002, - name="unknown_attribute_57346", - type=t.CharacterString, - is_manufacturer_specific=True, - ) + 0xE002: ("unknown_attribute_57346", t.CharacterString) }, # attribute_name:"57346" # ex: "001.000.000" { - 0xE004: ZCLAttributeDef( - id=0xE004, - name="unknown_attribute_57348", - type=t.CharacterString, - access="r", - is_manufacturer_specific=True, - ) + 0xE004: ("unknown_attribute_57348", t.CharacterString) }, # attribute_name:"57348" # ex: "213249FEFF5ECFD" + {0xE007: ("unknown_attribute_57351", t.enum16)}, # attribute_name:"57351" { - 0xE007: ZCLAttributeDef( - id=0xE007, - name="unknown_attribute_57351", - type=t.enum16, - access="r", - is_manufacturer_specific=True, - ) - }, # attribute_name:"57351" - { - 0xE008: ZCLAttributeDef( - id=0xE008, - name="unknown_attribute_57352", - type=t.CharacterString, - access="r", - is_manufacturer_specific=True, - ) + 0xE008: ("unknown_attribute_57352", t.CharacterString) }, # attribute_name:"57352" # ex: "Wiser Light" { - 0xE009: ZCLAttributeDef( - id=0xE009, - name="unknown_attribute_57353", - type=t.CharacterString, - access="r", - is_manufacturer_specific=True, - ) + 0xE009: ("unknown_attribute_57353", t.CharacterString) }, # attribute_name:"57353" # ex: "NHPB/SHUTTER/1" { - 0xE00A: ZCLAttributeDef( - id=0xE00A, - name="unknown_attribute_57354", - type=t.CharacterString, - access="r", - is_manufacturer_specific=True, - ) + 0xE00A: ("unknown_attribute_57354", t.CharacterString) }, # attribute_name:"57354" # ex: "Wiser Home" { - 0xE00B: ZCLAttributeDef( - id=0xE00B, - name="unknown_attribute_57355", - type=t.CharacterString, - access="r", - is_manufacturer_specific=True, - ) + 0xE00B: ("unknown_attribute_57355", t.CharacterString) }, # attribute_name:"57355" ) @@ -109,69 +61,15 @@ class SESpecificCluster(SEManufCluster): cluster_id = 0xFF17 attributes = { - { - 0x0000: ZCLAttributeDef( - id=0x0000, - name="unknown_attribute_0", - type=t.enum8, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"0" - { - 0x0001: ZCLAttributeDef( - id=0x0001, - name="unknown_attribute_1", - type=t.enum8, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"1" - { - 0x0010: ZCLAttributeDef( - id=0x0010, - name="unknown_attribute_16", - type=t.uint8_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"16" - { - 0x0011: ZCLAttributeDef( - id=0x0011, - name="unknown_attribute_17", - type=t.uint16_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"17" - { - 0x0020: ZCLAttributeDef( - id=0x0020, - name="unknown_attribute_32", - type=t.uint8_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"32" - { - 0x0021: ZCLAttributeDef( - id=0x0021, - name="unknown_attribute_33", - type=t.uint16_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"33" - { - 0xFFFD: ZCLAttributeDef( - id=0xFFFD, - name="unknown_attribute_65533", - type=t.uint16_t, - access="r", - is_manufacturer_specific=True, - ) - }, # attribute_name:"65533" + [ + {0x0000: ("unknown_attribute_0", t.enum8)}, # attribute_name:"0" + {0x0001: ("unknown_attribute_1", t.enum8)}, # attribute_name:"1" + {0x0010: ("unknown_attribute_16", t.uint8_t)}, # attribute_name:"16" + {0x0011: ("unknown_attribute_17", t.uint16_t)}, # attribute_name:"17" + {0x0020: ("unknown_attribute_32", t.uint8_t)}, # attribute_name:"32" + {0x0021: ("unknown_attribute_33", t.uint16_t)}, # attribute_name:"33" + {0xFFFD: ("unknown_attribute_65533", t.uint16_t)}, # attribute_name:"65533" + ] } @@ -181,91 +79,19 @@ class SEWindowCovering(SEManufCluster, WindowCovering): attributes: dict[int, ZCLAttributeDef] = WindowCovering.attributes.copy() attributes.update( - { - 0xFFFD: ZCLAttributeDef( - id=0xFFFD, - name="lift_duration", - type=t.uint16_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"65533" - { - 0xE000: ZCLAttributeDef( - id=0xE000, - name="unknown_attribute_57344", - type=t.uint16_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"57344" - { - 0xE010: ZCLAttributeDef( - id=0xE010, - name="unknown_attribute_57360", - type=t.bitmap8, - access="r", - is_manufacturer_specific=True, - ) - }, # attribute_name:"57360" - { - 0xE012: ZCLAttributeDef( - id=0xE012, - name="unknown_attribute_57362", - type=t.uint16_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"57362" - { - 0xE013: ZCLAttributeDef( - id=0xE013, - name="unknown_attribute_57363", - type=t.bitmap8, - access="r", - is_manufacturer_specific=True, - ) - }, # attribute_name:"57363" - { - 0xE014: ZCLAttributeDef( - id=0xE014, - name="unknown_attribute_57364", - type=t.uint16_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"57364" - { - 0xE015: ZCLAttributeDef( - id=0xE015, - name="unknown_attribute_57365", - type=t.uint16_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"57365" - { - 0xE016: ZCLAttributeDef( - id=0xE016, - name="unknown_attribute_57366", - type=t.uint16_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"57366" - { - 0xE017: ZCLAttributeDef( - id=0xE017, - name="unknown_attribute_57367", - type=t.uint8_t, - access="rw", - is_manufacturer_specific=True, - ) - }, # attribute_name:"57367" + {0xFFFD: ("lift_duration", t.uint16_t)}, # attribute_name:"65533" + {0xE000: ("unknown_attribute_57344", t.uint16_t)}, # attribute_name:"57344" + {0xE010: ("unknown_attribute_57360", t.bitmap8)}, # attribute_name:"57360" + {0xE012: ("unknown_attribute_57362", t.uint16_t)}, # attribute_name:"57362" + {0xE013: ("unknown_attribute_57363", t.bitmap8)}, # attribute_name:"57363" + {0xE014: ("unknown_attribute_57364", t.uint16_t)}, # attribute_name:"57364" + {0xE015: ("unknown_attribute_57365", t.uint16_t)}, # attribute_name:"57365" + {0xE016: ("unknown_attribute_57366", t.uint16_t)}, # attribute_name:"57366" + {0xE017: ("unknown_attribute_57367", t.uint8_t)}, # attribute_name:"57367" ) def _update_attribute(self, attrid, value): - if attrid == self.ATTR_CURRENT_POSITION_LIFT_PERCENTAGE: + if attrid == ATTR_CURRENT_POSITION_LIFT_PERCENTAGE: # Invert the percentage value value = 100 - value super()._update_attribute(attrid, value) @@ -274,7 +100,7 @@ async def command( self, command_id, *args, manufacturer=None, expect_reply=True, tsn=None ): """Override default command to invert percent lift value.""" - if command_id == self.CMD_GO_TO_LIFT_PERCENTAGE: + if command_id == CMD_GO_TO_LIFT_PERCENTAGE: percent = args[0] percent = 100 - percent v = (percent,) @@ -287,19 +113,14 @@ async def command( tsn=tsn ) + class SEDiagnostic(CustomCluster, Diagnostic): attributes: dict[int, ZCLAttributeDef] = Diagnostic.attributes.copy() # TODO: Check -> this attr don't seems to be manufacturer related (no "manf_id") attributes.update( - { - 0xFFFD: ZCLAttributeDef( - id=0xFFFD, - name="unknown_attribute_65533", - type=t.uint16_t, - access="r", - is_manufacturer_specific=True, - ) - }, # attribute_name:"65533" + [ + {0xFFFD: ("unknown_attribute_65533", t.uint16_t)}, # attribute_name:"65533" + ] ) diff --git a/zhaquirks/schneiderelectric/shutters.py b/zhaquirks/schneiderelectric/shutters.py index 1c6b4053b5..e3502b2a50 100644 --- a/zhaquirks/schneiderelectric/shutters.py +++ b/zhaquirks/schneiderelectric/shutters.py @@ -24,7 +24,11 @@ OUTPUT_CLUSTERS, PROFILE_ID, ) -from zhaquirks.schneiderelectric import SE_MANUF_NAME, SESpecificCluster +from zhaquirks.schneiderelectric import ( + SE_MANUF_NAME, + SESpecificCluster, + SEWindowCovering, +) class NHPBShutter1(CustomDevice): @@ -41,7 +45,9 @@ class NHPBShutter1(CustomDevice): # *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, # *is_router=True, *is_security_capable=False) signature = { - MODELS_INFO: [(SE_MANUF_NAME, "NHPB/SHUTTER/1")], + MODELS_INFO: [ + (SE_MANUF_NAME, "NHPB/SHUTTER/1"), + ], ENDPOINTS: { 5: { PROFILE_ID: zha.PROFILE_ID, @@ -82,4 +88,44 @@ class NHPBShutter1(CustomDevice): }, }, } - replacement = {} + replacement = { + ENDPOINTS: { + 5: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.WINDOW_COVERING_DEVICE, # 0x0202 + INPUT_CLUSTERS: [ + Basic.cluster_id, # 0x0000 + Identify.cluster_id, # 0x0003 + Groups.cluster_id, # 0x0004 + Scenes.cluster_id, # 0x0005 + WindowCovering.cluster_id, # 0x0102 + Diagnostic.cluster_id, # 0x0B05 + ], + OUTPUT_CLUSTERS: [Ota.cluster_id], # 0x0019 + }, + 21: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH, # 0x0104 + INPUT_CLUSTERS: [ + Basic.cluster_id, # 0x0000 + Identify.cluster_id, # 0x0003 + Diagnostic.cluster_id, # 0x0B05 + SESpecificCluster, # 0xff17 + ], + OUTPUT_CLUSTERS: [ + Identify.cluster_id, # 0x0003 + Groups.cluster_id, # 0x0004 + Scenes.cluster_id, # 0x0005 + OnOff.cluster_id, # 0x0006 + LevelControl.cluster_id, # 0x0008 + SEWindowCovering, # 0x0102 + ], + }, + 242: { + PROFILE_ID: 41440, + DEVICE_TYPE: 0x0061, + INPUT_CLUSTERS: [], + OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id], # 0x0021 + }, + } + } From 17dca8483c091bf2aaa9ed422c85271f6a477136 Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Sun, 28 Aug 2022 16:49:00 +0200 Subject: [PATCH 07/15] Fix attributes update - Edit some attributes name --- zhaquirks/schneiderelectric/__init__.py | 95 ++++++++++++++----------- zhaquirks/schneiderelectric/shutters.py | 8 +-- zhaquirks/schneiderelectric/switches.py | 4 +- 3 files changed, 56 insertions(+), 51 deletions(-) diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index a82dd8a21f..4fd65ebce9 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -33,27 +33,36 @@ class SEBasicCluster(SEManufCluster, Basic): attributes.update( { - 0xE001: ("unknown_attribute_57345", t.CharacterString) - }, # attribute_name:"57345" # ex: "002.004.016 R - { - 0xE002: ("unknown_attribute_57346", t.CharacterString) - }, # attribute_name:"57346" # ex: "001.000.000" - { - 0xE004: ("unknown_attribute_57348", t.CharacterString) - }, # attribute_name:"57348" # ex: "213249FEFF5ECFD" - {0xE007: ("unknown_attribute_57351", t.enum16)}, # attribute_name:"57351" - { - 0xE008: ("unknown_attribute_57352", t.CharacterString) - }, # attribute_name:"57352" # ex: "Wiser Light" - { - 0xE009: ("unknown_attribute_57353", t.CharacterString) - }, # attribute_name:"57353" # ex: "NHPB/SHUTTER/1" - { - 0xE00A: ("unknown_attribute_57354", t.CharacterString) - }, # attribute_name:"57354" # ex: "Wiser Home" - { - 0xE00B: ("unknown_attribute_57355", t.CharacterString) - }, # attribute_name:"57355" + 0xE001: ( + "se_sw_build_id", + t.CharacterString, + ), # attribute_name:"57345" # ex: "002.004.016 R + 0xE002: ( + "unknown_attribute_57346", + t.CharacterString, + ), # attribute_name:"57346" # ex: "001.000.000" + 0xE004: ( + "unknown_attribute_57348", + t.CharacterString, + ), # attribute_name:"57348" # ex: "213249FEFF5ECFD" + 0xE007: ("unknown_attribute_57351", t.enum16), # attribute_name:"57351" + 0xE008: ( + "se_device_type", + t.CharacterString, + ), # attribute_name:"57352" # ex: "Wiser Light" + 0xE009: ( + "se_model", + t.CharacterString, + ), # attribute_name:"57353" # ex: "NHPB/SHUTTER/1" + 0xE00A: ( + "se_realm", + t.CharacterString, + ), # attribute_name:"57354" # ex: "Wiser Home" + 0xE00B: ( + "unknown_attribute_57355", + t.CharacterString, + ), # attribute_name:"57355" + } ) @@ -61,33 +70,33 @@ class SESpecificCluster(SEManufCluster): cluster_id = 0xFF17 attributes = { - [ - {0x0000: ("unknown_attribute_0", t.enum8)}, # attribute_name:"0" - {0x0001: ("unknown_attribute_1", t.enum8)}, # attribute_name:"1" - {0x0010: ("unknown_attribute_16", t.uint8_t)}, # attribute_name:"16" - {0x0011: ("unknown_attribute_17", t.uint16_t)}, # attribute_name:"17" - {0x0020: ("unknown_attribute_32", t.uint8_t)}, # attribute_name:"32" - {0x0021: ("unknown_attribute_33", t.uint16_t)}, # attribute_name:"33" - {0xFFFD: ("unknown_attribute_65533", t.uint16_t)}, # attribute_name:"65533" - ] + 0x0000: ("unknown_attribute_0", t.enum8), # attribute_name:"0" + 0x0001: ("unknown_attribute_1", t.enum8), # attribute_name:"1" + 0x0010: ("unknown_attribute_16", t.uint8_t), # attribute_name:"16" + 0x0011: ("unknown_attribute_17", t.uint16_t), # attribute_name:"17" + 0x0020: ("unknown_attribute_32", t.uint8_t), # attribute_name:"32" + 0x0021: ("unknown_attribute_33", t.uint16_t), # attribute_name:"33" + 0xFFFD: ("unknown_attribute_65533", t.uint16_t), # attribute_name:"65533" } class SEWindowCovering(SEManufCluster, WindowCovering): - """Manufacturer Specific Cluster of Device cover.""" + """Manufacturer Specific Cluster of cover device.""" attributes: dict[int, ZCLAttributeDef] = WindowCovering.attributes.copy() attributes.update( - {0xFFFD: ("lift_duration", t.uint16_t)}, # attribute_name:"65533" - {0xE000: ("unknown_attribute_57344", t.uint16_t)}, # attribute_name:"57344" - {0xE010: ("unknown_attribute_57360", t.bitmap8)}, # attribute_name:"57360" - {0xE012: ("unknown_attribute_57362", t.uint16_t)}, # attribute_name:"57362" - {0xE013: ("unknown_attribute_57363", t.bitmap8)}, # attribute_name:"57363" - {0xE014: ("unknown_attribute_57364", t.uint16_t)}, # attribute_name:"57364" - {0xE015: ("unknown_attribute_57365", t.uint16_t)}, # attribute_name:"57365" - {0xE016: ("unknown_attribute_57366", t.uint16_t)}, # attribute_name:"57366" - {0xE017: ("unknown_attribute_57367", t.uint8_t)}, # attribute_name:"57367" + { + 0xFFFD: ("lift_duration", t.uint16_t), # attribute_name:"65533" + 0xE000: ("unknown_attribute_57344", t.uint16_t), # attribute_name:"57344" + 0xE010: ("unknown_attribute_57360", t.bitmap8), # attribute_name:"57360" + 0xE012: ("unknown_attribute_57362", t.uint16_t), # attribute_name:"57362" + 0xE013: ("unknown_attribute_57363", t.bitmap8), # attribute_name:"57363" + 0xE014: ("unknown_attribute_57364", t.uint16_t), # attribute_name:"57364" + 0xE015: ("unknown_attribute_57365", t.uint16_t), # attribute_name:"57365" + 0xE016: ("unknown_attribute_57366", t.uint16_t), # attribute_name:"57366" + 0xE017: ("unknown_attribute_57367", t.uint8_t), # attribute_name:"57367" + } ) def _update_attribute(self, attrid, value): @@ -120,7 +129,7 @@ class SEDiagnostic(CustomCluster, Diagnostic): # TODO: Check -> this attr don't seems to be manufacturer related (no "manf_id") attributes.update( - [ - {0xFFFD: ("unknown_attribute_65533", t.uint16_t)}, # attribute_name:"65533" - ] + { + 0xFFFD: ("unknown_attribute_65533", t.uint16_t), # attribute_name:"65533" + } ) diff --git a/zhaquirks/schneiderelectric/shutters.py b/zhaquirks/schneiderelectric/shutters.py index e3502b2a50..9350318647 100644 --- a/zhaquirks/schneiderelectric/shutters.py +++ b/zhaquirks/schneiderelectric/shutters.py @@ -12,9 +12,7 @@ Ota, Scenes, ) -from zigpy.zcl.clusters.homeautomation import ( - Diagnostic, -) +from zigpy.zcl.clusters.homeautomation import Diagnostic from zhaquirks.const import ( DEVICE_TYPE, @@ -98,7 +96,7 @@ class NHPBShutter1(CustomDevice): Identify.cluster_id, # 0x0003 Groups.cluster_id, # 0x0004 Scenes.cluster_id, # 0x0005 - WindowCovering.cluster_id, # 0x0102 + SEWindowCovering, # 0x0102 Diagnostic.cluster_id, # 0x0B05 ], OUTPUT_CLUSTERS: [Ota.cluster_id], # 0x0019 @@ -118,7 +116,7 @@ class NHPBShutter1(CustomDevice): Scenes.cluster_id, # 0x0005 OnOff.cluster_id, # 0x0006 LevelControl.cluster_id, # 0x0008 - SEWindowCovering, # 0x0102 + WindowCovering.cluster_id, # 0x0102 ], }, 242: { diff --git a/zhaquirks/schneiderelectric/switches.py b/zhaquirks/schneiderelectric/switches.py index 65930f74ff..11c14d26bf 100644 --- a/zhaquirks/schneiderelectric/switches.py +++ b/zhaquirks/schneiderelectric/switches.py @@ -12,9 +12,7 @@ Ota, Scenes, ) -from zigpy.zcl.clusters.homeautomation import ( - Diagnostic, -) +from zigpy.zcl.clusters.homeautomation import Diagnostic from zhaquirks.const import ( DEVICE_TYPE, From 2a530802e70bd353041bb74e05c933816fe246c1 Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Sun, 28 Aug 2022 19:02:04 +0200 Subject: [PATCH 08/15] Fix lift_duration attribute ID --- zhaquirks/schneiderelectric/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index 4fd65ebce9..6d65b2fc4e 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -87,8 +87,8 @@ class SEWindowCovering(SEManufCluster, WindowCovering): attributes.update( { - 0xFFFD: ("lift_duration", t.uint16_t), # attribute_name:"65533" - 0xE000: ("unknown_attribute_57344", t.uint16_t), # attribute_name:"57344" + 0xFFFD: ("unknown_attribute_65533", t.uint16_t), # attribute_name:"65533" + 0xE000: ("lift_duration", t.uint16_t), # attribute_name:"57344" 0xE010: ("unknown_attribute_57360", t.bitmap8), # attribute_name:"57360" 0xE012: ("unknown_attribute_57362", t.uint16_t), # attribute_name:"57362" 0xE013: ("unknown_attribute_57363", t.bitmap8), # attribute_name:"57363" From c6da55b05189b8af014c14eb8c10159c571ca288 Mon Sep 17 00:00:00 2001 From: Axel Le Bot Date: Mon, 29 Aug 2022 13:12:01 +0200 Subject: [PATCH 09/15] Add Schneider Electric readme --- zhaquirks/schneiderelectric/README.md | 3990 +++++++++++++++++++++++++ 1 file changed, 3990 insertions(+) create mode 100644 zhaquirks/schneiderelectric/README.md diff --git a/zhaquirks/schneiderelectric/README.md b/zhaquirks/schneiderelectric/README.md new file mode 100644 index 0000000000..449092b6a0 --- /dev/null +++ b/zhaquirks/schneiderelectric/README.md @@ -0,0 +1,3990 @@ +# Schneider Electric + + +- [Schneider Electric](#schneider-electric) + - [Introduction](#introduction) + - [Helpers](#helpers) + - [Devices](#devices) + - [Shutter](#shutter) + - [NHPB/SHUTTER/1 ❔](#nhpbshutter1-) + - [PUCK/SHUTTER/1 ❌](#puckshutter1-) + - [1GANG/SHUTTER/1 ❔](#1gangshutter1-) + - [Switch](#switch) + - [PUCK/SWITCH/1 ❔](#puckswitch1-) + - [CH2AX/SWITCH/1 ❔](#ch2axswitch1-) + - [CH10AX/SWITCH/1 ❌](#ch10axswitch1-) + - [FLS/AIRLINK/4 ❌](#flsairlink4-) + - [FLS/SYSTEM-M/4 ❔](#flssystem-m4-) + - [LK Switch](#lk-switch) + - [NHPB/SWITCH/1 ❔](#nhpbswitch1-) + - [PUCK/SWITCH/1 ❔](#puckswitch1--1) + - [U201SRY2KWZB ❔](#u201sry2kwzb-) + - [U202SRY2KWZB ❔](#u202sry2kwzb-) + - [Dimmer](#dimmer) + - [CH/DIMMER/1 ❔](#chdimmer1-) + - [PUCK/DIMMER/1 ❔](#puckdimmer1-) + - [LK Dimmer](#lk-dimmer) + - [NHPB/DIMMER/1 ❔](#nhpbdimmer1-) + - [NHROTARY/DIMMER/1 ❔](#nhrotarydimmer1-) + - [U201DST600ZB ❔](#u201dst600zb-) + - [U202DST600ZB ❔](#u202dst600zb-) + - [Plug](#plug) + - [CH/Socket/2 ❔](#chsocket2-) + - [EH-ZB-SPD-V2 ❔](#eh-zb-spd-v2-) + - [LK/OUTLET/1 ❔](#lkoutlet1-) + - [SOCKET/OUTLET/1 ❔](#socketoutlet1-) + - [SOCKET/OUTLET/2 ❔](#socketoutlet2-) + - [SMARTPLUG/1 ❔](#smartplug1-) + - [Thermostat](#thermostat) + - [CCTFR6700 ❔](#cctfr6700-) + - [EH-ZB-VACT ❔](#eh-zb-vact-) + - [EH-ZB-RTS ❔](#eh-zb-rts-) + - [EH-ZB-HACT ❔](#eh-zb-hact-) + - [Thermostat ❔](#thermostat-) + - [iTRV ❔](#itrv-) + - [Motion](#motion) + - [CCT595011_AS ❔](#cct595011_as-) + - [NHMOTION/SWITCH/1 ❔](#nhmotionswitch1-) + - [MISC](#misc) + - [CCT592011_AS ❔](#cct592011_as-) + - [EH-ZB-LMACT ❔](#eh-zb-lmact-) + +## Introduction + +The purpose of this file is to list all Zigbee capable device from Schneider Electric manufacturer, the status of their potential quirk, their basic zigbee infos and more. + +All devices are listed alphabetically based on the Zigbee `model (0x0005)` attribute from `Basic (0x0000)` cluster. + +All quirk infos should remain in basecode. + +Status : + +- ✅ : Supported +- ❌ : Not supported +- 🆗 : No quirk needed +- ❔ : Unknown + +## Helpers + +Device signature can be acquired by clicking on the "Zigbee Device Signature" button in the device settings view + +Sources : + +- [wiserapp](https://github.com/Signalare/com.se.wiserapp) for [Homey](https://homey.app/en-us/app/com.se.wiserapp/Schneider-Electric/) +- [deconz-rest-plugin wiser](https://github.com/dresden-elektronik/deconz-rest-plugin/tree/master/devices/wiser) +- [deconz-rest-plugin merten](https://github.com/dresden-elektronik/deconz-rest-plugin/tree/master/devices/merten) +- [zigbee-herdsman-converters](https://github.com/Koenkk/zigbee-herdsman-converters/tree/master/devices/schneider_electric.js) + +## Devices + +### Shutter + +Lift percentage is reversed + +#### NHPB/SHUTTER/1 ❔ + +
+ Device signature + +```json +{ + "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", + "endpoints": { + "5": { + "profile_id": 260, + "device_type": "0x0202", + "in_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0102", + "0x0b05" + ], + "out_clusters": [ + "0x0019" + ] + }, + "21": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": [ + "0x0000", + "0x0003", + "0x0b05", + "0xff17" + ], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102" + ] + }, + "242": { + "profile_id": 41440, + "device_type": "0x0061", + "in_clusters": [], + "out_clusters": [ + "0x0021" + ] + } + }, + "manufacturer": "Schneider Electric", + "model": "NHPB/SHUTTER/1", + "class": "zigpy.device.Device" +} +``` + +
+ +
+ zha_toolkit.scan_device + +```json +{ + "ieee": "00:3c:84:xx:xx:xx:xx:x1", + "nwk": "0x21d2", + "model": "NHPB/SHUTTER/1", + "manufacturer": "Schneider Electric", + "manufacturer_id": "0x4190", + "endpoints": [ + { + "id": 5, + "device_type": "0x0202", + "profile": "0x0104", + "in_clusters": { + "0x0000": { + "cluster_id": "0x0000", + "title": "Basic", + "name": "basic", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "zcl_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 3 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "app_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "stack_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 6 + }, + "0x0003": { + "attribute_id": "0x0003", + "attribute_name": "hw_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0004": { + "attribute_id": "0x0004", + "attribute_name": "manufacturer", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "Schneider Electric" + }, + "0x0005": { + "attribute_id": "0x0005", + "attribute_name": "model", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "NHPB/SHUTTER/1" + }, + "0x0006": { + "attribute_id": "0x0006", + "attribute_name": "date_code", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x0007": { + "attribute_id": "0x0007", + "attribute_name": "power_source", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0008": { + "attribute_id": "0x0008", + "attribute_name": "generic_device_class", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0009": { + "attribute_id": "0x0009", + "attribute_name": "generic_device_type", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 225 + }, + "0x000a": { + "attribute_id": "0x000a", + "attribute_name": "product_code", + "value_type": [ + "0x41", + "LVBytes", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x000b": { + "attribute_id": "0x000b", + "attribute_name": "product_url", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "http://www.schneider-electric.com" + }, + "0x4000": { + "attribute_id": "0x4000", + "attribute_name": "sw_build_id", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "002.004.016 R" + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0xe001": { + "attribute_id": "0xe001", + "attribute_name": "57345", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "002.004.016 R" + }, + "0xe002": { + "attribute_id": "0xe002", + "attribute_name": "57346", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "001.000.000" + }, + "0xe004": { + "attribute_id": "0xe004", + "attribute_name": "57348", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "213249FEFF5ECFD" + }, + "0xe007": { + "attribute_id": "0xe007", + "attribute_name": "57351", + "value_type": [ + "0x31", + "enum16", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": 17422 + }, + "0xe008": { + "attribute_id": "0xe008", + "attribute_name": "57352", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Light" + }, + "0xe009": { + "attribute_id": "0xe009", + "attribute_name": "57353", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "NHPB/SHUTTER/1" + }, + "0xe00a": { + "attribute_id": "0xe00a", + "attribute_name": "57354", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Home" + }, + "0xe00b": { + "attribute_id": "0xe00b", + "attribute_name": "57355", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "reset_fact_default", + "command_arguments": "" + } + }, + "commands_generated": {} + }, + "0x0003": { + "cluster_id": "0x0003", + "title": "Identify", + "name": "identify", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "identify_time", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "identify_query_response", + "command_args": "" + } + } + }, + "0x0004": { + "cluster_id": "0x0004", + "title": "Groups", + "name": "groups", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "name_support", + "value_type": [ + "0x18", + "bitmap8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "add", + "command_arguments": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view", + "command_arguments": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "get_membership", + "command_arguments": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove", + "command_arguments": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "remove_all", + "command_arguments": "" + }, + "0x05": { + "command_id": "0x05", + "command_name": "add_if_identifying", + "command_arguments": "" + } + }, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "get_membership_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_response", + "command_args": "" + } + } + }, + "0x0005": { + "cluster_id": "0x0005", + "title": "Scenes", + "name": "scenes", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "count", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "current_scene", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "current_group", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0003": { + "attribute_id": "0x0003", + "attribute_name": "scene_valid", + "value_type": [ + "0x10", + "Bool", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0004": { + "attribute_id": "0x0004", + "attribute_name": "name_support", + "value_type": [ + "0x18", + "bitmap8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "add", + "command_arguments": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view", + "command_arguments": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "remove", + "command_arguments": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_all", + "command_arguments": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "store", + "command_arguments": "" + }, + "0x05": { + "command_id": "0x05", + "command_name": "recall", + "command_arguments": "" + }, + "0x06": { + "command_id": "0x06", + "command_name": "get_scene_membership", + "command_arguments": "" + } + }, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_scene_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "remove_scene_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_all_scenes_response", + "command_args": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "store_scene_response", + "command_args": "" + }, + "0x06": { + "command_id": "0x06", + "command_name": "get_scene_membership_response", + "command_args": "" + } + } + }, + "0x0102": { + "cluster_id": "0x0102", + "title": "Window Covering", + "name": "window_covering", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "window_covering_type", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 8 + }, + "0x0007": { + "attribute_id": "0x0007", + "attribute_name": "config_status", + "value_type": [ + "0x18", + "bitmap8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 3 + }, + "0x0008": { + "attribute_id": "0x0008", + "attribute_name": "current_position_lift_percentage", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 20 + }, + "0x0009": { + "attribute_id": "0x0009", + "attribute_name": "current_position_tilt_percentage", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0017": { + "attribute_id": "0x0017", + "attribute_name": "window_covering_mode", + "value_type": [ + "0x18", + "bitmap8", + "Discrete" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 8 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0xe000": { + "attribute_id": "0xe000", + "attribute_name": "57344", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 120 + }, + "0xe010": { + "attribute_id": "0xe010", + "attribute_name": "57360", + "value_type": [ + "0x18", + "bitmap8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": 0 + }, + "0xe012": { + "attribute_id": "0xe012", + "attribute_name": "57362", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 32767 + }, + "0xe013": { + "attribute_id": "0xe013", + "attribute_name": "57363", + "value_type": [ + "0x18", + "bitmap8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": 0 + }, + "0xe014": { + "attribute_id": "0xe014", + "attribute_name": "57364", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 1200 + }, + "0xe015": { + "attribute_id": "0xe015", + "attribute_name": "57365", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 1200 + }, + "0xe016": { + "attribute_id": "0xe016", + "attribute_name": "57366", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 100 + }, + "0xe017": { + "attribute_id": "0xe017", + "attribute_name": "57367", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 255 + } + }, + "commands_received": {}, + "commands_generated": {} + }, + "0x0b05": { + "cluster_id": "0x0b05", + "title": "Diagnostic", + "name": "diagnostic", + "attributes": { + "0x011c": { + "attribute_id": "0x011c", + "attribute_name": "last_message_lqi", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x011d": { + "attribute_id": "0x011d", + "attribute_name": "last_message_rssi", + "value_type": [ + "0x28", + "int8s", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": {} + } + }, + "out_clusters": { + "0x0019": { + "cluster_id": "0x0019", + "title": "Ota", + "name": "ota", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "upgrade_server_id", + "value_type": [ + "0xf0", + "EUI64", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": [ + 255, + 170, + 5, + 255, + 255, + 46, + 33, + 0 + ] + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "file_offset", + "value_type": [ + "0x23", + "uint32_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 4294967295 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "current_file_version", + "value_type": [ + "0x23", + "uint32_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 33820927 + }, + "0x0006": { + "attribute_id": "0x0006", + "attribute_name": "image_upgrade_status", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0007": { + "attribute_id": "0x0007", + "attribute_name": "manufacturer_id", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 4190 + }, + "0x0008": { + "attribute_id": "0x0008", + "attribute_name": "image_type_id", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 65535 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 3 + } + }, + "commands_received": {}, + "commands_generated": { + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + }, + "0x03": { + "command_id": "0x03", + "command_name": "3", + "command_args": "'not_in_zcl'" + }, + "0x06": { + "command_id": "0x06", + "command_name": "6", + "command_args": "'not_in_zcl'" + } + } + } + } + }, + { + "id": 21, + "device_type": "0x0104", + "profile": "0x0104", + "in_clusters": { + "0x0000": { + "cluster_id": "0x0000", + "title": "Basic", + "name": "basic", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "zcl_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 3 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "app_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "stack_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 6 + }, + "0x0003": { + "attribute_id": "0x0003", + "attribute_name": "hw_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0004": { + "attribute_id": "0x0004", + "attribute_name": "manufacturer", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "Schneider Electric" + }, + "0x0005": { + "attribute_id": "0x0005", + "attribute_name": "model", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "NHPB/SHUTTER/1" + }, + "0x0006": { + "attribute_id": "0x0006", + "attribute_name": "date_code", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x0007": { + "attribute_id": "0x0007", + "attribute_name": "power_source", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0008": { + "attribute_id": "0x0008", + "attribute_name": "generic_device_class", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0009": { + "attribute_id": "0x0009", + "attribute_name": "generic_device_type", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 225 + }, + "0x000a": { + "attribute_id": "0x000a", + "attribute_name": "product_code", + "value_type": [ + "0x41", + "LVBytes", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x000b": { + "attribute_id": "0x000b", + "attribute_name": "product_url", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "http://www.schneider-electric.com" + }, + "0x4000": { + "attribute_id": "0x4000", + "attribute_name": "sw_build_id", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "002.004.016 R" + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0xe001": { + "attribute_id": "0xe001", + "attribute_name": "57345", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "002.004.016 R" + }, + "0xe002": { + "attribute_id": "0xe002", + "attribute_name": "57346", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "001.000.000" + }, + "0xe004": { + "attribute_id": "0xe004", + "attribute_name": "57348", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "213249FEFF5ECFD" + }, + "0xe007": { + "attribute_id": "0xe007", + "attribute_name": "57351", + "value_type": [ + "0x31", + "enum16", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": 17422 + }, + "0xe008": { + "attribute_id": "0xe008", + "attribute_name": "57352", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Light" + }, + "0xe009": { + "attribute_id": "0xe009", + "attribute_name": "57353", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "NHPB/SHUTTER/1" + }, + "0xe00a": { + "attribute_id": "0xe00a", + "attribute_name": "57354", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Home" + }, + "0xe00b": { + "attribute_id": "0xe00b", + "attribute_name": "57355", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "reset_fact_default", + "command_arguments": "" + } + }, + "commands_generated": {} + }, + "0x0003": { + "cluster_id": "0x0003", + "title": "Identify", + "name": "identify", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "identify_time", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "identify_query_response", + "command_args": "" + } + } + }, + "0x0b05": { + "cluster_id": "0x0b05", + "title": "Diagnostic", + "name": "diagnostic", + "attributes": { + "0x011c": { + "attribute_id": "0x011c", + "attribute_name": "last_message_lqi", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x011d": { + "attribute_id": "0x011d", + "attribute_name": "last_message_rssi", + "value_type": [ + "0x28", + "int8s", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": {} + }, + "0xff17": { + "cluster_id": "0xff17", + "title": "Manufacturer Specific", + "name": "manufacturer_specific", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "0", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "1", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 3 + }, + "0x0010": { + "attribute_id": "0x0010", + "attribute_name": "16", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0x0011": { + "attribute_id": "0x0011", + "attribute_name": "17", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0x0020": { + "attribute_id": "0x0020", + "attribute_name": "32", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 1 + }, + "0x0021": { + "attribute_id": "0x0021", + "attribute_name": "33", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": 1 + } + }, + "commands_received": {}, + "commands_generated": {} + } + }, + "out_clusters": { + "0x0003": { + "cluster_id": "0x0003", + "title": "Identify", + "name": "identify", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "identify", + "command_arguments": "" + } + }, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "identify_query_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + } + } + }, + "0x0004": { + "cluster_id": "0x0004", + "title": "Groups", + "name": "groups", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "get_membership_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_response", + "command_args": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "4", + "command_args": "'not_in_zcl'" + }, + "0x05": { + "command_id": "0x05", + "command_name": "5", + "command_args": "'not_in_zcl'" + } + } + }, + "0x0005": { + "cluster_id": "0x0005", + "title": "Scenes", + "name": "scenes", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_scene_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "remove_scene_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_all_scenes_response", + "command_args": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "store_scene_response", + "command_args": "" + }, + "0x05": { + "command_id": "0x05", + "command_name": "5", + "command_args": "'not_in_zcl'" + }, + "0x06": { + "command_id": "0x06", + "command_name": "get_scene_membership_response", + "command_args": "" + } + } + }, + "0x0006": { + "cluster_id": "0x0006", + "title": "On/Off", + "name": "on_off", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "0", + "command_args": "'not_in_zcl'" + }, + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + }, + "0x02": { + "command_id": "0x02", + "command_name": "2", + "command_args": "'not_in_zcl'" + } + } + }, + "0x0008": { + "cluster_id": "0x0008", + "title": "Level control", + "name": "level", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "0", + "command_args": "'not_in_zcl'" + }, + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + }, + "0x02": { + "command_id": "0x02", + "command_name": "2", + "command_args": "'not_in_zcl'" + }, + "0x03": { + "command_id": "0x03", + "command_name": "3", + "command_args": "'not_in_zcl'" + }, + "0x04": { + "command_id": "0x04", + "command_name": "4", + "command_args": "'not_in_zcl'" + }, + "0x05": { + "command_id": "0x05", + "command_name": "5", + "command_args": "'not_in_zcl'" + }, + "0x06": { + "command_id": "0x06", + "command_name": "6", + "command_args": "'not_in_zcl'" + }, + "0x07": { + "command_id": "0x07", + "command_name": "7", + "command_args": "'not_in_zcl'" + } + } + }, + "0x0102": { + "cluster_id": "0x0102", + "title": "Window Covering", + "name": "window_covering", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "0", + "command_args": "'not_in_zcl'" + }, + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + }, + "0x02": { + "command_id": "0x02", + "command_name": "2", + "command_args": "'not_in_zcl'" + } + } + } + } + }, + { + "id": 242, + "device_type": "0x0061", + "profile": "0xa1e0" + } + ] +} +``` + +
+ +#### PUCK/SHUTTER/1 ❌ + +
+ Jeedom logs +From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla/53420/699) + +> Volets roulants module Schneider Electric Wiser CCT5015-0002W + +```json +{ + "ieee": "00:0d:6f:ff:fe:cb:52:11", + "nwk": 31119, + "status": 2, + "lqi": "231", + "rssi": "-65", + "last_seen": "1617382106.1621628", + "node_descriptor": "01:40:8e:5e:10:52:52:00:00:2c:52:00:00", + "endpoints": [ + { + "id": 5, + "status": 1, + "device_type": 514, + "profile_id": 260, + "manufacturer": "Schneider Electric", + "model": "PUCK\/SHUTTER\/1", + "output_clusters": [ + { + "id": 25, + "name": "Ota", + "attributes": [] + } + ], + "input_clusters": [ + { + "id": 0, + "name": "Basic", + "attributes": [ + { + "id": 0, + "name": "zcl_version", + "value": 3 + }, + { + "id": 1, + "name": "app_version", + "value": 2 + }, + { + "id": 2, + "name": "stack_version", + "value": 6 + }, + { + "id": 3, + "name": "hw_version", + "value": 1 + }, + { + "id": 4, + "name": "manufacturer", + "value": "Schneider Electric" + }, + { + "id": 5, + "name": "model", + "value": "PUCK\/SHUTTER\/1" + }, + { + "id": 6, + "name": "date_code", + "value": "" + }, + { + "id": 7, + "name": "power_source", + "value": 1 + }, + { + "id": 16384, + "name": "sw_build_id", + "value": "002.004.018 R" + } + ] + }, + { + "id": 3, + "name": "Identify", + "attributes": [] + }, + { + "id": 4, + "name": "Groups", + "attributes": [] + }, + { + "id": 5, + "name": "Scenes", + "attributes": [] + }, + { + "id": 258, + "name": "Window Covering", + "attributes": [] + }, + { + "id": 2821, + "name": "Diagnostic", + "attributes": [] + } + ] + }, + { + "id": 242, + "status": 1, + "device_type": 97, + "profile_id": 41440, + "manufacturer": null, + "model": null, + "output_clusters": [ + { + "id": 33, + "name": "GreenPowerProxy", + "attributes": [] + } + ], + "input_clusters": [] + } + ], + "signature": { + "manufacturer": "Schneider Electric", + "model": "PUCK\/SHUTTER\/1", + "node_desc": { + "byte1": 1, + "byte2": 64, + "mac_capability_flags": 142, + "manufacturer_code": 4190, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "5": { + "profile_id": 260, + "device_type": 514, + "input_clusters": [ + 0, + 3, + 4, + 5, + 258, + 2821 + ], + "output_clusters": [ + 25 + ] + }, + "242": { + "profile_id": 41440, + "device_type": 97, + "input_clusters": [], + "output_clusters": [ + 33 + ] + } + } + }, + "class": "zigpy.device" +} +``` + +
+ +#### 1GANG/SHUTTER/1 ❔ + +### Switch + +#### PUCK/SWITCH/1 ❔ + +#### CH2AX/SWITCH/1 ❔ + +#### CH10AX/SWITCH/1 ❌ + +
+ Signature + +```json +{ + "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", + "endpoints": { + "1": { + "profile_id": 260, + "device_type": "0x0100", + "in_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0b05" + ], + "out_clusters": [ + "0x0019" + ] + }, + "21": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": [ + "0x0000", + "0x0003", + "0x0b05", + "0xff17" + ], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102" + ] + }, + "242": { + "profile_id": 41440, + "device_type": "0x0061", + "in_clusters": [], + "out_clusters": [ + "0x0021" + ] + } + }, + "manufacturer": "Schneider Electric", + "model": "CH10AX/SWITCH/1", + "class": "zigpy.device.Device" +} +``` + +
+ +
+ zha_toolkit.scan_device + +```json +{ + "ieee": "8c:f6:81:00z:00:00:00:00", + "nwk": "0x26ce", + "model": "CH10AX/SWITCH/1", + "manufacturer": "Schneider Electric", + "manufacturer_id": "0x4190", + "endpoints": [ + { + "id": 1, + "device_type": "0x0100", + "profile": "0x0104", + "in_clusters": { + "0x0000": { + "cluster_id": "0x0000", + "title": "Basic", + "name": "basic", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "zcl_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 3 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "app_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "stack_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 6 + }, + "0x0003": { + "attribute_id": "0x0003", + "attribute_name": "hw_version", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0004": { + "attribute_id": "0x0004", + "attribute_name": "manufacturer", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "Schneider Electric" + }, + "0x0005": { + "attribute_id": "0x0005", + "attribute_name": "model", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "CH10AX/SWITCH/1" + }, + "0x0006": { + "attribute_id": "0x0006", + "attribute_name": "date_code", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x0007": { + "attribute_id": "0x0007", + "attribute_name": "power_source", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0008": { + "attribute_id": "0x0008", + "attribute_name": "generic_device_class", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0009": { + "attribute_id": "0x0009", + "attribute_name": "generic_device_type", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 225 + }, + "0x000a": { + "attribute_id": "0x000a", + "attribute_name": "product_code", + "value_type": [ + "0x41", + "LVBytes", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x000b": { + "attribute_id": "0x000b", + "attribute_name": "product_url", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "http://www.schneider-electric.com" + }, + "0x4000": { + "attribute_id": "0x4000", + "attribute_name": "sw_build_id", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "002.010.007 R" + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0xe001": { + "attribute_id": "0xe001", + "attribute_name": "57345", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "002.010.007 R" + }, + "0xe002": { + "attribute_id": "0xe002", + "attribute_name": "57346", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "001.000.000" + }, + "0xe004": { + "attribute_id": "0xe004", + "attribute_name": "57348", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "333033423500000" + }, + "0xe007": { + "attribute_id": "0xe007", + "attribute_name": "57351", + "value_type": [ + "0x31", + "enum16", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": 17432 + }, + "0xe008": { + "attribute_id": "0xe008", + "attribute_name": "57352", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Light" + }, + "0xe009": { + "attribute_id": "0xe009", + "attribute_name": "57353", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "CH10AX/SWITCH/1" + }, + "0xe00a": { + "attribute_id": "0xe00a", + "attribute_name": "57354", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Home" + }, + "0xe00b": { + "attribute_id": "0xe00b", + "attribute_name": "57355", + "value_type": [ + "0x42", + "CharacterString", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "reset_fact_default", + "command_arguments": "" + } + }, + "commands_generated": {} + }, + "0x0003": { + "cluster_id": "0x0003", + "title": "Identify", + "name": "identify", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "identify_time", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "identify_query_response", + "command_args": "" + } + } + }, + "0x0004": { + "cluster_id": "0x0004", + "title": "Groups", + "name": "groups", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "name_support", + "value_type": [ + "0x18", + "bitmap8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "add", + "command_arguments": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view", + "command_arguments": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "get_membership", + "command_arguments": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove", + "command_arguments": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "remove_all", + "command_arguments": "" + }, + "0x05": { + "command_id": "0x05", + "command_name": "add_if_identifying", + "command_arguments": "" + } + }, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "get_membership_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_response", + "command_args": "" + } + } + }, + "0x0005": { + "cluster_id": "0x0005", + "title": "Scenes", + "name": "scenes", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "count", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "current_scene", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "current_group", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0003": { + "attribute_id": "0x0003", + "attribute_name": "scene_valid", + "value_type": [ + "0x10", + "Bool", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0004": { + "attribute_id": "0x0004", + "attribute_name": "name_support", + "value_type": [ + "0x18", + "bitmap8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "add", + "command_arguments": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view", + "command_arguments": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "remove", + "command_arguments": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_all", + "command_arguments": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "store", + "command_arguments": "" + }, + "0x05": { + "command_id": "0x05", + "command_name": "recall", + "command_arguments": "" + }, + "0x06": { + "command_id": "0x06", + "command_name": "get_scene_membership", + "command_arguments": "" + } + }, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_scene_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "remove_scene_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_all_scenes_response", + "command_args": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "store_scene_response", + "command_args": "" + }, + "0x06": { + "command_id": "0x06", + "command_name": "get_scene_membership_response", + "command_args": "" + } + } + }, + "0x0006": { + "cluster_id": "0x0006", + "title": "On/Off", + "name": "on_off", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "on_off", + "value_type": [ + "0x10", + "Bool", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x4001": { + "attribute_id": "0x4001", + "attribute_name": "on_time", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 0 + }, + "0x4002": { + "attribute_id": "0x4002", + "attribute_name": "off_wait_time", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0xe000": { + "attribute_id": "0xe000", + "attribute_name": "57344", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0xe001": { + "attribute_id": "0xe001", + "attribute_name": "57345", + "value_type": [ + "0x23", + "uint32_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0xe002": { + "attribute_id": "0xe002", + "attribute_name": "57346", + "value_type": [ + "0x18", + "bitmap8", + "Discrete" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 1 + }, + "0xe003": { + "attribute_id": "0xe003", + "attribute_name": "57347", + "value_type": [ + "0x23", + "uint32_t", + "Analog" + ], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + } + }, + "commands_received": {}, + "commands_generated": {} + }, + "0x0b05": { + "cluster_id": "0x0b05", + "title": "Diagnostic", + "name": "diagnostic", + "attributes": { + "0x011c": { + "attribute_id": "0x011c", + "attribute_name": "last_message_lqi", + "value_type": [ + "0x20", + "uint8_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 124 + }, + "0x011d": { + "attribute_id": "0x011d", + "attribute_name": "last_message_rssi", + "value_type": [ + "0x28", + "int8s", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": -69 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": {} + } + }, + "out_clusters": { + "0x0019": { + "cluster_id": "0x0019", + "title": "Ota", + "name": "ota", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "upgrade_server_id", + "value_type": [ + "0xf0", + "EUI64", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": [ + 138, + 55, + 9, + 255, + 255, + 46, + 33, + 0 + ] + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "file_offset", + "value_type": [ + "0x23", + "uint32_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 4294967295 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "current_file_version", + "value_type": [ + "0x23", + "uint32_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 34211839 + }, + "0x0006": { + "attribute_id": "0x0006", + "attribute_name": "image_upgrade_status", + "value_type": [ + "0x30", + "enum8", + "Discrete" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0007": { + "attribute_id": "0x0007", + "attribute_name": "manufacturer_id", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 4190 + }, + "0x0008": { + "attribute_id": "0x0008", + "attribute_name": "image_type_id", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 65535 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": [ + "0x21", + "uint16_t", + "Analog" + ], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 3 + } + }, + "commands_received": {}, + "commands_generated": { + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + }, + "0x03": { + "command_id": "0x03", + "command_name": "3", + "command_args": "'not_in_zcl'" + }, + "0x06": { + "command_id": "0x06", + "command_name": "6", + "command_args": "'not_in_zcl'" + } + } + } + } + } + ] +} +``` + +
+ +#### FLS/AIRLINK/4 ❌ + +
+ Signature + +```json +{ + "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", + "endpoints": { + "21": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0x0020", + "0xff17" + ], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0019", + "0x0102" + ] + }, + "22": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0xff17" + ], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102" + ] + }, + "23": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0xff17" + ], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102" + ] + }, + "24": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": [ + "0x0000", + "0x0001", + "0x0003", + "0xff17" + ], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102" + ] + } + }, + "manufacturer": "Schneider Electric", + "model": "FLS/AIRLINK/4", + "class": "zigpy.device.Device" +} +``` + +
+ +#### FLS/SYSTEM-M/4 ❔ + +#### LK Switch + +#### NHPB/SWITCH/1 ❔ + +#### PUCK/SWITCH/1 ❔ + +
+ Jeedom logs +From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla/53420/700) + +> Équipement non reconnu, module Switch Schneider Electric Wiser CCT5011-0002W + +```json +{ + "ieee": "00:0d:6f:ff:fe:8f:c8:b1", + "nwk": 59911, + "status": 2, + "lqi": "167", + "rssi": "-73", + "last_seen": "1617385752.2766984", + "node_descriptor": "01:40:8e:5e:10:52:52:00:00:2c:52:00:00", + "endpoints": [ + { + "id": 1, + "status": 1, + "device_type": 256, + "profile_id": 260, + "manufacturer": "Schneider Electric", + "model": "PUCK\/SWITCH\/1", + "output_clusters": [ + { + "id": 25, + "name": "Ota", + "attributes": [] + } + ], + "input_clusters": [ + { + "id": 0, + "name": "Basic", + "attributes": [ + { + "id": 0, + "name": "zcl_version", + "value": 3 + }, + { + "id": 1, + "name": "app_version", + "value": 2 + }, + { + "id": 2, + "name": "stack_version", + "value": 6 + }, + { + "id": 3, + "name": "hw_version", + "value": 1 + }, + { + "id": 4, + "name": "manufacturer", + "value": "Schneider Electric" + }, + { + "id": 5, + "name": "model", + "value": "PUCK\/SWITCH\/1" + }, + { + "id": 6, + "name": "date_code", + "value": "" + }, + { + "id": 7, + "name": "power_source", + "value": 1 + }, + { + "id": 16384, + "name": "sw_build_id", + "value": "002.004.018 R" + } + ] + }, + { + "id": 3, + "name": "Identify", + "attributes": [] + }, + { + "id": 4, + "name": "Groups", + "attributes": [] + }, + { + "id": 5, + "name": "Scenes", + "attributes": [] + }, + { + "id": 6, + "name": "On\/Off", + "attributes": [] + }, + { + "id": 2821, + "name": "Diagnostic", + "attributes": [] + } + ] + }, + { + "id": 242, + "status": 1, + "device_type": 97, + "profile_id": 41440, + "manufacturer": null, + "model": null, + "output_clusters": [ + { + "id": 33, + "name": "GreenPowerProxy", + "attributes": [] + } + ], + "input_clusters": [] + } + ], + "signature": { + "manufacturer": "Schneider Electric", + "model": "PUCK\/SWITCH\/1", + "node_desc": { + "byte1": 1, + "byte2": 64, + "mac_capability_flags": 142, + "manufacturer_code": 4190, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": 256, + "input_clusters": [ + 0, + 3, + 4, + 5, + 6, + 2821 + ], + "output_clusters": [ + 25 + ] + }, + "242": { + "profile_id": 41440, + "device_type": 97, + "input_clusters": [], + "output_clusters": [ + 33 + ] + } + } + }, + "class": "zigpy.device" +} +``` + +
+ +#### U201SRY2KWZB ❔ + +#### U202SRY2KWZB ❔ + +### Dimmer + +#### CH/DIMMER/1 ❔ + +#### PUCK/DIMMER/1 ❔ + +
+ Jeedom logs + +From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla/53420/700) + +> Equipement reconnu, lumières dimmable module Schneider Electric Wiser CCT5010-0002W + +```json +{ + "ieee": "90:fd:9f:ff:fe:7f:a3:70", + "nwk": 26895, + "status": 2, + "lqi": "239", + "rssi": "-64", + "last_seen": "1617383914.5459597", + "node_descriptor": "01:40:8e:5e:10:52:52:00:00:2c:52:00:00", + "endpoints": [ + { + "id": 3, + "status": 1, + "device_type": 257, + "profile_id": 260, + "manufacturer": "Schneider Electric", + "model": "PUCK\/DIMMER\/1", + "output_clusters": [ + { + "id": 25, + "name": "Ota", + "attributes": [] + } + ], + "input_clusters": [ + { + "id": 0, + "name": "Basic", + "attributes": [ + { + "id": 0, + "name": "zcl_version", + "value": 3 + }, + { + "id": 1, + "name": "app_version", + "value": 2 + }, + { + "id": 2, + "name": "stack_version", + "value": 6 + }, + { + "id": 3, + "name": "hw_version", + "value": 1 + }, + { + "id": 4, + "name": "manufacturer", + "value": "Schneider Electric" + }, + { + "id": 5, + "name": "model", + "value": "PUCK\/DIMMER\/1" + }, + { + "id": 6, + "name": "date_code", + "value": "" + }, + { + "id": 7, + "name": "power_source", + "value": 1 + }, + { + "id": 16384, + "name": "sw_build_id", + "value": "002.004.018 R" + } + ] + }, + { + "id": 3, + "name": "Identify", + "attributes": [] + }, + { + "id": 4, + "name": "Groups", + "attributes": [] + }, + { + "id": 5, + "name": "Scenes", + "attributes": [] + }, + { + "id": 6, + "name": "On\/Off", + "attributes": [ + { + "id": 0, + "name": "on_off", + "value": 0 + } + ] + }, + { + "id": 8, + "name": "Level control", + "attributes": [ + { + "id": 0, + "name": "current_level", + "value": 254 + } + ] + }, + { + "id": 769, + "name": "Ballast", + "attributes": [] + }, + { + "id": 2821, + "name": "Diagnostic", + "attributes": [] + } + ] + }, + { + "id": 242, + "status": 1, + "device_type": 97, + "profile_id": 41440, + "manufacturer": null, + "model": null, + "output_clusters": [ + { + "id": 33, + "name": "GreenPowerProxy", + "attributes": [] + } + ], + "input_clusters": [] + } + ], + "signature": { + "manufacturer": "Schneider Electric", + "model": "PUCK\/DIMMER\/1", + "node_desc": { + "byte1": 1, + "byte2": 64, + "mac_capability_flags": 142, + "manufacturer_code": 4190, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "3": { + "profile_id": 260, + "device_type": 257, + "input_clusters": [ + 0, + 3, + 4, + 5, + 6, + 8, + 769, + 2821 + ], + "output_clusters": [ + 25 + ] + }, + "242": { + "profile_id": 41440, + "device_type": 97, + "input_clusters": [], + "output_clusters": [ + 33 + ] + } + } + }, + "class": "zigpy.device" +} +``` + +
+ +#### LK Dimmer + +#### NHPB/DIMMER/1 ❔ + +
+ Jeedom log + +From [Jeedom community](https://community.jeedom.com/t/ajout-bp-dimmer-schneider-wiser/62657) + +```json +{ + "ieee": "68:0a:e2:ff:fe:0e:6c:35", + "nwk": 41197, + "status": 2, + "lqi": "192", + "rssi": "-52", + "last_seen": "1622797736.8228328", + "node_descriptor": "01:40:8e:5e:10:52:52:00:00:2c:52:00:00", + "endpoints": [ + { + "id": 3, + "status": 1, + "device_type": 257, + "profile_id": 260, + "manufacturer": "Schneider Electric", + "model": "NHPB\/DIMMER\/1", + "output_clusters": [ + { + "id": 25, + "name": "Ota", + "attributes": [] + } + ], + "input_clusters": [ + { + "id": 0, + "name": "Basic", + "attributes": [ + { + "id": 0, + "name": "zcl_version", + "value": 3 + }, + { + "id": 1, + "name": "app_version", + "value": 2 + }, + { + "id": 2, + "name": "stack_version", + "value": 6 + }, + { + "id": 3, + "name": "hw_version", + "value": 1 + }, + { + "id": 4, + "name": "manufacturer", + "value": "Schneider Electric" + }, + { + "id": 5, + "name": "model", + "value": "NHPB\/DIMMER\/1" + }, + { + "id": 6, + "name": "date_code", + "value": "" + }, + { + "id": 7, + "name": "power_source", + "value": 1 + }, + { + "id": 16384, + "name": "sw_build_id", + "value": "002.004.015 R" + } + ] + }, + { + "id": 3, + "name": "Identify", + "attributes": [] + }, + { + "id": 4, + "name": "Groups", + "attributes": [] + }, + { + "id": 5, + "name": "Scenes", + "attributes": [] + }, + { + "id": 6, + "name": "On\/Off", + "attributes": [ + { + "id": 0, + "name": "on_off", + "value": 0 + } + ] + }, + { + "id": 8, + "name": "Level control", + "attributes": [ + { + "id": 0, + "name": "current_level", + "value": 146 + } + ] + }, + { + "id": 769, + "name": "Ballast", + "attributes": [] + }, + { + "id": 2821, + "name": "Diagnostic", + "attributes": [] + } + ] + }, + { + "id": 21, + "status": 1, + "device_type": 260, + "profile_id": 260, + "manufacturer": "Schneider Electric", + "model": "NHPB\/DIMMER\/1", + "output_clusters": [ + { + "id": 3, + "name": "Identify", + "attributes": [] + }, + { + "id": 4, + "name": "Groups", + "attributes": [] + }, + { + "id": 5, + "name": "Scenes", + "attributes": [] + }, + { + "id": 6, + "name": "On\/Off", + "attributes": [] + }, + { + "id": 8, + "name": "Level control", + "attributes": [] + }, + { + "id": 258, + "name": "Window Covering", + "attributes": [] + } + ], + "input_clusters": [ + { + "id": 0, + "name": "Basic", + "attributes": [ + { + "id": 0, + "name": "zcl_version", + "value": 3 + }, + { + "id": 1, + "name": "app_version", + "value": 2 + }, + { + "id": 2, + "name": "stack_version", + "value": 6 + }, + { + "id": 3, + "name": "hw_version", + "value": 1 + }, + { + "id": 4, + "name": "manufacturer", + "value": "Schneider Electric" + }, + { + "id": 5, + "name": "model", + "value": "NHPB\/DIMMER\/1" + }, + { + "id": 6, + "name": "date_code", + "value": "" + }, + { + "id": 7, + "name": "power_source", + "value": 1 + }, + { + "id": 16384, + "name": "sw_build_id", + "value": "002.004.015 R" + } + ] + }, + { + "id": 3, + "name": "Identify", + "attributes": [] + }, + { + "id": 2821, + "name": "Diagnostic", + "attributes": [] + }, + { + "id": 65303, + "name": "Manufacturer Specific", + "attributes": [] + } + ] + }, + { + "id": 242, + "status": 1, + "device_type": 97, + "profile_id": 41440, + "manufacturer": null, + "model": null, + "output_clusters": [ + { + "id": 33, + "name": "GreenPowerProxy", + "attributes": [] + } + ], + "input_clusters": [] + } + ], + "signature": { + "manufacturer": "Schneider Electric", + "model": "NHPB\/DIMMER\/1", + "node_desc": { + "byte1": 1, + "byte2": 64, + "mac_capability_flags": 142, + "manufacturer_code": 4190, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 11264, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "3": { + "profile_id": 260, + "device_type": 257, + "input_clusters": [ + 0, + 3, + 4, + 5, + 6, + 8, + 769, + 2821 + ], + "output_clusters": [ + 25 + ] + }, + "21": { + "profile_id": 260, + "device_type": 260, + "input_clusters": [ + 0, + 3, + 2821, + 65303 + ], + "output_clusters": [ + 3, + 4, + 5, + 6, + 8, + 258 + ] + }, + "242": { + "profile_id": 41440, + "device_type": 97, + "input_clusters": [], + "output_clusters": [ + 33 + ] + } + } + }, + "class": "zigpy.device" +} +``` + +
+ +#### NHROTARY/DIMMER/1 ❔ + +#### U201DST600ZB ❔ + +#### U202DST600ZB ❔ + +### Plug + +#### CH/Socket/2 ❔ + +#### EH-ZB-SPD-V2 ❔ + +#### LK/OUTLET/1 ❔ + +#### SOCKET/OUTLET/1 ❔ + +#### SOCKET/OUTLET/2 ❔ + +#### SMARTPLUG/1 ❔ + +### Thermostat + +#### CCTFR6700 ❔ + +From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-schneider-wiser-cctfr6700/582050) + +#### EH-ZB-VACT ❔ + +#### EH-ZB-RTS ❔ + +#### EH-ZB-HACT ❔ + +#### Thermostat ❔ + +
+ Jeedom logs + +From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla/53420/700) + +> Thermostat schneider modèle CCTFR6400 reconnu mais l’humidité ne remonte pas en valeur. +> En modifiant la valeur du LogicalID en 1::1029::0 j’ai bien le retour de la valeur. + +> (c’est bien le 38:: qu’il faut passer en 1:: ) + +```json +{ + "ieee": "68:0a:e2:ff:fe:f0:3d:ec", + "nwk": 4006, + "status": 2, + "lqi": "255", + "rssi": "-61", + "last_seen": "1617387095.1353316", + "node_descriptor": "02:40:80:5e:10:52:52:00:00:00:52:00:00", + "endpoints": [ + { + "id": 1, + "status": 1, + "device_type": 770, + "profile_id": 260, + "manufacturer": "Schneider Electric", + "model": "Thermostat", + "output_clusters": [ + { + "id": 0, + "name": "Basic", + "attributes": [] + }, + { + "id": 25, + "name": "Ota", + "attributes": [] + }, + { + "id": 513, + "name": "Thermostat", + "attributes": [] + } + ], + "input_clusters": [ + { + "id": 0, + "name": "Basic", + "attributes": [ + { + "id": 0, + "name": "zcl_version", + "value": 2 + }, + { + "id": 1, + "name": "app_version", + "value": 0 + }, + { + "id": 3, + "name": "hw_version", + "value": 1 + }, + { + "id": 4, + "name": "manufacturer", + "value": "Schneider Electric" + }, + { + "id": 5, + "name": "model", + "value": "Thermostat" + }, + { + "id": 7, + "name": "power_source", + "value": 3 + }, + { + "id": 16384, + "name": "sw_build_id", + "value": "bc271cf" + } + ] + }, + { + "id": 1, + "name": "Power Configuration", + "attributes": [] + }, + { + "id": 3, + "name": "Identify", + "attributes": [] + }, + { + "id": 32, + "name": "Poll Control", + "attributes": [ + { + "id": 0, + "name": "checkin_interval", + "value": 14400 + } + ] + }, + { + "id": 516, + "name": "Thermostat User Interface Configuration", + "attributes": [] + }, + { + "id": 1026, + "name": "Temperature Measurement", + "attributes": [ + { + "id": 0, + "name": "measured_value", + "value": 2628 + } + ] + }, + { + "id": 1029, + "name": "Relative Humidity Measurement", + "attributes": [ + { + "id": 0, + "name": "measured_value", + "value": 3780 + } + ] + }, + { + "id": 2821, + "name": "Diagnostic", + "attributes": [ + { + "id": 284, + "name": "last_message_lqi", + "value": 208 + }, + { + "id": 285, + "name": "last_message_rssi", + "value": -48 + } + ] + }, + { + "id": 65027, + "name": "Manufacturer Specific", + "attributes": [] + } + ] + } + ], + "signature": { + "manufacturer": "Schneider Electric", + "model": "Thermostat", + "node_desc": { + "byte1": 2, + "byte2": 64, + "mac_capability_flags": 128, + "manufacturer_code": 4190, + "maximum_buffer_size": 82, + "maximum_incoming_transfer_size": 82, + "server_mask": 0, + "maximum_outgoing_transfer_size": 82, + "descriptor_capability_field": 0 + }, + "endpoints": { + "1": { + "profile_id": 260, + "device_type": 770, + "input_clusters": [ + 0, + 1, + 3, + 32, + 516, + 1026, + 1029, + 2821, + 65027 + ], + "output_clusters": [ + 0, + 25, + 513 + ] + } + } + }, + "class": "zigpy.device" +} +``` + +
+ +#### iTRV ❔ + +### Motion + +#### CCT595011_AS ❔ + +#### NHMOTION/SWITCH/1 ❔ + +### MISC + +#### CCT592011_AS ❔ + +#### EH-ZB-LMACT ❔ From c9ac278ee57a707cb3ab9f384e15839421132dd6 Mon Sep 17 00:00:00 2001 From: Axel Le Bot Date: Tue, 30 Aug 2022 12:56:08 +0200 Subject: [PATCH 10/15] Add SEOnOff cluster --- zhaquirks/schneiderelectric/__init__.py | 76 ++++++++++++++----------- 1 file changed, 44 insertions(+), 32 deletions(-) diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index 6d65b2fc4e..2fefc6b230 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -4,14 +4,14 @@ from zigpy.quirks import CustomCluster import zigpy.types as t from zigpy.zcl.clusters.closures import WindowCovering -from zigpy.zcl.clusters.general import Basic +from zigpy.zcl.clusters.general import Basic, OnOff from zigpy.zcl.clusters.homeautomation import Diagnostic from zigpy.zcl.foundation import ZCLAttributeDef _LOGGER = logging.getLogger(__name__) SE_MANUF_NAME = "Schneider Electric" -SE_MANUF_ID = 4190 +SE_MANUF_ID = 0x4190 # Attribute IDs ATTR_CURRENT_POSITION_LIFT_PERCENTAGE = 0x0008 @@ -36,48 +36,46 @@ class SEBasicCluster(SEManufCluster, Basic): 0xE001: ( "se_sw_build_id", t.CharacterString, - ), # attribute_name:"57345" # ex: "002.004.016 R + ), # value: "002.004.016 R 0xE002: ( "unknown_attribute_57346", t.CharacterString, - ), # attribute_name:"57346" # ex: "001.000.000" + ), # value: "001.000.000" 0xE004: ( "unknown_attribute_57348", t.CharacterString, - ), # attribute_name:"57348" # ex: "213249FEFF5ECFD" - 0xE007: ("unknown_attribute_57351", t.enum16), # attribute_name:"57351" + ), # value: "213249FEFF5ECFD" + 0xE007: ("unknown_attribute_57351", t.enum16), 0xE008: ( "se_device_type", t.CharacterString, - ), # attribute_name:"57352" # ex: "Wiser Light" + ), # value: "Wiser Light" 0xE009: ( "se_model", t.CharacterString, - ), # attribute_name:"57353" # ex: "NHPB/SHUTTER/1" + ), # value: "NHPB/SHUTTER/1" 0xE00A: ( "se_realm", t.CharacterString, - ), # attribute_name:"57354" # ex: "Wiser Home" + ), # value: "Wiser Home" 0xE00B: ( "unknown_attribute_57355", t.CharacterString, - ), # attribute_name:"57355" + ), } ) -class SESpecificCluster(SEManufCluster): - cluster_id = 0xFF17 - - attributes = { - 0x0000: ("unknown_attribute_0", t.enum8), # attribute_name:"0" - 0x0001: ("unknown_attribute_1", t.enum8), # attribute_name:"1" - 0x0010: ("unknown_attribute_16", t.uint8_t), # attribute_name:"16" - 0x0011: ("unknown_attribute_17", t.uint16_t), # attribute_name:"17" - 0x0020: ("unknown_attribute_32", t.uint8_t), # attribute_name:"32" - 0x0021: ("unknown_attribute_33", t.uint16_t), # attribute_name:"33" - 0xFFFD: ("unknown_attribute_65533", t.uint16_t), # attribute_name:"65533" - } +class SEOnOff(SEManufCluster, OnOff): + attributes = OnOff.attributes.copy() + attributes.update( + { + 0xE000: ("unknown_attribute_57344", t.uint16_t), + 0xE001: ("unknown_attribute_57345", t.uint32_t), + 0xE002: ("unknown_attribute_57346", t.bitmap8), + 0xE003: ("unknown_attribute_57347", t.uint32_t), + } + ) class SEWindowCovering(SEManufCluster, WindowCovering): @@ -87,15 +85,15 @@ class SEWindowCovering(SEManufCluster, WindowCovering): attributes.update( { - 0xFFFD: ("unknown_attribute_65533", t.uint16_t), # attribute_name:"65533" - 0xE000: ("lift_duration", t.uint16_t), # attribute_name:"57344" - 0xE010: ("unknown_attribute_57360", t.bitmap8), # attribute_name:"57360" - 0xE012: ("unknown_attribute_57362", t.uint16_t), # attribute_name:"57362" - 0xE013: ("unknown_attribute_57363", t.bitmap8), # attribute_name:"57363" - 0xE014: ("unknown_attribute_57364", t.uint16_t), # attribute_name:"57364" - 0xE015: ("unknown_attribute_57365", t.uint16_t), # attribute_name:"57365" - 0xE016: ("unknown_attribute_57366", t.uint16_t), # attribute_name:"57366" - 0xE017: ("unknown_attribute_57367", t.uint8_t), # attribute_name:"57367" + 0xFFFD: ("unknown_attribute_65533", t.uint16_t), + 0xE000: ("lift_duration", t.uint16_t), + 0xE010: ("unknown_attribute_57360", t.bitmap8), + 0xE012: ("unknown_attribute_57362", t.uint16_t), + 0xE013: ("unknown_attribute_57363", t.bitmap8), + 0xE014: ("unknown_attribute_57364", t.uint16_t), + 0xE015: ("unknown_attribute_57365", t.uint16_t), + 0xE016: ("unknown_attribute_57366", t.uint16_t), + 0xE017: ("unknown_attribute_57367", t.uint8_t), } ) @@ -130,6 +128,20 @@ class SEDiagnostic(CustomCluster, Diagnostic): # TODO: Check -> this attr don't seems to be manufacturer related (no "manf_id") attributes.update( { - 0xFFFD: ("unknown_attribute_65533", t.uint16_t), # attribute_name:"65533" + 0xFFFD: ("unknown_attribute_65533", t.uint16_t), } ) + + +class SESpecificCluster(SEManufCluster): + cluster_id = 0xFF17 + + attributes = { + 0x0000: ("unknown_attribute_0", t.enum8), + 0x0001: ("unknown_attribute_1", t.enum8), + 0x0010: ("unknown_attribute_16", t.uint8_t), + 0x0011: ("unknown_attribute_17", t.uint16_t), + 0x0020: ("unknown_attribute_32", t.uint8_t), + 0x0021: ("unknown_attribute_33", t.uint16_t), + 0xFFFD: ("unknown_attribute_65533", t.uint16_t), + } From f3ba3234a32413bc21abd404120e69b593f1a5fd Mon Sep 17 00:00:00 2001 From: Axel Le Bot Date: Tue, 30 Aug 2022 15:17:20 +0200 Subject: [PATCH 11/15] Add CH2AX/SWITCH/1 signature --- zhaquirks/schneiderelectric/README.md | 58 ++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/zhaquirks/schneiderelectric/README.md b/zhaquirks/schneiderelectric/README.md index 449092b6a0..5aab247131 100644 --- a/zhaquirks/schneiderelectric/README.md +++ b/zhaquirks/schneiderelectric/README.md @@ -1,6 +1,5 @@ # Schneider Electric - - [Schneider Electric](#schneider-electric) - [Introduction](#introduction) - [Helpers](#helpers) @@ -2021,6 +2020,63 @@ From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla #### CH2AX/SWITCH/1 ❔ +
+ Signature + +```json +{ + "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", + "endpoints": { + "1": { + "profile_id": 260, + "device_type": "0x0100", + "in_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0b05" + ], + "out_clusters": [ + "0x0019" + ] + }, + "21": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": [ + "0x0000", + "0x0003", + "0x0b05", + "0xff17" + ], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102" + ] + }, + "242": { + "profile_id": 41440, + "device_type": "0x0061", + "in_clusters": [], + "out_clusters": [ + "0x0021" + ] + } + }, + "manufacturer": "Schneider Electric", + "model": "CH2AX/SWITCH/1", + "class": "zigpy.device.Device" +} +``` + +
+ #### CH10AX/SWITCH/1 ❌
From 3829121c122368717e2146d438aa64d9e583e4f5 Mon Sep 17 00:00:00 2001 From: Axel Le Bot Date: Tue, 30 Aug 2022 16:43:22 +0200 Subject: [PATCH 12/15] Add found dimmer/thermostat mode --- zhaquirks/schneiderelectric/__init__.py | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index 2fefc6b230..8e9f12dd67 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -145,3 +145,33 @@ class SESpecificCluster(SEManufCluster): 0x0021: ("unknown_attribute_33", t.uint16_t), 0xFFFD: ("unknown_attribute_65533", t.uint16_t), } + + +class SEPiloteMode(int): + ''' + Might be useful for : + - CCTFR6700 (manufacturerCode seems diff: 0x105e) + ''' + Contactor=1 + Pilot=3 + +class WiserDimmerMode(int): + ''' + Might be useful for : + - PUCK/DIMMER/ + - NHROTARY/DIMMER/1 + ''' + Auto = 0 + RC = 1 + RL = 2 + RL_LED = 3 + + +class SEDimmerMode(): + ''' + Might be useful for : + - LK Dimmer (manufacturerCode seems diff: 0x105e) + ''' + RC = 1 + RL = 2 + From e01b59073352f7342a9d5a059d593b0d1d73066c Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Wed, 31 Aug 2022 12:27:57 +0200 Subject: [PATCH 13/15] Add CH2AX/SWITCH/1 scan --- zhaquirks/schneiderelectric/README.md | 1265 ++++++++++++++++++++++++- 1 file changed, 1258 insertions(+), 7 deletions(-) diff --git a/zhaquirks/schneiderelectric/README.md b/zhaquirks/schneiderelectric/README.md index 5aab247131..9c5a339525 100644 --- a/zhaquirks/schneiderelectric/README.md +++ b/zhaquirks/schneiderelectric/README.md @@ -1,4 +1,4 @@ -# Schneider Electric +# Schneider Electric - [Schneider Electric](#schneider-electric) - [Introduction](#introduction) @@ -9,14 +9,13 @@ - [PUCK/SHUTTER/1 ❌](#puckshutter1-) - [1GANG/SHUTTER/1 ❔](#1gangshutter1-) - [Switch](#switch) - - [PUCK/SWITCH/1 ❔](#puckswitch1-) - [CH2AX/SWITCH/1 ❔](#ch2axswitch1-) - [CH10AX/SWITCH/1 ❌](#ch10axswitch1-) - [FLS/AIRLINK/4 ❌](#flsairlink4-) - [FLS/SYSTEM-M/4 ❔](#flssystem-m4-) - [LK Switch](#lk-switch) - [NHPB/SWITCH/1 ❔](#nhpbswitch1-) - - [PUCK/SWITCH/1 ❔](#puckswitch1--1) + - [PUCK/SWITCH/1 ❔](#puckswitch1-) - [U201SRY2KWZB ❔](#u201sry2kwzb-) - [U202SRY2KWZB ❔](#u202sry2kwzb-) - [Dimmer](#dimmer) @@ -61,7 +60,7 @@ Status : - ✅ : Supported - ❌ : Not supported - 🆗 : No quirk needed -- ❔ : Unknown +- ❔ : Unknown ## Helpers @@ -1843,7 +1842,7 @@ Lift percentage is reversed
Jeedom logs From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla/53420/699) - + > Volets roulants module Schneider Electric Wiser CCT5015-0002W ```json @@ -2016,8 +2015,6 @@ From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla ### Switch -#### PUCK/SWITCH/1 ❔ - #### CH2AX/SWITCH/1 ❔
@@ -2077,6 +2074,1260 @@ From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla
+
+ zha_toolkit.scan_device + +```json +{ + "ieee": "2c:11:65:00:00:00:00:00", + "nwk": "0xdb05", + "model": "CH2AX/SWITCH/1", + "manufacturer": "Schneider Electric", + "manufacturer_id": "0x4190", + "endpoints": [ + { + "id": 1, + "device_type": "0x0100", + "profile": "0x0104", + "in_clusters": { + "0x0000": { + "cluster_id": "0x0000", + "title": "Basic", + "name": "basic", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "zcl_version", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 3 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "app_version", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "stack_version", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 6 + }, + "0x0003": { + "attribute_id": "0x0003", + "attribute_name": "hw_version", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0004": { + "attribute_id": "0x0004", + "attribute_name": "manufacturer", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "Schneider Electric" + }, + "0x0005": { + "attribute_id": "0x0005", + "attribute_name": "model", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "CH2AX/SWITCH/1" + }, + "0x0006": { + "attribute_id": "0x0006", + "attribute_name": "date_code", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x0007": { + "attribute_id": "0x0007", + "attribute_name": "power_source", + "value_type": ["0x30", "enum8", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0008": { + "attribute_id": "0x0008", + "attribute_name": "generic_device_class", + "value_type": ["0x30", "enum8", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0009": { + "attribute_id": "0x0009", + "attribute_name": "generic_device_type", + "value_type": ["0x30", "enum8", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 225 + }, + "0x000a": { + "attribute_id": "0x000a", + "attribute_name": "product_code", + "value_type": ["0x41", "LVBytes", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x000b": { + "attribute_id": "0x000b", + "attribute_name": "product_url", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "http://www.schneider-electric.com" + }, + "0x4000": { + "attribute_id": "0x4000", + "attribute_name": "sw_build_id", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "002.005.007 R" + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0xe001": { + "attribute_id": "0xe001", + "attribute_name": "57345", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "002.005.007 R" + }, + "0xe002": { + "attribute_id": "0xe002", + "attribute_name": "57346", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "001.000.000" + }, + "0xe004": { + "attribute_id": "0xe004", + "attribute_name": "57348", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "C5F121FEFF65112" + }, + "0xe007": { + "attribute_id": "0xe007", + "attribute_name": "57351", + "value_type": ["0x31", "enum16", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": 17433 + }, + "0xe008": { + "attribute_id": "0xe008", + "attribute_name": "57352", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Light" + }, + "0xe009": { + "attribute_id": "0xe009", + "attribute_name": "57353", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "CH2AX/SWITCH/1" + }, + "0xe00a": { + "attribute_id": "0xe00a", + "attribute_name": "57354", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Home" + }, + "0xe00b": { + "attribute_id": "0xe00b", + "attribute_name": "57355", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "reset_fact_default", + "command_arguments": "" + } + }, + "commands_generated": {} + }, + "0x0003": { + "cluster_id": "0x0003", + "title": "Identify", + "name": "identify", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "identify_time", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "identify_query_response", + "command_args": "" + } + } + }, + "0x0004": { + "cluster_id": "0x0004", + "title": "Groups", + "name": "groups", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "name_support", + "value_type": ["0x18", "bitmap8", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "add", + "command_arguments": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view", + "command_arguments": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "get_membership", + "command_arguments": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove", + "command_arguments": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "remove_all", + "command_arguments": "" + }, + "0x05": { + "command_id": "0x05", + "command_name": "add_if_identifying", + "command_arguments": "" + } + }, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "get_membership_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_response", + "command_args": "" + } + } + }, + "0x0005": { + "cluster_id": "0x0005", + "title": "Scenes", + "name": "scenes", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "count", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "current_scene", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "current_group", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0003": { + "attribute_id": "0x0003", + "attribute_name": "scene_valid", + "value_type": ["0x10", "Bool", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0004": { + "attribute_id": "0x0004", + "attribute_name": "name_support", + "value_type": ["0x18", "bitmap8", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "add", + "command_arguments": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view", + "command_arguments": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "remove", + "command_arguments": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_all", + "command_arguments": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "store", + "command_arguments": "" + }, + "0x05": { + "command_id": "0x05", + "command_name": "recall", + "command_arguments": "" + }, + "0x06": { + "command_id": "0x06", + "command_name": "get_scene_membership", + "command_arguments": "" + } + }, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_scene_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "remove_scene_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_all_scenes_response", + "command_args": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "store_scene_response", + "command_args": "" + }, + "0x06": { + "command_id": "0x06", + "command_name": "get_scene_membership_response", + "command_args": "" + } + } + }, + "0x0006": { + "cluster_id": "0x0006", + "title": "On/Off", + "name": "on_off", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "on_off", + "value_type": ["0x10", "Bool", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x4001": { + "attribute_id": "0x4001", + "attribute_name": "on_time", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 0 + }, + "0x4002": { + "attribute_id": "0x4002", + "attribute_name": "off_wait_time", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0xe000": { + "attribute_id": "0xe000", + "attribute_name": "57344", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0xe001": { + "attribute_id": "0xe001", + "attribute_name": "57345", + "value_type": ["0x23", "uint32_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0xe002": { + "attribute_id": "0xe002", + "attribute_name": "57346", + "value_type": ["0x18", "bitmap8", "Discrete"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 1 + }, + "0xe003": { + "attribute_id": "0xe003", + "attribute_name": "57347", + "value_type": ["0x23", "uint32_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + } + }, + "commands_received": {}, + "commands_generated": {} + }, + "0x0b05": { + "cluster_id": "0x0b05", + "title": "Diagnostic", + "name": "diagnostic", + "attributes": { + "0x011c": { + "attribute_id": "0x011c", + "attribute_name": "last_message_lqi", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 120 + }, + "0x011d": { + "attribute_id": "0x011d", + "attribute_name": "last_message_rssi", + "value_type": ["0x28", "int8s", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": -70 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": {} + } + }, + "out_clusters": { + "0x0019": { + "cluster_id": "0x0019", + "title": "Ota", + "name": "ota", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "upgrade_server_id", + "value_type": ["0xf0", "EUI64", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": [138, 55, 9, 255, 255, 46, 33, 0] + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "file_offset", + "value_type": ["0x23", "uint32_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 4294967295 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "current_file_version", + "value_type": ["0x23", "uint32_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 33884159 + }, + "0x0006": { + "attribute_id": "0x0006", + "attribute_name": "image_upgrade_status", + "value_type": ["0x30", "enum8", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0007": { + "attribute_id": "0x0007", + "attribute_name": "manufacturer_id", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 4190 + }, + "0x0008": { + "attribute_id": "0x0008", + "attribute_name": "image_type_id", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 65535 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 3 + } + }, + "commands_received": {}, + "commands_generated": { + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + }, + "0x03": { + "command_id": "0x03", + "command_name": "3", + "command_args": "'not_in_zcl'" + }, + "0x06": { + "command_id": "0x06", + "command_name": "6", + "command_args": "'not_in_zcl'" + } + } + } + } + }, + { + "id": 21, + "device_type": "0x0104", + "profile": "0x0104", + "in_clusters": { + "0x0000": { + "cluster_id": "0x0000", + "title": "Basic", + "name": "basic", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "zcl_version", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 3 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "app_version", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0x0002": { + "attribute_id": "0x0002", + "attribute_name": "stack_version", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 6 + }, + "0x0003": { + "attribute_id": "0x0003", + "attribute_name": "hw_version", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0004": { + "attribute_id": "0x0004", + "attribute_name": "manufacturer", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "Schneider Electric" + }, + "0x0005": { + "attribute_id": "0x0005", + "attribute_name": "model", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "CH2AX/SWITCH/1" + }, + "0x0006": { + "attribute_id": "0x0006", + "attribute_name": "date_code", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x0007": { + "attribute_id": "0x0007", + "attribute_name": "power_source", + "value_type": ["0x30", "enum8", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + }, + "0x0008": { + "attribute_id": "0x0008", + "attribute_name": "generic_device_class", + "value_type": ["0x30", "enum8", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 0 + }, + "0x0009": { + "attribute_id": "0x0009", + "attribute_name": "generic_device_type", + "value_type": ["0x30", "enum8", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 225 + }, + "0x000a": { + "attribute_id": "0x000a", + "attribute_name": "product_code", + "value_type": ["0x41", "LVBytes", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "" + }, + "0x000b": { + "attribute_id": "0x000b", + "attribute_name": "product_url", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "http://www.schneider-electric.com" + }, + "0x4000": { + "attribute_id": "0x4000", + "attribute_name": "sw_build_id", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": "002.005.007 R" + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + }, + "0xe001": { + "attribute_id": "0xe001", + "attribute_name": "57345", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "002.005.007 R" + }, + "0xe002": { + "attribute_id": "0xe002", + "attribute_name": "57346", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "001.000.000" + }, + "0xe004": { + "attribute_id": "0xe004", + "attribute_name": "57348", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "C5F121FEFF65112" + }, + "0xe007": { + "attribute_id": "0xe007", + "attribute_name": "57351", + "value_type": ["0x31", "enum16", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": 17433 + }, + "0xe008": { + "attribute_id": "0xe008", + "attribute_name": "57352", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Light" + }, + "0xe009": { + "attribute_id": "0xe009", + "attribute_name": "57353", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "CH2AX/SWITCH/1" + }, + "0xe00a": { + "attribute_id": "0xe00a", + "attribute_name": "57354", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": "Wiser Home" + }, + "0xe00b": { + "attribute_id": "0xe00b", + "attribute_name": "57355", + "value_type": ["0x42", "CharacterString", "Discrete"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "reset_fact_default", + "command_arguments": "" + } + }, + "commands_generated": {} + }, + "0x0003": { + "cluster_id": "0x0003", + "title": "Identify", + "name": "identify", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "identify_time", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "identify_query_response", + "command_args": "" + } + } + }, + "0x0b05": { + "cluster_id": "0x0b05", + "title": "Diagnostic", + "name": "diagnostic", + "attributes": { + "0x011c": { + "attribute_id": "0x011c", + "attribute_name": "last_message_lqi", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 120 + }, + "0x011d": { + "attribute_id": "0x011d", + "attribute_name": "last_message_rssi", + "value_type": ["0x28", "int8s", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": -70 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": {} + }, + "0xff17": { + "cluster_id": "0xff17", + "title": "Manufacturer Specific", + "name": "manufacturer_specific", + "attributes": { + "0x0000": { + "attribute_id": "0x0000", + "attribute_name": "0", + "value_type": ["0x30", "enum8", "Discrete"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 2 + }, + "0x0001": { + "attribute_id": "0x0001", + "attribute_name": "1", + "value_type": ["0x30", "enum8", "Discrete"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 7 + }, + "0x0010": { + "attribute_id": "0x0010", + "attribute_name": "16", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0x0011": { + "attribute_id": "0x0011", + "attribute_name": "17", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0x0020": { + "attribute_id": "0x0020", + "attribute_name": "32", + "value_type": ["0x20", "uint8_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 1 + }, + "0x0021": { + "attribute_id": "0x0021", + "attribute_name": "33", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|WRITE|READ", + "access_acl": 7, + "manf_id": 4190, + "attribute_value": 0 + }, + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "manf_id": 4190, + "attribute_value": 1 + } + }, + "commands_received": {}, + "commands_generated": {} + } + }, + "out_clusters": { + "0x0003": { + "cluster_id": "0x0003", + "title": "Identify", + "name": "identify", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + } + }, + "commands_received": { + "0x00": { + "command_id": "0x00", + "command_name": "identify", + "command_arguments": "" + } + }, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "identify_query_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + } + } + }, + "0x0004": { + "cluster_id": "0x0004", + "title": "Groups", + "name": "groups", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 1 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "get_membership_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_response", + "command_args": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "4", + "command_args": "'not_in_zcl'" + }, + "0x05": { + "command_id": "0x05", + "command_name": "5", + "command_args": "'not_in_zcl'" + } + } + }, + "0x0005": { + "cluster_id": "0x0005", + "title": "Scenes", + "name": "scenes", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "add_scene_response", + "command_args": "" + }, + "0x01": { + "command_id": "0x01", + "command_name": "view_response", + "command_args": "" + }, + "0x02": { + "command_id": "0x02", + "command_name": "remove_scene_response", + "command_args": "" + }, + "0x03": { + "command_id": "0x03", + "command_name": "remove_all_scenes_response", + "command_args": "" + }, + "0x04": { + "command_id": "0x04", + "command_name": "store_scene_response", + "command_args": "" + }, + "0x05": { + "command_id": "0x05", + "command_name": "5", + "command_args": "'not_in_zcl'" + }, + "0x06": { + "command_id": "0x06", + "command_name": "get_scene_membership_response", + "command_args": "" + } + } + }, + "0x0006": { + "cluster_id": "0x0006", + "title": "On/Off", + "name": "on_off", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "0", + "command_args": "'not_in_zcl'" + }, + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + }, + "0x02": { + "command_id": "0x02", + "command_name": "2", + "command_args": "'not_in_zcl'" + } + } + }, + "0x0008": { + "cluster_id": "0x0008", + "title": "Level control", + "name": "level", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "cluster_revision", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "0", + "command_args": "'not_in_zcl'" + }, + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + }, + "0x02": { + "command_id": "0x02", + "command_name": "2", + "command_args": "'not_in_zcl'" + }, + "0x03": { + "command_id": "0x03", + "command_name": "3", + "command_args": "'not_in_zcl'" + }, + "0x04": { + "command_id": "0x04", + "command_name": "4", + "command_args": "'not_in_zcl'" + }, + "0x05": { + "command_id": "0x05", + "command_name": "5", + "command_args": "'not_in_zcl'" + }, + "0x06": { + "command_id": "0x06", + "command_name": "6", + "command_args": "'not_in_zcl'" + }, + "0x07": { + "command_id": "0x07", + "command_name": "7", + "command_args": "'not_in_zcl'" + } + } + }, + "0x0102": { + "cluster_id": "0x0102", + "title": "Window Covering", + "name": "window_covering", + "attributes": { + "0xfffd": { + "attribute_id": "0xfffd", + "attribute_name": "65533", + "value_type": ["0x21", "uint16_t", "Analog"], + "access": "REPORT|READ", + "access_acl": 5, + "attribute_value": 2 + } + }, + "commands_received": {}, + "commands_generated": { + "0x00": { + "command_id": "0x00", + "command_name": "0", + "command_args": "'not_in_zcl'" + }, + "0x01": { + "command_id": "0x01", + "command_name": "1", + "command_args": "'not_in_zcl'" + }, + "0x02": { + "command_id": "0x02", + "command_name": "2", + "command_args": "'not_in_zcl'" + } + } + } + } + }, + { + "id": 242, + "device_type": "0x0061", + "profile": "0xa1e0" + } + ] +} +``` + +
+ #### CH10AX/SWITCH/1 ❌
From 6b90d190070f155ab79de07ff0d042c2b3bbdd44 Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Wed, 31 Aug 2022 13:16:03 +0200 Subject: [PATCH 14/15] Refactor modules - Add CH2AX/SWITCH/1 signature --- tests/test_schneiderelectric.py | 54 +++++- zhaquirks/schneiderelectric/README.md | 18 +- zhaquirks/schneiderelectric/__init__.py | 170 ----------------- .../schneiderelectric/clusters/__init__.py | 172 ++++++++++++++++++ .../{ => devices}/shutters.py | 2 + .../{ => devices}/switches.py | 20 +- 6 files changed, 249 insertions(+), 187 deletions(-) create mode 100644 zhaquirks/schneiderelectric/clusters/__init__.py rename zhaquirks/schneiderelectric/{ => devices}/shutters.py (98%) rename zhaquirks/schneiderelectric/{ => devices}/switches.py (89%) diff --git a/tests/test_schneiderelectric.py b/tests/test_schneiderelectric.py index b0d05856e4..b6b13f9e96 100644 --- a/tests/test_schneiderelectric.py +++ b/tests/test_schneiderelectric.py @@ -2,8 +2,8 @@ from zigpy.zcl import foundation -import zhaquirks.schneiderelectric.shutters -import zhaquirks.schneiderelectric.switches +import zhaquirks.schneiderelectric.devices.shutters +import zhaquirks.schneiderelectric.devices.switches zhaquirks.setup() @@ -121,7 +121,53 @@ async def test_fls_air_link_4_signature(assert_signature_matches_quirk): "class": "zigpy.device.Device", } assert_signature_matches_quirk( - zhaquirks.schneiderelectric.switches.FLSAirlink4, signature + zhaquirks.schneiderelectric.devices.switches.FLSAirlink4, signature + ) + + +async def test_ch2ax_switch_1_signature(assert_signature_matches_quirk): + signature = { + "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", + "endpoints": { + "1": { + "profile_id": 260, + "device_type": "0x0100", + "in_clusters": [ + "0x0000", + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0b05", + ], + "out_clusters": ["0x0019"], + }, + "21": { + "profile_id": 260, + "device_type": "0x0104", + "in_clusters": ["0x0000", "0x0003", "0x0b05", "0xff17"], + "out_clusters": [ + "0x0003", + "0x0004", + "0x0005", + "0x0006", + "0x0008", + "0x0102", + ], + }, + "242": { + "profile_id": 41440, + "device_type": "0x0061", + "in_clusters": [], + "out_clusters": ["0x0021"], + }, + }, + "manufacturer": "Schneider Electric", + "model": "CH2AX/SWITCH/1", + "class": "zigpy.device.Device", + } + assert_signature_matches_quirk( + zhaquirks.schneiderelectric.devices.switches.CHxAXSwitch1, signature ) @@ -167,5 +213,5 @@ async def test_ch10ax_switch_1_signature(assert_signature_matches_quirk): "class": "zigpy.device.Device", } assert_signature_matches_quirk( - zhaquirks.schneiderelectric.switches.CH10AXSwitch1, signature + zhaquirks.schneiderelectric.devices.switches.CHxAXSwitch1, signature ) diff --git a/zhaquirks/schneiderelectric/README.md b/zhaquirks/schneiderelectric/README.md index 9c5a339525..e47bc6cd83 100644 --- a/zhaquirks/schneiderelectric/README.md +++ b/zhaquirks/schneiderelectric/README.md @@ -5,11 +5,11 @@ - [Helpers](#helpers) - [Devices](#devices) - [Shutter](#shutter) - - [NHPB/SHUTTER/1 ❔](#nhpbshutter1-) + - [NHPB/SHUTTER/1 ❌](#nhpbshutter1-) - [PUCK/SHUTTER/1 ❌](#puckshutter1-) - [1GANG/SHUTTER/1 ❔](#1gangshutter1-) - [Switch](#switch) - - [CH2AX/SWITCH/1 ❔](#ch2axswitch1-) + - [CH2AX/SWITCH/1 ❌](#ch2axswitch1-) - [CH10AX/SWITCH/1 ❌](#ch10axswitch1-) - [FLS/AIRLINK/4 ❌](#flsairlink4-) - [FLS/SYSTEM-M/4 ❔](#flssystem-m4-) @@ -53,7 +53,7 @@ The purpose of this file is to list all Zigbee capable device from Schneider Ele All devices are listed alphabetically based on the Zigbee `model (0x0005)` attribute from `Basic (0x0000)` cluster. -All quirk infos should remain in basecode. +All quirk infos should remain in basecode. Status : @@ -79,7 +79,7 @@ Sources : Lift percentage is reversed -#### NHPB/SHUTTER/1 ❔ +#### NHPB/SHUTTER/1 ❌
Device signature @@ -2015,7 +2015,7 @@ From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla ### Switch -#### CH2AX/SWITCH/1 ❔ +#### CH2AX/SWITCH/1 ❌
Signature @@ -4245,6 +4245,14 @@ From [Jeedom community](https://community.jeedom.com/t/plugin-zigbee-beta-blabla #### FLS/AIRLINK/4 ❌ +[zigbee2mqtt](https://www.zigbee2mqtt.io/devices/550D6001.html) + +> Depending on the firmware version the device may support both 1-channel and 2-channel mode. In 1-channel mode both the upper and lower buttons works as the upper buttons. On some firmware versions (incl. those sold as Elko EKO07117) the device starts out in 1-channel mode and must be switched into 2-channel mode either by using the Elko / Wiser gateway or by holding down button 1 and 4 (upper left and lower right) for approx. 10 seconds - the led will flash red and the become green once successfull. + +[zigbee-herdsman-converters](https://github.com/Koenkk/zigbee-herdsman-converters/blob/d1f00202a79a5cd4b6548dd1d15057895a3e6666/devices/schneider_electric.js#L292-L311) + +> When in 2-gang operation mode, unit operates out of endpoints 21 and 22, otherwise just 21 +
Signature diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index 8e9f12dd67..710ab33e7b 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -1,177 +1,7 @@ """Module for Schneider Electric devices quirks.""" import logging -from zigpy.quirks import CustomCluster -import zigpy.types as t -from zigpy.zcl.clusters.closures import WindowCovering -from zigpy.zcl.clusters.general import Basic, OnOff -from zigpy.zcl.clusters.homeautomation import Diagnostic -from zigpy.zcl.foundation import ZCLAttributeDef - _LOGGER = logging.getLogger(__name__) SE_MANUF_NAME = "Schneider Electric" SE_MANUF_ID = 0x4190 - -# Attribute IDs -ATTR_CURRENT_POSITION_LIFT_PERCENTAGE = 0x0008 - -# Command IDs -CMD_GO_TO_LIFT_PERCENTAGE = 0x0005 - - -class SEManufCluster(CustomCluster): - """Schneider Electric manufacturer specific cluster.""" - - name = "Schneider Electric Manufacturer Specicific" - ep_attribute = "schneider_electric_manufacturer" - - -class SEBasicCluster(SEManufCluster, Basic): - - attributes: dict[int, ZCLAttributeDef] = Basic.attributes.copy() - - attributes.update( - { - 0xE001: ( - "se_sw_build_id", - t.CharacterString, - ), # value: "002.004.016 R - 0xE002: ( - "unknown_attribute_57346", - t.CharacterString, - ), # value: "001.000.000" - 0xE004: ( - "unknown_attribute_57348", - t.CharacterString, - ), # value: "213249FEFF5ECFD" - 0xE007: ("unknown_attribute_57351", t.enum16), - 0xE008: ( - "se_device_type", - t.CharacterString, - ), # value: "Wiser Light" - 0xE009: ( - "se_model", - t.CharacterString, - ), # value: "NHPB/SHUTTER/1" - 0xE00A: ( - "se_realm", - t.CharacterString, - ), # value: "Wiser Home" - 0xE00B: ( - "unknown_attribute_57355", - t.CharacterString, - ), - } - ) - - -class SEOnOff(SEManufCluster, OnOff): - attributes = OnOff.attributes.copy() - attributes.update( - { - 0xE000: ("unknown_attribute_57344", t.uint16_t), - 0xE001: ("unknown_attribute_57345", t.uint32_t), - 0xE002: ("unknown_attribute_57346", t.bitmap8), - 0xE003: ("unknown_attribute_57347", t.uint32_t), - } - ) - - -class SEWindowCovering(SEManufCluster, WindowCovering): - """Manufacturer Specific Cluster of cover device.""" - - attributes: dict[int, ZCLAttributeDef] = WindowCovering.attributes.copy() - - attributes.update( - { - 0xFFFD: ("unknown_attribute_65533", t.uint16_t), - 0xE000: ("lift_duration", t.uint16_t), - 0xE010: ("unknown_attribute_57360", t.bitmap8), - 0xE012: ("unknown_attribute_57362", t.uint16_t), - 0xE013: ("unknown_attribute_57363", t.bitmap8), - 0xE014: ("unknown_attribute_57364", t.uint16_t), - 0xE015: ("unknown_attribute_57365", t.uint16_t), - 0xE016: ("unknown_attribute_57366", t.uint16_t), - 0xE017: ("unknown_attribute_57367", t.uint8_t), - } - ) - - def _update_attribute(self, attrid, value): - if attrid == ATTR_CURRENT_POSITION_LIFT_PERCENTAGE: - # Invert the percentage value - value = 100 - value - super()._update_attribute(attrid, value) - - async def command( - self, command_id, *args, manufacturer=None, expect_reply=True, tsn=None - ): - """Override default command to invert percent lift value.""" - if command_id == CMD_GO_TO_LIFT_PERCENTAGE: - percent = args[0] - percent = 100 - percent - v = (percent,) - return await super().command(command_id, *v) - return await super().command( - command_id, - *args, - manufacturer=manufacturer, - expect_reply=expect_reply, - tsn=tsn - ) - - -class SEDiagnostic(CustomCluster, Diagnostic): - - attributes: dict[int, ZCLAttributeDef] = Diagnostic.attributes.copy() - - # TODO: Check -> this attr don't seems to be manufacturer related (no "manf_id") - attributes.update( - { - 0xFFFD: ("unknown_attribute_65533", t.uint16_t), - } - ) - - -class SESpecificCluster(SEManufCluster): - cluster_id = 0xFF17 - - attributes = { - 0x0000: ("unknown_attribute_0", t.enum8), - 0x0001: ("unknown_attribute_1", t.enum8), - 0x0010: ("unknown_attribute_16", t.uint8_t), - 0x0011: ("unknown_attribute_17", t.uint16_t), - 0x0020: ("unknown_attribute_32", t.uint8_t), - 0x0021: ("unknown_attribute_33", t.uint16_t), - 0xFFFD: ("unknown_attribute_65533", t.uint16_t), - } - - -class SEPiloteMode(int): - ''' - Might be useful for : - - CCTFR6700 (manufacturerCode seems diff: 0x105e) - ''' - Contactor=1 - Pilot=3 - -class WiserDimmerMode(int): - ''' - Might be useful for : - - PUCK/DIMMER/ - - NHROTARY/DIMMER/1 - ''' - Auto = 0 - RC = 1 - RL = 2 - RL_LED = 3 - - -class SEDimmerMode(): - ''' - Might be useful for : - - LK Dimmer (manufacturerCode seems diff: 0x105e) - ''' - RC = 1 - RL = 2 - diff --git a/zhaquirks/schneiderelectric/clusters/__init__.py b/zhaquirks/schneiderelectric/clusters/__init__.py new file mode 100644 index 0000000000..8e301686a0 --- /dev/null +++ b/zhaquirks/schneiderelectric/clusters/__init__.py @@ -0,0 +1,172 @@ +from zigpy.quirks import CustomCluster +import zigpy.types as t +from zigpy.zcl.clusters.closures import WindowCovering +from zigpy.zcl.clusters.general import Basic, OnOff +from zigpy.zcl.clusters.homeautomation import Diagnostic +from zigpy.zcl.foundation import ZCLAttributeDef + +# Attribute IDs +ATTR_CURRENT_POSITION_LIFT_PERCENTAGE = 0x0008 + +# Command IDs +CMD_GO_TO_LIFT_PERCENTAGE = 0x0005 + + +class SEManufCluster(CustomCluster): + """Schneider Electric manufacturer specific cluster.""" + + name = "Schneider Electric Manufacturer Specicific" + ep_attribute = "schneider_electric_manufacturer" + + +class SEBasicCluster(SEManufCluster, Basic): + + attributes: dict[int, ZCLAttributeDef] = Basic.attributes.copy() + + attributes.update( + { + 0xE001: ( + "se_sw_build_id", + t.CharacterString, + ), # value: "002.004.016 R + 0xE002: ( + "unknown_attribute_57346", + t.CharacterString, + ), # value: "001.000.000" + 0xE004: ( + "unknown_attribute_57348", + t.CharacterString, + ), # value: "213249FEFF5ECFD" + 0xE007: ("unknown_attribute_57351", t.enum16), + 0xE008: ( + "se_device_type", + t.CharacterString, + ), # value: "Wiser Light" + 0xE009: ( + "se_model", + t.CharacterString, + ), # value: "NHPB/SHUTTER/1" + 0xE00A: ( + "se_realm", + t.CharacterString, + ), # value: "Wiser Home" + 0xE00B: ( + "unknown_attribute_57355", + t.CharacterString, + ), + } + ) + + +class SEOnOff(SEManufCluster, OnOff): + attributes = OnOff.attributes.copy() + attributes.update( + { + 0xE000: ("unknown_attribute_57344", t.uint16_t), + 0xE001: ("unknown_attribute_57345", t.uint32_t), + 0xE002: ("unknown_attribute_57346", t.bitmap8), + 0xE003: ("unknown_attribute_57347", t.uint32_t), + } + ) + + +class SEWindowCovering(SEManufCluster, WindowCovering): + """Manufacturer Specific Cluster of cover device.""" + + attributes: dict[int, ZCLAttributeDef] = WindowCovering.attributes.copy() + + attributes.update( + { + 0xFFFD: ("unknown_attribute_65533", t.uint16_t), + 0xE000: ("lift_duration", t.uint16_t), + 0xE010: ("unknown_attribute_57360", t.bitmap8), + 0xE012: ("unknown_attribute_57362", t.uint16_t), + 0xE013: ("unknown_attribute_57363", t.bitmap8), + 0xE014: ("unknown_attribute_57364", t.uint16_t), + 0xE015: ("unknown_attribute_57365", t.uint16_t), + 0xE016: ("unknown_attribute_57366", t.uint16_t), + 0xE017: ("unknown_attribute_57367", t.uint8_t), + } + ) + + def _update_attribute(self, attrid, value): + if attrid == ATTR_CURRENT_POSITION_LIFT_PERCENTAGE: + # Invert the percentage value + value = 100 - value + super()._update_attribute(attrid, value) + + async def command( + self, command_id, *args, manufacturer=None, expect_reply=True, tsn=None + ): + """Override default command to invert percent lift value.""" + if command_id == CMD_GO_TO_LIFT_PERCENTAGE: + percent = args[0] + percent = 100 - percent + v = (percent,) + return await super().command(command_id, *v) + return await super().command( + command_id, + *args, + manufacturer=manufacturer, + expect_reply=expect_reply, + tsn=tsn + ) + + +class SEDiagnostic(CustomCluster, Diagnostic): + + attributes: dict[int, ZCLAttributeDef] = Diagnostic.attributes.copy() + + # TODO: Check -> this attr don't seems to be manufacturer related (no "manf_id") + attributes.update( + { + 0xFFFD: ("unknown_attribute_65533", t.uint16_t), + } + ) + + +class SESpecificCluster(SEManufCluster): + cluster_id = 0xFF17 + + attributes = { + 0x0000: ("unknown_attribute_0", t.enum8), + 0x0001: ("unknown_attribute_1", t.enum8), + 0x0010: ("unknown_attribute_16", t.uint8_t), + 0x0011: ("unknown_attribute_17", t.uint16_t), + 0x0020: ("unknown_attribute_32", t.uint8_t), + 0x0021: ("unknown_attribute_33", t.uint16_t), + 0xFFFD: ("unknown_attribute_65533", t.uint16_t), + } + + +class SEPiloteMode(int): + """ + Might be useful for : + - CCTFR6700 (manufacturerCode seems diff: 0x105e) + """ + + Contactor = 1 + Pilot = 3 + + +class WiserDimmerMode(int): + """ + Might be useful for : + - PUCK/DIMMER/ + - NHROTARY/DIMMER/1 + """ + + Auto = 0 + RC = 1 + RL = 2 + RL_LED = 3 + + +class SEDimmerMode: + """ + Might be useful for : + - LK Dimmer (manufacturerCode seems diff: 0x105e) + """ + + RC = 1 + RL = 2 diff --git a/zhaquirks/schneiderelectric/shutters.py b/zhaquirks/schneiderelectric/devices/shutters.py similarity index 98% rename from zhaquirks/schneiderelectric/shutters.py rename to zhaquirks/schneiderelectric/devices/shutters.py index 9350318647..834d22442b 100644 --- a/zhaquirks/schneiderelectric/shutters.py +++ b/zhaquirks/schneiderelectric/devices/shutters.py @@ -24,6 +24,8 @@ ) from zhaquirks.schneiderelectric import ( SE_MANUF_NAME, +) +from zhaquirks.schneiderelectric.clusters import ( SESpecificCluster, SEWindowCovering, ) diff --git a/zhaquirks/schneiderelectric/switches.py b/zhaquirks/schneiderelectric/devices/switches.py similarity index 89% rename from zhaquirks/schneiderelectric/switches.py rename to zhaquirks/schneiderelectric/devices/switches.py index 11c14d26bf..c9429fe3a3 100644 --- a/zhaquirks/schneiderelectric/switches.py +++ b/zhaquirks/schneiderelectric/devices/switches.py @@ -22,7 +22,8 @@ OUTPUT_CLUSTERS, PROFILE_ID, ) -from zhaquirks.schneiderelectric import SE_MANUF_NAME, SESpecificCluster +from zhaquirks.schneiderelectric import SE_MANUF_NAME +from zhaquirks.schneiderelectric.clusters import SESpecificCluster class FLSAirlink4(CustomDevice): @@ -82,8 +83,8 @@ class FLSAirlink4(CustomDevice): } -class CH10AXSwitch1(CustomDevice): - """CH10AX/SWITCH/1 from Schneider Electric.""" +class CHxAXSwitch1(CustomDevice): + """CH2AX/SWITCH/1 and CH10AX/SWITCH/1 from Schneider Electric.""" # NodeDescriptor(logical_type=, complex_descriptor_available=0, # user_descriptor_available=0, reserved=0, aps_flags=0, @@ -97,12 +98,15 @@ class CH10AXSwitch1(CustomDevice): # *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, # *is_security_capable=False) signature = { - MODELS_INFO: [(SE_MANUF_NAME, "CH10AX/SWITCH/1")], + MODELS_INFO: [ + (SE_MANUF_NAME, "CH2AX/SWITCH/1"), + (SE_MANUF_NAME, "CH10AX/SWITCH/1"), + ], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, - "device_type": "0x0100", - "in_clusters": [ + DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT, # 0x0100 + INPUT_CLUSTERS: [ Basic.cluster_id, # 0x0000 Identify.cluster_id, # 0x0003 Groups.cluster_id, # 0x0004 @@ -110,11 +114,11 @@ class CH10AXSwitch1(CustomDevice): OnOff.cluster_id, # 0x0006 Diagnostic.cluster_id, # 0x0b05 ], - "out_clusters": [Ota.cluster_id], # 0x0019 + OUTPUT_CLUSTERS: [Ota.cluster_id], # 0x0019 }, 21: { PROFILE_ID: zha.PROFILE_ID, - DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH, + DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH, # 0x0104 INPUT_CLUSTERS: [ Basic.cluster_id, # 0x0000 Identify.cluster_id, # 0x0003 From f3e7a34d197fea891cec17f2d4b2a0a63799d9b0 Mon Sep 17 00:00:00 2001 From: Axel LE BOT Date: Fri, 9 Sep 2022 17:53:58 +0200 Subject: [PATCH 15/15] Fix tests --- tests/test_schneiderelectric.py | 10 +++++----- zhaquirks/schneiderelectric/__init__.py | 2 +- zhaquirks/schneiderelectric/devices/shutters.py | 9 ++------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/tests/test_schneiderelectric.py b/tests/test_schneiderelectric.py index b6b13f9e96..ddf03c1fdd 100644 --- a/tests/test_schneiderelectric.py +++ b/tests/test_schneiderelectric.py @@ -12,7 +12,7 @@ ].schema -async def test_nhpb_shutter_1_signature(assert_signature_matches_quirk): +def test_nhpb_shutter_1_signature(assert_signature_matches_quirk): signature = { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { @@ -54,11 +54,11 @@ async def test_nhpb_shutter_1_signature(assert_signature_matches_quirk): "class": "zigpy.device.Device", } assert_signature_matches_quirk( - zhaquirks.schneiderelectric.shutter.NHPBShutter1, signature + zhaquirks.schneiderelectric.devices.shutters.NHPBShutter1, signature ) -async def test_fls_air_link_4_signature(assert_signature_matches_quirk): +def test_fls_air_link_4_signature(assert_signature_matches_quirk): signature = { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { @@ -125,7 +125,7 @@ async def test_fls_air_link_4_signature(assert_signature_matches_quirk): ) -async def test_ch2ax_switch_1_signature(assert_signature_matches_quirk): +def test_ch2ax_switch_1_signature(assert_signature_matches_quirk): signature = { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { @@ -171,7 +171,7 @@ async def test_ch2ax_switch_1_signature(assert_signature_matches_quirk): ) -async def test_ch10ax_switch_1_signature(assert_signature_matches_quirk): +def test_ch10ax_switch_1_signature(assert_signature_matches_quirk): signature = { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4190, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { diff --git a/zhaquirks/schneiderelectric/__init__.py b/zhaquirks/schneiderelectric/__init__.py index 710ab33e7b..573836c457 100644 --- a/zhaquirks/schneiderelectric/__init__.py +++ b/zhaquirks/schneiderelectric/__init__.py @@ -1,4 +1,4 @@ -"""Module for Schneider Electric devices quirks.""" +"""Quirks implementations for Schneider Electric devices.""" import logging _LOGGER = logging.getLogger(__name__) diff --git a/zhaquirks/schneiderelectric/devices/shutters.py b/zhaquirks/schneiderelectric/devices/shutters.py index 834d22442b..133fbd84fd 100644 --- a/zhaquirks/schneiderelectric/devices/shutters.py +++ b/zhaquirks/schneiderelectric/devices/shutters.py @@ -22,13 +22,8 @@ OUTPUT_CLUSTERS, PROFILE_ID, ) -from zhaquirks.schneiderelectric import ( - SE_MANUF_NAME, -) -from zhaquirks.schneiderelectric.clusters import ( - SESpecificCluster, - SEWindowCovering, -) +from zhaquirks.schneiderelectric import SE_MANUF_NAME +from zhaquirks.schneiderelectric.clusters import SESpecificCluster, SEWindowCovering class NHPBShutter1(CustomDevice):