ZHA component fails to load after pairing first device

I’m having trouble getting the ZHA component to pair with a SmartThings Motion Sensor (2015 model). Other users have reported this device to pair and work successfully. The failure happens immediately after restarting following pairing of the first device from a clean database.

##Environment

  • Raspberry Pi 3
  • Raspbian GNU/Linux 8 (jessie)
  • Home Assistant 0.49.0 deployed via AIO installer
  • Python 3.4.2
  • Nortek HUSBZB-1

##configuration.yaml

zha:
  usb_path: /dev/zigbee
  database_path: /home/homeassistant/.homeassistant/zigbee.db

##Process

  • sudo systemctl stop home-assistant.service
  • sudo rm /home/homeassistant/.homeassistant/zigbee.db
  • sudo systemctl start home-assistant.service
  • In web interface, issue zha.permit service call
  • Run through inclusion procedure on device

Log result:

2017-07-17 07:52:07 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification
2017-07-17 07:52:09 WARNING (MainThread) [bellows.zigbee.util] Error calling listener.device_initialized: No such command name: cluster_id
2017-07-17 07:52:28 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-17 07:52:28 WARNING (MainThread) [bellows.zigbee.zcl] [0x9539:1:0x0500] No handler for cluster command 1
2017-07-17 07:52:29 WARNING (MainThread) [bellows.zigbee.zcl] [0x9539:1:0x0500] No handler for cluster command 0
2017-07-17 07:52:30 WARNING (MainThread) [bellows.zigbee.zcl] [0x9539:1:0x0500] No handler for cluster command 0
2017-07-17 07:52:31 WARNING (MainThread) [bellows.zigbee.zcl] [0x9539:1:0x0500] No handler for cluster command 0
2017-07-17 07:52:59 WARNING (MainThread) [bellows.zigbee.zcl] [0x9539:1:0x0500] No handler for cluster command 0
2017-07-17 07:53:03 WARNING (MainThread) [bellows.zigbee.zcl] [0x9539:1:0x0500] No handler for cluster command 0
  • Restart hass: sudo systemctl restart home-assistant.service

Log result:

2017-07-17 07:53:43 ERROR (MainThread) [homeassistant.setup] Error during setup of component zha
    Traceback (most recent call last):
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/setup.py", line 187, in _async_setup_component
        result = yield from component.async_setup(hass, processed_config)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/zha/__init__.py", line 87, in async_setup
        APPLICATION_CONTROLLER = ControllerApplication(ezsp_, database)
      File "/home/homeassistant/.homeassistant/deps/bellows/zigbee/application.py", line 30, in __init__
        self._dblistener.load()
      File "/home/homeassistant/.homeassistant/deps/bellows/zigbee/appdb.py", line 204, in load
        clus = ep.in_clusters[cluster]
    KeyError: 0

Device details

Friendly Name: CentraLite 3325-S
Type of Device: Smartthings Motion Sensor (2015)

Database Values

Attributes

| endpoint_id | cluster | attrid | value      |
|-------------|---------|--------|------------|
| 1           | 0       | 4      | CentraLite |
| 1           | 0       | 5      | 3325-S     |
| 2           | 0       | 4      | CentraLite |
| 2           | 0       | 5      | 3325-S     |
| 1           | 1280    | 1      | 13         |

Clusters

| endpoint_id | cluster |
|-------------|---------|
| 1           | 0       |
| 1           | 1       |
| 1           | 1026    |
| 1           | 3       |
| 1           | 2821    |
| 1           | 32      |
| 1           | 1280    |

Devices

|  nwk      | status |
|-----------|--------|
| <network> | 1      |

Endpoints

| endpoint_id | profile_id | device_type | status |
|-------------|------------|-------------|--------|
|      1      |     260    |     1026    |    1   |
|      2      |     49887  |     263     |    1   |

I’m in the same boat after 0.49 install none of my iris motion sensors and door sensors work
if you delete the DB zha starts up fine and as soon as you add just 1 device it works for a while until reboot and i get the same error message

sadly i can’t get an answer anywhere and i’ve been at it now since 0.49 got released to figure out what the problem is

it’s been so far that the permit option does not work anymore either

1 Like

I’m in the same boat as well. Fresh install on Ubuntu, my first time using home assistant. I have the Nortek HUSBZB-1 hub. Can get my Osram Lightify lights to pair with HA and everything works great until I restart the server. The ZHA component fails to load after the restart. Deleting the DB and restarting again allows the ZHA component to load without error but, with a new database, and without any of the previously paired devices.

I’ve just updated my installation to 49.1 and the problem is now worse: instead of skipping over the zha component with a failure, the entire boot process hangs. With logger set to DEBUG I get the normal boot messages followed by the single line:

Jul 24 18:30:37 hass hass[2732]: WARNING:homeassistant.setup:Setup of zha is taking over 10 seconds.

After which nothing happens, the web interface doesn’t load and the startup of HASS hangs indefinately. No trace output is presented. If I delete the zigbee.db file first, it is re-created at boot, but with or without the db file the system refuses to start with zha enabled.

Commenting out the zha component returns the system to normal operation.

edit: disregard all of the above, I hadn’t mapped over the serial port correctly like a dunce.

Same issues for me as well. I tried getting it setup first time in .49 and ran into the same issues listed here. Same result after upgrade to .49.1 Still hangs on service restart with: WARNING:homeassistant.setup:Setup of zha is taking over 10 seconds. and HA will not finish startup. Only way to remedy is to comment out and restart.

Same issue as OP.

rm /srv/homeassistant/.homeassistant/zigbee.db
sudo service home-assistant start

zigbee.db is created and everything works normal. I can call the permit service and it lets me pair devices. From this point a restart of hass will end with an error on the States page and the following in home-assistant.log:

2017-08-03 21:33:24 ERROR (MainThread) [homeassistant.setup] Error during setup of component zha
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 191, in _async_setup_component
    result = yield from component.async_setup(hass, processed_config)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/zha/__init__.py", line 87, in async_setup
    APPLICATION_CONTROLLER = ControllerApplication(ezsp_, database)
  File "/srv/homeassistant/lib/python3.5/site-packages/bellows/zigbee/application.py", line 31, in __init__
    self._dblistener.load()
  File "/srv/homeassistant/lib/python3.5/site-packages/bellows/zigbee/appdb.py", line 204, in load
    clus = ep.in_clusters[cluster]
KeyError: 0

System info:
Odroid C2+ running Ubuntu 16.04.2 LTS
HUSBZB-1
Zstick Rev 5
HASS: 0.50.2 (upgraded and tested just before writing this post)
python 3.5.2
bellows 0.3.4

1 Like

Same issue here. It all works fine the first time I setup, but after a reset I get the “Setup of zha is taking over 10 seconds”.

I have the exact same issue too. Like most others, I use the HUSBZB stick.
Did any of you’ll figure out a solution to this?