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.4k stars 615 forks source link

Roidmi EVA can't be discovered ( roidmi.vacuum.v66) #992

Open bouyssic opened 1 year ago

bouyssic commented 1 year ago

Hello team,

I can't get my Roidmi EVA to show up on Home Assistant using this integration.

The vac is discovered, but wether I use cloud or local, I'm having this error in the logs:

This error originated from a custom integration.

Logger: custom_components.xiaomi_miot.vacuum
Source: custom_components/xiaomi_miot/__init__.py: 1374
Integration: Xiaomi Miot Auto (documentation, issues)
First occurred: 12: 27: 03 AM (17 occurrences)
Last logged: 12: 42: 59 AM

EVA(roidmi.vacuum.v66): Got MiioException while fetching the state: Unable to discover the device 192.168.1.55, mapping: {'vacuum.status': {'siid': 2, 'piid': 1
    }, 'vacuum.fault': {'siid': 2, 'piid': 2
    }, 'vacuum.mode': {'siid': 2, 'piid': 4
    }, 'vacuum.sweep_type': {'siid': 2, 'piid': 8
    }, 'vacuum.on': {'siid': 2, 'piid': 10
    }, 'basestation.signal': {'siid': 17, 'piid': 1
    }, 'basestation.clear_tank_status': {'siid': 17, 'piid': 2
    }, 'basestation.sewage_tank_status': {'siid': 17, 'piid': 3
    }, 'basestation.work_status': {'siid': 17, 'piid': 4
    }, 'basestation.version': {'siid': 17, 'piid': 5
    }, 'basestation.ota_progress': {'siid': 17, 'piid': 6
    }, 'basestation.ap_name': {'siid': 17, 'piid': 8
    }, 'basestation.back_clean_freq': {'siid': 17, 'piid': 9
    }, 'basestation.spin_dry_mode': {'siid': 17, 'piid': 11
    }, 'basestation.air_time_mode': {'siid': 17, 'piid': 12
    }, 'mop.mop_life_time': {'siid': 16, 'piid': 1
    }, 'mop.mop_life_level': {'siid': 16, 'piid': 2
    }, 'sweep.sweep_mode': {'siid': 14, 'piid': 1
    }, 'map.clean_path': {'siid': 13, 'piid': 2
    }, 'map.restricted_zone': {'siid': 13, 'piid': 3
    }, 'map.auto_area': {'siid': 13, 'piid': 4
    }, 'map.map_memory': {'siid': 13, 'piid': 5
    }, 'map.map_name': {'siid': 13, 'piid': 6
    }, 'map.use_auto_area': {'siid': 13, 'piid': 7
    }, 'map.path_type': {'siid': 13, 'piid': 8
    }, 'brush_left_time-15-1': {'siid': 15, 'piid': 1
    }, 'brush_life_level-15-2': {'siid': 15, 'piid': 2
    }, 'brush_left_time-12-1': {'siid': 12, 'piid': 1
    }, 'brush_life_level-12-2': {'siid': 12, 'piid': 2
    }, 'brush_cleaner.brush_left_time': {'siid': 11, 'piid': 1
    }, 'brush_cleaner.brush_life_level': {'siid': 11, 'piid': 2
    }, 'filter.filter_life_level': {'siid': 10, 'piid': 1
    }, 'filter.filter_left_time': {'siid': 10, 'piid': 2
    }, 'speaker.volume': {'siid': 9, 'piid': 1
    }, 'speaker.mute': {'siid': 9, 'piid': 2
    }, 'battery_level': {'siid': 3, 'piid': 1
    }, 'battery.charging_state': {'siid': 3, 'piid': 2
    }
}, max_properties: 9/37

Can you help me understand what is going on?

I'm runnin the following:

If you need anything else, let me know

bouyssic commented 1 year ago

I found the root cause for this.

I have a peculiar network range, 192.168.0.0/23.

Home Assistant is properly detecting this range, but HA doesn't seem to be able to discover the Vac locally on that same range.

I changed the integration to cloud and it started working. I'll see if I can solve this some other way.

Can you enlighten me on how the local network scan works? Is it possible my range is not compatible with the integration ... or the vac itself isn't?

Thanks

al-one commented 1 year ago

The device and HA must be in the same subnet.

bouyssic commented 1 year ago

Thank you al-one... But they are on the same subnet mate 192.168.0.0/23 gives 254*2 possible IP : 192.168.0.1->192.168.0.245 and 192.168.1.1 -> 192.168.1.254 BUT it is the same subnet.

Everything on the network can talk to each other, but the integration doesn't seem to be able to locate the vac..

balbulator commented 1 year ago

I have the same `Logger: custom_components.xiaomi_miot.switch Source: custom_components/xiaomi_miot/init.py:1374 Integration: Xiaomi Miot Auto (documentation, issues) First occurred: 22:13:22 (1 occurrences) Last logged: 22:13:22

Xiaomi Miot(chuangmi.plug.m3): Got MiioException while fetching the state: Unable to discover the device 192.168.0.159, mapping: {'switch.on': {'siid': 2, 'piid': 1}, 'switch.temperature': {'siid': 2, 'piid': 2}, 'indicator_light.on': {'siid': 3, 'piid': 1}}, max_properties: 10/3`

balbulator commented 1 year ago

And more `Logger: custom_components.xiaomi_miot.light Source: custom_components/xiaomi_miot/init.py:1374 Integration: Xiaomi Miot Auto (documentation, issues) First occurred: 22:10:54 (4 occurrences) Last logged: 22:18:54

yeelight_2(yeelink.light.lamp4): Got MiioException while fetching the state: Unable to discover the device 192.168.0.157, mapping: {'light.on': {'siid': 2, 'piid': 1}, 'light.brightness': {'siid': 2, 'piid': 2}, 'light.color_temperature': {'siid': 2, 'piid': 3}, 'light.mode': {'siid': 2, 'piid': 4}, 'adjust_brightness-3-1': {'siid': 3, 'piid': 1}, 'light_extension.ct_delta': {'siid': 3, 'piid': 2}, 'light_extension.ct_adjust_alexa': {'siid': 3, 'piid': 3}}, max_properties: 10/7`

bouyssic commented 1 year ago

Hey @balbulator ,

Are you on a weird network range like me? 🤔

Thanks

balbulator commented 1 year ago

Hey @balbulator ,

Are you on a weird network range like me? thinking

Thanks

I don't even know, I have one network, and a static address for logging in from the world

al-one commented 1 year ago

Must be on the same network segment.

luzik commented 1 year ago

My Roidmi also stopped working. It was working for few months without problem on two subnets with masquerade between them. Did something changed in this network segment thing in last few weeks ?

al-one commented 1 year ago

Have you updated the firmware for the device recently ?

luzik commented 1 year ago

Not aware ..maybe by itself. But vacuum recently did discharge and I had to reset wifi on it

luzik commented 1 year ago

I did not updated DID/Token via HA UI. Mea culpa. DID/Token was changed after WiFi reset