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

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

[插件集成] HomeAssistant的Hue模拟器组件,抛弃你的ha-bridge

  [复制链接]

25

主题

688

帖子

3630

积分

论坛元老

Rank: 8Rank: 8

积分
3630
金钱
2937
HASS币
219

活跃会员

发表于 2018-5-15 19:32:39 | 显示全部楼层
本帖最后由 aktifin 于 2018-5-16 21:30 编辑

群晖docker报错如下,80端口没被占用,habridge能运行
群晖:6.1
hass: 0.68.1,ssl登陆,已经开启高权限容器

2018-05-15 19:29:58 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.99.101
2018-05-15 19:29:58 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.99.101. Retrying in 2 seconds
2018-05-15 19:30:06 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-05-15 19:30:33 ERROR (MainThread) [homeassistant.components.hue] Unknown Hue linking error occurred
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/hue/bridge.py", line 164, in get_bridge
    await bridge.initialize()
  File "/usr/local/lib/python3.6/site-packages/aiohue/bridge.py", line 43, in initialize
    result = await self.request('get', '')
  File "/usr/local/lib/python3.6/site-packages/aiohue/bridge.py", line 61, in request
    'Invalid content type: {}'.format(res.content_type))
aiohue.errors.ResponseError: Invalid content type: text/plain
2018-05-15 19:30:38 ERROR (MainThread) [homeassistant.components.hue] Unknown Hue linking error occurred
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/hue/bridge.py", line 164, in get_bridge
    await bridge.initialize()
  File "/usr/local/lib/python3.6/site-packages/aiohue/bridge.py", line 43, in initialize
    result = await self.request('get', '')
  File "/usr/local/lib/python3.6/site-packages/aiohue/bridge.py", line 61, in request
    'Invalid content type: {}'.format(res.content_type))
aiohue.errors.ResponseError: Invalid content type: text/plain
2018-05-15 19:30:38 ERROR (MainThread) [homeassistant.components.hue] Unknown Hue linking error occurred
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/hue/bridge.py", line 164, in get_bridge
    await bridge.initialize()
  File "/usr/local/lib/python3.6/site-packages/aiohue/bridge.py", line 43, in initialize
    result = await self.request('get', '')
  File "/usr/local/lib/python3.6/site-packages/aiohue/bridge.py", line 61, in request
    'Invalid content type: {}'.format(res.content_type))
aiohue.errors.ResponseError: Invalid content type: text/plain

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/hue/config_flow.py", line 190, in async_step_import
    self.hass, host, username
  File "/usr/src/app/homeassistant/components/hue/bridge.py", line 175, in get_bridge
    raise AuthenticationRequired
homeassistant.components.hue.errors.AuthenticationRequired

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/hue/bridge.py", line 164, in get_bridge
    await bridge.initialize()
  File "/usr/local/lib/python3.6/site-packages/aiohue/bridge.py", line 43, in initialize
    result = await self.request('get', '')
  File "/usr/local/lib/python3.6/site-packages/aiohue/bridge.py", line 61, in request
    'Invalid content type: {}'.format(res.content_type))
aiohue.errors.ResponseError: Invalid content type: text/plain

把原有的hue的自动生成的配置文件删除后,问题解决


回复

使用道具 举报

10

主题

122

帖子

781

积分

高级会员

Rank: 4

积分
781
金钱
654
HASS币
0

教程狂人

发表于 2018-5-16 21:14:26 | 显示全部楼层
kay7758 发表于 2018-4-25 11:30
这个是不是失效了?今天重做系统,提示没有插件

我的也是提示找不到插件,0.68.1的系统
回复

使用道具 举报

0

主题

18

帖子

189

积分

注册会员

Rank: 2

积分
189
金钱
171
HASS币
0
发表于 2018-5-21 19:01:27 | 显示全部楼层
如果是用ubuntu虚拟环境建的
readlink -f /srv/homeassistant/homeassistant_venv/bin/python3   是这个

回复

使用道具 举报

4

主题

531

帖子

3912

积分

论坛元老

Rank: 8Rank: 8

积分
3912
金钱
3371
HASS币
120
发表于 2018-7-3 11:14:06 | 显示全部楼层
本帖最后由 killadm 于 2018-7-3 13:51 编辑

0.73.0开始报错

2018-07-03 10:40:15 ERROR (MainThread) [homeassistant.setup] Error during setup of component emulated_hue_charley
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 146, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/emulated_hue_charley/__init__.py", line 107, in setup
    is_ban_enabled=False
TypeError: __init__() missing 2 required positional arguments: 'ssl_peer_certificate' and 'trusted_proxies'


看了下是因为下边两个  commits
Document the new http.trusted_proxies setting (#5624)   
https://github.com/home-assistan ... 5ccaae0e21f0988cee4
Extend documentation with ssl_peer_certificate option (#5566)   
https://github.com/home-assistan ... 4c63e36a2d97b8ca753

增加下边两行问题解决
trusted_proxies=[],
ssl_peer_certificate=None,

回复

使用道具 举报

2

主题

24

帖子

290

积分

中级会员

Rank: 3Rank: 3

积分
290
金钱
266
HASS币
0
发表于 2018-7-8 22:56:12 | 显示全部楼层
感谢楼上!具体点来说,是修改 custom_components/emulated_hue_charley/__init__.py

然后搜索 is_ban_enabled=False 这一句,在它的最后增加两行
trusted_proxies=[],
ssl_peer_certificate=None,
回复

使用道具 举报

4

主题

143

帖子

2490

积分

金牌会员

Rank: 6Rank: 6

积分
2490
金钱
2347
HASS币
0
发表于 2018-7-21 05:45:01 来自手机 | 显示全部楼层
大神们 新问题又出现了 升级到0.74后又开始不能用了 怎么破呀 谢谢了
回复

使用道具 举报

5

主题

72

帖子

864

积分

高级会员

Rank: 4

积分
864
金钱
787
HASS币
0
发表于 2018-7-21 08:57:17 来自手机 | 显示全部楼层
什么问题?
回复

使用道具 举报

65

主题

853

帖子

3038

积分

论坛元老

Rank: 8Rank: 8

积分
3038
金钱
2180
HASS币
40
发表于 2018-7-22 11:34:41 | 显示全部楼层
syhbb 发表于 2018-7-21 05:45
大神们 新问题又出现了 升级到0.74后又开始不能用了 怎么破呀 谢谢了

测试0.74后emulated_hue_charley插件再次无法使用,增加如下:
trusted_proxies=[],
ssl_peer_certificate=None,
依旧无法使用
回复

使用道具 举报

4

主题

52

帖子

364

积分

禁止发言

积分
364
金钱
312
HASS币
0
发表于 2018-8-12 18:50:54 | 显示全部楼层
我用群晖的DOCKER装的HA但群晖的80端口有在用啊?怎么破?
回复

使用道具 举报

7

主题

43

帖子

863

积分

超级版主

Rank: 8Rank: 8

积分
863
金钱
805
HASS币
40
 楼主| 发表于 2018-8-27 18:14:55 | 显示全部楼层
transnote 发表于 2018-8-12 18:50
我用群晖的DOCKER装的HA但群晖的80端口有在用啊?怎么破?

可以修改群辉的端口
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-26 03:57 , Processed in 0.054213 second(s), 31 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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