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

 找回密码
 立即注册
查看: 4000|回复: 3

[求助] 新人求助,请教大神新增小米Wi-Fi设备的报错问题

[复制链接]

1

主题

6

帖子

31

积分

新手上路

Rank: 1

积分
31
金钱
25
HASS币
0
发表于 2019-5-2 17:24:56 | 显示全部楼层 |阅读模式
先谢过各位大神了啊!

我是纯新手,刚安装好HA系统,在树莓派3B板子上安装的Mossbian系统(2018-10-16),python和[size=14.666666984558105px]python开发资源都是3.5.3,HASS是最新版0.92.1,家里用的是全套小米的智能家居设备,小米网关及其zigbee设备,还有空气净化器等几个wifi设备。HA系统启动后,首先自动发现了[size=14.666666984558105px]小米网关及其zigbee设备。接着我就把小米[size=14.666666984558105px]空气净化器pro(固定ip地址)token值查到,在configuration.yaml文件中加入:
fan:
  # 空气净化器
  - platform: xiaomi_miio
    name: Xiaomi Air Purifier
    host: 192.168.130.66
    token: 85de50bb660ca02559009df1800333f6
    model: zhimi.airpurifier.v6



重新启动HA后出现以下信息:
屏幕快照 2019-05-02 下午5.08.23.png
请教是何原因,如何解决啊?
再次表示感谢!



回复

使用道具 举报

1

主题

6

帖子

31

积分

新手上路

Rank: 1

积分
31
金钱
25
HASS币
0
 楼主| 发表于 2019-5-2 20:07:07 | 显示全部楼层
目前定位到具体一条错误:涉及到xiaomi_miio的报错
详细信息如下:
Log Details (ERROR)
Thu May 02 2019 20:04:41 GMT+0800 (CST)

Error while setting up platform xiaomi_miio
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=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/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/xiaomi_miio/fan.py", line 403, in async_setup_platform
    from miio import Device, DeviceException
  File "/srv/homeassistant/lib/python3.5/site-packages/miio/__init__.py", line 2, in <module>
    from miio.airconditioningcompanion import AirConditioningCompanion
  File "/srv/homeassistant/lib/python3.5/site-packages/miio/airconditioningcompanion.py", line 5, in <module>
    import click
  File "/srv/homeassistant/lib/python3.5/site-packages/click/__init__.py", line 16, in <module>
    from .core import Context, BaseCommand, Command, MultiCommand, Group, \
  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 773, in get_code
  File "<frozen importlib._bootstrap_external>", line 484, in _compile_bytecode
EOFError: marshal data too short
回复

使用道具 举报

1

主题

6

帖子

31

积分

新手上路

Rank: 1

积分
31
金钱
25
HASS币
0
 楼主| 发表于 2019-5-3 00:40:25 | 显示全部楼层
最后一句提示是:EOFError: marshal data too short
回复

使用道具 举报

1

主题

6

帖子

31

积分

新手上路

Rank: 1

积分
31
金钱
25
HASS币
0
 楼主| 发表于 2019-5-3 07:09:11 | 显示全部楼层
配置文件如下:设备的密码部分我用*来取代了

homeassistant:
  # Name of the location where Home Assistant is running hl
  name: xiangyun
  # Location required to calculate the time the sun rises and sets
  latitude: 31.****
  longitude: 118.****
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Asia/Shanghai
  # Customization file
  customize: !include customize.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Discover some devices automatically
discovery:

# Sensors


# Text to speech

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

xiaomi_aqara:
  gateways:
    - key: 2C9F**********

# Example configuration.yaml entry
fan:
  # 空气净化器
  - platform: xiaomi_miio
    name: Xiaomi Air Purifier
    host: 192.168.1.99
    token: 85de****************************
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 10:24 , Processed in 0.236868 second(s), 29 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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