al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.46k stars 626 forks source link

Viomi V2 Pro #1584

Open fludziu opened 6 months ago

fludziu commented 6 months ago

Device model / 设备型号

Viomi V2 Pro

Component version / 插件版本

0.7.12

HA core version / HA版本

2024.3.1

Integrated mode / 集成方式

Local (本地模式)

The problem / 问题详情

I have around 70x devices in MiHome, all of the devices without any special issue are connecting from MiHome to HA, beside this one particular device, Cleaner Viomi V2 Pro. This robot is fully active and operating but in HA it looks like non-available.

Entity attributes / 实体属性

vacuum.viomi_v6_b000_robot_cleaner -> unavailable

Home Assistant Logs / 系统日志

ERROR

Viomi Cleaning Robot V2 Pro(viomi.vacuum.v6): Got MiioException while fetching the state: Unable to discover the device 192.168.1.36, mapping: {'vacuum.status': {'siid': 2, 'piid': 1}, 'vacuum.mode': {'siid': 2, 'piid': 2}, 'alarm.volume': {'siid': 4, 'piid': 1}, 'battery_level': {'siid': 3, 'piid': 1}}, max_properties: 7/4 Viomi Cleaning Robot V2 Pro(viomi.vacuum.v6): Got MiioException while fetching the state: No response from the device, mapping: {'vacuum.status': {'siid': 2, 'piid': 1}, 'vacuum.mode': {'siid': 2, 'piid': 2}, 'alarm.volume': {'siid': 4, 'piid': 1}, 'battery_level': {'siid': 3, 'piid': 1}}, max_properties: 7/4

WARNING Found an unsupported model 'viomi.vacuum.v6' for class 'RoborockVacuum'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio/

al-one commented 6 months ago

This device cannot be directly integrated locally using the miot protocol. It uses the old version of the miio protocol. You can refer to the following code and modify your local files to try to adapt it.

https://github.com/al-one/hass-xiaomi-miot/blob/4ac6029c1d6ae53c2ac44ea3ec55a888db26e56c/custom_components/xiaomi_miot/core/miio2miot_specs.py#L1456-L1535

    ...
    'viomi.vacuum.v6': {
        'extend_model': 'viomi.vacuum.v7',
    },
    ...