home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.63k stars 30.39k forks source link

ZHA initializing issues #123495

Closed andreiflorian closed 2 months ago

andreiflorian commented 2 months ago

The problem

After the update to 2024.8.0, ZHA integration failed to initialize. I'm using the EZSP driver for a Lidl Zigbee Gateway.

What version of Home Assistant Core has the issue?

core-2024.8.0

What was the last working version of Home Assistant Core?

core-2024.7.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

No response

Diagnostics information

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.8.0", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "aarch64", "timezone": "Europe/Bucharest", "os_name": "Linux", "os_version": "6.6.31-haos-raspi", "supervisor": "2024.08.0", "host_os": "Home Assistant OS 12.4", "docker_version": "26.1.4", "chassis": "embedded", "run_as_root": true }, "custom_components": { "scheduler": { "documentation": "https://github.com/nielsfaber/scheduler-component", "version": "v0.0.0", "requirements": [] }, "multiscrape": { "documentation": "https://github.com/danieldotnl/ha-multiscrape", "version": "7.0.0", "requirements": [ "lxml>=4.9.1", "beautifulsoup4>=4.12.2" ] }, "smartthinq_sensors": { "documentation": "https://github.com/ollo69/ha-smartthinq-sensors", "version": "0.39.2", "requirements": [ "pycountry>=23.12.11", "xmltodict>=0.13.0", "charset_normalizer>=3.2.0" ] }, "irrigation_unlimited": { "documentation": "https://github.com/rgc99/irrigation_unlimited", "version": "2024.5.0", "requirements": [ "crontab" ] }, "gardena_smart_system": { "documentation": "https://github.com/py-smart-gardena/hass-gardena-smart-system", "version": "1.0.0", "requirements": [ "py-smart-gardena==1.3.8" ] }, "platerecognizer": { "documentation": "https://github.com/robmarkcole/HASS-plate-recognizer", "version": "1.0.0", "requirements": [ "pillow", "requests" ] }, "remote_homeassistant": { "documentation": "https://github.com/custom-components/remote_homeassistant", "version": "4.1", "requirements": [] }, "diskspace": { "documentation": "https://www.home-assistant.io/integrations/diskspace", "version": "0.8", "requirements": [] }, "xiaomi_cloud_map_extractor": { "documentation": "https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor", "version": "v2.2.0", "requirements": [ "pillow", "pybase64", "python-miio", "requests", "pycryptodome" ] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "dual_smart_thermostat": { "documentation": "https://github.com/swingerman/ha-dual-smart-thermostat.git", "version": "0.9.6", "requirements": [] }, "localtuya": { "documentation": "https://github.com/rospogrigio/localtuya/", "version": "5.2.1", "requirements": [] }, "mass": { "documentation": "https://music-assistant.io", "version": "2024.6.2", "requirements": [ "music-assistant==2.0.6" ] }, "tapo_control": { "documentation": "https://github.com/JurajNyiri/HomeAssistant-Tapo-Control", "version": "5.4.13", "requirements": [ "pytapo==3.3.21" ] }, "mikrotik_router": { "documentation": "https://github.com/tomaae/homeassistant-mikrotik_router", "version": "0.0.0", "requirements": [ "librouteros>=3.2.0", "mac-vendor-lookup>=0.1.12" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "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.22", "zha==0.0.28" ], "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": "sonoffplus", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "sonoffplus", "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 }, "setup_times": { "null": { "setup": 0.00016644399147480726 }, "9e0c973451d77961c4cff997e97289a7": { "wait_import_platforms": -0.057219025009544566, "wait_base_component": -0.003697373002069071, "config_entry_setup": 48.896972574992105 } }, "data": { "config": {}, "config_entry": { "created_at": "1970-01-01T00:00:00+00:00", "data": { "device": { "path": "socket://192.168.88.244:8888", "baudrate": 57600, "flow_control": "software" }, "radio_type": "ezsp" }, "disabled_by": null, "domain": "zha", "entry_id": "9e0c973451d77961c4cff997e97289a7", "minor_version": 1, "modified_at": "2024-08-09T20:48:12.716714+00:00", "options": {}, "pref_disable_new_entities": false, "pref_disable_polling": false, "source": "user", "title": "socket://192.168.88.244:8888", "unique_id": null, "version": 4 }, "application_state": { "node_info": { "nwk": 0, "ieee": "REDACTED", "logical_type": 0, "model": null, "manufacturer": null, "version": "6.5.0.0 build 188" }, "network_info": { "extended_pan_id": "REDACTED", "pan_id": 63123, "nwk_update_id": 0, "nwk_manager_id": 0, "channel": 11, "channel_mask": 134215680, "security_level": 5, "network_key": "REDACTED", "tc_link_key": { "key": [ 90, 105, 103, 66, 101, 101, 65, 108, 108, 105, 97, 110, 99, 101, 48, 57 ], "tx_counter": 778240, "rx_counter": 0, "seq": 0, "partner_ieee": "REDACTED" }, "key_table": [], "children": [], "nwk_addresses": {}, "stack_specific": { "ezsp": { "hashed_tclk": "dcdc1b5d7559bdf87e08393fe9d37edc" } }, "metadata": { "ezsp": { "stack_version": 7, "can_burn_userdata_custom_eui64": true, "can_rewrite_custom_eui64": false } }, "source": "bellows@0.40.2" }, "counters": { "ezsp_counters": {}, "controller_app_counters": { "unicast_rx": { "type": "<class 'zigpy.state.Counter'>", "repr": "Counter(name='unicast_rx', _raw_value=8, reset_count=0, _last_reset_value=0)" }, "unicast_tx_success": { "__type": "<class 'zigpy.state.Counter'>", "repr": "Counter(name='unicast_tx_success', _raw_value=7, reset_count=0, _last_reset_value=0)" }, "broadcast_tx_success_unexpected": { "type": "<class 'zigpy.state.Counter'>", "repr": "Counter(name='broadcast_tx_success_unexpected', _raw_value=1, reset_count=0, _last_reset_value=0)" }, "broadcast_tx_failure_unexpected": { "__type": "<class 'zigpy.state.Counter'>", "repr": "Counter(name='broadcast_tx_failure_unexpected', _raw_value=1, reset_count=0, _last_reset_value=0)" } } }, "broadcast_counters": {}, "device_counters": {}, "group_counters": {} }, "energy_scan": { "11": 62.257682586134884, "12": 91.05606689948522, "13": 96.64469941013013, "14": 98.43344238842926, "15": 82.35373987514762, "16": 39.90320178295578, "17": 25.74050169409602, "18": 6.789392891308996, "19": 46.26944564832987, "20": 88.70042934643088, "21": 97.39286236923465, "22": 96.19660508390695, "23": 65.26028270288712, "24": 62.257682586134884, "25": 33.860880820104335, "26": 62.257682586134884 }, "versions": { "bellows": "0.40.2", "zigpy": "0.65.3", "zigpy_deconz": "0.23.3", "zigpy_xbee": "0.20.2", "zigpy_znp": "0.12.4", "zigpy_zigate": "0.13.1", "zhaquirks": "0.0.118", "zha": "0.0.28" }, "devices": [ { "manufacturer": null, "model": null, "logical_type": "Coordinator" }, { "manufacturer": "_TZ1800_fcdjzz3s", "model": "TY0202", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.sensor_motion", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.sensor_magnet", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.sensor_smoke", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.sensor_switch", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.plug", "logical_type": "Router" }, { "manufacturer": "LUMI", "model": "lumi.sensor_magnet", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.sensor_magnet", "logical_type": "EndDevice" }, { "manufacturer": "_TZ1800_fcdjzz3s", "model": "TY0202", "logical_type": "EndDevice" }, { "manufacturer": "IKEA of Sweden", "model": "TRADFRI control outlet", "logical_type": "Router" }, { "manufacturer": "IKEA of Sweden", "model": "TRADFRI remote control", "logical_type": "EndDevice" }, { "manufacturer": "IKEA of Sweden", "model": "TRADFRI motion sensor", "logical_type": "EndDevice" }, { "manufacturer": "XIAOMI", "model": "lumi.sen_ill.mgl01", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.sensor_magnet.aq2", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.sensor_magnet.aq2", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.weather", "logical_type": "EndDevice" }, { "manufacturer": "SONOFF", "model": "01MINIZB", "logical_type": "Router" }, { "manufacturer": "SONOFF", "model": "01MINIZB", "logical_type": "Router" }, { "manufacturer": "_TZE200_htnnfasr", "model": "TS0601", "logical_type": "EndDevice" }, { "manufacturer": "_TZE200_htnnfasr", "model": "TS0601", "logical_type": "EndDevice" }, { "manufacturer": "LUMI", "model": "lumi.sensor_magnet", "logical_type": "EndDevice" }, { "manufacturer": "eWeLink", "model": "TH01", "logical_type": "EndDevice" }, { "manufacturer": "_TZE200_myd45weu", "model": "TS0601", "logical_type": "EndDevice" }, { "manufacturer": "_TZ1800_fcdjzz3s", "model": "TY0202", "logical_type": "EndDevice" }, { "manufacturer": "_TZE200_htnnfasr", "model": "TS0601", "logical_type": "EndDevice" }, { "manufacturer": "_TZ3000_qaaysllp", "model": "TS0201", "logical_type": "EndDevice" }, { "manufacturer": "eWeLink", "model": "TH01", "logical_type": "EndDevice" }, { "manufacturer": "eWeLink", "model": "TH01", "logical_type": "EndDevice" }, { "manufacturer": "SONOFF", "model": "SNZB-02D", "logical_type": "EndDevice" }, { "manufacturer": "SONOFF", "model": "SNZB-02D", "logical_type": "EndDevice" } ] } }

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-08-09 23:57:56.044 DEBUG (MainThread) [bellows.ash] Sending frame DataFrame(frm_num=1, re_tx=False, ack_num=1, ezsp_frame=b' \x00\xff\x00\xf1') + FLAG
2024-08-09 23:57:56.044 DEBUG (MainThread) [bellows.ash] Sending data  7d3162215754db2ea27e
2024-08-09 23:57:56.053 DEBUG (MainThread) [bellows.ash] Received data 1262a15754db15b2
2024-08-09 23:57:56.095 DEBUG (MainThread) [bellows.ash] Received data 59944a25aa5592499c4e27abedce678bfdc66389fc7d5e3fa7ebcdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c267d33b1e070381c0e07bbe5ca658a459a4d9e4f9ff7c3d9d46a35a25190ceb17e
2024-08-09 23:57:56.096 DEBUG (MainThread) [bellows.ash] Received frame DataFrame(frm_num=1, re_tx=0, ack_num=2, ezsp_frame=b' \x80\xff\x00\xf1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-08-09 23:57:56.096 DEBUG (MainThread) [bellows.ash] Sending frame AckFrame(res=0, ncp_ready=0, ack_num=2) + FLAG
2024-08-09 23:57:56.096 DEBUG (MainThread) [bellows.ash] Sending data  82503a7e
2024-08-09 23:57:56.098 WARNING (MainThread) [bellows.ezsp.protocol] Failed to parse frame readCounters: b'0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/bellows/ezsp/protocol.py", line 108, in __call__
    result, data = t.deserialize_dict(data, rx_schema)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bellows/types/__init__.py", line 9, in deserialize_dict
    value, data = type_.deserialize(data)
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/types/basic.py", line 924, in deserialize
    item, data = cls._item_type.deserialize(data)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/types/basic.py", line 199, in deserialize
    raise ValueError(f"Data is too short to contain {byte_size} bytes")
ValueError: Data is too short to contain 2 bytes
2024-08-09 23:57:56.101 WARNING (MainThread) [bellows.ezsp] Failed to parse frame, ignoring

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @dmulcahey, @adminiuga, @puddly, @thejulianjes, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `zha` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign zha` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)

andreiflorian commented 2 months ago

Duplicate issue https://github.com/home-assistant/core/issues/123474

TheJulianJES commented 2 months ago

This is a duplicate of https://github.com/home-assistant/core/issues/123474 It'll be fixed in one of the next patch releases.