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

 找回密码
 立即注册
楼主: luzai

[插件集成] 小米电视机官方组件修复版

  [复制链接]

7

主题

181

帖子

608

积分

高级会员

Rank: 4

积分
608
金钱
426
HASS币
0
发表于 2018-7-25 10:08:06 | 显示全部楼层
学习学习
回复

使用道具 举报

0

主题

7

帖子

40

积分

新手上路

Rank: 1

积分
40
金钱
33
HASS币
0
发表于 2018-7-25 12:32:35 | 显示全部楼层
学习学习
回复

使用道具 举报

24

主题

884

帖子

5055

积分

论坛元老

Rank: 8Rank: 8

积分
5055
金钱
4166
HASS币
20
发表于 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',))
回复

使用道具 举报

5

主题

318

帖子

2069

积分

金牌会员

Rank: 6Rank: 6

积分
2069
金钱
1750
HASS币
0
发表于 2018-7-28 14:11:31 | 显示全部楼层
感谢分享
回复

使用道具 举报

1

主题

13

帖子

57

积分

注册会员

Rank: 2

积分
57
金钱
44
HASS币
0
发表于 2018-8-3 11:53:54 | 显示全部楼层
学习学习
回复

使用道具 举报

0

主题

69

帖子

250

积分

中级会员

Rank: 3Rank: 3

积分
250
金钱
181
HASS币
0
发表于 2018-8-4 21:59:56 来自手机 | 显示全部楼层
看看 到底是什么
回复

使用道具 举报

0

主题

161

帖子

693

积分

高级会员

Rank: 4

积分
693
金钱
531
HASS币
0
发表于 2018-8-8 11:02:50 | 显示全部楼层
我只想说,楼主你太牛逼了!
回复

使用道具 举报

3

主题

220

帖子

2266

积分

金牌会员

Rank: 6Rank: 6

积分
2266
金钱
2046
HASS币
0
发表于 2018-8-13 16:18:55 | 显示全部楼层
小米3S能用吗
回复

使用道具 举报

1

主题

29

帖子

174

积分

注册会员

Rank: 2

积分
174
金钱
145
HASS币
0
发表于 2018-8-13 17:31:34 | 显示全部楼层
如果有配置成功的朋友,欢迎分享自己的配置。
回复

使用道具 举报

0

主题

80

帖子

500

积分

高级会员

Rank: 4

积分
500
金钱
420
HASS币
0
发表于 2018-8-14 18:57:26 | 显示全部楼层
:victory:
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 16:47 , Processed in 0.075110 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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