『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 4894|回复: 4

[求助] 感应开灯自动化,每晚0点后都会故障,求大神帮忙看看

[复制链接]

1

主题

4

帖子

38

积分

新手上路

Rank: 1

积分
38
金钱
34
HASS币
0
发表于 2017-12-10 19:57:20 | 显示全部楼层 |阅读模式
我设置了2对自动化,分别是有人移动时开灯和无人后15秒关灯。但是每当0点以后,这两对自动化都会失效,以下是日志中的报错信息,但我看不懂是什么原因,请大神帮忙解答一下,谢谢了。

2017-12-10 00:36:51 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal error on transport TCPTransport (error status in uv_stream_t.read callback)
OSError: [Errno 113] Host is unreachable
2017-12-10 02:59:40 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection
    raise err
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 964, in send
    self.connect()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.6/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 0x73f90a90>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.6/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.31.1', port=80): Max retries exceeded with url: /cgi-bin/luci/;stok=edcf46bedc5265865bfcd78d35381e08/api/misystem/devicelist (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x73f90a90>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 181, in _step
    result = coro.throw(exc)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 699, in async_device_tracker_scan
    found_devices = yield from scanner.async_scan_devices()
  File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/xiaomi.py", line 53, in scan_devices
    self._update_info()
  File "/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/xiaomi.py", line 79, in _update_info
    result = self._retrieve_list_with_retry()
  File "/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/xiaomi.py", line 91, in _retrieve_list_with_retry
    result = _retrieve_list(self.host, self.token)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/xiaomi.py", line 113, in _retrieve_list
    res = requests.get(url, timeout=5, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.31.1', port=80): Max retries exceeded with url: /cgi-bin/luci/;stok=edcf46bedc5265865bfcd78d35381e08/api/misystem/devicelist (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x73f90a90>: Failed to establish a new connection: [Errno 111] Connection refused',))

回复

使用道具 举报

6

主题

287

帖子

4151

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4151
金钱
3859
HASS币
0
发表于 2017-12-10 20:45:59 | 显示全部楼层
你的路由器,是不是设置了每天晚上0点重启?
回复

使用道具 举报

1

主题

4

帖子

38

积分

新手上路

Rank: 1

积分
38
金钱
34
HASS币
0
 楼主| 发表于 2017-12-10 22:26:02 | 显示全部楼层
Roger 发表于 2017-12-10 20:45
你的路由器,是不是设置了每天晚上0点重启?

不是。 我设置的是每天3:00重启。
回复

使用道具 举报

27

主题

387

帖子

3257

积分

元老级技术达人

积分
3257
金钱
2850
HASS币
40

教程狂人

发表于 2017-12-10 23:31:03 | 显示全部楼层
路由器有沒有設00:00後網路關閉?
看log是說連不到設備
回复

使用道具 举报

1

主题

4

帖子

38

积分

新手上路

Rank: 1

积分
38
金钱
34
HASS币
0
 楼主| 发表于 2017-12-11 10:16:22 | 显示全部楼层
windgo 发表于 2017-12-10 23:31
路由器有沒有設00:00後網路關閉?
看log是說連不到設備

没有设置网络断开。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-26 20:53 , Processed in 0.260749 second(s), 33 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表