syssi / chuangmi_ir

Xiaomi Zhimi Floor Fan and Chuangmi IR Controller integration for Home Assistant
27 stars 5 forks source link

switch.send_command bug #13

Closed aysun168 closed 6 years ago

aysun168 commented 6 years ago

Error executing service <ServiceCall switch.send_command_192_168_31_19 (c:c01a18be5e8a4e828198de5fbaa0a084): command=['Z6VHADgCAACVBgAAvwgAAG8RAABDIwAAYiMAALyYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1ABAAABAQAAAQABAQAAAQEBAAAAAQEBAAABAQEAAAABBgJAA=']> Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1177, in _event_to_service_call await service_handler.func(service_call) File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro res = func(*args, **kw) File "/config/custom_components/switch/chuangmi_ir.py", line 115, in _send_command ir_remote.play_raw(command, 38400) File "/config/deps/lib/python3.6/site-packages/miio/chuangmi_ir.py", line 64, in play_raw {'freq': frequency, 'code': command}) File "/config/deps/lib/python3.6/site-packages/miio/device.py", line 270, in send raise DeviceError(m.data.value["error"]) miio.exceptions.DeviceError: {'code': -5008, 'message': 'magic error'}

script `aotuma_on: sequence:

`switch:

syssi commented 6 years ago

Please capture the infrared command again and update your configuration. The "magic error" appears if you command cannot be re-played.

aysun168 commented 6 years ago

The script could not issue the command, 'aotuma_on: sequence: - service: switch.send_command_192_168_31_19 data: command: - 'Z6VHADgCAACVBgAAvwgAAG8RAABDIwAAYiMAALyYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1ABAAABAQAAAQABAQAAAQEBAAAAAQEBAAABAQEAAAABBgJAA=' Any questions about this notation?

aysun168 commented 6 years ago

Relearning still doesn't work

aysun168 commented 6 years ago

重新安装了,树莓派安装RASPBIAN STRETCH LITE系统,没有任何问题了,之前用的是DIETPI