core: Unable to parse json from Philips Eyecare

Home Assistant release with the issue:

0.84.6

Last working Home Assistant release (if known):

n/a

Operating environment (Hass.io/Docker/Windows/etc.):

Virtualenv on Raspberry Pi

Component/platform:

https://www.home-assistant.io/components/light.xiaomi_miio/

Description of problem:

From time to time I see the following error in the log:

2019-01-10 04:54:51 ERROR (Thread-11) [miio.protocol] unable to parse json '{"result":[net],"id":1960}': Expecting value: line 1 column 12 (char 11)
2019-01-10 04:54:51 ERROR (MainThread) [homeassistant.helpers.entity] Update for light.philips_ambient_light fails

That response should be handled properly (at least to avoid an ugly traceback in the log).

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

light:
  - platform: xiaomi_miio
    name: philips
    scan_interval: 60
    model: philips.light.sread1
    host: 192.168.1.89
    token: 202e0609b23d38d15103a9de3075b7a2

Traceback (if applicable):

2019-01-10 04:54:51 ERROR (MainThread) [homeassistant.helpers.entity] Update for light.philips_ambient_light fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/xiaomi_miio.py", line 721, in async_update
    state = await self.hass.async_add_executor_job(self._light.status)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/miio/philips_eyecare.py", line 125, in status
    properties
  File "/srv/homeassistant/lib/python3.5/site-packages/miio/device.py", line 265, in send
    self.__id = m.data.value["id"]
TypeError: 'NoneType' object is not subscriptable

Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (18 by maintainers)

Most upvoted comments

It looks like I did not get any new errors since 2020-07-04. Probably something fixed or just muted this error.

I think it may be closed now.