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

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

求助!无法连接aqara空调助手升级版

[复制链接]

1

主题

5

帖子

33

积分

新手上路

Rank: 1

积分
33
金钱
28
HASS币
0
发表于 2019-1-12 15:03:19 | 显示全部楼层 |阅读模式
本帖最后由 light_22 于 2019-1-12 15:33 编辑

如题,配置文件如下:

homekit:
  auto_start: true
  port: 51827
  filter:  #设备过滤
    include_domains:
      - mi_acpartner  #指定包含设备类型
      - xiaomi_miio

switch:
  - platform: xiaomi_miio
    name: Original Xiaomi Mi Smart WiFi Socket
    host: 192.168.1.14
    token: 3a5f33db411a858093f3338cefe9b296


climate:
  - platform: xiaomi_miio
    name: mi_acpartner
    host: 192.168.1.15
    token: 7dc1f5ef3b665f1bf7e6a034ef8d8ec1
    target_sensor: sensor.temperature_158d00015aefc4


分别配置了wifi插座和空调助手,2个都没有反应,配置检查提示“Platform not found: climate.mi_acpartner”,已下载最新版xiaomi_miio.py到climate目录下,以下是日志:

2019-01-12 07:27:15 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=27 from 2019-01-12 07:17:15.645251)
2019-01-12 07:27:19 ERROR (MainThread) [homeassistant.components.switch.xiaomi_miio] Unsupported device found! Please create an issue at https://github.com/rytilahti/python-miio/issues and provide the following data: chuangmi.plug.m3
2019-01-12 07:27:19 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /home/homeassistant/.homeassistant/known_devices.yaml: Config file not found: /home/homeassistant/.homeassistant/known_devices.yaml
2019-01-12 07:27:20 ERROR (Thread-14) [homeassistant.components.notify.ios] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information
2019-01-12 07:27:24 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 56, in async_setup_component
    return await task  # type: ignore
  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/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 118, in _async_setup_component
    conf_util.async_process_component_config(hass, config, domain)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/config.py", line 764, in async_process_component_config
    platform = get_platform(hass, domain, p_name)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py", line 60, in get_platform
    return get_component(hass, PLATFORM_FORMAT.format(domain, platform))
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py", line 92, in get_component
    module = importlib.import_module(path)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 669, in exec_module
  File "<frozen importlib._bootstrap_external>", line 775, in get_code
  File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/homeassistant/.homeassistant/custom_components/climate/xiaomi_miio.py", line 7
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax



回复

使用道具 举报

40

主题

3056

帖子

1万

积分

超级版主

Nero

Rank: 8Rank: 8

积分
11149
金钱
8042
HASS币
182
发表于 2019-1-12 16:39:15 | 显示全部楼层
File "/home/homeassistant/.homeassistant/custom_components/climate/xiaomi_miio.py", line 7
    <!DOCTYPE html>

这个Python文件下载错了,这是一个网页不是Python文件。
Nero
回复

使用道具 举报

4

主题

100

帖子

818

积分

高级会员

Rank: 4

积分
818
金钱
718
HASS币
0
发表于 2019-1-12 22:08:35 | 显示全部楼层
另外你的WiFi插座HA还没有原生支持:
https://www.home-assistant.io/components/switch.xiaomi_miio/
找找syssi大神的方案吧:
https://github.com/syssi/xiaomiplug
回复

使用道具 举报

1

主题

5

帖子

33

积分

新手上路

Rank: 1

积分
33
金钱
28
HASS币
0
 楼主| 发表于 2019-1-12 23:18:10 | 显示全部楼层
neroxps 发表于 2019-1-12 16:39
File "/home/homeassistant/.homeassistant/custom_components/climate/xiaomi_miio.py", line 7
   

非常感谢!已经搞定!
回复

使用道具 举报

1

主题

5

帖子

33

积分

新手上路

Rank: 1

积分
33
金钱
28
HASS币
0
 楼主| 发表于 2019-1-12 23:19:31 | 显示全部楼层
抚音 发表于 2019-1-12 22:08
另外你的WiFi插座HA还没有原生支持:
https://www.home-assistant.io/components/switch.xiaomi_miio/
找找s ...

嗯,解决了上面那个问题之后已经自己把插座弄好了,不过还是非常感谢!
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 13:35 , Processed in 0.068087 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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