home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.18k stars 30.57k forks source link

mirobo.device discovery errors in log #10210

Closed ferdydek closed 6 years ago

ferdydek commented 7 years ago

Home Assistant release (hass --version): hass.io 1.1 supervisor 0.73 HA 0.56.2

Python release (python3 --version): N/A

Component/platform: xiaomi miio

Description of problem: Error in log (in random interval ~5-20 min):

2017-10-29 01:10:02 ERROR (SyncWorker_11) [mirobo.device] Unable to discover a device at address 192.168.2.82
2017-10-29 01:10:02 WARNING (SyncWorker_11) [homeassistant.components.vacuum.xiaomi_miio] Got exception while fetching the state: Unable to discover the device 192.168.2.82
2017-10-29 01:29:36 ERROR (SyncWorker_4) [mirobo.device] Unable to discover a device at address 192.168.2.82
2017-10-29 01:29:36 WARNING (SyncWorker_4) [homeassistant.components.vacuum.xiaomi_miio] Got exception while fetching the state: Unable to discover the device 192.168.2.82

Expected: Devices configured by IP should be skipped for discovery.

Problem-relevant configuration.yaml entries and steps to reproduce:

vacuum:
  - platform: xiaomi_miio
    name: 'VacuBits'
    host: 192.168.2.82
    token: !secret xiaomi_miio_token
    #userId: 1717397856
    sensors:
      - state
      - battery
      - fanspeed
      - clean_area
      - clean_time
      - error

Additional info: Xiaomi versions: MiHome: 4.3.15 Miio FW: 3.3.9_003077

If I recall correctly this started with 0.54 and is not related with hassio <> hassbian. This may be related with the fact that the vacuum started going into sleep mode when not used for longer period of time or power of the charger is disconnected. Maybe then wake-up command should be issues (like MiHome does) instead of triggering discovery error.

**there is no functionality issue whatsoever

linuxlurak commented 7 years ago

Perhaps it's not related: Did you prevent your robovac from accessing the internet? I blocked all connections to the internet with a blocking firewall rule. It happend that the robovac stopped working probably because no connections were possible and it maxed out it's maximum connections for the same time. I then changed my rule to a reject-rule and had no problems further on.

Anyways I see the same errors in my logs and have no functionality issues. So same here.

ferdydek commented 7 years ago

Its not related. There was another post about same behavior in logs https://community.home-assistant.io/t/xiaomi-vacuum-error-warning-in-logs/29746 while the device works perfectly and there is no issues with normal usage. There were changes in the pypi of this component aiming at autodiscovery of Xiaomi devices and I would suspect its more related with those changes than anything else.

olskar commented 7 years ago

Is it duplicate of #9013 ?

ferdydek commented 6 years ago

Closing as duplicate. Lets carry on https://github.com/home-assistant/home-assistant/issues/9013