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.63k stars 663 forks source link

Got MiioException while fetching the state: Unable to discover the device 192.168.1.33, mapping: {'vacuum.status': {'siid': 2, 'piid': 1} #1027

Open Aliens1973 opened 1 year ago

Aliens1973 commented 1 year ago

Device model / 设备型号

ijai.vacuum.v18

Component version / 插件版本

0.7.5

HA core version / HA版本

2023.2.3

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

several times a day I get such errors, while everything works Logger: custom_components.xiaomi_miot.vacuum Source: custom_components/xiaomi_miot/init.py:1374 Integration: Xiaomi Miot Auto (documentation, issues) First occurred: 08:34:52 (1 occurrences) Last logged: 08:34:52

Васька(ijai.vacuum.v18): Got MiioException while fetching the state: Unable to discover the device 192.168.1.33, 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': 9}, 'disturb.dnd_enable': {'siid': 12, 'piid': 1}, 'disturb.dnd_start_hour': {'siid': 12, 'piid': 2}, 'disturb.dnd_start_minute': {'siid': 12, 'piid': 3}, 'disturb.dnd_end_hour': {'siid': 12, 'piid': 4}, 'disturb.dnd_end_minute': {'siid': 12, 'piid': 5}, 'disturb.multi_prop_dnd': {'siid': 12, 'piid': 7}, 'map.remember_state': {'siid': 10, 'piid': 1}, 'map.cur_map_id': {'siid': 10, 'piid': 2}, 'map.map_num': {'siid': 10, 'piid': 3}, 'map.cur_cleaning_path': {'siid': 10, 'piid': 5}, 'map.build_map': {'siid': 10, 'piid': 14}, 'map.has_new_map': {'siid': 10, 'piid': 19}, 'sweep.repeat_state': {'siid': 7, 'piid': 1}, 'sweep.door_state': {'siid': 7, 'piid': 3}, 'sweep.cloth_state': {'siid': 7, 'piid': 4}, 'sweep.suction_state': {'siid': 7, 'piid': 5}, 'sweep.water_state': {'siid': 7, 'piid': 6}, 'sweep.mop_route': {'siid': 7, 'piid': 7}, 'sweep.side_brush_life': {'siid': 7, 'piid': 8}, 'sweep.side_brush_hours': {'siid': 7, 'piid': 9}, 'sweep.main_brush_life': {'siid': 7, 'piid': 10}, 'sweep.main_brush_hours': {'siid': 7, 'piid': 11}, 'sweep.hypa_life': {'siid': 7, 'piid': 12}, 'sweep.hypa_hours': {'siid': 7, 'piid': 13}, 'sweep.mop_life': {'siid': 7, 'piid': 14}, 'sweep.mop_hours': {'siid': 7, 'piid': 15}, 'sweep.direction': {'siid': 7, 'piid': 16}, 'sweep.time_zone': {'siid': 7, 'piid': 20}, 'sweep.cur_lang': {'siid': 7, 'piid': 21}, 'sweep.cleaning_time': {'siid': 7, 'piid': 22}, 'sweep.cleaning_area': {'siid': 7, 'piid': 23}, 'sweep.dirt_recognize': {'siid': 7, 'piid': 35}, 'sweep.pet_recognize': {'siid': 7, 'piid': 36}, 'sweep.ai_recognize': {'siid': 7, 'piid': 42}, 'sweep.carpet_booster': {'siid': 7, 'piid': 44}, 'sweep.multi_prop_vacuum': {'siid': 7, 'piid': 45}, 'sweep.carpet_avoid': {'siid': 7, 'piid': 47}, 'sweep.tank_shake': {'siid': 7, 'piid': 48}, 'sweep.shake_shift': {'siid': 7, 'piid': 50}, 'sweep.map_encrypt': {'siid': 7, 'piid': 55}, 'alarm': {'siid': 4, 'piid': 1}, 'alarm.volume': {'siid': 4, 'piid': 2}, 'battery_level': {'siid': 3, 'piid': 1}}, max_properties: 10/48

Logger: homeassistant.helpers.entity Source: helpers/entity.py:548 First occurred: 08:34:52 (1 occurrences) Last logged: 08:34:52

Update of vacuum.ijai_v18_4fd0_robot_cleaner is taking over 10 second

Entity attributes / 实体属性

vacuum.ijai_v18_4fd0_robot_cleaner fan_speed_list: Slient, Standard, Medium, Turbo battery_level: 100 battery_icon: mdi:battery-charging-100 fan_speed: Turbo model: ijai.vacuum.v18 lan_ip: 192.168.1.33 mac_address: cc:b5:d1:dc:4f:d0 entity_class: MiotVacuumEntity exclude_miot_services: order exclude_miot_properties: zone_points, restrict_points, target_point miot_type: urn:miot-spec-v2:device:vacuum:0000A006:ijai-v18:1 vacuum.status: 4 vacuum.fault: 2105 vacuum.mode: 0 vacuum.sweep_type: 0 vacuum.on: [1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1] disturb.dnd_enable: 1 disturb.dnd_start_hour: 23 disturb.dnd_start_minute: 0 disturb.dnd_end_hour: 9 disturb.dnd_end_minute: 0 disturb.multi_prop_dnd: [1,23,0,9,0] map.remember_state: 1 map.cur_map_id: 1668624381 map.map_num: 1 map.cur_cleaning_path: null map.build_map: 0 map.has_new_map: 0 sweep.repeat_state: 0 sweep.door_state: 3 sweep.cloth_state: 0 sweep.suction_state: 3 sweep.water_state: 0 sweep.mop_route: 1 sweep.side_brush_life: 80 sweep.side_brush_hours: 144 sweep.main_brush_life: 90 sweep.main_brush_hours: 324 sweep.hypa_life: 80 sweep.hypa_hours: 144 sweep.mop_life: 98 sweep.mop_hours: 177 sweep.direction.error: -4001 Property is not readable sweep.time_zone: -10800 sweep.cur_lang: ru_RU sweep.cleaning_time: 44 sweep.cleaning_area: 27 sweep.dirt_recognize: 0 sweep.pet_recognize: 0 sweep.ai_recognize: 0 sweep.carpet_booster: 0 sweep.multi_prop_vacuum: [0,3,0,3,0,1,-10800,44,27.3,0,"ru_RU","396932SD2209A08517","ru_RU",6,-1,0,0,1,2,1] sweep.carpet_avoid.error: -4001 Property is not readable sweep.tank_shake: 1 sweep.shake_shift: 2 sweep.map_encrypt: 1 alarm: true alarm.volume: 10 state_updater: lan vacuum.status_desc: Charging sub_entities: vacuum-2.status-1, sweep-7.side_brush_life-8, sweep-7.main_brush_life-10, sweep-7.hypa_life-12, sweep-7.mop_life-14, alarm-4.alarm-1, sweep-7.repeat_state-1, vacuum-2.mode-4, vacuum-2.sweep_type-8, sweep-7.water_state-6, battery-3.battery_level-1 miot_action_result: code: 0

friendly_name: Васька Robot Cleaner supported_features: 12539

Home Assistant Logs / 系统日志

No response

al-one commented 1 year ago

Some devices are intermittently unreachable on the LAN, if these errors occur infrequently, you can ignore them, or add a custom option auto_cloud: true. xiaomi miot customize

https://user-images.githubusercontent.com/4549099/211185592-79daa90d-c5cb-4c9e-829c-12a52fa3eaf0.mp4

Aliens1973 commented 1 year ago

I don't understand where to do it 1234

Aliens1973 commented 1 year ago

12345

Aliens1973 commented 1 year ago

thanks, figured it out

ireun commented 1 year ago

Thank You! This helped me!

antoweb commented 1 month ago

Also with auto-cloud: true appear another error in log

2024-10-05 21:48:44.756 ERROR (MainThread) [homeassistant.components.androidtv.entity] Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: Reading from 192.168.1.15:5555 timed out (9.0 seconds) 2024-10-05 21:48:53.170 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.careli_maf02_cceb_air_fryer fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update await self.async_update() File "/config/custom_components/xiaomi_miot/sensor.py", line 359, in async_update await super().async_update() File "/config/custom_components/xiaomi_miot/sensor.py", line 238, in async_update await super().async_update() File "/config/custom_components/xiaomi_miot/init.py", line 1454, in async_update results = await mic.async_get_properties_for_mapping(self.miot_did, mapping) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 75, in async_get_properties_for_mapping rls = await self.async_get_props(pms) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 93, in async_get_props return await self.async_request_miot_spec('prop/get', params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 117, in async_request_miot_spec rdt = await self.async_request_api('miotspec/' + api, { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 213, in async_request_api rsp = await self.async_request_rc4_api(api, params, method, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 757, in async_request_rc4_api response = await session.post(url, data=params, timeout=timeout, headers=headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 492, in _request raise RuntimeError("Session is closed") RuntimeError: Session is closed 2024-10-05 21:49:23.165 ERROR (MainThread) [custom_components.xiaomi_miot.sensor] Friggitrice(careli.fryer.maf02): Got MiioException while fetching the state: Unable to discover the device 192.168.1.246, mapping: {'air_fryer.status': {'siid': 2, 'piid': 1}, 'air_fryer.fault': {'siid': 2, 'piid': 2}, 'air_fryer.target_time': {'siid': 2, 'piid': 3}, 'air_fryer.target_temperature': {'siid': 2, 'piid': 4}, 'air_fryer.left_time': {'siid': 2, 'piid': 5}}, max_properties: 8/5