core: 0.115.1 : Broadlink RM mini 3 : Error fetching device data: The device is offline

The problem

Since 0.115.1 I have this error related to my Broadlink RM mini 3 showing in the logs at a rate of about 2 per hour.

Error fetching device data: The device is offline

I have the device on a VLAN without internet access. I know it’s trying to call home and while not able reconnects on my wifi on a 5/2 minutes period. Maybe it has something to do with this error.

Environment

  • Home Assistant Core release with the issue: 0.115.1
  • Last working Home Assistant Core release (if known): 0.115.0
  • Operating environment (OS/Container/Supervised/Core): HassOS 4.13 on a Pi3B+
  • Integration causing this issue: Broadlink
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/broadlink/

Problem-relevant configuration.yaml

Config done with configuration flow.

N/A

Traceback/Error logs

2020-09-22 09:15:52 ERROR (MainThread) [homeassistant.components.broadlink.updater] Error fetching device data: The device is offline
2020-09-22 09:16:57 INFO (MainThread) [homeassistant.components.broadlink.updater] Fetching device data recovered
2020-09-22 09:42:57 ERROR (MainThread) [homeassistant.components.broadlink.updater] Error fetching device data: The device is offline
2020-09-22 09:44:02 INFO (MainThread) [homeassistant.components.broadlink.updater] Fetching device data recovered

Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 46 (22 by maintainers)

Most upvoted comments

If you are talking about the error messages, people found out what is going on. When you block internet access the device reboots every 3 minutes, this is why the updates fail. So we are creating a mechanism to simulate a connection to the cloud and keep the device awake. It will take a while, we want to finish implementing device discovery first.

I can offer 3 workarounds for now:

  1. Disable UPnP in your router’s settings. It worked for me with 3 different routers, but I don’t know if it is a universal solution. You can also…
  2. Allow internet access. Or…
  3. Install this branch on a computer.
pip3 install git+https://github.com/felipediel/python-broadlink.git@keep-alive --upgrade

And run this script forever:

import broadlink as blk
import time

while True:
    blk.keep_alive("192.168.0.17", 80)  # Example device
    time.sleep(120)

dear Felipe, could you please tell me, what problem can stump you? 😄

Felipe Martins Diel notifications@github.com 於 2020年11月6日 週五 08:35 寫道:

@DidibabaQiu https://github.com/DidibabaQiu The on/off button was fixed with #42443 https://github.com/home-assistant/core/pull/42443, now we just need to wait for a release.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/40457#issuecomment-722728040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOVSFFAJ4QL2QNNFJMICAUDSONAF5ANCNFSM4RVZTXRQ .

Would it also be possible to add more detail to the error message? Specifically, which device/hostname/IP is offline? I have multiple Broadlink devices, but cannot determine which one is having issues.

This update will likely resolve this, but it still needs testing.

@felipediel shouldnt blk.keep_alive be blk.ping ?? I see no reference to keep_alive in the code and python complains as well

@colethegamer123 The PR is open, but the fix is not yet merged/released. It is not even ready for review. This will take time. You should definitely workaround for now.

There seems to be a 1 minute hard coded update interval in updater.py, which could be made available as a configurable value. update_interval=timedelta(minutes=1) and default timeout of 5 (seconds?) which maybe should be extended for this device type.

It looks annoying. What is the device type and firmware?

It’s a RM mini 3 and Home Assistant reports firmware 44057.

There is not much we can do here but add one more try. I don’t think it will solve because it probably takes a while to reconnect.

Maybe that will hide this annoyance.

Note that we are showing you an error message that tells you a real problem, so this is not a bug. In the future we can discuss making the update coordinator optional, so these messages will no longer appear if you don’t want to.

That could be another workaround !