Open peca89 opened 1 year ago
ping 192.168.2.206
from HA hostmiiocli -d device --ip 192.168.1.66 --token **** info
C:\Users\User>miiocli -d device --ip 192.168.2.206 --token 861********cb6 info
INFO:miio.cli:Debug mode active
DEBUG:miio.click_common:Unknown model, trying autodetection. None None
DEBUG:miio.miioprotocol:Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00!\x1d\xc4\xcc\x00\x01\xc8\x06' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('211dc4cc')
ts = 1970-01-02 08:25:42
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 211dc4cc with ts: 1970-01-02 08:25:42, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.2.206:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []}
DEBUG:miio.miioprotocol:192.168.2.206:54321 (ts: 1970-01-02 08:25:43, id: 1) << {'id': 1, 'result': {'life': 116743, 'uid': 1731596329, 'model': 'zhimi.airp.cpa4', 'token': '861*******cb6', 'ipflag': 1, 'fw_ver': '2.2.1', 'mcu_fw_ver': '0014', 'miio_ver': '0.0.9', 'hw_ver': 'esp32', 'mmfree': 72212, 'mac': '68:AB*****:DE', 'wifi_fw_ver': '', 'ap': {'ssid': 'M******3', 'bssid': 'EE:9F******F4', 'rssi': -41, 'primary': 1}, 'netif': {'localIp': '192.168.2.206', 'mask': '255.255.255.0', 'gw': '192.168.2.1'}}, 'exe_time': 50}
DEBUG:miio.device:Detected model zhimi.airp.cpa4
Model: zhimi.airp.cpa4
Hardware version: esp32
Firmware version: 2.2.1
Same issue here with latest version of HA 2023.3.5 and newest compact unit.
Same, when added the 4 compact to HA (2023.3.5), it disconnected to the network and try to reconnected, while remove from HA it works fine.
Just found out that the connection is successful if you select Cloud during adding the integration instead of Automatic...
Just found out that the connection is successful if you select Cloud during adding the integration instead of Automatic...
Just did this and had the same experience. I thought the goal of this was to go local and not require cloud?
Try master branch.
Adding via automatic option still does not work for me. Also, I don't see that newly added Reset filter life does anything.
Try add custom option chunk_properties: 1
for zhimi.airp.cpa4
.
https://user-images.githubusercontent.com/4549099/211185592-79daa90d-c5cb-4c9e-829c-12a52fa3eaf0.mp4
Adding via both Automatic and Local works fine with 'chunk_properties: 1'. Thanks.
Also works fine when adding that option to device_customizes.py
Reset filter life still does not reset Filter Used Time to 0 if that is what it is supposed to do
Try master branch.
I was able to pull MASTER down via HACS and then restarted. I removed the prior setup I had for my CPA4 and was able to add it in as Local without issues. Thanks!
Try master branch again.
Anyone who wants to control the cpa4 via the mushroom fan card check out what I did:
https://github.com/marcoleder/cpa4-mushroom/tree/main
Feel free to make PR and issues :smiley:
Best and greetings from Switzerland Marco
Just added the device, working great, only missing control on Home Assistant seems to be changing from Manual to Auto to Sleep mode?
I recently purchased the zhimi.airp.cpa4 and I've noticed using local or automatic the device entities keep going unavailable and then coming back.
If I use cloud option, I'm unable to change the modes from auto,sleep,favorite. The option to change it is there, but it doesn't take affect and keeps flipping back.
Device model / 设备型号
zhimi.airp.cpa4
Component version / 插件版本
0.7.7
HA core version / HA版本
2023.3.3
Integrated mode / 集成方式
Automatic (自动模式)
The problem / 问题详情
Fan entity unavailable. Device is accessible via Xiaomi Home Android app. Device is in the same subnet as HA. Also tried placing it in a different subnet and NATing HA to the router interface IP on that other subnet.
Entity attributes / 实体属性
[fan.zhimi_cpa4_21de_air_purifier] preset_modes: Auto, Sleep, Favorite friendly_name: Air Purifier 4C Air Purifier supported_features: 8
[persistent_notification.xiaomi_miot_devices_offline] message: Some devices cannot be connected in the LAN, please check their IP and make sure they are in the same subnet as the HA.
一些设备无法通过局域网连接,请检查它们的IP,并确保它们和HA在同一子网。
Known issues | 了解更多 title: Devices offline friendly_name: Devices offline
Home Assistant Logs / 系统日志
Air Purifier 4C(zhimi.airp.cpa4): Got MiioException while fetching the state: Unable to discover the device 192.168.2.206, mapping: {'air_purifier.on': {'siid': 2, 'piid': 1}, 'air_purifier.fault': {'siid': 2, 'piid': 2}, 'air_purifier.mode': {'siid': 2, 'piid': 4}, 'aqi.aqi_updata_heartbeat': {'siid': 11, 'piid': 4}, 'custom_service.moto_speed_rpm': {'siid': 9, 'piid': 1}, 'custom_service.country_code': {'siid': 9, 'piid': 10}, 'custom_service.favorite_level': {'siid': 9, 'piid': 11}, 'screen.brightness': {'siid': 13, 'piid': 2}, 'physical_controls_locked': {'siid': 8, 'piid': 1}, 'alarm': {'siid': 6, 'piid': 1}, 'filter.filter_life_level': {'siid': 4, 'piid': 1}, 'filter.filter_used_time': {'siid': 4, 'piid': 3}, 'filter.filter_left_time': {'siid': 4, 'piid': 4}, 'environment.pm2_5_density': {'siid': 3, 'piid': 4}}, max_properties: 7/14