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

 找回密码
 立即注册
查看: 6000|回复: 7

[已解决] 我的空调伴侣不好用了,现在是在家庭里搜不到

[复制链接]

7

主题

41

帖子

189

积分

注册会员

Rank: 2

积分
189
金钱
148
HASS币
0
发表于 2018-4-13 12:44:08 | 显示全部楼层 |阅读模式
本帖最后由 chaiguolong1414 于 2018-4-13 21:35 编辑

我先把日志贴出来:

--------------------------------------------------------分割线-----------------------------------------------------------

2018-04-12 18:37:20 WARNING (MainThread) [homeassistant.bootstrap] Python 3.4 support has been deprecated and will be removed in the beginning of 2018. Please upgrade Python or your operating system. More info: https://home-assistant.io/blog/2 ... python-3.4-support/
2018-04-12 18:37:28 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform mi_acpartner
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/construct/core.py", line 2758, in _parse
    return self.subcon._parse(stream, context, path)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/construct/core.py", line 1591, in _parse
    obj = self.cases.get(key, self.default)._parse(stream, context, path)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/construct/core.py", line 2340, in _parse
    hash2 if not isinstance(hash2,bytes) else hexlify(hash2), ))
construct.core.ChecksumError: wrong checksum, read b'ffffffffffffffffffffffffffffffff', computed b'1781a20e9725ff73f6a822cfa29ac437'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/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.4/asyncio/tasks.py", line 372, in wait_for
    return fut.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, 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.4/site-packages/miio/device.py", line 233, in send
    m = Message.parse(data, ctx)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/construct/core.py", line 158, in parse
    return self.parse_stream(BytesIO(data), context, **kw)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/construct/core.py", line 171, in parse_stream
    return self._parse(stream, context2, "(parsing)")
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/construct/core.py", line 863, in _parse
    subobj = sc._parse(stream, context, path)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/construct/core.py", line 2762, in _parse
    raise e.__class__("%s\n    %s" % (e, path))
construct.core.ChecksumError: wrong checksum, read b'ffffffffffffffffffffffffffffffff', computed b'1781a20e9725ff73f6a822cfa29ac437'
    (parsing) -> checksum
2018-04-12 18:38:36 ERROR (Thread-7) [homeassistant.components.light.yeelight] Flash supported currently only in RGB mode.
2018-04-12 18:50:35 ERROR (Thread-7) [homeassistant.components.light.yeelight] Flash supported currently only in RGB mode.
2018-04-12 19:07:47 ERROR (Thread-7) [homeassistant.components.light.yeelight] Unable to turn the bulb on: A socket error occurred when sending the command.
2018-04-12 19:27:05 ERROR (Thread-7) [homeassistant.components.light.yeelight] Flash supported currently only in RGB mode.
2018-04-12 20:14:49 ERROR (Thread-9) [homeassistant.components.light.yeelight] Flash supported currently only in RGB mode.
2018-04-12 20:35:00 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/selector_events.py", line 582, in _read_ready
    data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
2018-04-13 01:35:33 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/selector_events.py", line 582, in _read_ready
    data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
2018-04-13 04:04:59 ERROR (Thread-7) [homeassistant.components.light.yeelight] Flash supported currently only in RGB mode.
2018-04-13 04:16:42 ERROR (Thread-3) [homeassistant.components.light.yeelight] Flash supported currently only in RGB mode.

--------------------------------------------------------分割线-----------------------------------------------------------



目前的情况是我采用的是HB+HA,安装在树莓派上的,前段时间小米的空调伴侣还是能用的,最近不知道是不是更新的缘故,用不了了
自己折腾了一阵子也不好用,所以上来求救来了,我还有别的智能硬件现在在iphone的家庭里都好用的,只有空调伴侣不好用,望各位
大神求救,我说的主要是空调功能,网关功能我并不需要。

我下面吧主配置文件也上传了吧:




--------------------------------------------------------分割线-----------------------------------------------------------
homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 30.2936
  longitude: 120.1614
  # 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

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

http:
  # Secrets are defined in the file secrets.yaml
  # api_password: !secret http_password
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  # base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Weather prediction
sensor:
  - platform: yr

# Text to speech
tts:
  - platform: google

# Cloud
cloud:

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

weather:
  - platform: yweather
    woeid: 2151849

# yeelight
light:
  - platform: yeelight
    devices:
      192.168.31.95:
        name: Living Room
        transition: 1000
        use_music_mode: True #(defaults to False)
        save_on_change: False #(defaults to True)
      #192.168.31.95:
        #name: Front Door

# xiaomi_aqara

xiaomi_aqara:
  gateways:
      - mac: 34CE008BE6EF
        key: AA46CAE8066A4B4C

# xiaomi_kongtiaobanlv
climate:
  - platform: mi_acpartner
    name: mi_acpartner
    host: 192.168.31.5
    #token: 48f8104fd94b61284a1a3af092c9c646
    token: d47ed53ece31e0457b0b5395e940b5db
    target_sensor: sensor.temperature_158d00015aefc4


--------------------------------------------------------分割线-----------------------------------------------------------

另外关于token的问题,图片中两种方法获得的不一致,在主配置文件中该选用哪一个:




IMG_5320.PNG
111.png
FullSizeRender.jpg
回复

使用道具 举报

4

主题

531

帖子

3927

积分

论坛元老

Rank: 8Rank: 8

积分
3927
金钱
3386
HASS币
120
发表于 2018-4-13 15:41:57 | 显示全部楼层
python-miio 0.3.8

Goodbye Python 3.4! This release marks end of support for python versions older than 3.5, paving a way for cleaner code and a nicer API for a future asyncio support. Highlights of this release:
回复

使用道具 举报

7

主题

41

帖子

189

积分

注册会员

Rank: 2

积分
189
金钱
148
HASS币
0
 楼主| 发表于 2018-4-13 16:16:10 | 显示全部楼层
killadm 发表于 2018-4-13 15:41
python-miio 0.3.8

Goodbye Python 3.4! This release marks end of support for python versions older t ...

那该如何安装python-miio 0.3.8?我在树莓派中更新升级已经是最新版本,python也是最新版本,后来我自己编译源代码装了python3.6,但是在虚拟环境中还是用的python3.4,在我su取得管理员权限时,提醒我输入,密码,但是我想不起来是否设置了,忘了密码。所以无法升级python
回复

使用道具 举报

4

主题

531

帖子

3927

积分

论坛元老

Rank: 8Rank: 8

积分
3927
金钱
3386
HASS币
120
发表于 2018-4-13 17:45:41 | 显示全部楼层
chaiguolong1414 发表于 2018-4-13 16:16
那该如何安装python-miio 0.3.8?我在树莓派中更新升级已经是最新版本,python也是最新版本,后来我自己 ...

从0.3.8开始,python-miio不再支持python3.4,只能想办法升级python版本,或者降级miio试试
pip3 install python-miio==0.3.7
也许Construct版本也需要降级
回复

使用道具 举报

7

主题

41

帖子

189

积分

注册会员

Rank: 2

积分
189
金钱
148
HASS币
0
 楼主| 发表于 2018-4-13 21:35:13 | 显示全部楼层
killadm 发表于 2018-4-13 17:45
从0.3.8开始,python-miio不再支持python3.4,只能想办法升级python版本,或者降级miio试试
pip3 install ...

谢谢解答,升级了树莓派的系统为最新版,从而更新了python版本,然后重新设置了一遍,一点小缺憾是yeelight灯有重复,但在主配置中已设置隐藏,不影响siri使用,而且现在对颜色支持也更好了,谢谢,已经完美了
回复

使用道具 举报

10

主题

661

帖子

5336

积分

论坛元老

Rank: 8Rank: 8

积分
5336
金钱
4670
HASS币
50
发表于 2018-6-12 12:41:31 | 显示全部楼层
本帖最后由 缥缈的孤鸿 于 2018-6-12 12:55 编辑

我也发现token不一样,楼主是怎么解决的?

用低版本米家app+root过的安卓机获取的token,和ios米家APP关于——网关信息里的token不一样,用这2个token都连不上。同一天在京东下单的另一个空调伴侣就没问题。。
在这个出问题的网关信息里显示:
ott_stat=(        0,        0,        0,        0),
难道是硬件有问题?
回复

使用道具 举报

7

主题

41

帖子

189

积分

注册会员

Rank: 2

积分
189
金钱
148
HASS币
0
 楼主| 发表于 2018-6-17 22:08:02 | 显示全部楼层
缥缈的孤鸿 发表于 2018-6-12 12:41
我也发现token不一样,楼主是怎么解决的?

用低版本米家app+root过的安卓机获取的token,和ios米家APP关于 ...

我是用安卓机获取的token,当然我是用的模拟机安卓机
回复

使用道具 举报

10

主题

661

帖子

5336

积分

论坛元老

Rank: 8Rank: 8

积分
5336
金钱
4670
HASS币
50
发表于 2018-6-17 22:09:43 | 显示全部楼层
chaiguolong1414 发表于 2018-6-17 22:08
我是用安卓机获取的token,当然我是用的模拟机安卓机

我一开始用安卓机获取的,和ios里看到的不一样,后来又一样了。。但是这个伴侣用miio一直接入不了,用mi_acpartner就可以。。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-19 23:46 , Processed in 0.108180 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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