zha-device-handlers: [BUG] Incorrect behaviour for Detached Relay mode in Sonoff ZBMINIR2
Bug description
I’ve been having issues using the detached relay mode on the Sonoff ZBMINIR2. I’m currently using the quirk as it was merged in #3428.
It functions fine without the detached relay feature, but with that feature turned on the behaviour is erratic and unusable. I’m using a pulse switch (as opposed to a rocker switch). Here’s some symptoms:
- Often after pressing the switch, its LED blinks in a pattern that the manual explains as a “Abnormal connection with the gateway”
- Instead of firing a ‘toggle’ event or action, presses on the physical switch turn on the switch inside Home Assistant’s device page on, then turns if off a second or two later. Sometimes repeating this action an extra time. Often followed by the blinking
- This makes testing for things like double tapping useless.
- The “sensor” it exposes in the HA UI never changes state
- It seems to merge the state of the relay and the state of the button into one ‘switch’ in the UI, even though these should be considered separately (i.e. you should be able to toggle the physical relay from HA)
It’s worth noting that today I tried to see how the switch worked with Zigbee2MQTT, and it worked without a hitch:
- The state of the physical relay turns into a switch in the HA UI
- It fires actions for each toggle, and doesn’t touch the state of the relay
- The switch does not blink after sending an event
- Events seem to arrive instantly
This was also brought up in #3428, but not in this detail. See the video below for an example of the different behaviours in ZHA vs Z2M
Steps to reproduce
- Turn on the pulse switch mode and detached relay mode
- press the switch
- Notice the events received by HA, see that the switch toggles off and on by itself after pressing the buttons
Expected behavior
- In detached relay mode, the physical switch should trigger events inside HA without changing HA’s perception of the state of the physical relay
- Pulse mode switches should either send a simple ‘press’ event or something like a 'press/release"event
Screenshots/Video
Device signature
Device signature
{
"node_descriptor": {
"logical_type": 1,
"complex_descriptor_available": 0,
"user_descriptor_available": 0,
"reserved": 0,
"aps_flags": 0,
"frequency_band": 8,
"mac_capability_flags": 142,
"manufacturer_code": 4742,
"maximum_buffer_size": 82,
"maximum_incoming_transfer_size": 255,
"server_mask": 11264,
"maximum_outgoing_transfer_size": 255,
"descriptor_capability_field": 0
},
"endpoints": {
"1": {
"profile_id": "0x0104",
"device_type": "0x0002",
"input_clusters": [
"0x0000",
"0x0003",
"0x0004",
"0x0006",
"0x0b05",
"0xfc11",
"0xfc57"
],
"output_clusters": [
"0x0003",
"0x0006",
"0x0019"
]
},
"242": {
"profile_id": "0xa1e0",
"device_type": "0x0061",
"input_clusters": [],
"output_clusters": [
"0x0021"
]
}
},
"manufacturer": "SONOFF",
"model": "ZBMINIR2",
"class": "zigpy.quirks.v2.CustomDeviceV2"
}
Diagnostic information
Diagnostic information
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2024.11.3",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.12.4",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Berlin",
"os_name": "Linux",
"os_version": "6.6.46-haos",
"supervisor": "2024.11.4",
"host_os": "Home Assistant OS 13.1",
"docker_version": "26.1.4",
"chassis": "embedded",
"run_as_root": true
},
"custom_components": {
"lastfm_scrobbler": {
"documentation": "https://github.com/valentin-gosselin/lastfm-scrobbler-ha-integration/blob/main/README.md",
"version": "1.2.0",
"requirements": [
"requests",
"pylast"
]
},
"thermal_comfort": {
"documentation": "https://github.com/dolezsa/thermal_comfort/blob/master/README.md",
"version": "2.2.2",
"requirements": []
},
"trakt_tv": {
"documentation": "https://github.com/dylandoamaral/trakt-integration",
"version": "0.9.0",
"requirements": []
},
"slack_user": {
"documentation": "https://github.com/GeorgeSG/ha-slack-user",
"version": "0.6",
"requirements": [
"slackclient==2.9.4"
]
},
"mass": {
"documentation": "https://music-assistant.io",
"version": "2024.11.4",
"requirements": [
"music-assistant-client==1.0.6"
]
},
"cluster_player_scrobbler": {
"documentation": null,
"version": "1.0.1",
"requirements": [
"requests",
"pylast"
]
},
"scene_presets": {
"documentation": "https://github.com/Hypfer/hass-scene_presets",
"version": "2.2.1",
"requirements": []
},
"hacs": {
"documentation": "https://hacs.xyz/docs/configuration/start",
"version": "2.0.1",
"requirements": [
"aiogithubapi>=22.10.1"
]
},
"ics_calendar": {
"documentation": "https://github.com/franc6/ics_calendar",
"version": "5.0.4",
"requirements": [
"icalendar>=6.0.0",
"python-dateutil>=2.9.0.post0",
"pytz>=2024.1",
"recurring_ical_events>=3.3.2",
"ics>=0.7.2",
"arrow"
]
}
},
"integration_manifest": {
"domain": "zha",
"name": "Zigbee Home Automation",
"after_dependencies": [
"hassio",
"onboarding",
"usb"
],
"codeowners": [
"dmulcahey",
"adminiuga",
"puddly",
"TheJulianJES"
],
"config_flow": true,
"dependencies": [
"file_upload"
],
"documentation": "https://www.home-assistant.io/integrations/zha",
"iot_class": "local_polling",
"loggers": [
"aiosqlite",
"bellows",
"crccheck",
"pure_pcapy3",
"zhaquirks",
"zigpy",
"zigpy_deconz",
"zigpy_xbee",
"zigpy_zigate",
"zigpy_znp",
"zha",
"universal_silabs_flasher"
],
"requirements": [
"universal-silabs-flasher==0.0.25",
"zha==0.0.39"
],
"usb": [
{
"vid": "10C4",
"pid": "EA60",
"description": "*2652*",
"known_devices": [
"slae.sh cc2652rb stick"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*slzb-07*",
"known_devices": [
"smlight slzb-07"
]
},
{
"vid": "1A86",
"pid": "55D4",
"description": "*sonoff*plus*",
"known_devices": [
"sonoff zigbee dongle plus v2"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*sonoff*plus*",
"known_devices": [
"sonoff zigbee dongle plus"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*zigstar*",
"known_devices": [
"ZigStar Coordinators"
]
},
{
"vid": "1CF1",
"pid": "0030",
"description": "*conbee*",
"known_devices": [
"Conbee II"
]
},
{
"vid": "0403",
"pid": "6015",
"description": "*conbee*",
"known_devices": [
"Conbee III"
]
},
{
"vid": "10C4",
"pid": "8A2A",
"description": "*zigbee*",
"known_devices": [
"Nortek HUSBZB-1"
]
},
{
"vid": "0403",
"pid": "6015",
"description": "*zigate*",
"known_devices": [
"ZiGate+"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*zigate*",
"known_devices": [
"ZiGate"
]
},
{
"vid": "10C4",
"pid": "8B34",
"description": "*bv 2010/10*",
"known_devices": [
"Bitron Video AV2010/10"
]
}
],
"zeroconf": [
{
"type": "_esphomelib._tcp.local.",
"name": "tube*"
},
{
"type": "_zigate-zigbee-gateway._tcp.local.",
"name": "*zigate*"
},
{
"type": "_zigstar_gw._tcp.local.",
"name": "*zigstar*"
},
{
"type": "_uzg-01._tcp.local.",
"name": "uzg-01*"
},
{
"type": "_slzb-06._tcp.local.",
"name": "slzb-06*"
},
{
"type": "_xzg._tcp.local.",
"name": "xzg*"
},
{
"type": "_czc._tcp.local.",
"name": "czc*"
}
],
"is_built_in": true,
"overwrites_built_in": false
},
"setup_times": {
"null": {
"setup": 9.081605821847916e-05
},
"01J2KNBP7SN295GGS0KQ2V5H58": {
"wait_import_platforms": -0.029656579019501805,
"wait_base_component": -0.001775671960785985,
"config_entry_setup": 12.813472521025687
}
},
"data": {
"ieee": "**REDACTED**",
"nwk": 60937,
"manufacturer": "SONOFF",
"model": "ZBMINIR2",
"name": "SONOFF ZBMINIR2",
"quirk_applied": true,
"quirk_class": "zigpy.quirks.v2.CustomDeviceV2",
"quirk_id": null,
"manufacturer_code": 4742,
"power_source": "Mains",
"lqi": null,
"rssi": null,
"last_seen": "2024-12-03T16:49:13",
"available": true,
"device_type": "Router",
"signature": {
"node_descriptor": {
"logical_type": 1,
"complex_descriptor_available": 0,
"user_descriptor_available": 0,
"reserved": 0,
"aps_flags": 0,
"frequency_band": 8,
"mac_capability_flags": 142,
"manufacturer_code": 4742,
"maximum_buffer_size": 82,
"maximum_incoming_transfer_size": 255,
"server_mask": 11264,
"maximum_outgoing_transfer_size": 255,
"descriptor_capability_field": 0
},
"endpoints": {
"1": {
"profile_id": "0x0104",
"device_type": "0x0002",
"input_clusters": [
"0x0000",
"0x0003",
"0x0004",
"0x0006",
"0x0b05",
"0xfc11",
"0xfc57"
],
"output_clusters": [
"0x0003",
"0x0006",
"0x0019"
]
},
"242": {
"profile_id": "0xa1e0",
"device_type": "0x0061",
"input_clusters": [],
"output_clusters": [
"0x0021"
]
}
},
"manufacturer": "SONOFF",
"model": "ZBMINIR2"
},
"active_coordinator": false,
"entities": [
{
"entity_id": "binary_sensor.sonoff_zbminir2_opening",
"name": "SONOFF ZBMINIR2"
},
{
"entity_id": "button.sonoff_zbminir2_identify",
"name": "SONOFF ZBMINIR2"
},
{
"entity_id": "select.sonoff_zbminir2_external_trigger_mode",
"name": "SONOFF ZBMINIR2"
},
{
"entity_id": "switch.sonoff_zbminir2_switch",
"name": "SONOFF ZBMINIR2"
},
{
"entity_id": "switch.sonoff_zbminir2_turbo_mode",
"name": "SONOFF ZBMINIR2"
},
{
"entity_id": "switch.sonoff_zbminir2_detach_relay",
"name": "SONOFF ZBMINIR2"
},
{
"entity_id": "update.sonoff_zbminir2_firmware",
"name": "SONOFF ZBMINIR2"
}
],
"neighbors": [],
"routes": [
{
"dest_nwk": "0x0000",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0x74D8"
},
{
"dest_nwk": "0xDA0D",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xDA0D"
},
{
"dest_nwk": "0x2E3D",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0x2E3D"
},
{
"dest_nwk": "0xB721",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xB721"
}
],
"endpoint_names": [
{
"name": "ON_OFF_OUTPUT"
},
{
"name": "PROXY_BASIC"
}
],
"user_given_name": null,
"device_reg_id": "fabba91b96619b3616cb1a83d63f4ab8",
"area_id": null,
"cluster_details": {
"1": {
"device_type": {
"name": "ON_OFF_OUTPUT",
"id": 2
},
"profile_id": 260,
"in_clusters": {
"0x0000": {
"endpoint_attribute": "basic",
"attributes": {
"0x0013": {
"attribute": "ZCLAttributeDef(id=0x0013, name='alarm_mask', type=<flag 'AlarmMask'>, zcl_type=<DataTypeId.map8: 24>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0001": {
"attribute": "ZCLAttributeDef(id=0x0001, name='app_version', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0xfffd": {
"attribute": "ZCLAttributeDef(id=0xFFFD, name='cluster_revision', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x0006": {
"attribute": "ZCLAttributeDef(id=0x0006, name='date_code', type=<class 'zigpy.types.basic.LimitedCharString.<locals>.LimitedCharString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0012": {
"attribute": "ZCLAttributeDef(id=0x0012, name='device_enabled', type=<enum 'Bool'>, zcl_type=<DataTypeId.bool_: 16>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0014": {
"attribute": "ZCLAttributeDef(id=0x0014, name='disable_local_config', type=<flag 'DisableLocalConfig'>, zcl_type=<DataTypeId.map8: 24>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0008": {
"attribute": "ZCLAttributeDef(id=0x0008, name='generic_device_class', type=<enum 'GenericDeviceClass'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0009": {
"attribute": "ZCLAttributeDef(id=0x0009, name='generic_device_type', type=<enum 'GenericLightingDeviceType'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0003": {
"attribute": "ZCLAttributeDef(id=0x0003, name='hw_version', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0010": {
"attribute": "ZCLAttributeDef(id=0x0010, name='location_desc', type=<class 'zigpy.types.basic.LimitedCharString.<locals>.LimitedCharString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0004": {
"attribute": "ZCLAttributeDef(id=0x0004, name='manufacturer', type=<class 'zigpy.types.basic.LimitedCharString.<locals>.LimitedCharString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": "SONOFF"
},
"0x000c": {
"attribute": "ZCLAttributeDef(id=0x000C, name='manufacturer_version_details', type=<class 'zigpy.types.basic.CharacterString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0005": {
"attribute": "ZCLAttributeDef(id=0x0005, name='model', type=<class 'zigpy.types.basic.LimitedCharString.<locals>.LimitedCharString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": "ZBMINIR2"
},
"0x0011": {
"attribute": "ZCLAttributeDef(id=0x0011, name='physical_env', type=<enum 'PhysicalEnvironment'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0007": {
"attribute": "ZCLAttributeDef(id=0x0007, name='power_source', type=<enum 'PowerSource'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x000a": {
"attribute": "ZCLAttributeDef(id=0x000A, name='product_code', type=<class 'zigpy.types.basic.LVBytes'>, zcl_type=<DataTypeId.octstr: 65>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x000e": {
"attribute": "ZCLAttributeDef(id=0x000E, name='product_label', type=<class 'zigpy.types.basic.CharacterString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x000b": {
"attribute": "ZCLAttributeDef(id=0x000B, name='product_url', type=<class 'zigpy.types.basic.CharacterString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0xfffe": {
"attribute": "ZCLAttributeDef(id=0xFFFE, name='reporting_status', type=<enum 'AttributeReportingStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x000d": {
"attribute": "ZCLAttributeDef(id=0x000D, name='serial_number', type=<class 'zigpy.types.basic.CharacterString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0002": {
"attribute": "ZCLAttributeDef(id=0x0002, name='stack_version', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4000": {
"attribute": "ZCLAttributeDef(id=0x4000, name='sw_build_id', type=<class 'zigpy.types.basic.CharacterString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0000": {
"attribute": "ZCLAttributeDef(id=0x0000, name='zcl_version', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
},
"0x0003": {
"endpoint_attribute": "identify",
"attributes": {
"0xfffd": {
"attribute": "ZCLAttributeDef(id=0xFFFD, name='cluster_revision', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x0000": {
"attribute": "ZCLAttributeDef(id=0x0000, name='identify_time', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0xfffe": {
"attribute": "ZCLAttributeDef(id=0xFFFE, name='reporting_status', type=<enum 'AttributeReportingStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
},
"0x0004": {
"endpoint_attribute": "groups",
"attributes": {
"0xfffd": {
"attribute": "ZCLAttributeDef(id=0xFFFD, name='cluster_revision', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x0000": {
"attribute": "ZCLAttributeDef(id=0x0000, name='name_support', type=<flag 'NameSupport'>, zcl_type=<DataTypeId.map8: 24>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0xfffe": {
"attribute": "ZCLAttributeDef(id=0xFFFE, name='reporting_status', type=<enum 'AttributeReportingStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
},
"0x0006": {
"endpoint_attribute": "on_off",
"attributes": {
"0xfffd": {
"attribute": "ZCLAttributeDef(id=0xFFFD, name='cluster_revision', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x4000": {
"attribute": "ZCLAttributeDef(id=0x4000, name='global_scene_control', type=<enum 'Bool'>, zcl_type=<DataTypeId.bool_: 16>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4002": {
"attribute": "ZCLAttributeDef(id=0x4002, name='off_wait_time', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0000": {
"attribute": "ZCLAttributeDef(id=0x0000, name='on_off', type=<enum 'Bool'>, zcl_type=<DataTypeId.bool_: 16>, access=<ZCLAttributeAccess.Read|Report|Scene: 25>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x4001": {
"attribute": "ZCLAttributeDef(id=0x4001, name='on_time', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0xfffe": {
"attribute": "ZCLAttributeDef(id=0xFFFE, name='reporting_status', type=<enum 'AttributeReportingStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4003": {
"attribute": "ZCLAttributeDef(id=0x4003, name='start_up_on_off', type=<enum 'StartUpOnOff'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
},
"0x0b05": {
"endpoint_attribute": "diagnostic",
"attributes": {
"0x0116": {
"attribute": "ZCLAttributeDef(id=0x0116, name='aps_decrypt_failures', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0113": {
"attribute": "ZCLAttributeDef(id=0x0113, name='aps_fc_failure', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0106": {
"attribute": "ZCLAttributeDef(id=0x0106, name='aps_rx_bcast', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0108": {
"attribute": "ZCLAttributeDef(id=0x0108, name='aps_rx_ucast', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0107": {
"attribute": "ZCLAttributeDef(id=0x0107, name='aps_tx_bcast', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x010b": {
"attribute": "ZCLAttributeDef(id=0x010B, name='aps_tx_ucast_fail', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x010a": {
"attribute": "ZCLAttributeDef(id=0x010A, name='aps_tx_ucast_retry', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0109": {
"attribute": "ZCLAttributeDef(id=0x0109, name='aps_tx_ucast_success', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0114": {
"attribute": "ZCLAttributeDef(id=0x0114, name='aps_unauthorized_key', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x011b": {
"attribute": "ZCLAttributeDef(id=0x011B, name='average_mac_retry_per_aps_message_sent', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0111": {
"attribute": "ZCLAttributeDef(id=0x0111, name='child_moved', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0xfffd": {
"attribute": "ZCLAttributeDef(id=0xFFFD, name='cluster_revision', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x0110": {
"attribute": "ZCLAttributeDef(id=0x0110, name='join_indication', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x011c": {
"attribute": "ZCLAttributeDef(id=0x011C, name='last_message_lqi', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x011d": {
"attribute": "ZCLAttributeDef(id=0x011D, name='last_message_rssi', type=<class 'zigpy.types.basic.int8s'>, zcl_type=<DataTypeId.int8: 40>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0100": {
"attribute": "ZCLAttributeDef(id=0x0100, name='mac_rx_bcast', type=<class 'zigpy.types.basic.uint32_t'>, zcl_type=<DataTypeId.uint32: 35>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0102": {
"attribute": "ZCLAttributeDef(id=0x0102, name='mac_rx_ucast', type=<class 'zigpy.types.basic.uint32_t'>, zcl_type=<DataTypeId.uint32: 35>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0101": {
"attribute": "ZCLAttributeDef(id=0x0101, name='mac_tx_bcast', type=<class 'zigpy.types.basic.uint32_t'>, zcl_type=<DataTypeId.uint32: 35>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0103": {
"attribute": "ZCLAttributeDef(id=0x0103, name='mac_tx_ucast', type=<class 'zigpy.types.basic.uint32_t'>, zcl_type=<DataTypeId.uint32: 35>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0105": {
"attribute": "ZCLAttributeDef(id=0x0105, name='mac_tx_ucast_fail', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0104": {
"attribute": "ZCLAttributeDef(id=0x0104, name='mac_tx_ucast_retry', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x010d": {
"attribute": "ZCLAttributeDef(id=0x010D, name='neighbor_added', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x010e": {
"attribute": "ZCLAttributeDef(id=0x010E, name='neighbor_removed', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x010f": {
"attribute": "ZCLAttributeDef(id=0x010F, name='neighbor_stale', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0000": {
"attribute": "ZCLAttributeDef(id=0x0000, name='number_of_resets', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0115": {
"attribute": "ZCLAttributeDef(id=0x0115, name='nwk_decrypt_failures', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0112": {
"attribute": "ZCLAttributeDef(id=0x0112, name='nwk_fc_failure', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0117": {
"attribute": "ZCLAttributeDef(id=0x0117, name='packet_buffer_allocate_failures', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x011a": {
"attribute": "ZCLAttributeDef(id=0x011A, name='packet_validate_drop_count', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0001": {
"attribute": "ZCLAttributeDef(id=0x0001, name='persistent_memory_writes', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0119": {
"attribute": "ZCLAttributeDef(id=0x0119, name='phy_to_mac_queue_limit_reached', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0118": {
"attribute": "ZCLAttributeDef(id=0x0118, name='relayed_ucast', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0xfffe": {
"attribute": "ZCLAttributeDef(id=0xFFFE, name='reporting_status', type=<enum 'AttributeReportingStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x010c": {
"attribute": "ZCLAttributeDef(id=0x010C, name='route_disc_initiated', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
},
"0xfc57": {
"endpoint_attribute": "manufacturer_specific",
"attributes": {},
"unsupported_attributes": []
},
"0xfc11": {
"endpoint_attribute": null,
"attributes": {
"0x0017": {
"attribute": "ZCLAttributeDef(id=0x0017, name='detach_relay', type=<enum 'Bool'>, zcl_type=<DataTypeId.bool_: 16>, access=<ZCLAttributeAccess.Read|Write|Report: 11>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0016": {
"attribute": "ZCLAttributeDef(id=0x0016, name='external_trigger_mode', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read|Write|Report: 11>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0012": {
"attribute": "ZCLAttributeDef(id=0x0012, name='turbo_mode', type=<class 'zigpy.types.basic.int16s'>, zcl_type=<DataTypeId.int16: 41>, access=<ZCLAttributeAccess.Read|Write|Report: 11>, mandatory=False, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
}
},
"out_clusters": {
"0x0003": {
"endpoint_attribute": "identify",
"attributes": {
"0xfffd": {
"attribute": "ZCLAttributeDef(id=0xFFFD, name='cluster_revision', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x0000": {
"attribute": "ZCLAttributeDef(id=0x0000, name='identify_time', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0xfffe": {
"attribute": "ZCLAttributeDef(id=0xFFFE, name='reporting_status', type=<enum 'AttributeReportingStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
},
"0x0006": {
"endpoint_attribute": "on_off",
"attributes": {
"0xfffd": {
"attribute": "ZCLAttributeDef(id=0xFFFD, name='cluster_revision', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x4000": {
"attribute": "ZCLAttributeDef(id=0x4000, name='global_scene_control', type=<enum 'Bool'>, zcl_type=<DataTypeId.bool_: 16>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4002": {
"attribute": "ZCLAttributeDef(id=0x4002, name='off_wait_time', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0000": {
"attribute": "ZCLAttributeDef(id=0x0000, name='on_off', type=<enum 'Bool'>, zcl_type=<DataTypeId.bool_: 16>, access=<ZCLAttributeAccess.Read|Report|Scene: 25>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x4001": {
"attribute": "ZCLAttributeDef(id=0x4001, name='on_time', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0xfffe": {
"attribute": "ZCLAttributeDef(id=0xFFFE, name='reporting_status', type=<enum 'AttributeReportingStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4003": {
"attribute": "ZCLAttributeDef(id=0x4003, name='start_up_on_off', type=<enum 'StartUpOnOff'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
},
"0x0019": {
"endpoint_attribute": "ota",
"attributes": {
"0xfffd": {
"attribute": "ZCLAttributeDef(id=0xFFFD, name='cluster_revision', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x0002": {
"attribute": "ZCLAttributeDef(id=0x0002, name='current_file_version', type=<class 'zigpy.types.basic.uint32_t'>, zcl_type=<DataTypeId.uint32: 35>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0003": {
"attribute": "ZCLAttributeDef(id=0x0003, name='current_zigbee_stack_version', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0004": {
"attribute": "ZCLAttributeDef(id=0x0004, name='downloaded_file_version', type=<class 'zigpy.types.basic.uint32_t'>, zcl_type=<DataTypeId.uint32: 35>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0005": {
"attribute": "ZCLAttributeDef(id=0x0005, name='downloaded_zigbee_stack_version', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0001": {
"attribute": "ZCLAttributeDef(id=0x0001, name='file_offset', type=<class 'zigpy.types.basic.uint32_t'>, zcl_type=<DataTypeId.uint32: 35>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x000a": {
"attribute": "ZCLAttributeDef(id=0x000A, name='image_stamp', type=<class 'zigpy.types.basic.uint32_t'>, zcl_type=<DataTypeId.uint32: 35>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0008": {
"attribute": "ZCLAttributeDef(id=0x0008, name='image_type_id', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0006": {
"attribute": "ZCLAttributeDef(id=0x0006, name='image_upgrade_status', type=<enum 'ImageUpgradeStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x0007": {
"attribute": "ZCLAttributeDef(id=0x0007, name='manufacturer_id', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0009": {
"attribute": "ZCLAttributeDef(id=0x0009, name='minimum_block_req_delay', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0xfffe": {
"attribute": "ZCLAttributeDef(id=0xFFFE, name='reporting_status', type=<enum 'AttributeReportingStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x000b": {
"attribute": "ZCLAttributeDef(id=0x000B, name='upgrade_activation_policy', type=<enum 'UpgradeActivationPolicy'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0000": {
"attribute": "ZCLAttributeDef(id=0x0000, name='upgrade_server_id', type=<class 'zigpy.types.named.EUI64'>, zcl_type=<DataTypeId.EUI64: 240>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x000c": {
"attribute": "ZCLAttributeDef(id=0x000C, name='upgrade_timeout_policy', type=<enum 'UpgradeTimeoutPolicy'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
}
}
},
"242": {
"device_type": {
"name": "PROXY_BASIC",
"id": 97
},
"profile_id": 41440,
"in_clusters": {},
"out_clusters": {
"0x0021": {
"endpoint_attribute": "green_power",
"attributes": {},
"unsupported_attributes": []
}
}
}
}
}
}
Logs
Logs
[Paste the logs here]
Additional information
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 36
- Comments: 50 (3 by maintainers)
I hacked some things in zcl here: https://github.com/zigpy/zigpy/pull/1599
It’s late here, but as far as I can see, flipping a switch doesn’t trigger fallback mode anymore. I will spend some time testing a bit later.
Also here I’m switching quirk to use newer facilities of custom clusters.
Thanks for all the inputs, it was super helpful. I learned a lot today 😃
ZHA is the poor man’s solution that only works with the bare minimum
@puddly Doesn’t look fixed to me (on 2025.5.1).
With “detach relay” on, the lights now come on, go off, and come on again - I don’t recall this happening before, but I think it’s mentioned above.
The “opening” sensor still never turns on.
I’ll try and check logs in more detail when I get a chance.
I have the same problem with ZHA !
Do you think this can be resolved soon? THANKS
Hi to explain better: Actually this is not an “obscure feature”, it is a “security mechanism” by the ZBMINIR2: When detached mode is enabled, it is of course no longer possible to control the light when the coordinator is offline. Therefore the ZBMINIR2 implements some fallback mode: When the coordinator does not respond correctly to its messages it toggles into fallback mode and disables the detached mode temporarily. This is why you can suddenly control the lights with the rocker again. In that mode the Sonoff device has a blinking led showing communication error. After some time once it receives a new message from the coordinator it changes back to detached mode. But unfortunately on every rocker change it detects the coordinator as “offline” and goes to fallback mode, because the message sent to coordinator gets not replied. This cannot be fixed by a zigpy quirk/devhandler, as this is faulty behaviour of the coordinator in general. This is a fix, will try it once I figure out how to replace zigpy in HASS: https://github.com/zigpy/zigpy/pull/1612
https://community.hubitat.com/t/sonoff-zbminir2-driver/147085/47
Perhaps this can be helpful?
With every HomeAssistant update, I check if anything has changed in this matter, but it’s still the same. Detach still doesn’t work on ZHA.
home-assistant_zha_2025-01-04T10-55-08.085Z.log
I’ve removed a small number of irrelevant lines, but I’m not sure about the rest so I’ve left it in. I enable logging Then enabled detached mode Then toggled the lights twice Then disabled logging
This might be related to how ZHA implements the cluster handler for the OnOff client cluster. It might conflict when there’s also a server cluster on the same endpoint, but I‘m not sure about this yet. It could also be something trivial.
Can anyone enable debug logs for ZHA (can be done on the HA integrations page), then reproduce the issue, disable debug logs (to download the whole HA log file) and then provide the (roughly) relevant section here?
The attached video in the OP and the investigation that followed is already helpful btw. Thanks for that.
Looking through logs, and the hubitat notes @warfarincoumadin provided, it looks like a ZCL default response isn’t sent - a more useful message in the attached discussion might be:
https://community.hubitat.com/t/sonoff-zbminir2-driver/147085/29
To summarise [what I think are] the important parts of the link above, the ZBMINIR2 sends the update when the switch is toggled, but if not acknowledged three times it goes to a fallback state. In the logs I’m seeing that message sent three times, so it would seem to match up.
Can confirm that this is an ZHA issue. I jumped ship to Z2M, and there it works flawlessly.
Hello TheJulianJES@TheJulianJES ,
I have investigated this issue and identified two problems:
ZBMINIR2 supports both the OnOff Server Cluster and the OnOff Client Cluster. I have found that when ZBMINIR2 reports the OnOff Client Toggle command, the OnOff UI on the ZHA page flips accordingly.
When ZBMINIR2 reports the OnOff Client Toggle command and expects a ZCL Default Response, ZHA does not provide the required ZCL Default Response.
Is there anything I need to modify?
Crosslinking to provide more context (TLDR: Zigpy does not completely comply with the Zigbee spec and the ZBMINIR2 uses this
obscure featuresecurity mechanism) https://github.com/zigpy/zigpy/pull/1599Another voice to add. I am also seeing the issue. On latest firmware (1002). Home Assistant with ZHA integration. Using a simple single pole/single throw physical switch connected to S1/S2 for testing.
Getting erratic behavior when using the S1/S2 switch in detached relay mode. Nothing at all like one would expect. Sometimes the relay is shut off/on by changing the switch, sometimes not (it should not ever change state in detached relay mode as a result of S1/S2 state change. The “virtual” switch in HA seems to often briefly toggle back off then on again when going from the off state to the on state via the S1/S2 switch. Doesn’t seem to do this when being turned off.
Also in this integration I don’t see a way in detached relay to separately trigger on the S1/S2 state change. The device switch entity controls the relay state and what one would want to separately control via automation vs detecting S1/S2 state changes.
I don’t know how much of this is a device firmware issue, ZHA issue, or both.
also having the exact same issue. Have to leave it off now, as the bug switched the power of and on quickly causing the smart bulbs to reset and loose connectivity to hub
Same Issue here, using ZHA
same issue here with ZHA
Same Issue here
same issue here
I had a similar problem: After ZBMINIR2 enables the relay separation function and triggers the external switch, the UI interface on HA will flip the “switch” status of the control bar, and the log on the right side of it will also be recorded. Then the device network indicator blinks quickly. Through the Ubiqua Sniffer packet capture, it is observed that the device sends the On/Off Toggle command, which is a Client to sever data, but the coordinator does not reply to it. I had no such problem when I added this device to Z2M.
Just to confirm that this bug is affecting also Sonoff ZBM5
@uschindler thank you for the clear answer.
As Zigpy is open-source, there is the possibility of this being “broken” (for my use-case) for another year, with contributors casually choosing to spend time on this.
Is that the expectation, or is the aim to have this resolved within a couple of weeks or months?
I’m asking because I need to figure out whether to how deal with broken light switches, and for how long.
Thanks again!
No needs an update of HASS. You can theoretically replace the zigpy version inside home assistant by messing with the docker containers, but this is nothing fo normal end-users.
No not yet. The solution is a bit more complex as this is a bigger problem in zigpy that needs a bigger cleanup. The ZBMINIR2’s problems are just the top of iceberg. The referred pull request above does not solve the problem completely there are different fixes to be applied before.
But when everything is solved (I tried the fix already and it works, but breaks other devices), the following works: The “Opening” sensor will show the state of the physical switch (also in normal, not detached mode). You can register an automation on it when its state changes to detect a change in physical switch.
@uschindler apologies for my question–I’m merely a dumb end-user.
I’m using Home Assistant with the SkyConnect dongle, that’s using Zigpy (probably, I think). I currently have various ZBMINIR2’s that do not worked as intended.
Is there an ETA of when this will be fixed? And am I correct to assume this has to be shipped with a Home Assistant update (or can it be shipped through a separate update on the ZHA integration?
Thank you! 🙇
I want to expand on the initial issue and say that I’m also experiencing this behaviour without using pulse mode, just using the default regular edge mode switch
Happy to provide logs if needed
Hi Same problem here. Everything up-to-date.