vanviegen / hue-thief

Factory reset Philips Hue bulbs using an EZSP-based Zigbee USB stick. After a reset, bulbs can easily join any type of compatible bridge.
GNU General Public License v3.0
178 stars 20 forks source link

Failure to start due to assertion error #14

Open craigcabrey opened 3 years ago

craigcabrey commented 3 years ago

Using a Go Control stick (Silicon Labs chip), been running with Home Assistant just fine. Run into the following:

root@f2e832ada290:/# python3 hue-thief/hue-thief.py /dev/ttyUSB1 
Exception in callback SerialTransport._read_ready()
handle: <Handle SerialTransport._read_ready()>
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.9/site-packages/serial_asyncio/__init__.py", line 119, in _read_ready
    self._protocol.data_received(data)
  File "/usr/local/lib/python3.9/site-packages/bellows/uart.py", line 64, in data_received
    self.frame_received(frame)
  File "/usr/local/lib/python3.9/site-packages/bellows/uart.py", line 86, in frame_received
    self.data_frame_received(data)
  File "/usr/local/lib/python3.9/site-packages/bellows/uart.py", line 107, in data_frame_received
    self._application.frame_received(self._randomize(data[1:-3]))
  File "/usr/local/lib/python3.9/site-packages/bellows/ezsp.py", line 169, in frame_received
    assert expected_id == frame_id
AssertionError

Not sure if this is a bellows issue or how hue-thief is trying to use it. Any pointers appreciated!

mikeaich commented 2 years ago

I'm seeing exactly the same thing with Python 3.8.10 on Ubuntu with a Nortek HUSBZB-1.

$ python3 hue-thief.py /dev/ttyUSB1
Exception in callback SerialTransport._read_ready()
handle: <Handle SerialTransport._read_ready()>
Traceback (most recent call last):
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/dist-packages/serial_asyncio/__init__.py", line 120, in _read_ready
    self._protocol.data_received(data)
  File "/usr/local/lib/python3.8/dist-packages/bellows/uart.py", line 64, in data_received
    self.frame_received(frame)
  File "/usr/local/lib/python3.8/dist-packages/bellows/uart.py", line 86, in frame_received
    self.data_frame_received(data)
  File "/usr/local/lib/python3.8/dist-packages/bellows/uart.py", line 107, in data_frame_received
    self._application.frame_received(self._randomize(data[1:-3]))
  File "/usr/local/lib/python3.8/dist-packages/bellows/ezsp.py", line 169, in frame_received
    assert expected_id == frame_id
AssertionError
meadowsjared commented 1 year ago

If you're running into this, another app is most likely still use your ZigBee dongle.

For me, the solution was to just use a separate RaspPi. however, there are less extreme versions.

Disabling the dongle in Home Assistant may help? 🤔

Or a second solution would be to boot your Home Assistant hub from another hard drive and just boot it on RaspbianOS temporarily would work for sure. But this requires a secondary boot drive.