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

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

[插件集成] 小米空调伴侣插件-请大家使用syssi大神的版本

  [复制链接]

19

主题

197

帖子

775

积分

高级会员

Rank: 4

积分
775
金钱
578
HASS币
0
发表于 2017-12-9 16:13:44 | 显示全部楼层
我在群晖的docker里的HA 调试可以使用, 我改到树莓派的HASSIO后, 怎么就报错,
2017-12-09 15:44:30 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform mqtt
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
    result = coro.send(None)
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 210, in coro
    res = func(*args, **kw)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/switch/mqtt.py", line 53, in async_setup_platform
    config = PLATFORM_SCHEMA(discovery_info)
  File "/usr/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 221, in __call__
    return self._compiled([], data)
  File "/usr/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 538, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 370, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: required key not provided @ data['command_topic']
2017-12-09 15:44:41 WARNING (MainThread) [homeassistant.setup] Setup of climate is taking over 10 seconds.
2017-12-09 15:44:44 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
    result = coro.send(None)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 399, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 240, in async_add_entity
    'Invalid entity id: {}'.format(entity.entity_id))
homeassistant.exceptions.HomeAssistantError: Invalid entity id: climate.
2017-12-09 15:45:45 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
    result = coro.send(None)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 266, in async_update_ha_state
    self.entity_id, state, attr, self.force_update)
  File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 745, in async_set
    state = State(entity_id, new_state, attributes, last_changed)
  File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 535, in __init__
    "Format should be <domain>.<object_id>").format(entity_id))
homeassistant.exceptions.InvalidEntityFormatError: Invalid entity id encountered: climate.. Format should be <domain>.<object_id>
回复

使用道具 举报

1

主题

45

帖子

191

积分

注册会员

Rank: 2

积分
191
金钱
146
HASS币
0
发表于 2017-12-10 22:57:21 | 显示全部楼层
这个太实用了。
回复

使用道具 举报

0

主题

6

帖子

42

积分

新手上路

Rank: 1

积分
42
金钱
36
HASS币
0
发表于 2017-12-12 22:35:14 来自手机 | 显示全部楼层
纯小白 下载了插件放哪儿
回复

使用道具 举报

9

主题

161

帖子

680

积分

高级会员

Rank: 4

积分
680
金钱
519
HASS币
0
发表于 2017-12-13 15:11:54 | 显示全部楼层
谢谢分享
回复

使用道具 举报

75

主题

1976

帖子

8179

积分

元老级技术达人

积分
8179
金钱
6153
HASS币
430

活跃会员教程狂人

发表于 2017-12-14 05:35:49 | 显示全部楼层
本帖最后由 咸味土豆 于 2017-12-16 20:50 编辑

学习了,多谢楼主。。。。。。
所有过往,皆为序章。
回复

使用道具 举报

0

主题

76

帖子

346

积分

论坛积极会员

积分
346
金钱
270
HASS币
0
发表于 2017-12-14 19:56:37 | 显示全部楼层
群晖docker里应怎么添加这个文件呢?
回复

使用道具 举报

4

主题

531

帖子

4001

积分

论坛元老

Rank: 8Rank: 8

积分
4001
金钱
3460
HASS币
120
发表于 2017-12-14 22:33:28 | 显示全部楼层
本帖最后由 killadm 于 2017-12-14 22:56 编辑

59好像失效了,报错

2017-12-14 22:09:48 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
    result = coro.send(None)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 399, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 247, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 231, in async_update_ha_state
    attr)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 333, in _attr_setter
    value = getattr(self, name)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 736, in supported_features
    raise NotImplementedError()
NotImplementedError


这里提到
All climate platforms are required to implement the supported_features method now. Custom components must adapt to this. Sorry for breaking this, but with changes like this, we can only adapt the “official” platform ourselves.

climate现在强制要求实现supported_features

Climate component: add supported_features #10658

更新:刚搜索了下发现已经有人修正了,59.2可以正常使用。



翻译中...


回复

使用道具 举报

5

主题

122

帖子

1041

积分

论坛技术达人

积分
1041
金钱
914
HASS币
40
 楼主| 发表于 2017-12-15 11:57:06 | 显示全部楼层
killadm 发表于 2017-12-14 22:33
59好像失效了,报错

[code]2017-12-14 22:09:48 ERROR (MainThread) [homeassist ...

嗯 我的github也已经更新
回复

使用道具 举报

1

主题

8

帖子

43

积分

新手上路

Rank: 1

积分
43
金钱
35
HASS币
0
发表于 2017-12-16 01:23:40 | 显示全部楼层
小米万能遥控器应该能参考一下
回复

使用道具 举报

5

主题

72

帖子

724

积分

高级会员

Rank: 4

积分
724
金钱
652
HASS币
0
发表于 2017-12-16 12:46:56 | 显示全部楼层
折腾了几天了,也换了新的14号的插件,空调伴侣可以ping通,也能用米家控制。
不知道问题出在哪里了。。。。
2017-12-16 12:31:53 WARNING (MainThread) [homeassistant.setup] Setup of climate is taking over 10 seconds.
2017-12-16 12:34:21 ERROR (Thread-19) [miio.device] Got error when receiving: timed out
2017-12-16 12:34:21 WARNING (Thread-19) [miio.device] Retrying with incremented id, retries left: 3
2017-12-16 12:34:25 WARNING (MainThread) [homeassistant.components.climate] Setup of platform mi_acpartner is taking over 10 seconds.
2017-12-16 12:34:26 ERROR (Thread-19) [miio.device] Got error when receiving: timed out
2017-12-16 12:34:26 WARNING (Thread-19) [miio.device] Retrying with incremented id, retries left: 2
2017-12-16 12:34:31 ERROR (Thread-19) [miio.device] Got error when receiving: timed out
2017-12-16 12:34:31 WARNING (Thread-19) [miio.device] Retrying with incremented id, retries left: 1
2017-12-16 12:34:36 ERROR (Thread-19) [miio.device] Got error when receiving: timed out
2017-12-16 12:34:36 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform mi_acpartner
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/miio/device.py", line 236, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/miio/device.py", line 236, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/miio/device.py", line 236, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/miio/device.py", line 236, in send
    data, addr = s.recvfrom(1024)
socket.timeout: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.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/climate/mi_acpartner.py", line 141, in setup_platform
    token, sensor_entity_id, sync, customize),
  File "/home/homeassistant/.homeassistant/custom_components/climate/mi_acpartner.py", line 214, in __init__
    self._state = self.climate_get_state()
  File "/home/homeassistant/.homeassistant/custom_components/climate/mi_acpartner.py", line 485, in climate_get_state
    getstate = self.climate.send("get_model_and_state", [])
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/miio/device.py", line 258, in send
    return self.send(command, parameters, retry_count - 1)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/miio/device.py", line 258, in send
    return self.send(command, parameters, retry_count - 1)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/miio/device.py", line 258, in send
    return self.send(command, parameters, retry_count - 1)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/miio/device.py", line 259, in send
    raise DeviceException from ex
miio.device.DeviceException
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-23 15:51 , Processed in 0.195798 second(s), 31 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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