|
发表于 2018-7-28 14:07:59
|
显示全部楼层
小米盒子最近经常关机后,状态马上又变成开启的(实际电视上没有输入信号),然后过几分钟又自动关闭。。。又自动打开。。。如此反复三四次之后才正常关闭。因为我用盒子的开启关闭来做自动化条件的,弄得很纠结
麻烦帮忙看下log是什么回事:
Log Details (ERROR)
Sat Jul 28 2018 12:36:09 GMT+0800
Error executing service <ServiceCall media_player.turn_on: entity_id=['media_player.xiaomi_tv']>
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
OSError: [Errno 113] No route to host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1107, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1152, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x669687f0>: Failed to establish a new connection: [Errno 113] No route to host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.10', port=6095): Max retries exceeded with url: /controller?action=keyevent&keycode=power (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x669687f0>: Failed to establish a new connection: [Errno 113] No route to host',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1007, in _event_to_service_call
await service_handler.func(service_call)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/__init__.py", line 441, in async_service_handler
await getattr(player, method['method'])(**params)
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 "/home/homeassistant/.homeassistant/custom_components/media_player/xiaomi_tv.py", line 110, in turn_on
self._tv.wake()
File "/srv/homeassistant/lib/python3.5/site-packages/pymitv/tv.py", line 35, in wake
return self._sendKeystroke(Control.wake);
File "/srv/homeassistant/lib/python3.5/site-packages/pymitv/tv.py", line 23, in _sendKeystroke
return Control().sendKeystrokes(self.ip, keystroke)
File "/srv/homeassistant/lib/python3.5/site-packages/pymitv/control.py", line 32, in sendKeystrokes
r = requests.get(tv_url + keystroke)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.10', port=6095): Max retries exceeded with url: /controller?action=keyevent&keycode=power (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x669687f0>: Failed to establish a new connection: [Errno 113] No route to host',)) |
|