Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeviceError code -30001 (Resp Invalid JSON) - Philips Bulb #205

Closed
mouth4war opened this issue Feb 8, 2018 · 2 comments
Closed

DeviceError code -30001 (Resp Invalid JSON) - Philips Bulb #205

mouth4war opened this issue Feb 8, 2018 · 2 comments
Labels

Comments

@mouth4war
Copy link
Contributor

mouth4war commented Feb 8, 2018

This is a sporadic error I see happening about once in 30 minutes. It seems to be relevant to this library so I'm posting it here.

2018-02-08 16:18:00 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall light.turn_on: transition=30.0, color_temp=283, entity_id=['light.guest_bedroom_wall_north']>
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/light/xiaomi_miio.py", line 194, in _try_command
partial(func, *args, **kwargs))
File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in iter
yield self # This tells Task to wait for completion.
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.6/site-packages/miio/philips_bulb.py", line 76, in on
return self.send("set_power", ["on"])
File "/srv/homeassistant/lib/python3.6/site-packages/miio/device.py", line 251, in send
raise DeviceError(m.data.value["error"])
miio.device.DeviceError: {'code': -30001, 'message': 'Resp invalid json.'}

@syssi
Copy link
Collaborator

syssi commented Feb 8, 2018

Has your philips bulb internet access?

@syssi
Copy link
Collaborator

syssi commented Feb 10, 2018

I've seen the error today the first time too while doing load tests (45req/s):

DEBUG:miio.device:192.168.132.37:54321 >>: {'params': ['power', 'bright', 'cct', 'snm', 'dv'], 'method': 'get_prop', 'id': 4274}
DEBUG:miio.device:192.168.132.37:54321 (ts: 1970-01-01 00:36:18, id: 4274) << {'id': 4274, 'error': {'code': -30001, 'message': 'Resp invalid json.'}}
DEBUG:miio.click_common:Exception: {'code': -30001, 'message': 'Resp invalid json.'}
Traceback (most recent call last):

I will try to handle the error properly in future: retry / replay of the failed command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants