Open 0xJohnX opened 7 years ago
Hi,
I also get a time out error trying to use the IR controller. I have checked that the token is correct, but it seems it is not connecting to it.
in the switch configuration try adding timeout parameter.
switch:
- platform: chuangmi_ir
name: "livingroomirremote"
host: !secret chuangmi_ip
token: !secret chuangmi_key
timeout: 20
switches:
reciever:
command_on: ''
command_off: ''
2017-08-25 15:48:12 ERROR (MainThread) [miio.miio] got error when receiving: timed out 2017-08-25 15:48:13 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step result = next(coro) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call yield from service_handler.func(service_call) File "/home/homeassistant/.homeassistant/custom_components/switch/chuangmi_ir.py", line 67, in _learn_command ir_remote.send("miIO.ir_learn", {'key': str(key)}) File "/srv/homeassistant/lib/python3.4/site-packages/miio/miio.py", line 128, in send data, addr = s.recvfrom(1024) socket.timeout: timed out 2017-08-25 15:48:13 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1973561136-678, domain=mqtt, service=publish, service_data=topic=RPi3HA, payload={"event_type": "call_service", "event_data": {"service_call_id": "1973561136-677", "domain": "chuangmi", "service": "learn_command_192_168_1_197", "service_data": {}}}> 2017-08-25 15:48:13 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
have this problem... in the configuration i've added the following code
`switch:
Smart Mi fan thio component not appear in home-assistant screen. i put this in config.yaml fan:
no answer?
Home Assistant 0.50.2
2017-08-08 11:27:02 ERROR (Thread-2) [miio.miio] got error when receiving: timed out 2017-08-08 11:27:02 ERROR (MainThread) [homeassistant.components.fan] Error while setting up platform smart_mi_fan Traceback (most recent call last): File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 164, 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/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/fan/smart_mi_fan.py", line 76, in setup_platform SmartMiFan(hass, name, host, token), File "/home/homeassistant/.homeassistant/custom_components/fan/smart_mi_fan.py", line 145, in __init__ self._state_attrs = self.fan_get_prop() File "/home/homeassistant/.homeassistant/custom_components/fan/smart_mi_fan.py", line 379, in fan_get_prop prop = self.fan.send("get_prop", ["temp_dec","humidity","angle","speed","poweroff_time","power","ac_power","battery","angle_enable","speed_level","natural_level","child_lock","buzzer","led_b"]) File "/srv/homeassistant/lib/python3.4/site-packages/miio/miio.py", line 128, in send data, addr = s.recvfrom(1024) socket.timeout: timed out