zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
696 stars 641 forks source link

[Device Support Request] Inovelli VZM35-SN Fan Switch #2640

Open codyhackw opened 9 months ago

codyhackw commented 9 months ago

Problem description

The Inovelli VZM35-SN Fan Switch only creates a subset of the entities expected within HA. It errors out on the active_power_reports attribute, which should only be checked for the VZM31-SN switch, but is likely being hit because both devices use the same manufacturer cluster (0xfc31).

Solution description

The device should create all applicable attributes, as identified under the Inovelli_VZM35SN_Cluster attributes in the init.py file.

Screenshots/Video

Screenshots/Video [Paste/upload your media here]

Device signature

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=4655, maximum_buffer_size=82, maximum_incoming_transfer_size=512, server_mask=11264, maximum_outgoing_transfer_size=512, 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": "0x0104", "device_type": "0x0101", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0008", "0x0b05", "0xfc31", "0xfc57" ], "output_clusters": [ "0x0019" ] }, "2": { "profile_id": "0x0104", "device_type": "0x0104", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005" ], "output_clusters": [ "0x0003", "0x0006", "0x0008" ] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "Inovelli", "model": "VZM35-SN", "class": "VZM35SN.InovelliVZM35SNMG24" } ```

Diagnostic information

Diagnostic information ```json [Paste the diagnostic information here] ```

Logs

Logs ```python 2023-10-10 19:19:31.235 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0006]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.235 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0006]: initializing cached cluster handler attributes: ['start_up_on_off'] 2023-10-10 19:19:31.235 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0006]: Reading attributes in chunks: ['start_up_on_off'] 2023-10-10 19:19:31.235 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0006]: initializing uncached cluster handler attributes: ['on_off'] - from cache[False] 2023-10-10 19:19:31.235 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0006]: Reading attributes in chunks: ['on_off'] 2023-10-10 19:19:31.235 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0006] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=49, command_id=, *direction=) 2023-10-10 19:19:31.235 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0006] Sending request: Read_Attributes(attribute_ids=[0]) 2023-10-10 19:19:31.235 DEBUG (MainThread) [zigpy.application] Max concurrency (8) reached, delaying request (28 enqueued) 2023-10-10 19:19:31.236 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0008]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.236 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0008]: initializing cached cluster handler attributes: ['on_off_transition_time', 'on_level', 'on_transition_time', 'off_transition_time', 'default_move_rate', 'start_up_current_level'] 2023-10-10 19:19:31.236 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0008]: Reading attributes in chunks: ['on_off_transition_time', 'on_level', 'on_transition_time', 'off_transition_time', 'default_move_rate'] 2023-10-10 19:19:31.236 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0008]: Reading attributes in chunks: ['start_up_current_level'] 2023-10-10 19:19:31.236 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0008]: initializing uncached cluster handler attributes: ['current_level'] - from cache[False] 2023-10-10 19:19:31.236 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0008]: Reading attributes in chunks: ['current_level'] 2023-10-10 19:19:31.236 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0008] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=50, command_id=, *direction=) 2023-10-10 19:19:31.236 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0008] Sending request: Read_Attributes(attribute_ids=[0]) 2023-10-10 19:19:31.237 DEBUG (MainThread) [zigpy.application] Max concurrency (8) reached, delaying request (29 enqueued) 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0000]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0000]: finished cluster handler initialization 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0003]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0003]: finished cluster handler initialization 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0xfc31]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0xfc31]: initializing cached cluster handler attributes: ['dimming_speed_up_remote', 'dimming_speed_up_local', 'ramp_rate_off_to_on_local', 'ramp_rate_off_to_on_remote', 'dimming_speed_down_remote', 'dimming_speed_down_local', 'ramp_rate_on_to_off_local', 'ramp_rate_on_to_off_remote', 'minimum_level', 'maximum_level', 'invert_switch', 'auto_off_timer', 'default_level_local', 'default_level_remote', 'state_after_power_restored', 'load_level_indicator_timeout', 'active_power_reports', 'periodic_power_and_energy_reports', 'active_energy_reports', 'increased_non_neutral_output', 'double_tap_up_enabled', 'double_tap_down_enabled', 'double_tap_up_level', 'double_tap_down_level', 'led_color_when_on', 'led_color_when_off', 'led_intensity_when_on', 'led_intensity_when_off', 'led_scaling_mode', 'aux_switch_scenes', 'binding_off_to_on_sync_level', 'on_off_led_mode', 'firmware_progress_led', 'relay_click_in_on_off_mode', 'disable_clear_notifications_double_tap'] 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0xfc31]: Reading attributes in chunks: ['dimming_speed_up_remote', 'dimming_speed_up_local', 'ramp_rate_off_to_on_local', 'ramp_rate_off_to_on_remote', 'dimming_speed_down_remote'] 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0xfc31]: Reading attributes in chunks: ['dimming_speed_down_local', 'ramp_rate_on_to_off_local', 'ramp_rate_on_to_off_remote', 'minimum_level', 'maximum_level'] 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0xfc31]: Reading attributes in chunks: ['invert_switch', 'auto_off_timer', 'default_level_local', 'default_level_remote', 'state_after_power_restored'] 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0xfc31]: Reading attributes in chunks: ['load_level_indicator_timeout', 'active_power_reports', 'periodic_power_and_energy_reports', 'active_energy_reports', 'increased_non_neutral_output'] 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0019]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0019]: finished cluster handler initialization 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0000]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0000]: finished cluster handler initialization 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0003]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0003]: finished cluster handler initialization 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0008]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0008]: finished cluster handler initialization 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0006]: initializing cluster handler: from_cache: False 2023-10-10 19:19:31.237 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0006]: finished cluster handler initialization 2023-10-10 19:19:31.239 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0000]: 'async_initialize' stage succeeded 2023-10-10 19:19:31.239 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0003]: 'async_initialize' stage succeeded 2023-10-10 19:19:31.239 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0008]: 'async_initialize' stage succeeded 2023-10-10 19:19:31.239 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:2:0x0006]: 'async_initialize' stage succeeded 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] on_transition_time is not supported - skipping OnTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] off_transition_time is not supported - skipping OffTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] default_move_rate is not supported - skipping DefaultMoveRateConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] on_off_transition_time is not supported - skipping OnOffTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] on_transition_time is not supported - skipping OnTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] off_transition_time is not supported - skipping OffTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] default_move_rate is not supported - skipping DefaultMoveRateConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] start_up_current_level is not supported - skipping StartUpCurrentLevelConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] on_transition_time is not supported - skipping OnTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] off_transition_time is not supported - skipping OffTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] default_move_rate is not supported - skipping DefaultMoveRateConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] on_transition_time is not supported - skipping OnTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] off_transition_time is not supported - skipping OffTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] default_move_rate is not supported - skipping DefaultMoveRateConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] double_tap_up_level is not supported - skipping InovelliDoubleTapUpLevel entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] double_tap_down_level is not supported - skipping InovelliDoubleTapDownLevel entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] on_transition_time is not supported - skipping OnTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] off_transition_time is not supported - skipping OffTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.240 DEBUG (MainThread) [homeassistant.components.zha.number] default_move_rate is not supported - skipping DefaultMoveRateConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] on_transition_time is not supported - skipping OnTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] off_transition_time is not supported - skipping OffTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] default_move_rate is not supported - skipping DefaultMoveRateConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] on_transition_time is not supported - skipping OnTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] off_transition_time is not supported - skipping OffTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] default_move_rate is not supported - skipping DefaultMoveRateConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] on_transition_time is not supported - skipping OnTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] off_transition_time is not supported - skipping OffTransitionTimeConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] default_move_rate is not supported - skipping DefaultMoveRateConfigurationEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] button_delay is not supported - skipping InovelliButtonDelay entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] load_level_indicator_timeout is not supported - skipping InovelliLoadLevelIndicatorTimeout entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] led_color_when_on is not supported - skipping InovelliDefaultAllLEDOnColor entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] led_color_when_off is not supported - skipping InovelliDefaultAllLEDOffColor entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] led_intensity_when_on is not supported - skipping InovelliDefaultAllLEDOnIntensity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] led_intensity_when_off is not supported - skipping InovelliDefaultAllLEDOffIntensity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] double_tap_up_level is not supported - skipping InovelliDoubleTapUpLevel entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.number] double_tap_down_level is not supported - skipping InovelliDoubleTapDownLevel entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.select] start_up_on_off is not supported - skipping ZHAStartupOnOffSelectEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.select] led_scaling_mode is not supported - skipping InovelliLedScalingModeEntity entity creation 2023-10-10 19:19:31.241 DEBUG (MainThread) [homeassistant.components.zha.select] increased_non_neutral_output is not supported - skipping InovelliNonNeutralOutputEntity entity creation 2023-10-10 19:19:31.242 DEBUG (MainThread) [homeassistant.components.zha.select] output_mode is not supported - skipping InovelliOutputModeEntity entity creation 2023-10-10 19:19:31.242 DEBUG (MainThread) [homeassistant.components.zha.select] switch_type is not supported - skipping InovelliSwitchTypeEntity entity creation 2023-10-10 19:19:31.242 DEBUG (MainThread) [homeassistant.components.zha.select] led_scaling_mode is not supported - skipping InovelliLedScalingModeEntity entity creation 2023-10-10 19:19:31.242 DEBUG (MainThread) [homeassistant.components.zha.select] increased_non_neutral_output is not supported - skipping InovelliNonNeutralOutputEntity entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] double_tap_down_enabled is not supported - skipping InovelliDoubleTapDownEnabled entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] aux_switch_scenes is not supported - skipping InovelliAuxSwitchScenes entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] binding_off_to_on_sync_level is not supported - skipping InovelliBindingOffToOnSyncLevel entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] disable_clear_notifications_double_tap is not supported - skipping InovelliDisableDoubleTapClearNotificationsMode entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] smart_bulb_mode is not supported - skipping InovelliSmartBulbMode entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] double_tap_up_enabled is not supported - skipping InovelliDoubleTapUpEnabled entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] double_tap_down_enabled is not supported - skipping InovelliDoubleTapDownEnabled entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] aux_switch_scenes is not supported - skipping InovelliAuxSwitchScenes entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] binding_off_to_on_sync_level is not supported - skipping InovelliBindingOffToOnSyncLevel entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] local_protection is not supported - skipping InovelliLocalProtection entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] on_off_led_mode is not supported - skipping InovelliOnOffLEDMode entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] firmware_progress_led is not supported - skipping InovelliFirmwareProgressLED entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] relay_click_in_on_off_mode is not supported - skipping InovelliRelayClickInOnOffMode entity creation 2023-10-10 19:19:31.243 DEBUG (MainThread) [homeassistant.components.zha.switch] disable_clear_notifications_double_tap is not supported - skipping InovelliDisableDoubleTapClearNotificationsMode entity creation 2023-10-10 19:19:32.387 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xBC21), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=None, profile_id=260, cluster_id=6, data=Serialized[b'\x181\x01\x00\x00\x00\x10\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-49) 2023-10-10 19:19:32.388 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0006] Received ZCL frame: b'\x181\x01\x00\x00\x00\x10\x00' 2023-10-10 19:19:32.388 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0006] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=49, command_id=1, *direction=) 2023-10-10 19:19:32.388 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0006] Decoded ZCL frame: OnOff:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0000, status=, value=TypeValue(type=Bool, value=))]) 2023-10-10 19:19:32.388 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0006]: finished cluster handler initialization 2023-10-10 19:19:32.438 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xAD4B), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=None, profile_id=260, cluster_id=64561, data=Serialized[b'\x1c/\x12N\x01\x02\x01\x00\x10\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-49) 2023-10-10 19:19:32.438 DEBUG (MainThread) [zigpy.zcl] [0xAD4B:1:0xfc31] Received ZCL frame: b'\x1c/\x12N\x01\x02\x01\x00\x10\x00' 2023-10-10 19:19:32.438 DEBUG (MainThread) [zigpy.zcl] [0xAD4B:1:0xfc31] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=True, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), manufacturer=4655, tsn=78, command_id=1, *direction=) 2023-10-10 19:19:32.438 DEBUG (MainThread) [zigpy.zcl] [0xAD4B:1:0xfc31] Decoded ZCL frame: Inovelli_VZM31SN_Cluster:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0102, status=, value=TypeValue(type=Bool, value=))]) 2023-10-10 19:19:32.439 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xAD4B:1:0xfc31]: finished cluster handler initialization 2023-10-10 19:19:32.449 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xBC21), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=None, profile_id=260, cluster_id=8, data=Serialized[b'\x182\x01\x00\x00\x00 \xfe'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-49) 2023-10-10 19:19:32.450 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0008] Received ZCL frame: b'\x182\x01\x00\x00\x00 \xfe' 2023-10-10 19:19:32.450 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0008] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=50, command_id=1, *direction=) 2023-10-10 19:19:32.450 DEBUG (MainThread) [zigpy.zcl] [0xBC21:1:0x0008] Decoded ZCL frame: LevelControl:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0000, status=, value=TypeValue(type=uint8_t, value=254))]) 2023-10-10 19:19:32.451 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0008]: received attribute: 0 update with value: 254 2023-10-10 19:19:32.451 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0008]: finished cluster handler initialization 2023-10-10 19:19:32.452 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0006]: 'async_initialize' stage succeeded 2023-10-10 19:19:32.452 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0008]: 'async_initialize' stage succeeded 2023-10-10 19:19:32.452 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0000]: 'async_initialize' stage succeeded 2023-10-10 19:19:32.452 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0003]: 'async_initialize' stage succeeded 2023-10-10 19:19:32.452 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0xfc31]: 'async_initialize' stage failed: 'active_power_reports' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/zha/core/helpers.py", line 340, in wrapper return await func(cluster_handler, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/__init__.py", line 380, in async_initialize await self._get_attributes( File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/__init__.py", line 491, in _get_attributes read, _ = await self.cluster.read_attributes( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/zigpy/zcl/__init__.py", line 501, in read_attributes attrid = self.attributes_by_name[attribute].id ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ KeyError: 'active_power_reports' 2023-10-10 19:19:32.454 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xBC21:1:0x0019]: 'async_initialize' stage succeeded 2023-10-10 19:19:32.454 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0xBC21](VZM35-SN): power source: Mains 2023-10-10 19:19:32.454 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0xBC21](VZM35-SN): completed initialization ```

Custom quirk

Custom quirk ```python [Paste your custom quirk here] ```

Additional information

Relevant __init__.py section for Inovelli VZM31-SN Cluster ```python class Inovelli_VZM31SN_Cluster(CustomCluster): """Inovelli VZM31-SN custom cluster.""" cluster_id = 0xFC31 name = "InovelliVZM31SNCluster" ep_attribute = "inovelli_vzm31sn_cluster" attributes = ManufacturerSpecificCluster.attributes.copy() attributes.update( { 0x0001: ("dimming_speed_up_remote", t.uint8_t, True), 0x0002: ("dimming_speed_up_local", t.uint8_t, True), 0x0003: ("ramp_rate_off_to_on_local", t.uint8_t, True), 0x0004: ("ramp_rate_off_to_on_remote", t.uint8_t, True), 0x0005: ("dimming_speed_down_remote", t.uint8_t, True), 0x0006: ("dimming_speed_down_local", t.uint8_t, True), 0x0007: ("ramp_rate_on_to_off_local", t.uint8_t, True), 0x0008: ("ramp_rate_on_to_off_remote", t.uint8_t, True), 0x0009: ("minimum_level", t.uint8_t, True), 0x000A: ("maximum_level", t.uint8_t, True), 0x000B: ("invert_switch", t.Bool, True), 0x000C: ("auto_off_timer", t.uint16_t, True), 0x000D: ("default_level_local", t.uint8_t, True), 0x000E: ("default_level_remote", t.uint8_t, True), 0x000F: ("state_after_power_restored", t.uint8_t, True), 0x0010: ("disable_remote_control", t.uint8_t, True), 0x0011: ("load_level_indicator_timeout", t.uint8_t, True), 0x0012: ("active_power_reports", t.uint8_t, True), 0x0013: ("periodic_power_and_energy_reports", t.uint8_t, True), 0x0014: ("active_energy_reports", t.uint16_t, True), 0x0015: ("power_type", t.uint8_t, True), 0x0016: ("switch_type", t.uint8_t, True), 0x0019: ("increased_non_neutral_output", t.Bool, True), 0x0032: ("button_delay", t.uint8_t, True), 0x0033: ("device_bind_number", t.uint8_t, True), 0x0034: ("smart_bulb_mode", t.Bool, True), 0x0035: ("double_tap_up_enabled", t.Bool, True), 0x0036: ("double_tap_down_enabled", t.Bool, True), 0x0037: ("double_tap_up_level", t.uint8_t, True), 0x0038: ("double_tap_down_level", t.uint8_t, True), 0x003C: ("default_led1_strip_color_when_on", t.uint8_t, True), 0x003D: ("default_led1_strip_color_when_off", t.uint8_t, True), 0x003E: ("default_led1_strip_intensity_when_on", t.uint8_t, True), 0x003F: ("default_led1_strip_intensity_when_off", t.uint8_t, True), 0x0041: ("default_led2_strip_color_when_on", t.uint8_t, True), 0x0042: ("default_led2_strip_color_when_off", t.uint8_t, True), 0x0043: ("default_led2_strip_intensity_when_on", t.uint8_t, True), 0x0044: ("default_led2_strip_intensity_when_off", t.uint8_t, True), 0x0046: ("default_led3_strip_color_when_on", t.uint8_t, True), 0x0047: ("default_led3_strip_color_when_off", t.uint8_t, True), 0x0048: ("default_led3_strip_intensity_when_on", t.uint8_t, True), 0x0049: ("default_led3_strip_intensity_when_off", t.uint8_t, True), 0x004B: ("default_led4_strip_color_when_on", t.uint8_t, True), 0x004C: ("default_led4_strip_color_when_off", t.uint8_t, True), 0x004D: ("default_led4_strip_intensity_when_on", t.uint8_t, True), 0x004E: ("default_led4_strip_intensity_when_off", t.uint8_t, True), 0x0050: ("default_led5_strip_color_when_on", t.uint8_t, True), 0x0051: ("default_led5_strip_color_when_off", t.uint8_t, True), 0x0052: ("default_led5_strip_intensity_when_on", t.uint8_t, True), 0x0053: ("default_led5_strip_intensity_when_off", t.uint8_t, True), 0x0055: ("default_led6_strip_color_when_on", t.uint8_t, True), 0x0056: ("default_led6_strip_color_when_off", t.uint8_t, True), 0x0057: ("default_led6_strip_intensity_when_on", t.uint8_t, True), 0x0058: ("default_led6_strip_intensity_when_off", t.uint8_t, True), 0x005A: ("default_led7_strip_color_when_on", t.uint8_t, True), 0x005B: ("default_led7_strip_color_when_off", t.uint8_t, True), 0x005C: ("default_led7_strip_intensity_when_on", t.uint8_t, True), 0x005D: ("default_led7_strip_intensity_when_off", t.uint8_t, True), 0x005F: ("led_color_when_on", t.uint8_t, True), 0x0060: ("led_color_when_off", t.uint8_t, True), 0x0061: ("led_intensity_when_on", t.uint8_t, True), 0x0062: ("led_intensity_when_off", t.uint8_t, True), 0x0064: ("led_scaling_mode", t.Bool, True), 0x007B: ("aux_switch_scenes", t.Bool, True), 0x007D: ("binding_off_to_on_sync_level", t.Bool, True), 0x0100: ("local_protection", t.Bool, True), 0x0101: ("remote_protection", t.Bool, True), 0x0102: ("output_mode", t.Bool, True), 0x0103: ("on_off_led_mode", t.Bool, True), 0x0104: ("firmware_progress_led", t.Bool, True), 0x0105: ("relay_click_in_on_off_mode", t.Bool, True), 0x0106: ("disable_clear_notifications_double_tap", t.Bool, True), } ) ```
Relevant __init__.py section for Inovelli VZM35-SN Cluster ```python VZM35SN_REMOVES = [ 0x0012, 0x0013, 0x0014, 0x0019, 0x0034, 0x0064, 0x007D, 0x0105, ] class Inovelli_VZM35SN_Cluster(Inovelli_VZM31SN_Cluster): """Inovelli VZM35-SN custom cluster.""" attributes = { key: Inovelli_VZM31SN_Cluster.attributes[key] for key in Inovelli_VZM31SN_Cluster.attributes if key not in VZM35SN_REMOVES } attributes.update( { 0x0017: ("quick_start_time", t.uint8_t, True), 0x001E: ("non_neutral_aux_med_gear_learn_value", t.uint8_t, True), 0x001F: ("non_neutral_aux_low_gear_learn_value", t.uint8_t, True), 0x0034: ("smart_fan_mode", t.Bool, True), 0x0106: ("smart_fan_led_display_levels", t.uint8_t, True), } ) ```

You can see from the device page that the entities are created for the attributes prior to active_power_reports, but anything after is never created due to the validation failing for that attribute - image

InovelliUSA commented 9 months ago

So it looks like it is iterating through all of the attributes even though it should only go through a subset of them for the VZM35-SN (as opposed to the VZM31-SN)? When the device does not respond to the reading of the "active_power_reports" attribute, HA errors out and does not check the rest. This results in many entities not being created.

owen2 commented 9 months ago

This is showing up as a Light instead of a Fan and it has a bunch of dimming parameters that don't make sense for the fan control. HA 2023.10.3

owen2 commented 9 months ago
image
InovelliUSA commented 9 months ago

This is showing up as a Light instead of a Fan and it has a bunch of dimming parameters that don't make sense for the fan control. HA 2023.10.3

Dimming params are meant to be used in Smart Fan mode. Maybe they should be hidden by default?

justinlindh commented 9 months ago

So it looks like it is iterating through all of the attributes even though it should only go through a subset of them for the VZM35-SN (as opposed to the VZM31-SN)? When the device does not respond to the reading of the "active_power_reports" attribute, HA errors out and does not check the rest. This results in many entities not being created.

Yup. Logs:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/helpers.py", line 338, in wrapper
    return await func(cluster_handler, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/__init__.py", line 380, in async_initialize
    await self._get_attributes(
  File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/__init__.py", line 491, in _get_attributes
    read, _ = await self.cluster.read_attributes(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/zigpy/zcl/__init__.py", line 501, in read_attributes
    attrid = self.attributes_by_name[attribute].id
             ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'active_power_reports'
ryantiger658 commented 9 months ago

It looks like the active power report is removed from the attributes list here

It does seem odd that the VZM35SN doesn't have its own attribute list.

owen2 commented 8 months ago

2696 #2688

bmos commented 7 months ago

It appears this is slated for 2023.12 https://rc.home-assistant.io/changelogs/core-2023.12

owen2 commented 7 months ago

I've got 2023.12 installed, and my fans are still showing up as lights and not fans.

bmos commented 7 months ago

There were some favorable changes in 2023.12 (the configuration parameters are more correct/complete but still not all there), but I also have had to reconfigure them manually to fans as they appeared as lights.

nwithan8 commented 7 months ago

There were some favorable changes in 2023.12 (the configuration parameters are more correct/complete but still not all there), but I also have had to reconfigure them manually to fans as they appeared as lights.

I've been unable to use helpers to alter a light type to a fan type, do you have any insight?

bmos commented 7 months ago

I had to reconfigure them manually to fans as they appeared as lights.

I've been unable to use helpers to alter a light type to a fan type, do you have any insight?

I set the device type to "switch" via YAML and then used the UI to make a helper to convert the switch into a fan. Not intuitive, but it works.

owen2 commented 6 months ago

Do you get the discrete 3 speed settings with the switch as X workaround or is it still a %? I want to use the tile card features for hi/med/low. It would be really great if this three speed fan controller was a three speed fan controller. 😃

bmos commented 6 months ago

It's functioning on the switch itself as 3 speed control but there is no control over that in HA. I can only turn it on/off remotely. Speed must be adjusted manually.

InovelliUSA commented 6 months ago

Do you get the discrete 3 speed settings with the switch as X workaround or is it still a %? I want to use the tile card features for hi/med/low. It would be really great if this three speed fan controller was a three speed fan controller. 😃

We are working on a firmware update that will have an additional fan endpoint. It will show up as a dimmer and a fan in HA, but you can disable either one if you want to. We keep the dimmer endpoint so it can be bound to dimmable devices that are not fans.

In the meantime there is a template that you can use. You can see in the screenshot what it will look like.

https://community.inovelli.com/t/vzm35-sn-zigbee-blue-series-zha-fan-template-for-home-assistant/15436

github-actions[bot] commented 3 weeks ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

InovelliUSA commented 3 weeks ago

This has been closed. The quirk has been updated to remove the power/energy functions and Firmware 1.05+ has an endpoint that shows up as a fan in ZHA.