Giter Club home page Giter Club logo

bellows's Introduction

zigpy

Build Coverage Status

zigpy is a hardware independent Zigbee protocol stack integration project to implement Zigbee standard specifications as a Python 3 library.

Zigbee integration via zigpy allows you to connect one of many off-the-shelf Zigbee Coordinator adapters using one of the available Zigbee radio library modules compatible with zigpy to control Zigbee based devices. There is currently support for controlling Zigbee device types such as binary sensors (e.g., motion and door sensors), sensors (e.g., temperature sensors), lights, switches, buttons, covers, fans, climate control equipment, locks, and intruder alarm system devices. Note that Zigbee Green Power devices currently are unsupported.

Zigbee stacks and hardware from many different hardware chip manufacturers are supported via radio libraries which translate their proprietary communication protocol into a common API which is shared among all radio libraries for zigpy. If some Zigbee stack or Zigbee Coordinator hardware for other manufacturers is not supported by yet zigpy it is possible for any independent developer to step-up and develop a new radio library for zigpy which translates its proprietary communication protocol into the common API that zigpy can understand.

zigpy contains common code implementing ZCL (Zigbee Cluster Library) and ZDO (Zigbee Device Object) application state management which is being used by various radio libraries implementing the actual interface with the radio modules from different manufacturers. The separate radio libraries interface with radio hardware adapters/modules over USB and GPIO using different native UART serial protocols.

The ZHA integration component for Home Assistant, the Zigbee Plugin for Domoticz, and the Zigbee Plugin for Jeedom (competing open-source home automation software) are all using zigpy libraries as dependencies, as such they could be used as references of different implementations if looking to integrate a Zigbee solution into your application.

Zigbee device OTA updates

zigpy have ability to download and perform Zigbee OTAU (Over-The-Air Updates) of Zigbee devices firmware. The Zigbee OTA update firmware image files should conform to standard Zigbee OTA format and OTA provider source URLs need to be published for public availability. Updates from a local OTA update directory also is also supported and can be used as an option for offline firmware updates if user provide correct Zigbee OTA formatted firmware files themselves.

Support for automatic download from existing online OTA providers in zigpy OTA provider code is currently only available for IKEA, Inovelli, LEDVANCE/OSRAM, SALUS/Computime, and SONOFF/ITEAD devices. Support for additional OTA providers for other manufacturers devices could be added to zigpy in the future, if device manufacturers publish their firmware images publicly and developers contribute the needed download code for them.

How to install and test, report bugs, or contribute to this project

For specific instructions on how-to install and test zigpy or contribute bug-reports and code to this project please see the guidelines in the CONTRIBUTING.md file:

This CONTRIBUTING.md file will contain information about using zigpy, testing new releases, troubleshooting and bug-reporting as, as well as library + code instructions for developers and more. This file also contain short summaries and links to other related projects that directly or indirectly depends in zigpy libraries.

You can contribute to this project either as an end-user, a tester (advanced user contributing constructive issue/bug-reports) or as a developer contributing code.

Compatible Zigbee coordinator hardware

Radio libraries for zigpy are separate projects with their own repositories and include bellows (for communicating with Silicon Labs EmberZNet based radios), zigpy-deconz (for communicating with deCONZ based radios from Dresden Elektronik), and zigpy-xbee (for communicating with XBee based Zigbee radios), zigpy-zigate for communicating with ZiGate based radios, zigpy-znp or zigpy-cc for communicating with Texas Instruments based radios that have Z-Stack ZNP coordinator firmware.

Note! Zigbee 3.0 support or not in zigpy depends primarily on your Zigbee coordinator hardware and its firmware. Some Zigbee coordinator hardware support Zigbee 3.0 but might be shipped with an older firmware which does not, in which case may want to upgrade the firmware manually yourself. Some other Zigbee coordinator hardware may not support a firmware that is capable of Zigbee 3.0 at all but can still be fully functional and feature complete for your needs, (this is very common as many if not most Zigbee devices do not yet Zigbee 3.0 or are backwards-compable with a Zigbee profile that is support by your Zigbee coordinator hardware and its firmware). As a general rule, newer Zigbee coordinator hardware released can normally support Zigbee 3.0 firmware and it is up to its manufacturer to make such firmware available for them.

Compatible zigpy radio libraries

  • Digi XBee based Zigbee radios via the zigpy-xbee library for zigpy.
  • dresden elektronik deCONZ based Zigbee radios via the zigpy-deconz library for zigpy.
  • Silicon Labs (EmberZNet) based Zigbee radios using the EZSP protocol via the bellows library for zigpy.
  • Texas Instruments based Zigbee radios with all compatible Z-Stack firmware via the zigpy-znp library for zigpy.
  • ZiGate based ZigBee radios via the zigpy-zigate library for zigpy.

Legacy or obsolete zigpy radio libraries

  • Texas Instruments with Z-Stack legacy firmware via the zigpy-cc library for zigpy.

Release packages available via PyPI

New packages of tagged versions are also released via the "zigpy" project on PyPI

Older packages of tagged versions are still available on the "zigpy-homeassistant" project on PyPI

Packages of tagged versions of the radio libraries are released via separate projects on PyPI

bellows's People

Contributors

adminiuga avatar agners avatar andreasbomholtz avatar basilfx avatar bdrr77 avatar candoanything avatar damarco avatar dmulcahey avatar dumpfheimer avatar h3ndrik avatar hadrienpatte avatar halkeye avatar hedda avatar henryptung avatar jbott avatar konistehrad avatar kylehendricks avatar lag1924 avatar mattsch avatar mattwestb avatar pipiche38 avatar puddly avatar rcloran avatar sofiboselli avatar sylvainper avatar tari avatar thejulianjes avatar tube0013 avatar yoda-x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bellows's Issues

Iris Motion sensor breaks zha in 0.3.2

It seems iris sensors break the zha database when added to homeassistant

When DB is deleted and HA is started it creates a new db and everything is fine .
As soon as a gen 2 iris motion sensor is added it works fine until restart of HA.

after restart

2017-07-17 17:24:12 INFO (MainThread) [homeassistant.loader] Loaded zha from homeassistant.components.zha
2017-07-17 17:24:17 INFO (MainThread) [homeassistant.setup] Setting up zha
2017-07-17 17:24:18 ERROR (MainThread) [homeassistant.setup] Error during setup of component zha
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/zha/__init__.py", line 87, in async_setup
* [zha](https://home-assistant.io/components/zha/)
* [zha](https://home-assistant.io/components/zha/)

adding other devices like hue motion sensor or remote does not break anything just IRIS motion sensor
any ideas?

everything worked fine before Ha got updated to 0.49 and zha was updated to 0.3.2.

Error trying to pair thermostat devices (st218)

Hello,

I got devices paired, but I wanted to retry the pairing.
So I stopped my Home assistant, delete zigbee.db file et restart Home assistant.
Now When I try to pair devices I got that

ov 16 13:16:51 androlapin hass[24814]: 2017-11-16 13:16:51 WARNING (MainThread) [bellows.zigbee.zdo] [0xe895:zdo] Unsupported ZDO request 0x0036
Nov 16 13:16:51 androlapin hass[24814]: 2017-11-16 13:16:51 WARNING (MainThread) [bellows.zigbee.zdo] [0xe895:zdo] Unsupported ZDO request 0x0036
Nov 16 13:16:51 androlapin hass[24814]: 2017-11-16 13:16:51 WARNING (MainThread) [bellows.zigbee.zdo] [0xe895:zdo] Unsupported ZDO request 0x0036
Nov 16 13:16:51 androlapin hass[24814]: 2017-11-16 13:16:51 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
Nov 16 13:17:28 androlapin hass[24814]: 2017-11-16 13:17:28 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
Nov 16 13:18:28 androlapin hass[24814]: 2017-11-16 13:18:28 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback SerialTransport._read_ready()
Nov 16 13:18:28 androlapin hass[24814]: Traceback (most recent call last):
Nov 16 13:18:28 androlapin hass[24814]:   File "/usr/lib/python3.6/asyncio/events.py", line 127, in _run
Nov 16 13:18:28 androlapin hass[24814]:     self._callback(*self._args)
Nov 16 13:18:28 androlapin hass[24814]:   File "/opt/homeassistant/deps/lib/python3.6/site-packages/serial_asyncio/__init__.py", line 106, in _read_ready
Nov 16 13:18:28 androlapin hass[24814]:     self._protocol.data_received(data)
Nov 16 13:18:28 androlapin hass[24814]:   File "/opt/homeassistant/deps/lib/python3.6/site-packages/bellows/uart.py", line 61, in data_received
Nov 16 13:18:28 androlapin hass[24814]:     self.frame_received(frame)
Nov 16 13:18:28 androlapin hass[24814]:   File "/opt/homeassistant/deps/lib/python3.6/site-packages/bellows/uart.py", line 81, in frame_received
Nov 16 13:18:28 androlapin hass[24814]:     self.rstack_frame_received(data)
Nov 16 13:18:28 androlapin hass[24814]:   File "/opt/homeassistant/deps/lib/python3.6/site-packages/bellows/uart.py", line 128, in rstack_frame_received
Nov 16 13:18:28 androlapin hass[24814]:     self._reset_future.set_result(True)
Nov 16 13:18:28 androlapin hass[24814]:   File "/usr/lib/python3.6/asyncio/futures.py", line 300, in set_result
Nov 16 13:18:28 androlapin hass[24814]:     raise InvalidStateError('{}: {!r}'.format(self._state, self))
Nov 16 13:18:28 androlapin hass[24814]: asyncio.base_futures.InvalidStateError: FINISHED: <Future finished result=True>
Nov 16 13:18:40 androlapin hass[24814]: 2017-11-16 13:18:40 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback SerialTransport._read_ready()
Nov 16 13:18:40 androlapin hass[24814]: Traceback (most recent call last):
Nov 16 13:18:40 androlapin hass[24814]:   File "/usr/lib/python3.6/asyncio/events.py", line 127, in _run
Nov 16 13:18:40 androlapin hass[24814]:     self._callback(*self._args)
Nov 16 13:18:40 androlapin hass[24814]:   File "/opt/homeassistant/deps/lib/python3.6/site-packages/serial_asyncio/__init__.py", line 106, in _read_ready
Nov 16 13:18:40 androlapin hass[24814]:     self._protocol.data_received(data)
Nov 16 13:18:40 androlapin hass[24814]:   File "/opt/homeassistant/deps/lib/python3.6/site-packages/bellows/uart.py", line 61, in data_received
Nov 16 13:18:40 androlapin hass[24814]:     self.frame_received(frame)
Nov 16 13:18:40 androlapin hass[24814]:   File "/opt/homeassistant/deps/lib/python3.6/site-packages/bellows/uart.py", line 81, in frame_received
Nov 16 13:18:40 androlapin hass[24814]:     self.rstack_frame_received(data)
Nov 16 13:18:40 androlapin hass[24814]:   File "/opt/homeassistant/deps/lib/python3.6/site-packages/bellows/uart.py", line 128, in rstack_frame_received
Nov 16 13:18:40 androlapin hass[24814]:     self._reset_future.set_result(True)
Nov 16 13:18:40 androlapin hass[24814]:   File "/usr/lib/python3.6/asyncio/futures.py", line 300, in set_result
Nov 16 13:18:40 androlapin hass[24814]:     raise InvalidStateError('{}: {!r}'.format(self._state, self))
Nov 16 13:18:40 androlapin hass[24814]: asyncio.base_futures.InvalidStateError: FINISHED: <Future finished result=True>

Zha failing on startup - some devices not available

I have started seeing the following exception when I start HA. I get this error twice, and also I have two Smartthing Outlets that fail to show up. Not sure if this is related.

Error while setting up platform zha
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/switch/zha.py", line 27, in async_setup_platform
    await cluster.bind()
  File "/mnt/homeassistant/hass/deps/lib/python3.6/site-packages/bellows/zigbee/application.py", line 248, in request
    raise DeliveryError("Message send failure %s" % (v[0], ))
zigpy.exceptions.DeliveryError: Message send failure EmberStatus.MAX_MESSAGE_LIMIT_REACHED

Ability to rename end points

Current endpoints can be difficult to differentiate, especially when you have multiple of the same item (I have 10 ikea light bulbs).

The current name is constructed as a combination of the different device components:

self.entity_id = '%s.%s_%s_%s_%s' % (
            self._domain,
            slugify(manufacturer),
            slugify(model),
            ieeetail,
            endpoint.endpoint_id,

Something similar to Z-wave's rename would allow the user to rename their devices which would make config implementation (automation, configuration, etc) easier and less prone to error.

A suggest would be to add an additional table to zigbee.db that contains the mapping of the devices (configurable) name to the endpoint. This could, be default, be filled out in the same way as the names are currently defined, but also allow a user to override with their own custom naming.

Issue connecting Xiaomi devices

Note: This issue is somewhat of a scratchpad of my findings. I was barely familiar with the structure of the zigbee protocol before I started this. I'm hoping someone else will come across this and see something I'm missing, but until then, I'll continue this debugging session here, if that's alright.

I'm attempting to couple the following devices of Xiaomi using Bellows, to use them with Home Assistant: Xiaomi Smart Door and Window Sensor, Human Body sensor and Wireless switch. However, after connecting them using bellows permit, I get Message on unknown endpoint 1 errors.

As connecting seems a bit finnicky, it took me a while to get a somewhat reliable log. In this particular case, another exception was thrown by Bellows right after it started to look for endpoints. I think this might have been the case because the button was clicked right after (it is almost impossible to click the linking button without actually triggering the button).

It seems that the Active Endpoint Request never receives a response, due to which it never registers the endpoints.

I'm not well known with the whole Zigbee protocol stack, although I have been trying to read up on it. However, I have no device that does work to compare logs with, so I'm really not sure what I'm looking for in this case. I'm hoping for some input with this issue.

When the button is clicked without the endpoints being found, the following is logged:

2017-08-23 00:11:05.462 debug: Data frame: b'304db1ed542e14b459954b25ab5592ca7bf5bbf912316093fecc6389ec7ed1357e'
2017-08-23 00:11:05.471 debug: Sending: b'8430fc7e'
2017-08-23 00:11:05.480 debug: Application frame 69 (incomingMessageHandler) received
2017-08-23 00:11:05.491 warning: [0x529c] Message on unknown endpoint 1
2017-08-23 00:11:05.668 debug: Data frame: b'404db1ed542e14b459954b25ab5592cd72f5bbf912316093f9cc6389ec7f247b7e'
2017-08-23 00:11:05.678 debug: Sending: b'8520dd7e'
2017-08-23 00:11:05.688 debug: Application frame 69 (incomingMessageHandler) received
2017-08-23 00:11:05.698 warning: [0x529c] Message on unknown endpoint 1

Full log of bellows -d /dev/ttyUSB0 -v DEBUG permit -t 150 -D zigbee.db:

2017-08-23 00:10:23.100 debug: Using selector: EpollSelector
2017-08-23 00:10:23.308 debug: Loading application state from zigbee3.db
2017-08-23 00:10:23.320 debug: Sending: b'1ac038bc7e'
2017-08-23 00:10:23.449 debug: RSTACK Version: 2 Reason: RESET_SOFTWARE frame: b'c1020b0a527e'
2017-08-23 00:10:23.461 debug: Send command version
2017-08-23 00:10:23.477 debug: Sending: b'004221a850ed2c7e'
2017-08-23 00:10:23.488 debug: Data frame: b'0142a1a8502815e23c957e'
2017-08-23 00:10:23.499 debug: Sending: b'8160597e'
2017-08-23 00:10:23.511 debug: Application frame 0 (version) received
2017-08-23 00:10:23.520 debug: Send command setConfigurationValue
2017-08-23 00:10:23.538 debug: Sending: b'7d314321fb582815c3277e'
2017-08-23 00:10:23.555 debug: Data frame: b'1243a1fb54fb737e'
2017-08-23 00:10:23.572 debug: Sending: b'82503a7e'
2017-08-23 00:10:23.585 debug: Application frame 83 (setConfigurationValue) received
2017-08-23 00:10:23.596 debug: Send command setConfigurationValue
2017-08-23 00:10:23.610 debug: Sending: b'224021fb592f15226f7e'
2017-08-23 00:10:23.631 debug: Data frame: b'2340a1fb54c6107e'
2017-08-23 00:10:23.641 debug: Sending: b'83401b7e'
2017-08-23 00:10:23.656 debug: Application frame 83 (setConfigurationValue) received
2017-08-23 00:10:23.665 debug: Send command setConfigurationValue
2017-08-23 00:10:23.675 debug: Sending: b'334121fb792b15a2d77e'
2017-08-23 00:10:23.685 debug: Data frame: b'3441a1fb54d32a7e'
2017-08-23 00:10:23.695 debug: Sending: b'8430fc7e'
2017-08-23 00:10:23.707 debug: Application frame 83 (setConfigurationValue) received
2017-08-23 00:10:23.716 debug: Send command setConfigurationValue
2017-08-23 00:10:23.726 debug: Sending: b'444621fb7d5e291514417e'
2017-08-23 00:10:23.736 debug: Data frame: b'4546a1fb5435d07e'
2017-08-23 00:10:23.748 debug: Sending: b'8520dd7e'
2017-08-23 00:10:23.758 debug: Application frame 83 (setConfigurationValue) received
2017-08-23 00:10:23.769 debug: Send command setConfigurationValue
2017-08-23 00:10:23.778 debug: Sending: b'554721fb4d2815713f7e'
2017-08-23 00:10:23.787 debug: Data frame: b'5647a1fb54a9ec7e'
2017-08-23 00:10:23.797 debug: Sending: b'8610be7e'
2017-08-23 00:10:23.806 debug: Application frame 83 (setConfigurationValue) received
2017-08-23 00:10:23.816 debug: Send command setConfigurationValue
2017-08-23 00:10:23.825 debug: Sending: b'664421fb55d515b18f7e'
2017-08-23 00:10:23.835 debug: Data frame: b'6744a1fb54948f7e'
2017-08-23 00:10:23.846 debug: Sending: b'87009f7e'
2017-08-23 00:10:23.856 debug: Application frame 83 (setConfigurationValue) received
2017-08-23 00:10:23.866 debug: Send command networkInit
2017-08-23 00:10:23.876 debug: Sending: b'774521bf02267e'
2017-08-23 00:10:23.886 debug: Data frame: b'7045a5bf549c7d7e'
2017-08-23 00:10:23.895 debug: Sending: b'8070787e'
2017-08-23 00:10:23.906 debug: Application frame 23 (networkInit) received
2017-08-23 00:10:23.916 debug: Data frame: b'0045b1b1c4beee7e'
2017-08-23 00:10:23.925 debug: Sending: b'8160597e'
2017-08-23 00:10:23.935 debug: Application frame 25 (stackStatusHandler) received
2017-08-23 00:10:23.944 debug: Send command getNetworkParameters
2017-08-23 00:10:23.956 debug: Sending: b'014a21808c477e'
2017-08-23 00:10:23.967 debug: Data frame: b'114aa180542b23cdccf0bb442528095e944127abedce677302c11b897e'
2017-08-23 00:10:23.977 debug: Sending: b'82503a7e'
2017-08-23 00:10:23.986 debug: Application frame 40 (getNetworkParameters) received
2017-08-23 00:10:23.996 debug: Send command setPolicy
2017-08-23 00:10:24.006 debug: Sending: b'124b21fd517a60e97e'
2017-08-23 00:10:24.017 debug: Data frame: b'224ba1fd54d8f87e'
2017-08-23 00:10:24.027 debug: Sending: b'83401b7e'
2017-08-23 00:10:24.037 debug: Application frame 85 (setPolicy) received
2017-08-23 00:10:24.047 debug: Send command setPolicy
2017-08-23 00:10:24.058 debug: Sending: b'234821fd524b97367e'
2017-08-23 00:10:24.067 debug: Data frame: b'3348a1fd54ed2f7e'
2017-08-23 00:10:24.076 debug: Sending: b'8430fc7e'
2017-08-23 00:10:24.086 debug: Application frame 85 (setPolicy) received
2017-08-23 00:10:24.095 debug: Send command setPolicy
2017-08-23 00:10:24.106 debug: Sending: b'344921fd542b29a27e'
2017-08-23 00:10:24.115 debug: Data frame: b'4449a1fd54e1c97e'
2017-08-23 00:10:24.125 debug: Sending: b'8520dd7e'
2017-08-23 00:10:24.135 debug: Application frame 85 (setPolicy) received
2017-08-23 00:10:24.144 debug: Send command getNodeId
2017-08-23 00:10:24.154 debug: Sending: b'454e218f05057e'
2017-08-23 00:10:24.163 debug: Data frame: b'554ea18f542a2fbf7e'
2017-08-23 00:10:24.174 debug: Sending: b'8610be7e'
2017-08-23 00:10:24.183 debug: Application frame 39 (getNodeId) received
2017-08-23 00:10:24.193 debug: Send command getEui64
2017-08-23 00:10:24.203 debug: Sending: b'564f218ea26f7e'
2017-08-23 00:10:24.212 debug: Data frame: b'664fa18eed1310bf59fb472560ec7e'
2017-08-23 00:10:24.222 debug: Sending: b'87009f7e'
2017-08-23 00:10:24.232 debug: Application frame 38 (getEui64) received
2017-08-23 00:10:24.243 debug: Send command permitJoining
2017-08-23 00:10:24.253 debug: Sending: b'674c218ac2f2017e'
2017-08-23 00:10:24.263 debug: Data frame: b'774ca18a542e7e7e'
2017-08-23 00:10:24.272 debug: Sending: b'8070787e'
2017-08-23 00:10:24.281 debug: Application frame 34 (permitJoining) received
2017-08-23 00:10:24.291 Joins are permitted for the next 150s...
2017-08-23 00:10:39.213 debug: Data frame: b'074cb18b542bae1a1f7ccc24aad8874998cebb7e'
2017-08-23 00:10:39.222 debug: Sending: b'8160597e'
2017-08-23 00:10:39.232 debug: Application frame 35 (childJoinHandler) received
2017-08-23 00:10:42.144 debug: Data frame: b'174cb18b542aae1a1f7ccc24aad8874998d3cf7e'
2017-08-23 00:10:42.153 debug: Sending: b'82503a7e'
2017-08-23 00:10:42.163 debug: Application frame 35 (childJoinHandler) received
2017-08-23 00:10:55.324 debug: Data frame: b'274cb18b542b89e01f7ccc24aad8874998de0a7e'
2017-08-23 00:10:55.333 debug: Sending: b'83401b7e'
2017-08-23 00:10:55.343 debug: Application frame 35 (childJoinHandler) received
2017-08-23 00:10:55.822 debug: Data frame: b'374cb18cc878535adf954aa8bf5593499c4efe747e'
2017-08-23 00:10:55.831 debug: Sending: b'8430fc7e'
2017-08-23 00:10:55.842 debug: Application frame 36 (trustCenterJoinHandler) received
2017-08-23 00:10:55.852 Device 0x529c (00:15:8d:00:01:86:e8:46) joined the network
2017-08-23 00:10:55.862 [0x529c] Discovering endpoints
2017-08-23 00:10:55.872 debug: Send command sendUnicast
2017-08-23 00:10:55.881 debug: Sending: b'744d219c54b647b259914a25aa1593499c4f26a8ec5235ebe87e'
2017-08-23 00:10:55.891 debug: Data frame: b'404da19c549f75a57e'
2017-08-23 00:10:55.900 debug: Sending: b'8520dd7e'
2017-08-23 00:10:55.910 debug: Application frame 52 (sendUnicast) received
2017-08-23 00:10:56.092 debug: Data frame: b'504db1ed502a15a159944a2dab55923663f7bbf912316b33619425617a7f3f2afecd5e9ab17e'
2017-08-23 00:10:56.102 debug: Sending: b'8610be7e'
2017-08-23 00:10:56.112 debug: Application frame 69 (incomingMessageHandler) received
2017-08-23 00:10:56.126 debug: [0x529c:zdo] ZDO request 0x0013: [21148, 00:15:8d:00:01:86:e8:46, 128]
2017-08-23 00:10:56.147 debug: Data frame: b'604db1ed542e14b259954b25ab5592c97df5bbf912317e93fdcc6689be6c53d286a4f01cea91b4b4a78d1afb2f57ca84a4607e'
2017-08-23 00:10:56.162 debug: Sending: b'87009f7e'
2017-08-23 00:10:56.172 debug: Application frame 69 (incomingMessageHandler) received
2017-08-23 00:10:56.182 warning: [0x529c] Message on unknown endpoint 1
2017-08-23 00:10:56.192 debug: Data frame: b'704db1ed542e14b259954b25ab5592c864f7bbf912316093fccc6289dc743b027e'
2017-08-23 00:10:56.202 debug: Sending: b'8070787e'
2017-08-23 00:10:56.215 debug: Application frame 69 (incomingMessageHandler) received
2017-08-23 00:10:56.228 warning: [0x529c] Message on unknown endpoint 1
2017-08-23 00:10:56.239 debug: Data frame: b'004db1ed542e14b259954b25ab5592cb2cf7bbf912317a97c9d46183fe8173a1ebdddf4e63f4e673d4f6698c4623a9cd123a85ba92057e'
2017-08-23 00:10:56.249 debug: Sending: b'8160597e'
2017-08-23 00:10:56.261 debug: Application frame 69 (incomingMessageHandler) received
2017-08-23 00:10:56.271 Exception running handler
2017-08-23 00:10:56.281 Traceback (most recent call last):
2017-08-23 00:10:56.292   File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/ezsp.py", line 198, in handle_callback
2017-08-23 00:10:56.302     handler(*args)
2017-08-23 00:10:56.312   File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/zigbee/application.py", line 146, in ezsp_callback_handler
2017-08-23 00:10:56.322     self._handle_frame(*args)
2017-08-23 00:10:56.332   File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/zigbee/application.py", line 169, in _handle_frame
2017-08-23 00:10:56.342     tsn, command_id, is_reply, args = deserialize(aps_frame, message)
2017-08-23 00:10:56.352   File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/zigbee/zcl/__init__.py", line 56, in deserialize
2017-08-23 00:10:56.362     value, data = t.deserialize(data, schema)
2017-08-23 00:10:56.372   File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/types/__init__.py", line 9, in deserialize
2017-08-23 00:10:56.381     value, data = type_.deserialize(data)
2017-08-23 00:10:56.392   File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/types/basic.py", line 128, in deserialize
2017-08-23 00:10:56.401     item, data = r._itemtype.deserialize(data)
2017-08-23 00:10:56.412   File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/types/struct.py", line 22, in deserialize
2017-08-23 00:10:56.422     v, data = field_type.deserialize(data)
2017-08-23 00:10:56.432   File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/zigbee/zcl/foundation.py", line 129, in deserialize
2017-08-23 00:10:56.442     actual_type = DATA_TYPES[self.type][1]
2017-08-23 00:10:56.452 KeyError: 76
2017-08-23 00:10:58.798 debug: Data frame: b'104db12816b647a94f7e'
2017-08-23 00:10:58.808 debug: Sending: b'82503a7e'
2017-08-23 00:10:58.817 debug: Application frame 128 (incomingRouteErrorHandler) received
2017-08-23 00:11:03.296 debug: Data frame: b'204db12816b647f0c27e'
2017-08-23 00:11:03.306 debug: Sending: b'83401b7e'
2017-08-23 00:11:03.315 debug: Application frame 128 (incomingRouteErrorHandler) received
2017-08-23 00:11:05.462 debug: Data frame: b'304db1ed542e14b459954b25ab5592ca7bf5bbf912316093fecc6389ec7ed1357e'
2017-08-23 00:11:05.471 debug: Sending: b'8430fc7e'
2017-08-23 00:11:05.480 debug: Application frame 69 (incomingMessageHandler) received
2017-08-23 00:11:05.491 warning: [0x529c] Message on unknown endpoint 1
2017-08-23 00:11:05.668 debug: Data frame: b'404db1ed542e14b459954b25ab5592cd72f5bbf912316093f9cc6389ec7f247b7e'
2017-08-23 00:11:05.678 debug: Sending: b'8520dd7e'
2017-08-23 00:11:05.688 debug: Application frame 69 (incomingMessageHandler) received
2017-08-23 00:11:05.698 warning: [0x529c] Message on unknown endpoint 1
2017-08-23 00:11:07.785 debug: Data frame: b'504db12816b64774a37e'
2017-08-23 00:11:07.795 debug: Sending: b'8610be7e'
2017-08-23 00:11:07.805 debug: Application frame 128 (incomingRouteErrorHandler) received
2017-08-23 00:11:09.352 debug: Data frame: b'604db19754b647b259914a25aa1593499cfb26cded8a847e'
2017-08-23 00:11:09.362 debug: Sending: b'87009f7e'
2017-08-23 00:11:09.372 debug: Application frame 63 (messageSentHandler) received
2017-08-23 00:11:11.360 debug: Send command sendUnicast
2017-08-23 00:11:11.370 debug: Sending: b'0752219c54b647b259914a25aa1593499c4c25a8ef52355e197e'
2017-08-23 00:11:11.383 debug: Data frame: b'7152a19c549c4e497e'
2017-08-23 00:11:11.392 debug: Sending: b'8070787e'
2017-08-23 00:11:11.402 debug: Application frame 52 (sendUnicast) received
2017-08-23 00:11:14.305 debug: Data frame: b'0152b12816b647f9d27e'
2017-08-23 00:11:14.321 debug: Sending: b'8160597e'
2017-08-23 00:11:14.332 debug: Application frame 128 (incomingRouteErrorHandler) received
2017-08-23 00:11:18.800 debug: Data frame: b'1152b12816b647cea97e'
2017-08-23 00:11:18.810 debug: Sending: b'82503a7e'
2017-08-23 00:11:18.819 debug: Application frame 128 (incomingRouteErrorHandler) received
2017-08-23 00:11:23.292 debug: Data frame: b'2152b12816b64797247e'
2017-08-23 00:11:23.302 debug: Sending: b'83401b7e'
2017-08-23 00:11:23.312 debug: Application frame 128 (incomingRouteErrorHandler) received
2017-08-23 00:11:24.858 debug: Data frame: b'3152b19754b647b259914a25aa1593499cf825cded56b67e'
2017-08-23 00:11:24.868 debug: Sending: b'8430fc7e'
2017-08-23 00:11:24.877 debug: Application frame 63 (messageSentHandler) received
2017-08-23 00:11:26.866 debug: Send command sendUnicast
2017-08-23 00:11:26.876 debug: Sending: b'1453219c54b647b259914a25aa1593499c4d24a8ee5235746b7e'
2017-08-23 00:11:26.886 debug: Data frame: b'4253a19c549d15557e'
2017-08-23 00:11:26.896 debug: Sending: b'8520dd7e'
2017-08-23 00:11:26.906 debug: Application frame 52 (sendUnicast) received
2017-08-23 00:11:29.812 debug: Data frame: b'5253b12816b6478e677e'
2017-08-23 00:11:29.821 debug: Sending: b'8610be7e'
2017-08-23 00:11:29.831 debug: Application frame 128 (incomingRouteErrorHandler) received
2017-08-23 00:11:34.305 debug: Data frame: b'6253b12816b647d7ea7e'
2017-08-23 00:11:34.315 debug: Sending: b'87009f7e'
2017-08-23 00:11:34.325 debug: Application frame 128 (incomingRouteErrorHandler) received
2017-08-23 00:11:38.800 debug: Data frame: b'7253b12816b647e0917e'
2017-08-23 00:11:38.809 debug: Sending: b'8070787e'
2017-08-23 00:11:38.819 debug: Application frame 128 (incomingRouteErrorHandler) received
2017-08-23 00:11:40.365 debug: Data frame: b'0253b19754b647b259914a25aa1593499cf924cdedcfcc7e'
2017-08-23 00:11:40.374 debug: Sending: b'8160597e'
2017-08-23 00:11:40.384 debug: Application frame 63 (messageSentHandler) received
2017-08-23 00:11:40.393 warning: [0x529c] Failed ZDO request during device initialization: Message send failure: EmberStatus.DELIVERY_FAILED

leave() in cli/application.py appears to be dead code

I can't find anywhere that calls this, it's just... there.

On a side note: what is the "official" way to remove/forget a node? The only option I've been able to find is to manually edit the sqlite database, which feels dangerous.

INNR E14 Bulbs

Hi, i am trying to controll INNR E14 Bulbs with Home Assistant 58.1

The Lamp is included into HA and there is a Switch - but thats it. No control possible. The HA logs are giving me no information (even in debug mode) - no errors, just the switch calls.

Is it possible to debug the whole setup somehow? Bellows commandline?

Support for ZigBee "Green Power" devices such as the Hue Tap Switch

Hey - So, I could be missing something, but as near as I can tell ZigBee "Green Power" devices, like the Philips Hue Tap Switch, are current unsupported? So far, I've tried a few things to pair a Hue Tap Switch with bellows, but have not had much luck.

Are green power devices supported? If so, is there anything special needed to pair?

Invite more developers to join "Team Bellows" working in upstream repo?

@rcloran & @AndreasBomholtz Can I suggest that you extend some invitations to a few more developers who are already actively working on patches for and forks of bellows to join some kind of "Team Bellows" which could work together to achieve common goals for the upstream bellows repository? As a team you could collaborate using a common chat and/or forum as communication channel(s) for sharing ideas and discussing short-term and long-term goals for bellows?

To start with some example team-member candidates of the people who looks to be actively been working on improvements and enhancements for bellows and zha for Home Assistant are; @Yoda-x @dmulcahey @jonatanolofsson @damarco @Seluxit @h3ndrik @SteveEasley @titilambert @puddly

Having a team collaborating would off-load some of the work from you. Like if you and a few of them are willing to work together as team then you could for example all help review and give feedback on each otherโ€™s pull request for patches and once trust is proved you could giving more people write access to the upstream bellows repository to assist in committing push request and fixing issues that other people posts?

Long-term, do you believe that it would be a good or bad idea to have more people with write access to your upstream bellows repo?

Proper remove/forget support

This is a pretty critical feature, seeing as bellows manages its own database, and it's a regular occurrence that a device is unavailable or has been reset and is no longer actually in the network to receive a leave command (if that even removes the device from the database -- which is unclear). This makes troubleshooting connection problems difficult, potentially impossible if direct (i.e. outside of bellows) access to the database isn't available.

First steps - documentation update

I got my hands on Telegesis ETRX3USB8M stick (ETRX357 via USB) and I am trying to make it work with HA. Since HA has trouble starting zha (Setup of zha is taking over 10 seconds.), I figured I would try using bellows directly first.

This issue is about the documentation (README.md) deficiencies. I think it should be updated, however, I don't feel like I know enough to do a PR. If you wish I can try though.

Versions:

# python3 --version
Python 3.6.2
# pip3 freeze | grep bellows
bellows==0.3.4

Following the instructions in README:

# bellows devices
Usage: bellows [OPTIONS] COMMAND [ARGS]...

Error: Missing option "-d" / "--device".

Trying again:

# bellows -d /dev/ttyUSB0 devices
Traceback (most recent call last):
  File "/usr/local/bin/bellows", line 11, in <module>
    load_entry_point('bellows==0.3.4', 'console_scripts', 'bellows')()
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/bellows/cli/application.py", line 69, in devices
    app = bellows.zigbee.application.ControllerApplication(ezsp, database)
  File "/usr/local/lib/python3.6/site-packages/bellows/zigbee/application.py", line 29, in __init__
    self._dblistener = bellows.zigbee.appdb.PersistingListener(database_file, self)
  File "/usr/local/lib/python3.6/site-packages/bellows/zigbee/appdb.py", line 29, in __init__
    detect_types=sqlite3.PARSE_DECLTYPES)
sqlite3.OperationalError: unable to open database file

But it looks like database file is not a parameter I can specify?

# bellows --help
Usage: bellows [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --verbosity LVL  Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  -d, --device TEXT    [required]
  --help               Show this message and exit.

Commands:
  config   Get/set configuration on the NCP
  devices  Show device database
  dump     Capture frames on CHANNEL and write to FILE...
  form     Form a new ZigBee network
  info     Get NCP information
  join     Join an existing ZigBee network as an end...
  leave    Leave the ZigBee network
  permit   Allow devices to join this ZigBee network
  scan     Scan for networks or radio interference
  zcl      Peform ZCL operations against a device
  zdo      Perform ZDO operations against a device

Correct me if I'm wrong, but I think the more relevant command for starting would be:

# bellows -v debug -d /dev/ttyUSB0 info
debug: Using selector: EpollSelector
debug: Connected. Resetting.
debug: Sending: b'1ac038bc7e'

(this command hangs on me, but I am guessing this is because I didn't upgrade the firmware, so I'll start looking how to do that now - any hints appreciated ;) )

ValueError: 153 is not a valid EzspStatus

Not sure what is useful for debugging, so including the entire stack trace.

I'm really just playing around with the HUSBZB-1 and seeing if i can't add some random zigbee devices I have.

(homeassistant) homeassistant@hassbian:~/bellows $ bellows -v debug -d /dev/zigbee permit -D ~/.homeassistant/zigb
ee.db
debug: Using selector: EpollSelector
debug: Loading application state from /home/homeassistant/.homeassistant/zigbee.db
debug: Sending: b'1ac038bc7e'
debug: RSTACK Version: 2 Reason: RESET_SOFTWARE frame: b'c1020b0a527e'
debug: Send command version
debug: Sending: b'004221a850ed2c7e'
debug: Data frame: b'0142a1a8502805e67f627e'
debug: Sending: b'8160597e'
debug: Application frame 0 (version) received
debug: Send command setConfigurationValue
debug: Sending: b'7d314321fb582815c3277e'
debug: Data frame: b'1243a1fb54fb737e'
debug: Sending: b'82503a7e'
debug: Application frame 83 (setConfigurationValue) received
debug: Send command setConfigurationValue
debug: Sending: b'224021fb592f15226f7e'
debug: Data frame: b'2340a1fb54c6107e'
debug: Sending: b'83401b7e'
debug: Application frame 83 (setConfigurationValue) received
debug: Send command setConfigurationValue
debug: Sending: b'334121fb792b15a2d77e'
debug: Data frame: b'3441a1fb54d32a7e'
debug: Sending: b'8430fc7e'
debug: Application frame 83 (setConfigurationValue) received
debug: Send command setConfigurationValue
debug: Sending: b'444621fb7d5e291514417e'
debug: Data frame: b'4546a1fb5435d07e'
debug: Sending: b'8520dd7e'
debug: Application frame 83 (setConfigurationValue) received
debug: Send command setConfigurationValue
debug: Sending: b'554721fb4d2815713f7e'
debug: Data frame: b'5647a1fb54a9ec7e'
debug: Sending: b'8610be7e'
debug: Application frame 83 (setConfigurationValue) received
debug: Send command setConfigurationValue
debug: Sending: b'664421fb55d515b18f7e'
debug: Data frame: b'6744a1fb54948f7e'
debug: Sending: b'87009f7e'
debug: Application frame 83 (setConfigurationValue) received
debug: Send command setConfigurationValue
debug: Sending: b'774521fb4a2b1524a97e'
debug: Data frame: b'7045a1fb5481b57e'
debug: Sending: b'8070787e'
debug: Application frame 83 (setConfigurationValue) received
debug: Send command networkInit
debug: Sending: b'004a21bf3d4f7e'
debug: Data frame: b'014aa5bf54ff447e'
debug: Sending: b'8160597e'
debug: Application frame 23 (networkInit) received
debug: Data frame: b'114ab1b1c4c40b7e'
debug: Sending: b'82503a7e'
debug: Application frame 25 (stackStatusHandler) received
debug: Send command getNetworkParameters
debug: Sending: b'124b21803b0c7e'
debug: Data frame: b'224ba180542b55c97796e28907ec5a55944127abedce677302c11fac7e'
debug: Sending: b'83401b7e'
debug: Application frame 40 (getNetworkParameters) received
debug: Send command setPolicy
debug: Sending: b'234821fd517ae4177e'
debug: Data frame: b'3348a1fd54ed2f7e'
debug: Sending: b'8430fc7e'
debug: Application frame 85 (setPolicy) received
debug: Send command setPolicy
debug: Sending: b'344921fd524befa27e'
debug: Data frame: b'4449a1fd54e1c97e'
debug: Sending: b'8520dd7e'
debug: Application frame 85 (setPolicy) received
debug: Send command setPolicy
debug: Sending: b'454e21fd542b4e4a7e'
debug: Data frame: b'554ea1fd541eef7e'
debug: Sending: b'8610be7e'
debug: Application frame 85 (setPolicy) received
debug: Send command getNodeId
debug: Sending: b'564f218fb24e7e'
debug: Data frame: b'664fa18f542a64827e'
debug: Sending: b'87009f7e'
debug: Application frame 39 (getNodeId) received
debug: Send command getEui64
debug: Sending: b'674c218ea1627e'
debug: Data frame: b'4ca18e03cd07b959fb4725aebd7e'
debug: Sending: b'8520dd7e'
debug: Application frame 171 (setValue) received
Exception in callback SerialTransport._read_ready()
handle: <Handle SerialTransport._read_ready()>
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
    self._callback(*self._args)
  File "/srv/homeassistant/lib/python3.4/site-packages/serial_asyncio/__init__.py", line 106, in _read_ready
    self._protocol.data_received(data)
  File "/home/homeassistant/bellows/bellows/uart.py", line 61, in data_received
    self.frame_received(frame)
  File "/home/homeassistant/bellows/bellows/uart.py", line 73, in frame_received
    self.data_frame_received(data)
  File "/home/homeassistant/bellows/bellows/uart.py", line 94, in data_frame_received
    self._application.frame_received(self._randomize(data[1:-3]))
  File "/home/homeassistant/bellows/bellows/ezsp.py", line 179, in frame_received
    result, data = t.deserialize(data, schema)
  File "/home/homeassistant/bellows/bellows/types/__init__.py", line 9, in deserialize
    value, data = type_.deserialize(data)
  File "/home/homeassistant/bellows/bellows/types/basic.py", line 13, in deserialize
    r = cls(int.from_bytes(data[:cls._size], 'little', signed=cls._signed))
  File "/usr/lib/python3.4/enum.py", line 222, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib/python3.4/enum.py", line 457, in __new__
    raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 153 is not a valid EzspStatus
debug: NAK frame: b'a18e03cd07b959fb4725b5157e'
debug: Data frame: b'7f4ca18e03cd07b959fb4725b5157e'
debug: Sending: b'8070787e'
debug: Application frame 38 (getEui64) received
debug: Send command permitJoining
debug: Sending: b'704d218a4af7bb7e'
debug: Data frame: b'004da18a5422987e'
debug: Sending: b'8160597e'
debug: Application frame 34 (permitJoining) received
Joins are permitted for the next 30s...
Done

If i run it again i'm getting

debug: Application frame 83 (setConfigurationValue) received
debug: Send command setConfigurationValue
debug: Sending: b'224021fb592f15226f7e'
debug: Data frame: b'40a1fb54c6107e'
debug: Sending: b'8520dd7e'
Exception in callback SerialTransport._read_ready()
handle: <Handle SerialTransport._read_ready()>
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
    self._callback(*self._args)
  File "/srv/homeassistant/lib/python3.4/site-packages/serial_asyncio/__init__.py", line 106, in _read_ready
    self._protocol.data_received(data)
  File "/home/homeassistant/bellows/bellows/uart.py", line 61, in data_received
    self.frame_received(frame)
  File "/home/homeassistant/bellows/bellows/uart.py", line 73, in frame_received
    self.data_frame_received(data)
  File "/home/homeassistant/bellows/bellows/uart.py", line 94, in data_frame_received
    self._application.frame_received(self._randomize(data[1:-3]))
  File "/home/homeassistant/bellows/bellows/ezsp.py", line 164, in frame_received
    frame_name = self.COMMANDS_BY_ID[frame_id][0]
KeyError: 252

ZigBee Groups - Is it possible to configure and control groups?

Hi,

I've got a bunch of downlights I'm controlling with Home Assistant+zha, and I've noticed a reasonably large delay between the first and last light when toggling a group of 8 lights. Looking at the HA logs, the first to last light is toggled within 0.6 seconds, however that's a noticeable period of time (and I believe the lights are actually taking a little longer, to actually receive all the commands)

Poking around the zigpy and bellows code, I've spotted some membership related code, but don't seem to be able to use it (likely my own fault ;))

I'm hoping this is something supported to configure, at least the ZigBee pieces of it?

My initial attempts to even list membership seem to fail, though I'm aware listing/creating groups is only step 1 - and I'll need likely to extend zha to recognise the groups:

$ bellows -d /dev/ttyUSB0 -b 57600 zcl 00:17:88:01:02:9f:7a:6d 11 4 command get_membership 1
Traceback (most recent call last):
  File "/home/kiall/opt/hass/homeassistant/bin/bellows", line 11, in <module>
    sys.exit(main())
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/bellows/cli/util.py", line 72, in inner
    loop.run_until_complete(async_inner(*args, **kwargs))
  File "/home/kiall/.pyenv/versions/3.5.5/lib/python3.5/asyncio/base_events.py", line 467, in run_until_complete
    return future.result()
  File "/home/kiall/.pyenv/versions/3.5.5/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/home/kiall/.pyenv/versions/3.5.5/lib/python3.5/asyncio/tasks.py", line 240, in _step
    result = coro.send(None)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/bellows/cli/util.py", line 59, in async_inner
    yield from f(ctx, *args, **kwargs)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/bellows/cli/application.py", line 310, in command
    v = yield from getattr(cluster, command)(*parameters, manufacturer=manufacturer)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/zigpy/zcl/__init__.py", line 300, in command
    return self.request(False, command, schema, *args, manufacturer=manufacturer, expect_reply=expect_reply)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/zigpy/util.py", line 73, in wrapper
    return func(*args, **kwargs)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/zigpy/zcl/__init__.py", line 134, in request
    data += t.serialize(args, schema)
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/zigpy/types/__init__.py", line 15, in serialize
    return b''.join(t(v).serialize() for t, v in zip(schema, data))
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/zigpy/types/__init__.py", line 15, in <genexpr>
    return b''.join(t(v).serialize() for t, v in zip(schema, data))
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/zigpy/types/basic.py", line 146, in serialize
    data = super().serialize()
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/zigpy/types/basic.py", line 130, in serialize
    return b''.join([i.serialize() for i in self])
  File "/home/kiall/opt/hass/homeassistant/lib/python3.5/site-packages/zigpy/types/basic.py", line 130, in <listcomp>
    return b''.join([i.serialize() for i in self])
AttributeError: 'str' object has no attribute 'serialize'

Thanks!

Failed ZDO request during device initialization for Ikea Bulb

See also old issue #44

I have tried the latest version of ha today to see if the Ikea issues are resolved, but it appears my ikea bulb is still giving issues.

`2018-03-02 20:16:25 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1937875504: Received {'type': 'call_service', 'domain': 'zha', 'service': 'permit', 'service_data': {}, 'id': 11}
2018-03-02 20:16:25 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=zha, service=permit, service_data=, service_call_id=1965441360-2>
2018-03-02 20:16:25 INFO (MainThread) [homeassistant.components.zha] Permitting joins for 60s
2018-03-02 20:16:25 DEBUG (MainThread) [bellows.ezsp] Send command permitJoining
2018-03-02 20:16:25 DEBUG (MainThread) [bellows.uart] Sending: b'2350218a682a5a7e'
2018-03-02 20:16:25 DEBUG (MainThread) [bellows.uart] Data frame: b'3350a18a54e2857e'
2018-03-02 20:16:25 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2018-03-02 20:16:25 DEBUG (MainThread) [bellows.ezsp] Application frame 34 (permitJoining) received
2018-03-02 20:16:25 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1965441360-2>
2018-03-02 20:16:25 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1937875504: Sending {'id': 11, 'type': 'result', 'success': True, 'result': None}
2018-03-02 20:16:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sun.sun, old_state=<state sun.sun=below_horizon; next_dawn=2018-03-03T05:48:44+00:00, next_dusk=2018-03-03T17:55:27+00:00, next_midnight=2018-03-02T23:52:00+00:00, next_noon=2018-03-03T11:52:06+00:00, next_rising=2018-03-03T06:22:57+00:00, next_setting=2018-03-03T17:21:14+00:00, elevation=-17.92, azimuth=282.75, friendly_name=Sun @ 2018-03-02T20:13:40.667002+01:00>, new_state=<state sun.sun=below_horizon; next_dawn=2018-03-03T05:48:44+00:00, next_dusk=2018-03-03T17:55:27+00:00, next_midnight=2018-03-02T23:52:00+00:00, next_noon=2018-03-03T11:52:06+00:00, next_rising=2018-03-03T06:22:57+00:00, next_setting=2018-03-03T17:21:14+00:00, elevation=-18.07, azimuth=282.96, friendly_name=Sun @ 2018-03-02T20:13:40.667002+01:00>>
2018-03-02 20:16:30 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1937875504: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sun.sun', 'old_state': <state sun.sun=below_horizon; next_dawn=2018-03-03T05:48:44+00:00, next_dusk=2018-03-03T17:55:27+00:00, next_midnight=2018-03-02T23:52:00+00:00, next_noon=2018-03-03T11:52:06+00:00, next_rising=2018-03-03T06:22:57+00:00, next_setting=2018-03-03T17:21:14+00:00, elevation=-17.92, azimuth=282.75, friendly_name=Sun @ 2018-03-02T20:13:40.667002+01:00>, 'new_state': <state sun.sun=below_horizon; next_dawn=2018-03-03T05:48:44+00:00, next_dusk=2018-03-03T17:55:27+00:00, next_midnight=2018-03-02T23:52:00+00:00, next_noon=2018-03-03T11:52:06+00:00, next_rising=2018-03-03T06:22:57+00:00, next_setting=2018-03-03T17:21:14+00:00, elevation=-18.07, azimuth=282.96, friendly_name=Sun @ 2018-03-02T20:13:40.667002+01:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 3, 2, 19, 16, 30, 820815, tzinfo=)}}
2018-03-02 20:16:33 DEBUG (MainThread) [bellows.uart] Data frame: b'4350b5cae1a78f4ca6c3412551517e'
2018-03-02 20:16:33 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e'
2018-03-02 20:16:33 DEBUG (MainThread) [bellows.ezsp] Application frame 98 (incomingSenderEui64Handler) received
2018-03-02 20:16:33 DEBUG (MainThread) [bellows.uart] Data frame: b'5350b1ed502a15a159944a2dae55929b6381ae8d12316b0a74e0d6046680c0f0e0cd50d7047e'
2018-03-02 20:16:33 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e'
2018-03-02 20:16:33 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:16:33 DEBUG (MainThread) [bellows.zigbee.application] No such device 9865
2018-03-02 20:16:33 WARNING (MainThread) [zigpy.application] Message on unknown device 0x2689
2018-03-02 20:16:33 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1520018193.252518, level=WARNING, message=Message on unknown device 0x2689, exception=, source=core.py>
2018-03-02 20:16:35 DEBUG (MainThread) [bellows.uart] Data frame: b'6350b18cd32da03fc36ab572a15593499c4e7e0d7e'
2018-03-02 20:16:35 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e'
2018-03-02 20:16:35 DEBUG (MainThread) [bellows.ezsp] Application frame 36 (trustCenterJoinHandler) received
2018-03-02 20:16:36 INFO (MainThread) [zigpy.application] Device 0x0787 (00:0b:57:ff:fe:9a:8d:b5) joined the network
2018-03-02 20:16:36 INFO (MainThread) [zigpy.device] [0x0787] Discovering endpoints
2018-03-02 20:16:36 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast
2018-03-02 20:16:36 DEBUG (MainThread) [bellows.uart] Sending: b'3751219c54ad12b259914a25aa1593499c4f26a8ec496022dd7e'
2018-03-02 20:16:36 DEBUG (MainThread) [bellows.uart] Data frame: b'7451a19c544d38c67e'
2018-03-02 20:16:36 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e'
2018-03-02 20:16:36 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received
2018-03-02 20:16:40 DEBUG (MainThread) [bellows.uart] Data frame: b'0451b19754ad12b259914a25aa1593499c2926cded35b07e'
2018-03-02 20:16:40 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e'
2018-03-02 20:16:40 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'1451b18c86dda03fc36ab572a15593499c4edda57e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 36 (trustCenterJoinHandler) received
2018-03-02 20:16:42 INFO (MainThread) [zigpy.application] Device 0xf7d2 (00:0b:57:ff:fe:9a:8d:b5) joined the network
2018-03-02 20:16:42 DEBUG (MainThread) [zigpy.application] Device 00:0b:57:ff:fe:9a:8d:b5 changed id (0x0787 => 0xf7d2)
2018-03-02 20:16:42 DEBUG (MainThread) [zigpy.device] Canceling old initialize call
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'2451b5cae1a78f4ca6c3412532b37e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 98 (incomingSenderEui64Handler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'3451b1ed502a15a159944a2dae559241639cf55c12316b0a2f31d6046680c0f0e0cd5017c67e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [zigpy.zdo] [0xf7d2:zdo] ZDO request 0x0013: [63442, 00:0b:57:ff:fe:9a:8d:b5, 142]
2018-03-02 20:16:42 INFO (MainThread) [zigpy.device] [0xf7d2] Discovering endpoints
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'4456219c54f8e2b259914a25aa1593499c4c25a8ef1c90c9657e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'4556a19c5443d4f07e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'5556b1f186dda03fc36ab572a1556d989c88997e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'6556b1f186dda03fc36ab572a1556d9b9cffc97e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'7556b1ed542a15b7d9944a65aa559240639cf55c12316189fd149488fd62487e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'0556b19754f8e2b259914a25aa1592499c2725abeda0e97e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received
2018-03-02 20:16:42 INFO (MainThread) [zigpy.device] [0xf7d2] Discovered endpoints: [1]
2018-03-02 20:16:42 INFO (MainThread) [zigpy.endpoint] [0xf7d2:1] Discovering endpoint information
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'5157219c54f8e2b259904a25aa1593499c4d24afee1c908a91ad7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'1657a19c5440f0b67e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'2657b1f186dda03fc36ab572a1556d9b9c1ecf7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'3657b1f186dda03fc36ab572a1556d9b9c00ce7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'4657b1ed542a15b6d9944a65ab559243639cf55c12314088fd1494abfd20ff87e9cfd76f8ffcc7dfd5d7698a462ba9ec753eaeea65864498552633b1e060e79d7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'5657b19754f8e2b259904a25aa1593499c2424abed79227e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received
2018-03-02 20:16:42 INFO (MainThread) [zigpy.endpoint] [0xf7d2:1] Discovered endpoint information: <SimpleDescriptor endpoint=1 profile=49246 device_type=544 device_version=2 input_clusters=[0, 3, 4, 5, 6, 8, 768, 2821, 4096] output_clusters=[5, 25, 32, 4096]>
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'6654219c54f8e2ec99944a24ab1593499c4a23acedca678ffdc363dd427e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'6754a19c54410e797e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'7754b1f186dda03fc36ab572a1556d9b9c80657e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'0754b19754f8e2ec99944a24ab1593499c2523abedff187e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'7155219c54f8e2b259914a25aa1593499c4b22a8e84960fac17e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'1055a19c544659127e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'2055b1f186dda03fc36ab572a1556d9b9c3cea7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'3055b1f186dda03fc36ab572a1556d9b9c22eb7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'4055b1ed542a15b7d9944a65ab559242639cf55c1231628e7c41648915077e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Data frame: b'5055b19754f8e2b259914a25aa1593499c2222abed587e7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e'
2018-03-02 20:16:42 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received
2018-03-02 20:16:42 ERROR (MainThread) [zigpy.device] Failed ZDO request during device initialization: ('Endpoint request failed: %s', [129, 1927, []])
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/zigpy/device.py", line 53, in _initialize
raise Exception("Endpoint request failed: %s", epr)
Exception: ('Endpoint request failed: %s', [129, 1927, []])
2018-03-02 20:16:42 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1520018202.9044335, level=ERROR, message=Failed ZDO request during device initialization: ('Endpoint request failed: %s', [129, 1927, []]), exception=Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/zigpy/device.py", line 53, in _initialize
raise Exception("Endpoint request failed: %s", epr)
Exception: ('Endpoint request failed: %s', [129, 1927, []])
, source=/usr/lib/python3.6/site-packages/zigpy/device.py>
2018-03-02 20:16:52 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/lib/python3.6/site-packages/homeassistant/components/zha/init.py", line 182, in async_device_initialized
discovered_info = yield from _discover_endpoint_info(endpoint)
File "/usr/lib/python3.6/site-packages/homeassistant/components/zha/init.py", line 345, in _discover_endpoint_info
yield from read(['manufacturer', 'model'])
File "/usr/lib/python3.6/site-packages/homeassistant/components/zha/init.py", line 341, in read
allow_cache=True,
File "/usr/lib/python3.6/site-packages/zigpy/zcl/init.py", line 227, in read_attributes
result = yield from self.read_attributes_raw(to_read, manufacturer=manufacturer)
File "/usr/lib/python3.6/site-packages/zigpy/zcl/init.py", line 194, in read_attributes_raw
v = yield from self.request(True, 0x00, schema, attributes, manufacturer=manufacturer)
File "/usr/lib/python3.6/site-packages/bellows/zigbee/application.py", line 251, in request
v = yield from asyncio.wait_for(reply_fut, timeout)
File "/usr/lib/python3.6/asyncio/tasks.py", line 362, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
2018-03-02 20:16:52 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1520018212.7077072, level=ERROR, message=Error doing job: Task exception was never retrieved, exception=Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/lib/python3.6/site-packages/homeassistant/components/zha/init.py", line 182, in async_device_initialized
discovered_info = yield from _discover_endpoint_info(endpoint)
File "/usr/lib/python3.6/site-packages/homeassistant/components/zha/init.py", line 345, in _discover_endpoint_info
yield from read(['manufacturer', 'model'])
File "/usr/lib/python3.6/site-packages/homeassistant/components/zha/init.py", line 341, in read
allow_cache=True,
File "/usr/lib/python3.6/site-packages/zigpy/zcl/init.py", line 227, in read_attributes
result = yield from self.read_attributes_raw(to_read, manufacturer=manufacturer)
File "/usr/lib/python3.6/site-packages/zigpy/zcl/init.py", line 194, in read_attributes_raw
v = yield from self.request(True, 0x00, schema, attributes, manufacturer=manufacturer)
File "/usr/lib/python3.6/site-packages/bellows/zigbee/application.py", line 251, in request
v = yield from asyncio.wait_for(reply_fut, timeout)
File "/usr/lib/python3.6/asyncio/tasks.py", line 362, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
, source=components/zha/init.py>

2018-03-02 20:20:44 DEBUG (MainThread) [bellows.uart] Data frame: b'6055b1ed502a15b459944a2dab559245639cf55c12316e8a00396788fd673fa7a2e07e'
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e'
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:20:44 DEBUG (MainThread) [zigpy.zdo] [0xf7d2:zdo] ZDO request 0x0006: [65533, 260, [25], []]
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.uart] Sending: b'075a219c54f8e2b25992ca25aa1593499c4821adebce678bfcc7721f7e'
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.uart] Data frame: b'715aa19c544736727e'
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e'
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.uart] Data frame: b'015ab1f186dda03fc36ab572a1556d9b9c69107e'
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e'
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.uart] Data frame: b'115ab19754f8e2b25992ca25aa1593499c2321abed008f7e'
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e'
2018-03-02 20:20:44 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received
2018-03-02 20:20:46 DEBUG (MainThread) [bellows.uart] Data frame: b'215ab1f186dda03fc36ab572a1556d9b9c55127e'
2018-03-02 20:20:46 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e'
2018-03-02 20:20:46 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:20:46 DEBUG (MainThread) [bellows.uart] Data frame: b'315ab1ed542e14ab59954b65aa559244639cf55c1231698afdc762f5ed7c1dd59eeccc6e8f315a7e'
2018-03-02 20:20:46 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2018-03-02 20:20:46 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:20:46 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] ZCL request 0x0101: [1, 4476, 8706, 304182642, 1]
2018-03-02 20:20:46 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] No handler for cluster command 1
2018-03-02 20:20:49 DEBUG (MainThread) [bellows.uart] Data frame: b'415ab1f186dda03fc36ab572a1556d9b9c11147e'
2018-03-02 20:20:49 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e'
2018-03-02 20:20:49 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:20:49 DEBUG (MainThread) [bellows.uart] Data frame: b'515ab1ed542e14ab59954b65aa559247639cf55c1231698afcc762f5ed7c1dd59eeccc6e8f4df07e'
2018-03-02 20:20:49 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e'
2018-03-02 20:20:49 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:20:49 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] ZCL request 0x0101: [1, 4476, 8706, 304182642, 1]
2018-03-02 20:20:49 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] No handler for cluster command 1
2018-03-02 20:20:52 DEBUG (MainThread) [bellows.uart] Data frame: b'615ab1f186dda03fc36ab572a1556d9b9c2d167e'
2018-03-02 20:20:52 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e'
2018-03-02 20:20:52 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:20:52 DEBUG (MainThread) [bellows.uart] Data frame: b'715ab1ed542e14ab59954b65aa559246639cf55c1231698affc762f5ed7c1dd59eeccc6e8f95127e'
2018-03-02 20:20:52 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e'
2018-03-02 20:20:52 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:20:52 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] ZCL request 0x0101: [1, 4476, 8706, 304182642, 1]
2018-03-02 20:20:52 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] No handler for cluster command 1
2018-03-02 20:20:55 DEBUG (MainThread) [bellows.uart] Data frame: b'015ab1f186dda03fc36ab572a1556d9b9c69107e'
2018-03-02 20:20:55 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e'
2018-03-02 20:20:55 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:20:55 DEBUG (MainThread) [bellows.uart] Data frame: b'115ab1ed542e14ab59954b65aa559259639cf55c1231698afec762f5ed7c1dd59eeccc6e8fad1c7e'
2018-03-02 20:20:55 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e'
2018-03-02 20:20:55 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:20:55 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] ZCL request 0x0101: [1, 4476, 8706, 304182642, 1]
2018-03-02 20:20:55 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] No handler for cluster command 1
2018-03-02 20:20:58 DEBUG (MainThread) [bellows.uart] Data frame: b'215ab1f186dda03fc36ab572a1556d9b9c55127e'
2018-03-02 20:20:58 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e'
2018-03-02 20:20:58 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2018-03-02 20:20:58 DEBUG (MainThread) [bellows.uart] Data frame: b'315ab1ed542e14ab59954b65aa559258639cf55c1231698af9c762f5ed7c1dd59eeccc6e8f70537e'
2018-03-02 20:20:58 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2018-03-02 20:20:58 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2018-03-02 20:20:58 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] ZCL request 0x0101: [1, 4476, 8706, 304182642, 1]
2018-03-02 20:20:58 DEBUG (MainThread) [zigpy.zcl] [0xf7d2:1:0x0019] No handler for cluster command 1`

Unable to open database file

Hi I am trying to set this up with Home Assistant 0.47.1 and the Nortek HZUZB1 stick.

When starting HA with zha enabled it hangs. If I run bellows from within the HA virtualenv I get:

bellows -d /dev/ttyUSB1 devices
Traceback (most recent call last):
  File "/srv/homeassistant/bin/bellows", line 9, in <module>
    load_entry_point('bellows==0.2.7', 'console_scripts', 'bellows')()
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/bellows/cli/application.py", line 56, in devices
    app = bellows.zigbee.application.ControllerApplication(ezsp, database)
  File "/srv/homeassistant/lib/python3.4/site-packages/bellows/zigbee/application.py", line 28, in __init__
    self._dblistener = bellows.zigbee.appdb.PersistingListener(database_file, self)
  File "/srv/homeassistant/lib/python3.4/site-packages/bellows/zigbee/appdb.py", line 29, in __init__
    detect_types=sqlite3.PARSE_DECLTYPES)
sqlite3.OperationalError: unable to open database file

The zigbee.db file did get created in the appropriate spot for HA and it is owned by the HA user so I don't think it's a permissions issue.

Someone with a similar error here:
https://community.home-assistant.io/t/0-44-zha-config-questions/17295/6

ZHA Permit not working in homeassistant and other oddities

Since 0.49 i'm having trouble with zha ...now the exploding database has been fixed but zha permit does not work when called and zha just randomly adds everything it can get a hold of without running permit it even adds a19 bulbs that are paired with hue including the hue motion sensors and remotes .
Even iris sensors that are not in pair mode randomly get added throughout the day without permission but devices you want to pair will not .

Any help would be appreciated
thnx

if needed i can give access to HA to get to the bottom of this

State update after physical power turned on/off

Hi @rcloran - Just wanted to say that Im now using your library (and HASS) with the Cortet MeshConnect EM357 stick. I did have to update the firmware, bootloader and baud rate setting using an ISA3 debug device, but now its working successfully with HASS and a Wemo bulb. Thanks for your hard work.

Quick question, not sure if its a bug or not? If I cut power to a zigbee bulb and then turn the switch back on, should I expect that bulb to re-establish communication with the USB stick/bellows and update its status or does it need to be polled? My scenario is that I have a zigbee light bulb in a location where there is a physical wall switch. If the physical switch is turned on or off, the bulb state does not seem to be reflected. I would expect either 'on', 'off' or 'unknown', similar to how a lifx state works in HASS if switched off at the wall.

If it needs to be polled, is there a way to enable that in HASS?

Cheers

Native serial UART protocol support for ConBee and RaspBee hardware by Dresden Elektronik

@rcloran would you please consider adding native serial UART protocol for ConBee (Zigbee USB dongle adapter) and RaspBee (ZigBee GPIO Shield for Raspberry Pi) hardware made by Dresden Elektronik)?

http://www.dresden-elektronik.de/rpi/deconz/deCONZ-Serial-Protocol-en.pdf

ConBee (v1/v2) and RaspBee by Dresden Elektronik are the two of the most commonly/popularly sold as DIY ZigBee radio adapters available in Europe, and they are of course also available relativly inexpensive in North America too. With both of them supporting ZigBee PRO, ZigBee Home Automation (ZHA), and ZigBee Light Link (ZLL).

https://www.dresden-elektronik.de/conbee/?L=1&ref=gh
https://www.amazon.com/NEW-gateway-compact-certified-operating/dp/B01FDWOIHK/

https://www.dresden-elektronik.de/raspbee/?L=1&ref=gh
https://www.amazon.com/RaspBee-premium-ZigBee-Raspberry-Firmware/dp/B00E6300DO/

https://www.dresden-elektronik.de/funktechnik/service/download/driver/?L=1

Serial UART protocol (deCONZ Serial Protocol) documentation used by ConBee and RaspBee hardware:

http://www.dresden-elektronik.de/rpi/deconz/deCONZ-Serial-Protocol-en.pdf

Official open source implementations by Dresden Elektronik themselves :

https://github.com/dresden-elektronik
https://github.com/dresden-elektronik/deconz-rest-plugin
https://github.com/dresden-elektronik/deconz-rest-doc
https://github.com/dresden-elektronik/basic-aps-plugin

Dresden Elektronik today their own ZigBee gateway software called "deCONZ" which has APIs for both ConBee and RaspBee hardware.

https://www.dresden-elektronik.de/funktechnik/products/software/pc/deconz/?L=1

The goal and wish would be to be able to use these relativly cheap ConBee and RaspBee hardware adapters in Home Assistant and Hass.io

Use python3.5+ await syntax

Home assistant is dropping python3.4 support, so it's time to update the bellows syntax to use the await syntax. This also improves the support to e.g. spot unawaited futures.

Implement support for Philips Hue remote

I'm trying to add support for a Philips Hue dimmer remote to HASS. I've done the following so far:

  • Updated zha/const.py and added zha.DeviceType.SIMPLE_SENSOR: 'binary_sensor', to the ZHA device profiles
  • Added DeviceType.SIMPLE_SENSOR: [0x0001, 0x0003, 0x000f], to bellows/zigbee/profiles/zha.py
  • Hacked binary_sensor/zha.py to look for BinaryInput rather than IAS and removed the IAS-specific code for now

I then get a binary sensor device in HASS. However, hitting buttons never calls the cluster_command() method and I see no debug output from bellows. zha and bellows debug output:

Jul 04 16:59:32 alloneword hass[2557]: INFO:homeassistant.loader:Loaded zha from homeassistant.components.zha
Jul 04 16:59:34 alloneword hass[2557]: INFO:homeassistant.setup:Setting up zha
Jul 04 16:59:34 alloneword hass[2557]: DEBUG:bellows.zigbee.appdb:Loading application state from /root/.homeassistant/zigbee.db
Jul 04 16:59:34 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x1a\xc08\xbc~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:RSTACK frame: b'\xc1\x02\x0b\nR~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command version
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x00B!\xa8P\xed,~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'\x01B\xa1\xa8P(\x05\xe6\x7fb~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x81`Y~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 0 (version) received
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setConfigurationValue
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b"}1C!\xfbX(\x15\xc3'~"
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'\x12C\xa1\xfbT\xfbs~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x82P:~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 83 (setConfigurationValue) received
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setConfigurationValue
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'"@!\xfbY/\x15"o~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'#@\xa1\xfbT\xc6\x10~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x83@\x1b~'
Jul 04 16:59:35 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 83 (setConfigurationValue) received
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setConfigurationValue
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'3A!\xfby+\x15\xa2\xd7~'
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'4A\xa1\xfbT\xd3*~'
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x840\xfc~'
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 83 (setConfigurationValue) received
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setConfigurationValue
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'DF!\xfby+\x15\xf7\xb3~'
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'EF\xa1\xfbT5\xd0~'
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x85 \xdd~'
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 83 (setConfigurationValue) received
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setConfigurationValue
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'UG!\xfb}^)\x15\xde\xfb~'
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'VG\xa1\xfbT\xa9\xec~'
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x86\x10\xbe~'
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 83 (setConfigurationValue) received
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setConfigurationValue
Jul 04 16:59:43 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'fD!\xfbM(\x15>\xd0~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'gD\xa1\xfbT\x94\x8f~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x87\x00\x9f~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 83 (setConfigurationValue) received
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setConfigurationValue
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'wE!\xfbU\xd5\x15{5~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'pE\xa1\xfbT\x81\xb5~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x80px~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 83 (setConfigurationValue) received
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command networkInit
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x00J!\xbf=O~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'\x01J\xa5\xbfT\xffD~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x81`Y~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 23 (networkInit) received
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'\x11J\xb1\xb1\xc4\xc4\x0b~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x82P:~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 25 (stackStatusHandler) received
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command getNetworkParameters
Jul 04 16:59:44 alloneword hass[2557]: WARNING:homeassistant.setup:Setup of zha is taking over 10 seconds.
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x12K!\x80;\x0c~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'"K\xa1\x80T+R\x91\xc8\xb8`\xfcH\x91\xc3M\x94A\'\xab\xed\xcegs\x02\xc1\xa2m~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x83@\x1b~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 40 (getNetworkParameters) received
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setPolicy
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'#H!\xfdQz\xe4\x17~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'3H\xa1\xfdT\xed/~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x840\xfc~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 85 (setPolicy) received
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setPolicy
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'4I!\xfdRK\xef\xa2~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'DI\xa1\xfdT\xe1\xc9~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x85 \xdd~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 85 (setPolicy) received
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command setPolicy
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'EN!\xfdT+NJ~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'UN\xa1\xfdT\x1e\xef~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x86\x10\xbe~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 85 (setPolicy) received
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command getNodeId
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'VO!\x8f\xb2N~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'fO\xa1\x8fT*d\x82~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x87\x00\x9f~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 39 (getNodeId) received
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command getEui64
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'gL!\x8e\xa1b~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'wL\xa1\x8e\xac%\x06\xb9Y\xfbG%?x~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x80px~'
Jul 04 16:59:44 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 38 (getEui64) received
Jul 04 16:59:44 alloneword hass[2557]: INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=zha, service=permit>
Jul 04 16:59:44 alloneword hass[2557]: INFO:homeassistant.setup:Setup of domain zha took 10.4 seconds.
Jul 04 16:59:44 alloneword hass[2557]: INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=zha>
Jul 04 16:59:57 alloneword hass[2557]: DEBUG:homeassistant.components.websocket_api:WS 2821654892: Sending {'success': True, 'result': {'time_zone': 'America/Los_Angeles', 'longitude': -122.2759, 'elevation': 16, 'whitelist_external_dirs': {'/root/.homeassistant/www'}, 'unit_system': {'temperature': 'ยฐC', 'volume': 'L', 'length': 'km', 'mass': 'g'}, 'location_name': 'Home', 'version': '0.48.0', 'components': {'sun', 'binary_sensor', 'history', 'websocket_api', 'neato', 'sensor.yr', 'light.avion', 'sensor.mqtt', 'switch.wemo', 'automation', 'light.lifx', 'light.decora', 'conversation', 'emulated_hue', 'camera.neato', 'group', 'light.wemo', 'recorder', 'http', 'binary_sensor.mqtt', 'frontend', 'switch', 'api', 'switch.mqtt', 'camera', 'switch.neato', 'updater', 'sensor', 'logbook', 'discovery', 'light.flux_led', 'mqtt', 'wemo', 'sensor.broadlink', 'light', 'sensor.neato', 'zha', 'logger', 'sensor.darksky'}, 'config_dir': '/root/.homeassistant', 'latitude': 37.8058}, 'id': 7, 'type': 'result'}
Jul 04 16:59:57 alloneword hass[2557]: redDict([('description', 'Number between 0 and 255 indicating brightness of the effect. Leave this out to maintain the current brightness of each participating light'), ('example', 120)])), ('period', OrderedDict([('description', 'Duration (in seconds) between color changes (default 60)'), ('example', 180)])), ('change', OrderedDict([('description', 'Hue movement per period, in degrees on a color wheel (ranges from 0 to 360, default 20)'), ('example', 45)])), ('spread', OrderedDict([('description', 'Maximum hue difference between participating lights, in degrees on a color wheel (ranges from 0 to 360, default 30)'), ('example', 0)])), ('power_on', OrderedDict([('description', 'Powered off lights are temporarily turned on during the effect (default True)'), ('example', False)]))]), 'description': 'Run an effect with looping colors.'}}, 'homeassistant': {'turn_off': {'fields': {}, 'description': ''}, 'toggle': {'fields': {}, 'description': ''}, 'stop': {'fields': {}, 'description': ''}, 'turn_on': {'fields': {}, 'description': ''}, 'restart': {'fields': {}, 'description': ''}, 'check_config': {'fields': {}, 'description': ''}, 'reload_core_config': {'fields': {}, 'description': ''}}, 'conversation': {'process': {'fields': {}, 'description': ''}}, 'logger': {'set_level': {'fields': {}, 'description': 'Set log level for components.'}}, 'zha': {'permit': {'fields': {'duration': {'example': '60', 'description': 'Time to permit joins, in seconds'}}, 'description': 'Allow nodes to join the Zigbee network'}}, 'logbook': {'log': {'fields': {}, 'description': ''}}, 'camera': {'enable_motion_detection': {'fields': OrderedDict([('entity_id', OrderedDict([('description', 'Name(s) of entities to enable motion detection'), ('example', 'camera.living_room_camera')]))]), 'description': 'Enable the motion detection in a camera'}, 'disable_motion_detection': {'fields': OrderedDict([('entity_id', OrderedDict([('description', 'Name(s) of entities to disable motion detection'), ('example', 'camera.living_room_camera')]))]), 'descriptio
Jul 04 17:00:24 alloneword hass[2557]: DEBUG:homeassistant.components.websocket_api:WS 2821654892: Received {'domain': 'zha', 'id': 10, 'service': 'permit', 'type': 'call_service', 'service_data': {}}
Jul 04 17:00:24 alloneword hass[2557]: INFO:homeassistant.core:Bus:Handling <Event call_service[L]: domain=zha, service=permit, service_call_id=3060232428-11, service_data=>
Jul 04 17:00:24 alloneword hass[2557]: INFO:homeassistant.components.zha:Permitting joins for 60s
Jul 04 17:00:24 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command permitJoining
Jul 04 17:00:24 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'pM!\x8ah\xf3\x9b~'
Jul 04 17:00:24 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'\x00M\xa1\x8aT"\x98~'
Jul 04 17:00:24 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x81`Y~'
Jul 04 17:00:24 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 34 (permitJoining) received
Jul 04 17:00:25 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b"\x10M\xb1\x8bT+\xd3\xa9\xd8\xc3S'\xab\xdd\x85I\x98\xf1\xe2~"
Jul 04 17:00:25 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x82P:~'
Jul 04 17:00:25 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 35 (childJoinHandler) received
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b' M\xb1\x8c\x921\x94\xe5@\x96K\xad\xbdU\x93I\x9cN4\xa3~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x83@\x1b~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 36 (trustCenterJoinHandler) received
Jul 04 17:00:26 alloneword hass[2557]: INFO:bellows.zigbee.application:Device 0x1bc6 (00:17:88:01:02:19:57:81) joined the network
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'0M\xb1\xedP*\x15\xa1Y\x94J-\xaaU\x92\xdfc\xf0\xe1\xb0\x121k\x8b;\xdd\xe2\xde\xe5|>/\xfc\xcd^%\xe1~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x840\xfc~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 69 (incomingMessageHandler) received
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.zigbee.zdo:[0x1bc6:zdo] ZDO request 0x0013: [7110, 00:17:88:01:02:19:57:81, 128]
Jul 04 17:00:26 alloneword hass[2557]: INFO:bellows.zigbee.device:[0x1bc6] Discovering endpoints
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command sendUnicast
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x04R!\x9cT\xec\x0e\xb2Y\x91J%\xaa\x15\x93I\x9cO&\xa8\xec\x08|WE~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'AR\xa1\x9cT\x87\xc2\x9f~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x85 \xdd~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 52 (sendUnicast) received
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'QR\xb1\x97T\xec\x0e\xb2Y\x91J%\xaa\x15\x93I\x9c\xe3&\xab\xed\xe0a~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x86\x10\xbe~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 63 (messageSentHandler) received
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'aR\xb1\xedT*\x15\xb7\xd9\x94Je\xabU\x92\xdec\xf3\xe1\xb0\x121`\x8a\xfd\x00x\x8b\xfd|~(~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x87\x00\x9f~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 69 (incomingMessageHandler) received
Jul 04 17:00:26 alloneword hass[2557]: INFO:bellows.zigbee.device:[0x1bc6] Discovered endpoints: [1, 2]
Jul 04 17:00:26 alloneword hass[2557]: INFO:bellows.zigbee.endpoint:[0x1bc6:1] Discovering endpoint information
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command sendUnicast
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x17S!\x9cT\xec\x0e\xb2Y\x90J%\xaa\x15\x93I\x9cL%\xaf\xef\x08|\x8ag\x1b~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'rS\xa1\x9cT\x84\xb9\xc1~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x80px~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 52 (sendUnicast) received
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'\x02S\xb1\x97T\xec\x0e\xb2Y\x90J%\xaa\x15\x93I\x9c\xe0%\xab\xed\xef\xab~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x81`Y~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 63 (messageSentHandler) received
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'\x12S\xb1\xedT*\x15\xb6\xd9\x94Je\xabU\x92\xd1c\xf5\xe1\xb0\x121|\x89\xfd\x00x\x9f\xfd \xff\x97\xe3\xcf\xdfo\x8f\xf9\xc7\xdb\xd6\xd2m\x8c@#\xa1\xecs;\xeb$~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x82P:~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 69 (incomingMessageHandler) received
Jul 04 17:00:26 alloneword hass[2557]: INFO:bellows.zigbee.endpoint:[0x1bc6:1] Discovered endpoint information: <SimpleDescriptor endpoint=1 profile=49246 device_type=2096 device_version=2 input_clusters=[0] output_clusters=[0, 3, 4, 6, 8, 5]>
Jul 04 17:00:26 alloneword hass[2557]: INFO:bellows.zigbee.endpoint:[0x1bc6:2] Discovering endpoint information
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command sendUnicast
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'"P!\x9cT\xec\x0e\xb2Y\x90J%\xaa\x15\x93I\x9cM$\xaf\xee\x08|\x89X\xea~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'#P\xa1\x9cT\x85r\x06~'
Jul 04 17:00:26 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x83@\x1b~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 52 (sendUnicast) received
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'3P\xb1\x97T\xec\x0e\xb2Y\x90J%\xaa\x15\x93I\x9c\xe1$\xab\xed\xa6z~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x840\xfc~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 63 (messageSentHandler) received
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'CP\xb1\xedT*\x15\xb6\xd9\x94Je\xabU\x92\xd0c\xf6\xe1\xb0\x121~\x88\xfd\x00x\x9d\xfez>\xab\xeb\xcd\xdbo\x8f\xfe\xc7\xd8\xd5\xddi\x8c\xba"\xb0\xec\xd4M~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x85 \xdd~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 69 (incomingMessageHandler) received
Jul 04 17:00:27 alloneword hass[2557]: INFO:bellows.zigbee.endpoint:[0x1bc6:2] Discovered endpoint information: <SimpleDescriptor endpoint=2 profile=260 device_type=12 device_version=0 input_clusters=[0, 1, 3, 15, 64512] output_clusters=[25]>
Jul 04 17:00:27 alloneword hass[2557]: WARNING:bellows.zigbee.zcl:Unknown cluster 64512
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': set()}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}, 'light': set()}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}, 'light': {8, 768, 4, 5, 6}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}, 'light': {8, 768, 4, 5, 6}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}, 'light': {8, 768, 4, 5, 6}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}, 'light': {8, 768, 4, 5, 6}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}, 'light': {8, 768, 4, 5, 6}, 'binary_sensor': set()}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}, 'light': {8, 768, 4, 5, 6}, 'binary_sensor': {1, 3, 15}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}, 'light': {8, 768, 4, 5, 6}, 'binary_sensor': {1, 3, 15}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {4, 5, 6}, 'light': {768, 4096, 4, 5, 6, 8}, 'binary_sensor': {1, 3, 15}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {8, 4096, 4, 5, 6}, 'light': {768, 4096, 4, 5, 6, 8}, 'binary_sensor': {1, 3, 15}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {8, 4096, 4, 5, 6}, 'light': {768, 4096, 4, 5, 6, 8}, 'binary_sensor': {1, 3, 15}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {8, 4096, 4, 5, 6}, 'light': {768, 4096, 4, 5, 6, 8}, 'binary_sensor': {1, 3, 15}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {8, 4096, 4, 5, 6}, 'light': {768, 4096, 4, 5, 6, 8}, 'binary_sensor': {1, 3, 15}}
Jul 04 17:00:27 alloneword hass[2557]: INFO:homeassistant.components.zha.const:COMPONENT CLUSTERS is {'switch': {8, 4096, 4, 5, 6}, 'light': {768, 4096, 4, 5, 6, 8}, 'binary_sensor': {1, 3, 15}}
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:homeassistant.components.zha:IN ZHA ASYNC INIT - {0: <bellows.zigbee.zdo.ZDO object at 0xa56dde6c>, 1: <bellows.zigbee.endpoint.Endpoint object at 0xa587080c>, 2: <bellows.zigbee.endpoint.Endpoint object at 0xa56ddd0c>}
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command sendUnicast
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'5Q!\x9cT\xec\x0e\xec\x99\x94J$\xab\x15\x93I\x9cJ#\xac\xed\xcag\x8f\xfd\xc3c\x02\xc0~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'TQ\xa1\x9cT\x9a\xb6T~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x86\x10\xbe~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 52 (sendUnicast) received
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'dQ\xb1\x97T\xec\x0e\xec\x99\x94J$\xab\x15\x93I\x9c\xfe#\xab\xed.\xad~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x87\x00\x9f~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 63 (messageSentHandler) received
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'tQ\xb1\xedT.\x14\xb2Y\x95K%\xabU\x92\xd3c\x8e\xe1\xb0\x121}\x93\xf9\xc7g\x89\xfc<8\xf7\x83\xa4\xb2\x06\xff\x8c\xc2\xdb\xd5\x90o\xde\x11o\x99\xdeFq*~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x80px~'
Jul 04 17:00:27 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 69 (incomingMessageHandler) received
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:1
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:2
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:4
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:7
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command sendUnicast
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'@V!\x9cT\xec\x0e\xb6X\x94J\'\xa8\x15\x93I\x9cK"\xac\xed\xcbg\x8f\xfd\xc3c\xb3q~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'\x05V\xa1\x9cT\x9b\xf4\x95~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x81`Y~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 52 (sendUnicast) received
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'\x15V\xb1\x97T\xec\x0e\xb6X\x94J\'\xa8\x15\x93I\x9c\xff"\xab\xedl\xbf~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x82P:~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 63 (messageSentHandler) received
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'%V\xb1\xedT.\x14\xb2Y\x96H%\xabU\x92\xd2c\xf1\xe1\xb0\x121}\x93\xf8\xc7g\x89\xfc<8\xf7\x83\xa4\xb2\x06\xff\x8c\xc2\xdb\xd5\x90o\xde\x11o\x99\xdeF\x087~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x83@\x1b~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 69 (incomingMessageHandler) received
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:1
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:2
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:3
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:4
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:6
Jul 04 17:00:28 alloneword hass[2557]: INFO:homeassistant.core:Bus:Handling <Event platform_discovered[L]: service=load_platform.binary_sensor, discovered=discovery_key=00:17:88:01:02:19:57:81-2, platform=zha>
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:7
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:7
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:7
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:7
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.zha:7
Jul 04 17:00:28 alloneword hass[2557]: INFO:homeassistant.loader:Loaded binary_sensor.zha from homeassistant.components.binary_sensor.zha
Jul 04 17:00:28 alloneword hass[2557]: INFO:homeassistant.components.binary_sensor:Setting up binary_sensor.zha
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.binary_sensor.zha:BINARY SENSOR ZHA FOUND
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.binary_sensor.zha:[<bellows.zigbee.zcl.clusters.general.PowerConfiguration object at 0xa56d33ec>, <bellows.zigbee.zcl.clusters.general.Identify object at 0xa8636f0c>, <bellows.zigbee.zcl.clusters.general.BinaryInput object at 0xa8299e4c>]
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.binary_sensor.zha:FOUND BINARY INPUT
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.binary_sensor.zha:<bellows.zigbee.zcl.clusters.general.BinaryInput object at 0xa8299e4c>
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:homeassistant.components.binary_sensor.zha:{'endpoint': <bellows.zigbee.endpoint.Endpoint object at 0xa56ddd0c>, 'clusters': [<bellows.zigbee.zcl.clusters.general.PowerConfiguration object at 0xa56d33ec>, <bellows.zigbee.zcl.clusters.general.Identify object at 0xa8636f0c>, <bellows.zigbee.zcl.clusters.general.BinaryInput object at 0xa8299e4c>], 'new_join': True, 'model': 'RWL020', 'manufacturer': 'Philips'}
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.ezsp:Send command sendUnicast
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'SW!\x9cT\xec\x0e\xb2Y\xb5J%\xaa\x15\x93I\x9cH!\xbd\xebO0\x92\xff\xc7\xeb\x9e\xfc|0\xa7\xe85\xd1|\x84\xff\xa8\xd6\xd5\xd31\xf1~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'6W\xa1\x9cT\x98\x8f\xcb~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x840\xfc~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 52 (sendUnicast) received
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'FW\xb1\x97T\xec\x0e\xb2Y\xb5J%\xaa\x15\x93I\x9c\xfc!\xab\xed\xad\xfe~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x85 \xdd~'
Jul 04 17:00:28 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 63 (messageSentHandler) received
Jul 04 17:00:29 alloneword hass[2557]: DEBUG:bellows.uart:Data frame: b'VW\xb1\xedT*\x15\x93\xd9\x94J%\xabU\x92\xd5c\xf0\xe1\xb0\x121e\x8d\xfd\xd2\\~'
Jul 04 17:00:29 alloneword hass[2557]: DEBUG:bellows.uart:Sending: b'\x86\x10\xbe~'
Jul 04 17:00:29 alloneword hass[2557]: DEBUG:bellows.ezsp:Application frame 69 (incomingMessageHandler) received

don't expect a reply?

Hi,
This is the second issue I ran into trying to get bellows to communicate with
https://www.homedepot.com/p/Hampton-Bay-Universal-Wink-Enabled-White-Ceiling-Fan-Premier-Remote-Control-99432/206591100.

It appears that the device does not send a incomingMessageHandler in reply to the on/off commands in the On/Off cluster. I can see that the reply expectation can be disabled in bellows.zigbee.application.ControllerApplication#request. However it doesn't appear that the layers above it can pass that arg.

I'm still fairly new to zigbee, but skimming through the spec, it doesn't appear that On/Off commands require an explicit reply. It seems like the reply can be omitted if the device sends other commands in response using the same Transaction sequence number as the received command. See 2.5.12.2 When Generated in the spec

I'm wondering if by default commands should only wait for the messageSentHandler frame as opposed to waiting for an explicit reply?

AttributeError: 'EzspStatus' object has no attribute '_name_'

Device is: HUSBZB-1
and running the latest pip install version.

(homeassistant_venv) homeassistant@hac1:~/.homeassistant$ bellows -d /dev/ttyUSB1 devices
warning: Unknown cluster 64580
warning: Unknown cluster 65280
Device:
  NWK: 0x56e0
  IEEE: 00:0d:6f:00:05:98:02:f9
  Endpoints:
    1: profile=0x104, device_type=DeviceType.REMOTE_CONTROL
      Clusters:
        Basic (0)
        Power Configuration (1)
        Identify (3)
        On/Off Switch Configuration (7)
        Poll Control (32)
        Diagnostic (2821)
    2: profile=0x104, device_type=DeviceType.REMOTE_CONTROL
      Clusters:
        On/Off Switch Configuration (7)
    3: profile=0x104, device_type=DeviceType.REMOTE_CONTROL
      Clusters:
        On/Off Switch Configuration (7)
    4: profile=0x104, device_type=DeviceType.REMOTE_CONTROL
      Clusters:
        On/Off Switch Configuration (7)
Device:
  NWK: 0xda82
  IEEE: 7c:e5:24:00:00:0c:21:d1
  Endpoints:
Device:
  NWK: 0xfbfe
  IEEE: ff:ff:00:0f:e7:ff:4d:d6
  Endpoints:
    1: profile=0xc05e, device_type=DeviceType.CONTROLLER
      Clusters:
        Basic (0)
        LightLink (4096)
        Cluster (64580)
        Cluster (65280)

(homeassistant_venv) homeassistant@hac1:~/.homeassistant$ bellows -d /dev/ttyUSB1 config --all
NOTE: Configuration changes do not persist across resets
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/bin/bellows", line 11, in <module>
    sys.exit(main())
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/cli/util.py", line 32, in inner
    loop.run_until_complete(f(*args, **kwargs))
  File "/usr/lib/python3.4/asyncio/base_events.py", line 276, in run_until_complete
    return future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/tasks.py", line 235, in _step
    result = coro.send(value)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/cli/ncp.py", line 25, in config
    s = yield from util.setup(ctx.obj['device'], util.print_cb)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/cli/util.py", line 107, in setup
    yield from cfg(c.CONFIG_STACK_PROFILE, 2)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/cli/util.py", line 102, in cfg
    check(v[0], 'Setting config %s to %s: %s' % (config_id, value, v[0]))
  File "/usr/lib/python3.4/enum.py", line 464, in __str__
    return "%s.%s" % (self.__class__.__name__, self._name_)
AttributeError: 'EzspStatus' object has no attribute '_name_'
error: Task was destroyed but it is pending!
error: task: <Task pending coro=<_send_task() running at /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/uart.py:127> wait_for=<Future pending cb=[Task._wakeup()]>>

(homeassistant_venv) homeassistant@hac1:~/.homeassistant$ bellows -d /dev/ttyUSB1 -v debug scan
debug: Using selector: EpollSelector
debug: Connected. Resetting.
debug: Sending: b'\x1a\xc08\xbc~'
debug: RSTACK frame: b'\xc1\x02\x0b\nR~'
debug: Send command version
debug: Sending: b'\x00B!\xa8P\xed,~'
debug: Data frame: b'\x01B\xa1\xa8P(\x05\xe6\x7fb~'
debug: Sending: b'\x81`Y~'
debug: Application frame 0 (version) received
debug: Configuring...
debug: Send command setConfigurationValue
debug: Sending: b"}1C!\xfbX(\x15\xc3'~"
debug: Data frame: b'\x12C\xa1\xfbT\xfbs~'
debug: Sending: b'\x82P:~'
debug: Application frame 83 (setConfigurationValue) received
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/bin/bellows", line 11, in <module>
    sys.exit(main())
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/cli/util.py", line 32, in inner
    loop.run_until_complete(f(*args, **kwargs))
  File "/usr/lib/python3.4/asyncio/base_events.py", line 276, in run_until_complete
    return future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/tasks.py", line 235, in _step
    result = coro.send(value)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/cli/network.py", line 136, in scan
    s = yield from util.setup(ctx.obj['device'])
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/cli/util.py", line 107, in setup
    yield from cfg(c.CONFIG_STACK_PROFILE, 2)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/cli/util.py", line 102, in cfg
    check(v[0], 'Setting config %s to %s: %s' % (config_id, value, v[0]))
  File "/usr/lib/python3.4/enum.py", line 464, in __str__
    return "%s.%s" % (self.__class__.__name__, self._name_)
AttributeError: 'EzspStatus' object has no attribute '_name_'
error: Task was destroyed but it is pending!
error: task: <Task pending coro=<_send_task() running at /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/bellows/uart.py:127> wait_for=<Future pending cb=[Task._wakeup()]>>
(homeassistant_venv) homeassistant@hac1:~/.homeassistant$ 

Failed ZDO request during device initialization

Hi,

bellows fails when trying to add IKEA GU10 bulbs supporting color temperature.
This issue was prevously on the other bellows github, the issue still happen on latest bellows.

debug: Data frame: b'4350b18cc3f3ded3696ab572a15593499c4e79c27e'
debug: Sending: b'8520dd7e'
debug: Application frame 36 (trustCenterJoinHandler) received
Device 0xd997 (00:0b:57:ff:fe:30:61:cb) joined the network
[0xd997] Discovering endpoints
debug: Send command sendUnicast
debug: Sending: b'3551219c54bdccb259914a25aa1593499c4f26a8ec59be40a57e'
debug: Data frame: b'5451a19c545e2f9c7e'
debug: Sending: b'8610be7e'
debug: Application frame 52 (sendUnicast) received
debug: Data frame: b'6451b19754bdccb259914a25aa1593499c3a26cded41b37e'
debug: Sending: b'87009f7e'
debug: Application frame 63 (messageSentHandler) received
debug: Data frame: b'7451b18c8fe7ded3696ab572a15593499c4eb0bd7e'
debug: Sending: b'8070787e'
debug: Application frame 36 (trustCenterJoinHandler) received
Device 0xcddb (00:0b:57:ff:fe:30:61:cb) joined the network
debug: Device 00:0b:57:ff:fe:30:61:cb changed id (0xd997 => 0xcddb)
debug: Canceling old initialize call
[0xcddb] Discovering endpoints
debug: Send command sendUnicast
debug: Sending: b'4056219c54f1d8b259914a25aa1593499c4c25a8ef15aae5607e'
debug: Data frame: b'0556a59c545c97cf7e'
debug: Sending: b'8160597e'
debug: Application frame 52 (sendUnicast) received
debug: Data frame: b'1551b5ca9f4b254ca6c341256b897e'
debug: Sending: b'82503a7e'
debug: Application frame 98 (incomingSenderEui64Handler) received
debug: Data frame: b'2551b1ed502a15a159944a2dae5592a1639cfc6612316b0a260ba8e8cc80c0f0e0cd500dab7e'
debug: Sending: b'83401b7e'
debug: Application frame 69 (incomingMessageHandler) received
debug: [0xcddb:zdo] ZDO request 0x0013: [52699, 00:0b:57:ff:fe:30:61:cb, 142]
debug: Data frame: b'3556b1f18fe7ded3696ab572a1556d9a9cf7157e'
debug: Sending: b'8430fc7e'
debug: Application frame 89 (incomingRouteRecordHandler) received
debug: Data frame: b'4556b1f18fe7ded3696ab572a1556d9b9c9e237e'
debug: Sending: b'8520dd7e'
debug: Application frame 89 (incomingRouteRecordHandler) received
debug: Data frame: b'5556b1ed542a15b7d9944a65ab5592a0639cfc6612316189fd1dae88fdce157e'
debug: Sending: b'8610be7e'
debug: Application frame 69 (incomingMessageHandler) received
debug: Data frame: b'6556b19754f1d8b259914a25aa1593499c3825abedc1af7e'
debug: Sending: b'87009f7e'
debug: Application frame 63 (messageSentHandler) received
[0xcddb] Discovered endpoints: [1]
[0xcddb:1] Discovering endpoint information
debug: Send command sendUnicast
debug: Sending: b'5757219c54f1d8b259904a25aa1593499c4d24afee15aa8a1f457e'
debug: Data frame: b'7657a19c545d6c327e'
debug: Sending: b'8070787e'
debug: Application frame 52 (sendUnicast) received
debug: Data frame: b'0657b1f18fe7ded3696ab572a1556d9b9c7f257e'
debug: Sending: b'8160597e'
debug: Application frame 89 (incomingRouteRecordHandler) received
debug: Data frame: b'1657b1f18fe7ded3696ab572a1556d9b9c61247e'
debug: Sending: b'82503a7e'
debug: Application frame 89 (incomingRouteRecordHandler) received
debug: Data frame: b'2657b1ed542a15b6d9944a65ab5592a3639cfc6612314088fd1daeabfd20ff87e9cfd76f8ffcc7dfd5d7698a462ba9ec753eaeea65864498552633b1e060966f7e'
debug: Sending: b'83401b7e'
debug: Application frame 69 (incomingMessageHandler) received
debug: Data frame: b'3657b19754f1d8b259904a25aa1593499c3924abed4d6d7e'
debug: Sending: b'8430fc7e'
debug: Application frame 63 (messageSentHandler) received
[0xcddb:1] Discovered endpoint information: <SimpleDescriptor endpoint=1 profile=49246 device_type=544 device_version=2 input_clusters=[0, 3, 4, 5, 6, 8, 768, 2821, 4096] output_clusters=[5, 25, 32, 4096]>
debug: Send command sendUnicast
debug: Sending: b'6454219c54f1d8b259914a25aa1593499c4a23a8e959be32e17e'
debug: Data frame: b'4754a19c545219237e'
debug: Sending: b'8520dd7e'
debug: Application frame 52 (sendUnicast) received
debug: Data frame: b'5754b1f18fe7ded3696ab572a1556d9a9cd2be7e'
debug: Sending: b'8610be7e'
debug: Application frame 89 (incomingRouteRecordHandler) received
debug: Data frame: b'6754b1f18fe7ded3696ab572a1556d9a9cf0bd7e'
debug: Sending: b'87009f7e'
debug: Application frame 89 (incomingRouteRecordHandler) received
debug: Data frame: b'7754b1ed542a15b7d9944a65ab5592a2629dfc661231628f7c51ba89bc217e'
debug: Sending: b'8070787e'
debug: Application frame 69 (incomingMessageHandler) received
debug: Data frame: b'0754b19754f1d8b259914a25aa1593499c3623abed17337e'
debug: Sending: b'8160597e'
debug: Application frame 63 (messageSentHandler) received
Failed ZDO request during device initialization: ('Endpoint request failed: %s', [129, 55703, []])
Traceback (most recent call last):
  File "/home/perosb/build/home-assistant/venv/lib/python3.6/site-packages/zigpy/device.py", line 53, in _initialize
    raise Exception("Endpoint request failed: %s", epr)
Exception: ('Endpoint request failed: %s', [129, 55703, []])
debug: Data frame: b'1754b1f18fe7ded3696ab572a1556d9a9caaba7e'
debug: Sending: b'82503a7e'
debug: Application frame 89 (incomingRouteRecordHandler) received
debug: Data frame: b'2754b1ed542a15b7d9944a65ab5592a0639dfc6612316189fd1dae88fdab4a7e'
debug: Sending: b'83401b7e'
debug: Application frame 69 (incomingMessageHandler) received
warning: Unexpected response TSN=2 command=32773 args=[0, 52699, [1]]
debug: [0xcddb:zdo] Unexpected ZDO reply 0x8005: [0, 52699, [1]]

Devices after add:

18:19 $ bellows -d /dev/ttyUSB0 devices
Device:
  NWK: 0xcddb
  IEEE: 00:0b:57:ff:fe:30:61:cb
  Endpoints:
    1: profile=0xc05e, device_type=DeviceType.COLOR_TEMPERATURE_LIGHT
      Input Clusters:
        Basic (0)
        Identify (3)
        Groups (4)
        Scenes (5)
        On/Off (6)
        Level control (8)
        Color Control (768)
        Diagnostic (2821)
        LightLink (4096)
      Output Clusters:
        Scenes (5)
        Ota (25)
        Poll Control (32)
        LightLink (4096)

Generate TCPdump from CLI

As mentioned in an earlier issue by me, I think the ability to view the data frames that are sent and received by Bellows in Wireshark. @rcloran mentioned he was open to the idea. This is something that would come in useful e.g. in #43, where an unknown type is in the data frame that is received, which results in a crash.

Having only one antenna device, I can't debug with another device while using the first one as the controller. Thus, I would like to debug the packets that the CLI application is already dumping in hex format when in verbose mode, in Wireshark.

I want to try implementing this, but I would like opinions first. My current idea is a flag for the CLI commands like permit, with which you specify a filename for the dump. This file is written as long as the CLI command is running, either until timeout (e.g. by the time mentioned in permit), or when the command is interrupted.

Does this sound like a useful feature, and the correct way to use it?

Invalid EmberOutgoingMessageType on permit (EZSP 5)

https://community.home-assistant.io/t/one-zigbee-gateway-to-rule-them-all/16803/30

Exception:

ERROR:homeassistant.core:Error doing job: Exception in callback SerialTransport.readready()
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
self._callback(*self.args)
File "/opt/hass/.homeassistant/deps/serial_asyncio/__init__.py", line 106, in readready
self.protocol.data_received(data)
File "/opt/hass/.homeassistant/deps/bellows/uart.py", line 61, in data_received
self.frame_received(frame)
File "/opt/hass/.homeassistant/deps/bellows/uart.py", line 73, in frame_received
self.data_frame_received(data)
File "/opt/hass/.homeassistant/deps/bellows/uart.py", line 94, in data_frame_received
self._application.frame_received(self._randomize(data[1:-3]))
File "/opt/hass/.homeassistant/deps/bellows/ezsp.py", line 179, in frame_received
result, data = t.deserialize(data, schema)
File "/opt/hass/.homeassistant/deps/bellows/types/__init__.py", line 9, in deserialize
value, data = type_.deserialize(data)
File "/opt/hass/.homeassistant/deps/bellows/types/basic.py", line 13, in deserialize
r = cls(int.from_bytes(data[:cls._size], 'little', signed=cls._signed))
File "/usr/lib/python3.4/enum.py", line 222, in __call__
return cls.__new__(cls, value)
File "/usr/lib/python3.4/enum.py", line 457, in __new__
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 6 is not a valid EmberOutgoingMessageType

Failed ZDO request during device initialization for Ikea bulb

I am unable to join my ikea bulb to my home assistant setup. It will result in a Failed ZDO request during device initialization: ('Endpoint request failed: %s', ...)

2017-08-23 20:33:55 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1948625904: Received {'type': 'call_service', 'domain': 'zha', 'service': 'permit', 'service_data': {}, 'id': 11}
2017-08-23 20:33:55 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=zha, service=permit, service_data=, service_call_id=1961586576-2>
2017-08-23 20:33:55 INFO (MainThread) [homeassistant.components.zha] Permitting joins for 60s
2017-08-23 20:33:55 DEBUG (MainThread) [bellows.ezsp] Send command permitJoining
2017-08-23 20:33:55 DEBUG (MainThread) [bellows.uart] Sending: b'634c218a686fa77e'
2017-08-23 20:33:55 DEBUG (MainThread) [bellows.uart] Data frame: b'374ca18a543f167e'
2017-08-23 20:33:55 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2017-08-23 20:33:55 DEBUG (MainThread) [bellows.ezsp] Application frame 34 (permitJoining) received
2017-08-23 20:33:55 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1961586576-2>
2017-08-23 20:33:55 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1948625904: Sending {'id': 11, 'type': 'result', 'success': True, 'result': None}
2017-08-23 20:34:00 DEBUG (MainThread) [bellows.uart] Data frame: b'474cb5cae1a78f4ca6c34125fa717e'
2017-08-23 20:34:00 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e'
2017-08-23 20:34:00 DEBUG (MainThread) [bellows.ezsp] Application frame 98 (incomingSenderEui64Handler) received
2017-08-23 20:34:00 DEBUG (MainThread) [bellows.uart] Data frame: b'574cb1ed502a15a159944a2dae5592d36385cd4512316b0a1728d6046680c0f0e0cd50a34d7e'
2017-08-23 20:34:00 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e'
2017-08-23 20:34:00 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2017-08-23 20:34:00 DEBUG (MainThread) [bellows.zigbee.application] No such device 61162
2017-08-23 20:34:00 WARNING (MainThread) [bellows.zigbee.application] Message on unknown device 0xeeea
2017-08-23 20:34:03 DEBUG (MainThread) [bellows.uart] Data frame: b'674cb18c084ba03fc36ab572a15593499c4e701e7e'
2017-08-23 20:34:03 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e'
2017-08-23 20:34:03 DEBUG (MainThread) [bellows.ezsp] Application frame 36 (trustCenterJoinHandler) received
2017-08-23 20:34:03 INFO (MainThread) [bellows.zigbee.application] Device 0x615c (00:0b:57:ff:fe:9a:8d:b5) joined the network
2017-08-23 20:34:03 INFO (MainThread) [bellows.zigbee.device] [0x615c] Discovering endpoints
2017-08-23 20:34:03 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast
2017-08-23 20:34:03 DEBUG (MainThread) [bellows.uart] Sending: b'774d219c547674b259914a25aa1593499c4f26a8ec92065b347e'
2017-08-23 20:34:03 DEBUG (MainThread) [bellows.uart] Data frame: b'704da19c54e1c5707e'
2017-08-23 20:34:03 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e'
2017-08-23 20:34:03 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received
2017-08-23 20:34:08 DEBUG (MainThread) [bellows.uart] Data frame: b'004db197547674b259914a25aa1593499c8526cdedc8847e'
2017-08-23 20:34:08 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e'
2017-08-23 20:34:08 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.uart] Data frame: b'104db18ccb38a03fc36ab572a15593499c4e335d7e'
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e'
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.ezsp] Application frame 36 (trustCenterJoinHandler) received
2017-08-23 20:34:09 INFO (MainThread) [bellows.zigbee.application] Device 0x129f (00:0b:57:ff:fe:9a:8d:b5) joined the network
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.zigbee.application] Skip initialization for existing device 00:0b:57:ff:fe:9a:8d:b5
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.uart] Data frame: b'204db5cae1a78f4ca6c3412599937e'
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e'
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.ezsp] Application frame 98 (incomingSenderEui64Handler) received
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.uart] Data frame: b'304db1ed502a15a159944a2dae55923d6382b8b912316b0a62d4d6046680c0f0e0cd50156a7e'
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2017-08-23 20:34:09 DEBUG (MainThread) [bellows.zigbee.zdo] [0x129f:zdo] ZDO request 0x0013: [4767, 00:0b:57:ff:fe:9a:8d:b5, 142]
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Sending: b'0452219c54b507b259914a25aa1593499c4c25a8ef920699167e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Data frame: b'4152a19c54e7ae397e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Data frame: b'5152b1f1cb38a03fc36ab572a1556d849c0b797e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Data frame: b'6152b1f1cb38a03fc36ab572a1556d849c297a7e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Data frame: b'7152b1ed542a15b7d9944a65aa55923c6383b8b9123162897c9a0289eaf77e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Data frame: b'0152b19754b507b259914a25aa1592499c8325abed52037e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e'
2017-08-23 20:34:10 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received
2017-08-23 20:34:10 WARNING (MainThread) [bellows.zigbee.device] [0x129f] Failed ZDO request during device initialization: ('Endpoint request failed: %s', [129, 24924, []])
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.uart] Data frame: b'1152b1ed502a15b459944a2dab55923f6382b8b912316e8a00396788fd673fa798b27e'
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e'
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.zigbee.zdo] [0x129f:zdo] ZDO request 0x0006: [65533, 260, [25], []]
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.uart] Sending: b'1253219c54b507b25992ca25aa1593499c4d24adeece678bfcc798c57e'
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.uart] Data frame: b'2253a19c54e4a5f37e'
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e'
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.uart] Data frame: b'3253b1f1cb38a03fc36ab572a1556d859ce54c7e'
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.uart] Data frame: b'4253b19754b507b25992ca25aa1593499c8024abed8a457e'
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e'
2017-08-23 20:34:18 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received
2017-08-23 20:34:18 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification
2017-08-23 20:34:20 DEBUG (MainThread) [bellows.uart] Data frame: b'5253b1f1cb38a03fc36ab572a1556d859ca14a7e'
2017-08-23 20:34:20 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e'
2017-08-23 20:34:20 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2017-08-23 20:34:20 DEBUG (MainThread) [bellows.uart] Data frame: b'6253b1ed542e14ab59954b65aa55923e6382b8b91231698afdc762f5ed7c1d87bcdccf6e8f0e947e'
2017-08-23 20:34:20 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e'
2017-08-23 20:34:20 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2017-08-23 20:34:20 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-08-23 20:34:20 WARNING (MainThread) [bellows.zigbee.device] [0x129f] Message on unknown endpoint 1
2017-08-23 20:34:23 DEBUG (MainThread) [bellows.uart] Data frame: b'7253b1f1cb38a03fc36ab572a1556d859c9d487e'
2017-08-23 20:34:23 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e'
2017-08-23 20:34:23 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2017-08-23 20:34:23 DEBUG (MainThread) [bellows.uart] Data frame: b'0253b1ed542e14ab59954b65aa5592316382b8b91231698afcc762f5ed7c1d87bcdccf6e8f8bdc7e'
2017-08-23 20:34:23 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e'
2017-08-23 20:34:23 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2017-08-23 20:34:23 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-08-23 20:34:23 WARNING (MainThread) [bellows.zigbee.device] [0x129f] Message on unknown endpoint 1
2017-08-23 20:34:26 DEBUG (MainThread) [bellows.uart] Data frame: b'1253b1f1cb38a03fc36ab572a1556d859cd94e7e'
2017-08-23 20:34:26 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e'
2017-08-23 20:34:26 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2017-08-23 20:34:26 DEBUG (MainThread) [bellows.uart] Data frame: b'2253b1ed542e14ab59954b65aa5592306382b8b91231698affc762f5ed7c1d87bcdccf6e8f533e7e'
2017-08-23 20:34:26 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e'
2017-08-23 20:34:26 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2017-08-23 20:34:26 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-08-23 20:34:26 WARNING (MainThread) [bellows.zigbee.device] [0x129f] Message on unknown endpoint 1
2017-08-23 20:34:29 DEBUG (MainThread) [bellows.uart] Data frame: b'3253b1f1cb38a03fc36ab572a1556d859ce54c7e'
2017-08-23 20:34:29 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e'
2017-08-23 20:34:29 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2017-08-23 20:34:29 INFO (SyncWorker_0) [homeassistant.components.device_tracker.ubus] Checking ARP
2017-08-23 20:34:29 DEBUG (MainThread) [bellows.uart] Data frame: b'4253b1ed542e14ab59954b65aa5592336382b8b91231698afec762f5ed7c1d87bcdccf6e8f2f947e'
2017-08-23 20:34:29 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e'
2017-08-23 20:34:29 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2017-08-23 20:34:29 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-08-23 20:34:29 WARNING (MainThread) [bellows.zigbee.device] [0x129f] Message on unknown endpoint 1
2017-08-23 20:34:32 DEBUG (MainThread) [bellows.uart] Data frame: b'5253b1f1cb38a03fc36ab572a1556d859ca14a7e'
2017-08-23 20:34:32 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e'
2017-08-23 20:34:32 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received
2017-08-23 20:34:32 DEBUG (MainThread) [bellows.uart] Data frame: b'6253b1ed542e14ab59954b65aa5592326382b8b91231698af9c762f5ed7c1d87bcdccf6e8ff2db7e'
2017-08-23 20:34:32 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e'
2017-08-23 20:34:32 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2017-08-23 20:34:32 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-08-23 20:34:32 WARNING (MainThread) [bellows.zigbee.device] [0x129f] Message on unknown endpoint 1

Clean up CLI

The bellows CLI depends on zigbee and handles database stuff that belongs to zigpy

Bulk reading capability

For example, I would love to be able to bulk read devices by specifying some sort of file (YAML?) that includes the target host, the endpoint ID, cluster ID, and attribute to read.

The per-run startup costs of doing these reads one host/endpoint/cluster/attribute at a time, especially on a slow device (RPi or similar) are pretty high. I suspect this is due to both Python runtime startup/teardown costs, and UART/ZigBee setup costs.

Doing it "naively" (ie. spawn bellows for each 4-tuple) takes almost 2 minutes on my RPi, but by applying this hack to the Bellows CLI, I can get it down to 21 seconds, and I get all my data at once.

UPDATE: A daemon mode or something like it would also be great. :) I want to poll some sensors occasionally (2-3 minutes), and push the data to InfluxDB, but couldn't figure out how to use Bellows from a Python script.

Osram Lightify Dimming Switch

This device pairs ok but doesn't show up in the web interface and nothing shows up in the logs when I push the button. I have enabled debug logging for the bellows component.

Device:
  NWK: 0xc51a
  IEEE: 84:18:26:00:00:e8:f8:d2
  Endpoints:
    1: profile=0x104, device_type=DeviceType.LEVEL_CONTROL_SWITCH
      Input Clusters:
        Basic (0)
        Power Configuration (1)
        Identify (3)
        Poll Control (32)
        Temperature Measurement (1026)
        Diagnostic (2821)
      Output Clusters:
        Identify (3)
        On/Off (6)
        Level control (8)
        Ota (25)

docs for adding new devices

I have the reciever from http://www.homedepot.com/p/Home-Decorators-Collection-Gardinier-52-in-LED-Brushed-Nickel-Ceiling-Fan-43260/206648825 and was wanting to add support for it. it paired okay. and shows up as a switch, which seems to be the switch to turn everything on/off. Turning it on works, however turning it back off does not seem to, the light is a dimmer and the fan speed control ihas 4 speeds, there is a comfort breeze mode that randomly changes the speed of the fan. There is support in smartthings for the receiver, I was wondering if you had any docs on how to best add support for new devices.

ZHA not able to control light until HA is restart

Following error occurs and Home assistant needs to restart to control the lights again.
Can you please guide what code can be modify to avoid restarting of the HA.

2017-12-15 06:43:04 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification 2017-12-15 06:43:04 WARNING (MainThread) [bellows.zigbee.application] Unexpected response TSN=8 command=1 args=[[<ReadAttributeRecord attrid=0 status=0 value=254>]] 2017-12-15 06:48:08 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/lib/python3.6/asyncio/tasks.py", line 181, in _step result = coro.throw(exc) File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 1031, in _event_to_service_call yield from service_handler.func(service_call) File "/usr/lib/python3.6/site-packages/homeassistant/components/light/__init__.py", line 271, in async_handle_light_service yield from light.async_turn_on(**params) File "/usr/lib/python3.6/site-packages/homeassistant/components/light/zha.py", line 105, in async_turn_on duration File "/usr/lib/python3.6/site-packages/bellows/zigbee/application.py", line 284, in request v = yield from send_fut File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup future.result() File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result raise self._exception bellows.zigbee.exceptions.DeliveryError: Message send failure: EmberStatus.DELIVERY_FAILED 2017-12-15 06:48:13 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification

Regular freeze during dump of `form`

While trying to figure out why my new Xiaomi devices don't work with Bellows, I'm attempting to make a dump to check what is happening in WireShark. I'm starting the dump as follows:

bellows -d /dev/ttyUSB0 -v INFO dump -c 15 -w zigbee_connect_dump

After that, I form a new network with a fresh database:

bellows -d /dev/ttyUSB0 -v DEBUG form -D zigbee.db

After a bit of output, however, both the dump and the form seem to freeze. This is the output where the form halts:

debug: Using selector: EpollSelector
debug: Loading application state from zigbee2.db
debug: Sending: b'1ac038bc7e'

and the following output is printed in the window where I'm running dump:

Capture started
Exception in callback SerialTransport._read_ready()
handle: <Handle SerialTransport._read_ready()>
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
    self._callback(*self._args)
  File "/home/pi/python3venv/lib/python3.4/site-packages/serial_asyncio/__init__.py", line 106, in _read_ready
    self._protocol.data_received(data)
  File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/uart.py", line 61, in data_received
    self.frame_received(frame)
  File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/uart.py", line 81, in frame_received
    self.rstack_frame_received(data)
  File "/home/pi/python3venv/lib/python3.4/site-packages/bellows-0.3.5-py3.4.egg/bellows/uart.py", line 128, in rstack_frame_received
    self._reset_future.set_result(True)
  File "/usr/lib/python3.4/asyncio/futures.py", line 338, in set_result
    raise InvalidStateError('{}: {!r}'.format(self._state, self))
asyncio.futures.InvalidStateError: FINISHED: <Future finished result=True>

After this, neither of the terminals give any output anymore until I kill the program.

This does not always happen, but it does most of the times. I'm using build 0.3.5.

Upgrade to 0.3.2 (ha .49)

1.)
CLI - attempt to use -D option returns
Error: no such option: -D

2.)
after upgrade, clusters 6 & 8 were added to attributes for 3 of 5 identical lights.
manually added the other 2. These were Sengled bulbs.
A note to anyone editing the database with DB browser for Sqlite;
when a record is added, it stores the integer as a text (1 -> '1') which causes a key error upon startup.
I am not sure how to get around this in DB browser for Sqlite, but i had to export database to sql, correct the offending fields in text editor, and reimport.

3.)
Upgrade created empty output_clusters table.
manually added ieee, endpoint_id, cluster (xx:xx:xx:xx:xx:xx:xx:xx 1 25)
upon restart still receiving different errors addressed in closed issue # 23
now i get a "No handler for cluster command"

2017-07-18 08:16:44 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:16:44 WARNING (MainThread) [bellows.zigbee.zcl] [0xb559:1:0x0019] No handler for cluster command 1
2017-07-18 08:16:47 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:16:47 WARNING (MainThread) [bellows.zigbee.zcl] [0xb559:1:0x0019] No handler for cluster command 1
2017-07-18 08:16:50 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:16:50 WARNING (MainThread) [bellows.zigbee.zcl] [0xb559:1:0x0019] No handler for cluster command 1
2017-07-18 08:16:53 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:16:53 WARNING (MainThread) [bellows.zigbee.zcl] [0xb559:1:0x0019] No handler for cluster command 1
2017-07-18 08:16:56 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:16:56 WARNING (MainThread) [bellows.zigbee.zcl] [0xb559:1:0x0019] No handler for cluster command 1
2017-07-18 08:17:23 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification
2017-07-18 08:17:25 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:17:25 WARNING (MainThread) [bellows.zigbee.zcl] [0xada6:1:0x0019] No handler for cluster command 1
2017-07-18 08:17:28 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:17:28 WARNING (MainThread) [bellows.zigbee.zcl] [0xada6:1:0x0019] No handler for cluster command 1
2017-07-18 08:17:31 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:17:31 WARNING (MainThread) [bellows.zigbee.zcl] [0xada6:1:0x0019] No handler for cluster command 1
2017-07-18 08:17:34 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:17:34 WARNING (MainThread) [bellows.zigbee.zcl] [0xada6:1:0x0019] No handler for cluster command 1
2017-07-18 08:17:37 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:17:37 WARNING (MainThread) [bellows.zigbee.zcl] [0xada6:1:0x0019] No handler for cluster command 1
2017-07-18 08:17:46 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification
2017-07-18 08:17:48 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:17:48 WARNING (MainThread) [bellows.zigbee.zcl] [0x5f0d:1:0x0019] No handler for cluster command 1
2017-07-18 08:17:51 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:17:51 WARNING (MainThread) [bellows.zigbee.zcl] [0x5f0d:1:0x0019] No handler for cluster command 1
2017-07-18 08:17:54 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:17:54 WARNING (MainThread) [bellows.zigbee.zcl] [0x5f0d:1:0x0019] No handler for cluster command 1
2017-07-18 08:17:57 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:17:57 WARNING (MainThread) [bellows.zigbee.zcl] [0x5f0d:1:0x0019] No handler for cluster command 1
2017-07-18 08:18:00 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-07-18 08:18:00 WARNING (MainThread) [bellows.zigbee.zcl] [0x5f0d:1:0x0019] No handler for cluster command 1

Licence information

Hi,

I just want to know the licence information for this project?

Because I would like to use your program and help develop it.

Message on unknown cluster 0x0019

Added new brand of bulbs to zha and receive these errors
Everything functions properly in HA, just the log is getting filled with warnings every 5 minutes or so.
quick search looked like the 0x0019 refers to OTA update ???

Nortek Linear HUSBZB-1 hub
(3) Sengled Element Classic Model E11-G13

2017-06-26 04:13:10 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification
2017-06-26 04:13:12 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:13:12 WARNING (MainThread) [bellows.zigbee.endpoint] [0x60a1:1] Message on unknown cluster 0x0019
2017-06-26 04:13:15 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:13:15 WARNING (MainThread) [bellows.zigbee.endpoint] [0x60a1:1] Message on unknown cluster 0x0019
2017-06-26 04:13:18 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:13:18 WARNING (MainThread) [bellows.zigbee.endpoint] [0x60a1:1] Message on unknown cluster 0x0019
2017-06-26 04:13:20 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:13:20 WARNING (MainThread) [bellows.zigbee.endpoint] [0x60a1:1] Message on unknown cluster 0x0019
2017-06-26 04:13:23 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:13:23 WARNING (MainThread) [bellows.zigbee.endpoint] [0x60a1:1] Message on unknown cluster 0x0019
2017-06-26 04:15:33 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.my_thermostat is taking over 10 seconds
2017-06-26 04:17:31 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification
2017-06-26 04:17:33 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:17:33 WARNING (MainThread) [bellows.zigbee.endpoint] [0x33a7:1] Message on unknown cluster 0x0019
2017-06-26 04:17:36 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:17:36 WARNING (MainThread) [bellows.zigbee.endpoint] [0x33a7:1] Message on unknown cluster 0x0019
2017-06-26 04:17:39 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:17:39 WARNING (MainThread) [bellows.zigbee.endpoint] [0x33a7:1] Message on unknown cluster 0x0019
2017-06-26 04:17:42 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:17:42 WARNING (MainThread) [bellows.zigbee.endpoint] [0x33a7:1] Message on unknown cluster 0x0019
2017-06-26 04:17:45 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:17:45 WARNING (MainThread) [bellows.zigbee.endpoint] [0x33a7:1] Message on unknown cluster 0x0019
2017-06-26 04:18:08 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification
2017-06-26 04:18:09 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:18:09 WARNING (MainThread) [bellows.zigbee.endpoint] [0x9d3d:1] Message on unknown cluster 0x0019
2017-06-26 04:18:12 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:18:12 WARNING (MainThread) [bellows.zigbee.endpoint] [0x9d3d:1] Message on unknown cluster 0x0019
2017-06-26 04:18:15 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:18:15 WARNING (MainThread) [bellows.zigbee.endpoint] [0x9d3d:1] Message on unknown cluster 0x0019
2017-06-26 04:18:18 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:18:18 WARNING (MainThread) [bellows.zigbee.endpoint] [0x9d3d:1] Message on unknown cluster 0x0019
2017-06-26 04:18:21 WARNING (MainThread) [bellows.zigbee.zcl] Data remains after deserializing ZCL frame
2017-06-26 04:18:21 WARNING (MainThread) [bellows.zigbee.endpoint] [0x9d3d:1] Message on unknown cluster 0x0019

Electrical Measurement cluster support

Device:
  NWK: 0x2744
  IEEE: 00:0d:6f:00:0b:2c:f3:13
  Endpoints:
    1: profile=0x104, device_type=DeviceType.SMART_PLUG
      Input Clusters:
        Basic (0)
        Identify (3)
        Groups (4)
        Scenes (5)
        On/Off (6)
        Metering (1794)
        Electrical Measurement (2820)
        Diagnostic (2821)
        Manufacturer Specific (64515)
      Output Clusters:
        Ota (25)

Full Disclosure: I haven't looked at the code at all

I would love to be able to track power usage by my plugs and lights. With some pointers and feedback, I'd be happy to help lend a hand to add support for this. Any pointers on where to get started?

cc2530 on serial0

Not a issue perse, though needed some clarification.
I have connected a cc2530 on gpio 14 & 15 and can't get this to work with bellows.
What's needed in order for bellows to talk to the attached cc2530 device ?
reading your comment's on your pr from.
https://github.com/home-assistant/home-assistant/pull/6263
it should be possible to extend this module with cc2530 knowledge.

Any advice is welcome.
regards,
Passie

Deserialization problems on read_attributes (EZSP 5)

Exception:

DEBUG:bellows.ezsp:Application frame 63 (messageSentHandler) received
DEBUG:bellows.uart:Data frame: b'1556b157546f15b658944a24ab5593499c59d8770af29874f8de6782fcbf132d7e'
DEBUG:bellows.uart:Sending: b'82503a7e'
DEBUG:bellows.ezsp:Application frame 69 (incomingMessageHandler) received
ERROR:homeassistant.core:Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
result = next(coro)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/zha/init.py", line 142, in async_device_initialized
discovered_info = yield from discoverendpoint_info(endpoint)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/zha/init.py", line 269, in discoverendpoint_info
allow_cache=True,
File "/opt/hass/.homeassistant/deps/bellows/zigbee/zcl/init.py", line 183, in read_attributes
for record in result[0]:
TypeError: 'uint8_t' object is not iterable

Support for Visionic MCT-340 E

Full disclosure: I'm a total newbie to home automation with Zigbee. I've managed to control my GE Link light bulbs with a USB Zigbee stick and bellows.

I'm trying to use bellows with the door sensor, Visionic MCT-340 E, but have found it difficult getting started. I managed getting the door sensor to join my Zigbee network (bellows form; bellows permit), but I don't understand the work flow from that point. Do I use bellows to poll the sensors for state of the door sensor, or is there a standard way to register a callback whenever the door sensor state changes?

I would love any sort of help or pointers just getting started! A link to some relevant source code or script with some light commentary would be extremely helpful.

Remove magic numbers from source code

Currently, there are a lot of magic numbers in the source which could be removed. Use names/constants instead of numbers when e.g. referring to a command.

Application should re-establish connection to uart after error

Running HA in docker session on Synology NAS bellows will stop showing any sign of life in log after 1-2 hours.
Restarting HA will make zigbee devices and bellows work for another 1-2 hours.

The setup has two zigbee motion sensors and a zigbee switch (for repeating), and a zwave switch.

To eliminate docker/NAS issues tried running natively on a Pine64 arm sbc (HA 0.50.2).
Mostly bellows will stop working after 1-2 hours.
This morning I had one motion sensor and the switch still alive after 8 hours, but one motion sensor was dead.

Would you please advice how I can help debug this issue.
Is there any way of bellows to give more more info or some kind of heartbeat?

This in continuation of: https://community.home-assistant.io/t/0-49-zigbee-stopped-working-after-adding-smart-socket-packet-routing-issue/22453

Is there a way to assess the zigbee mesh connectivity via the bellows cli?

I'm using Home Assistant and recently replaced my Osram Lightify bridge with the HUSBZB-1 stick, which works great for the most part. However, the Lightify bridge was near the center of the house (and was extremely reliable), and my PC with the USB stick is in a corner office. So now I'm seeing poor connectivity with some of the bulbs at the opposite end of the house. I have to switch them several times to get them to actually turn on/off. This is not entirely surprising, since bulbs (and I'm using a mixture of GE Link, Osram/Sylvania, and IKEA Tradfri) are not known as reliable repeaters.

So I picked up an Iris Smart Plug from Lowe's which is supposed to work well as a repeater (at least according to the SmartThings folks) and placed it between the USB stick and the unreliable bulbs. I pulled out my HUSBZB-1 stick for 20 minutes to see if the mesh would reorganize itself, but I'm still not seeing good results. The Smart Plug itself is reachable and quite reliable, and is only 15-20 feet (no walls) from the unreliable bulbs.

Is there a way I can see if the Smart Plug is actually part of the routing table for these bulbs? And if I can see that it's not, is there a way to force it to talk to them?

Thanks!

Can't initialize NCP

Bellows can't initialize my NCP properly. The stack version is 5.7.3-40. It seems my NCP sends a CANCEL but bellows doesn't handle it properly. Here is the debug output:

root@assistant:/home/pi/bellows# bellows -v DEBUG -d /dev/ttyAMA0 info
debug: Using selector: EpollSelector
debug: Connected. Resetting.
debug: Sending: b'1ac038bc7e'
debug: Data frame: b'00c1020b0a527e'
debug: Sending: b'8160597e'
debug: Application frame 163 (dsaVerify) received
^C
Aborted!

What is actually received is b'00' then b'1ac1020b0a527e'. The x00 is still in _buffer and is not cleared on CANCEL. When the CANCEL is received it only clears the previous contents of data and not _buffer. That's why b'1a' is gone but b'00' is still there.

If I add self._buffer = b'' here https://github.com/rcloran/bellows/blob/master/bellows/uart.py#L50 it works and everything starts up correctly. Is that the right way to fix it?

Errors when adding devices

I have been able to add and control Sengled bulbs, but when I add other devices I am getting the bellow error everytime.
2018-02-09 23:22:44 INFO (MainThread) [bellows.zigbee.application] Device 0x406c (00:0d:6f:00:0b:12:51:f4) joined the network
2018-02-09 23:22:45 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification

Even though it says it joined, it has not. I cannot see the status of the device, and the LED keeps blinking indicating it has not been paired yet. I see this issue on Visonic MCT-340 E contact sensors and Centralite 3305-P motion sensors.

After Several Hours Zigbee Devices Stop Responding Until Restart Home Assistant

Hello,

I am not sure if this is a bug with Bellows as my devices stop responding to commands after several hours. I am using HUSBZB-1 and the zwave portion works well. My devices respond again once I restart home assistant in the morning. The home assistant logs also do not provide any details when this problem occurs, they just stop generating for this component. Almost as if it freezes.

Devices paired:

  • 3 Cree bulbs
  • 2 Iris contact sensors
  • 2 Iris Smart plugs

Please let me know if you need more information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.