Xiaomi Philips smart light bulb checksum error

Hello,
i’m trying to integrate two philips smart led bulbs bu get an error in the logs:

ERROR (MainThread) [homeassistant.components.light] Error while setting up platform xiaomi_miio
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.4/site-packages/construct/core.py", line 2784, in _parse
return self.subcon._parse(stream, context, path)
File "/srv/homeassistant/lib/python3.4/site-packages/construct/core.py", line 1594, in _parse
obj = self.cases.get(key, self.default)._parse(stream, context, path)
File "/srv/homeassistant/lib/python3.4/site-packages/construct/core.py", line 2343, in _parse
hash2 if not isinstance(hash2,bytes) else hexlify(hash2), ))
construct.core.ChecksumError: wrong checksum, read b'ffffffffffffffffffffffffffffffff', computed b'0c82243ec046a40c66b625e960592a26'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for
return fut.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 237, in _step
result = next(coro)
File "/usr/lib/python3.4/asyncio/coroutines.py", line 141, in coro
res = func(*args, **kw)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/xiaomi_miio.py", line 56, in async_setup_platform
device_info = light.info()
File "/srv/homeassistant/lib/python3.4/site-packages/miio/device.py", line 274, in info
return DeviceInfo(self.send("miIO.info", []))
File "/srv/homeassistant/lib/python3.4/site-packages/miio/device.py", line 237, in send
m = Message.parse(data, ctx)
File "/srv/homeassistant/lib/python3.4/site-packages/construct/core.py", line 158, in parse
return self.parse_stream(BytesIO(data), context, **kw)
File "/srv/homeassistant/lib/python3.4/site-packages/construct/core.py", line 171, in parse_stream
return self._parse(stream, context2, "(parsing)")
File "/srv/homeassistant/lib/python3.4/site-packages/construct/core.py", line 867, in _parse
subobj = sc._parse(stream, context, path)
File "/srv/homeassistant/lib/python3.4/site-packages/construct/core.py", line 2788, in _parse
raise e.__class__("%s\n    %s" % (e, path))
construct.core.ChecksumError: wrong checksum, read b'ffffffffffffffffffffffffffffffff', computed b'0c82243ec046a40c66b625e960592a26'
(parsing) -> checksum

I got the same error using the default xiaomi miio component and the custom component from @syssi https://github.com/syssi/philipslight even usin one for each light
here’s my actual configuration
light:

  • platform: xiaomi_philipslight
    name: Xiaomi Philips Smart LED Ball
    host: 192.168.188.38
    token: ‘aea352651603bc223af6debf51b37c5a’
  • platform: xiaomi_miio
    name: living
    host: 192.168.188.36
    token: ‘e28468c6d352fa651267287d179b97a5’

I’m on HA version 0.59.2 Can someone give me a hint on how to debug that?
Thanks!
Luca

Try like this:

  • platform: xiaomi_miio
    name: light_name
    host: ip
    token: light_token (without the ')

Thanks for the hint! Just tried that but got same result…
If I disconnect the lamps (wall switch off) i get “Unable to discover a device at address 192.168.188.3x” but the checksum error does not show up , so it may be something in the communication/initialization of the device …

Verify if the token is the right one. All my xiaomi phillips lights work with the config I posted.

Great! That was it ! I exchanded the two tokens :sweat_smile: I had already tried swapping them but the apex symbol around them was generating the error!
Thanks again!

are you use Hass.io or Hassbian? I’m use hassbian (HA version 0.59.2) and get error

Platform xiaomi_miio not ready yet. Retrying in 120 seconds.

ERROR (MainThread) [miio.device] Got error when receiving: timed out

https://github.com/home-assistant/home-assistant/issues/11048

It works for me

I have the same problem but I can solve :(. you can help me?

Thanks

Are your philips bulbs on the same subnet as your homeassistant server? I ran into a similar issue as I had the bulbs on a separate vlan from my HA instance. I ended up NAT’ing traffic from HA to the vlan with the bulbs to get it working.