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

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

[技术探讨] 安装最新6月4号的空调伴侣插件后,卡在loading data启动界面

[复制链接]

14

主题

211

帖子

1188

积分

金牌会员

Rank: 6Rank: 6

积分
1188
金钱
977
HASS币
0
发表于 2018-6-9 01:50:19 | 显示全部楼层 |阅读模式
大神看看什么问题,安装插件后,就卡在启动界面。删除插件后,一切又正常,求帮助

6月 08 17:43:07 mossbian hass[26336]: 2018-06-08 17:43:07 ERROR (MainThread) [homeassistant.components.websocket_api] Unable to serialize to JSON: Object of type 'bytes' is not JSON serializable
6月 08 17:43:07 mossbian hass[26336]: {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'climate.mi_acpartner', 'old_state': <state climate.mi_acpartner=Cool; current_temperature=None, min_temp=16, max_temp=30, temperature=25, target_temp_step=1, fan_mode=Auto, fan_list=['Low', 'Medium', 'High', 'Auto'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Auto', 'Dehumidify', 'Ventilate'], swing_mode=Off, swing_list=['On', 'Off', 'Unknown'], ac_model=b"\x01\x05\x00\x97\x00\x01\x07'\x01", load_power=11, fan_speed=Auto, led=True, unit_of_measurement=°C, friendly_name=mi_acpartner, supported_features=4801 @ 2018-06-09T01:30:51.168185+08:00>, 'new_state': <state climate.mi_acpartner=Cool; current_temperature=None, min_temp=16, max_temp=30, temperature=25, target_temp_step=1, fan_mode=Auto, fan_list=['Low', 'Medium', 'High', 'Auto'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Auto', 'Dehumidify', 'Ventilate'], swing_mode=Off, swing_list=['On', 'Off', 'Unknown'], ac_model=b"\x01\x05\x00\x97\x00\x01\x07'\x01", load_power=10, fan_speed=Auto, led=True, unit_of_measurement=°C, friendly_name=mi_acpartner, supported_features=4801 @ 2018-06-09T01:30:51.168185+08:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 6, 8, 17, 43, 7, 691138, tzinfo=<UTC>)}}
6月 08 17:43:30 mossbian hass[26336]: 2018-06-08 17:43:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sun.sun, old_state=<state sun.sun=below_horizon; next_dawn=2018-06-08T21:15:26+00:00, next_dusk=2018-06-09T11:36:53+00:00, next_midnight=2018-06-09T16:26:24+00:00, next_noon=2018-06-09T04:26:09+00:00, next_rising=2018-06-08T21:40:36+00:00, next_setting=2018-06-09T11:11:43+00:00, elevation=-40.34, azimuth=23.24, friendly_name=Sun @ 2018-06-09T01:17:11.965523+08:00>, new_state=<state sun.sun=below_horizon; next_dawn=2018-06-08T21:15:26+00:00, next_dusk=2018-06-09T11:36:53+00:00, next_midnight=2018-06-09T16:26:24+00:00, next_noon=2018-06-09T04:26:09+00:00, next_rising=2018-06-08T21:40:36+00:00, next_setting=2018-06-09T11:11:43+00:00, elevation=-40.25, azimuth=23.52, friendly_name=Sun @ 2018-06-09T01:17:11.965523+08:00>>
6月 08 17:44:30 mossbian hass[26336]: 2018-06-08 17:44:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sun.sun, old_state=<state sun.sun=below_horizon; next_dawn=2018-06-08T21:15:26+00:00, next_dusk=2018-06-09T11:36:53+00:00, next_midnight=2018-06-09T16:26:24+00:00, next_noon=2018-06-09T04:26:09+00:00, next_rising=2018-06-08T21:40:36+00:00, next_setting=2018-06-09T11:11:43+00:00, elevation=-40.25, azimuth=23.52, friendly_name=Sun @ 2018-06-09T01:17:11.965523+08:00>, new_state=<state sun.sun=below_horizon; next_dawn=2018-06-08T21:15:26+00:00, next_dusk=2018-06-09T11:36:53+00:00, next_midnight=2018-06-09T16:26:24+00:00, next_noon=2018-06-09T04:26:09+00:00, next_rising=2018-06-08T21:40:36+00:00, next_setting=2018-06-09T11:11:43+00:00, elevation=-40.16, azimuth=23.8, friendly_name=Sun @ 2018-06-09T01:17:11.965523+08:00>>


回复

使用道具 举报

4

主题

531

帖子

3927

积分

论坛元老

Rank: 8Rank: 8

积分
3927
金钱
3386
HASS币
120
发表于 2018-6-9 02:20:34 | 显示全部楼层

回帖奖励 +1 金钱

同样的问题
回复

使用道具 举报

26

主题

94

帖子

1943

积分

金牌会员

Rank: 6Rank: 6

积分
1943
金钱
1814
HASS币
60

教程狂人论坛风云人物突出贡献

发表于 2018-6-9 10:26:11 | 显示全部楼层
应该是最新的miio中关于空调伴侣引用库中,一个属性使用了bytes类型出现了问题,我给改成了str类型就可以显示了,顺便改了下其他bug,具体可找找我的帖子
回复

使用道具 举报

14

主题

211

帖子

1188

积分

金牌会员

Rank: 6Rank: 6

积分
1188
金钱
977
HASS币
0
 楼主| 发表于 2018-6-9 11:09:03 | 显示全部楼层
FrankLv 发表于 2018-6-9 10:26
应该是最新的miio中关于空调伴侣引用库中,一个属性使用了bytes类型出现了问题,我给改成了str类型就可以显 ...

大神你那个帖子下载权限太高了,能不能降低一点啊
回复

使用道具 举报

26

主题

553

帖子

2726

积分

金牌会员

Rank: 6Rank: 6

积分
2726
金钱
2148
HASS币
100

教程狂人

发表于 2018-6-9 19:42:18 来自手机 | 显示全部楼层
本帖最后由 Mirukuteii 于 2018-6-9 20:05 编辑
FrankLv 发表于 2018-6-9 10:26
应该是最新的miio中关于空调伴侣引用库中,一个属性使用了bytes类型出现了问题,我给改成了str类型就可以显 ...

原来如此,我以前做的自制插件也碰到过类似问题,还是用str()对属性的值进行转换会安全些,引用的库要是传来错误也不至于把整个状态对象搞瘫
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-20 12:41 , Processed in 0.048593 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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