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

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

通过HomeKit接入Aqara 空调伴侣P3的方法

[复制链接]

1

主题

17

帖子

237

积分

论坛分享达人

积分
237
金钱
220
HASS币
0
发表于 2020-8-21 00:20:44 | 显示全部楼层
新问题,大佬。这是什么情况?
QQ图片20200821000932.png


回复

使用道具 举报

2

主题

22

帖子

250

积分

论坛技术达人

积分
250
金钱
223
HASS币
10
 楼主| 发表于 2020-8-21 09:15:48 | 显示全部楼层
a1007812524 发表于 2020-8-21 00:20
新问题,大佬。这是什么情况?

看起来不知道什么原因 uuid 这个古老的包被引入了. 这个包是python 2.6时代的,已经不兼容现在的python版本,需要移除。

已经搜到这是个已知的问题 https://github.com/home-assistant/core/pull/38444,是否发生似乎和pip版本相关。
你可以试着删除uuid包(pip3 uninstall uuid)我待会起个Ubuntu 容器测试一下。
回复

使用道具 举报

2

主题

22

帖子

250

积分

论坛技术达人

积分
250
金钱
223
HASS币
10
 楼主| 发表于 2020-8-21 09:26:09 | 显示全部楼层
a1007812524 发表于 2020-8-21 00:20
新问题,大佬。这是什么情况?

对了,执行我那个命令会同时升级你的home assistant到最新的开发版本,因为不是稳定版可能会有未知的问题,建议提前备份config文件夹。
回复

使用道具 举报

2

主题

22

帖子

250

积分

论坛技术达人

积分
250
金钱
223
HASS币
10
 楼主| 发表于 2020-8-21 10:00:11 | 显示全部楼层
a1007812524 发表于 2020-8-21 00:20
新问题,大佬。这是什么情况?

我在Ubuntu 20.04.1上未能重现你的问题:

# pip3 install -U git+https://github.com/home-assistant/core.git@refs/pull/38979/head
Collecting git+https://github.com/home-assistant/core.git@refs/pull/38979/head
  Cloning https://github.com/home-assistant/core.git (to revision refs/pull/38979/head) to /tmp/pip-req-build-umhal3un
  Running command git clone -q https://github.com/home-assistant/core.git /tmp/pip-req-build-umhal3un
  WARNING: Did not find branch or tag 'refs/pull/38979/head', assuming revision or ref.
  Running command git fetch -q https://github.com/home-assistant/core.git refs/pull/38979/head
  Running command git checkout -q 754feb31f788d29c316c99a91f0db2124817e28f
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied, skipping upgrade: pytz>=2020.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2020.1)
Requirement already satisfied, skipping upgrade: ruamel.yaml==0.15.100 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (0.15.100)
Requirement already satisfied, skipping upgrade: requests==2.24.0 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2.24.0)
Collecting ciso8601==2.1.3
  Using cached ciso8601-2.1.3.tar.gz (15 kB)
Collecting yarl==1.4.2
  Using cached yarl-1.4.2-cp38-cp38-manylinux1_x86_64.whl (253 kB)
Collecting attrs==19.3.0
  Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Requirement already satisfied, skipping upgrade: certifi>=2020.4.5.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2020.6.20)
Requirement already satisfied, skipping upgrade: pip>=8.0.3 in /usr/lib/python3/dist-packages (from homeassistant==0.115.0.dev0) (20.0.2)
Requirement already satisfied, skipping upgrade: bcrypt==3.1.7 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (3.1.7)
Requirement already satisfied, skipping upgrade: astral==1.10.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (1.10.1)
Collecting voluptuous-serialize==2.4.0
  Using cached voluptuous_serialize-2.4.0-py3-none-any.whl (6.7 kB)
Requirement already satisfied, skipping upgrade: jinja2>=2.11.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2.11.2)
Requirement already satisfied, skipping upgrade: cryptography==2.9.2 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2.9.2)
Requirement already satisfied, skipping upgrade: async-timeout==3.0.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (3.0.1)
Processing /root/.cache/pip/wheels/91/4d/4f/e740a68c215791688c46c4d6251770a570e8dfea91af1acb5c/python_slugify-4.0.1-py2.py3-none-any.whl
Collecting aiohttp==3.6.2
  Using cached aiohttp-3.6.2-py3-none-any.whl (441 kB)
Requirement already satisfied, skipping upgrade: pyyaml==5.3.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (5.3.1)
Requirement already satisfied, skipping upgrade: voluptuous==0.11.7 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (0.11.7)
Requirement already satisfied, skipping upgrade: PyJWT==1.7.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (1.7.1)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests==2.24.0->homeassistant==0.115.0.dev0) (2.10)
Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests==2.24.0->homeassistant==0.115.0.dev0) (3.0.4)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests==2.24.0->homeassistant==0.115.0.dev0) (1.25.10)
Collecting multidict>=4.0
  Using cached multidict-4.7.6-cp38-cp38-manylinux1_x86_64.whl (162 kB)
Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/local/lib/python3.8/dist-packages (from bcrypt==3.1.7->homeassistant==0.115.0.dev0) (1.15.0)
Requirement already satisfied, skipping upgrade: cffi>=1.1 in /usr/local/lib/python3.8/dist-packages (from bcrypt==3.1.7->homeassistant==0.115.0.dev0) (1.14.2)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /usr/local/lib/python3.8/dist-packages (from jinja2>=2.11.1->homeassistant==0.115.0.dev0) (1.1.1)
Collecting text-unidecode>=1.3
  Using cached text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.1->bcrypt==3.1.7->homeassistant==0.115.0.dev0) (2.20)
Building wheels for collected packages: homeassistant, ciso8601
  Building wheel for homeassistant (PEP 517) ... done
  Created wheel for homeassistant: filename=homeassistant-0.115.0.dev0-py3-none-any.whl size=8876615 sha256=3f9294db120447a3ef6dc0af695656137e5918328d4d957cd3e8575689db39fa
  Stored in directory: /tmp/pip-ephem-wheel-cache-l5we49k4/wheels/bb/92/2a/9a45a31372389f60ac920c5e8e4d2d25da11e1ec513ce0871d
  Building wheel for ciso8601 (setup.py) ... done
  Created wheel for ciso8601: filename=ciso8601-2.1.3-cp38-cp38-linux_x86_64.whl size=30187 sha256=dd22e1a257f4e903c48f1a7533125b226d43f2efe1333f8b03c292161ddba213
  Stored in directory: /root/.cache/pip/wheels/55/c3/4c/7f1b3249545f80aa40b0ff3b4029e676e7521559fb9b5aab14
Successfully built homeassistant ciso8601
Installing collected packages: ciso8601, multidict, yarl, attrs, voluptuous-serialize, text-unidecode, python-slugify, aiohttp, homeassistant
Successfully installed aiohttp-3.6.2 attrs-19.3.0 ciso8601-2.1.3 homeassistant-0.115.0.dev0 multidict-4.7.6 python-slugify-4.0.1 text-unidecode-1.3 voluptuous-serialize-2.4.0 yarl-1.4.2


我能想到的几个可以修复的方法:
1. 升级pip版本:pip3 install -U pip
2. 卸载 uuid(这个包在现代的python中已经不再需要): pip3 uninstall uuid
3. 如果还不行手动删除你图中报错信息中的uuid.py。

另外,你的home assistant是直接在系统python环境里安装的还是使用venv?如果是venv的话你需要先执行 source venv文件夹/bin/activate 再执行其他pip操作。
回复

使用道具 举报

1

主题

17

帖子

237

积分

论坛分享达人

积分
237
金钱
220
HASS币
0
发表于 2020-8-21 11:31:50 | 显示全部楼层
raysonx 发表于 2020-8-21 10:00
我在Ubuntu 20.04.1上未能重现你的问题:

好的,谢谢
回复

使用道具 举报

1

主题

17

帖子

237

积分

论坛分享达人

积分
237
金钱
220
HASS币
0
发表于 2020-8-21 12:28:29 | 显示全部楼层
新问题:在反向接入hass后,在接入ios的homekit,空调控制器状态显示不正常。控制器以关,homekit却显示正在调低。
IMG_2959.PNG
J5U0OZRSX`9}DH3Y2Q]ISKN.png
回复

使用道具 举报

2

主题

22

帖子

250

积分

论坛技术达人

积分
250
金钱
223
HASS币
10
 楼主| 发表于 2020-8-21 18:56:21 | 显示全部楼层
a1007812524 发表于 2020-8-21 12:28
新问题:在反向接入hass后,在接入ios的homekit,空调控制器状态显示不正常。控制器以关,homekit却显示正 ...

我也发现了,不过这只是个显示问题,实际不影响使用.我打算等现有的PR被合并之后再修这个问题
回复

使用道具 举报

2

主题

22

帖子

250

积分

论坛技术达人

积分
250
金钱
223
HASS币
10
 楼主| 发表于 2020-8-22 14:04:09 | 显示全部楼层
a1007812524 发表于 2020-8-21 12:28
新问题:在反向接入hass后,在接入ios的homekit,空调控制器状态显示不正常。控制器以关,homekit却显示正 ...

我已经更新了PR,进入容器后再次执行下方的命令即可修复这个问题。
pip3 install git+https://github.com/home-assistant/core.git@refs/pull/38979/head

回复

使用道具 举报

1

主题

17

帖子

237

积分

论坛分享达人

积分
237
金钱
220
HASS币
0
发表于 2020-8-23 21:58:16 | 显示全部楼层
raysonx 发表于 2020-8-22 14:04
我已经更新了PR,进入容器后再次执行下方的命令即可修复这个问题。

好的,谢谢
回复

使用道具 举报

0

主题

1

帖子

30

积分

新手上路

Rank: 1

积分
30
金钱
29
HASS币
0
发表于 2020-8-30 03:50:39 | 显示全部楼层
感谢楼主!
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-26 10:42 , Processed in 0.277930 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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