Continuous Updates from Roomba, should be periodic

Hello,

Even if I put only continuous: false,
the light stays on.
See pic: https://imgur.com/a/jjTda1f

Thanks

Hello everyone

same problem here
i have roomba e5 and leds stays on.

Hi, everyone,
New version of roombapy library already released.
Version 1.4.3 already have fix for periodic update. I believe HA 0.107 already has this fix.

How it works now.
in configuration you have:

continuous: False,
delay: 600
  1. library connects to roomba
  2. hold connection for 10sec (this value hardcoded)
  3. disconnects
  4. wait 600sec (10min)
  5. go to first step

Be aware! After disconnection roomba will not turn off the led immediately, it will be turned off after some time (min or couple I suppose). So if you put very short delay, the led will be always on.

2 Likes

Receiving the following error in 0.107.7 with roombapy 1.4.3

Error while setting up roomba platform for vacuum
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/roomba/vacuum.py", line 106, in async_setup_platform
    delay=delay,
TypeError: __init__() got an unexpected keyword argument 'delay'

Removing the additions for custom delay from pull request 28560 in the Roomba component return functionality. Is the component ahead of the python package?

Just updated t version 0.107.0, works fine.
I don’t know what could be wrong, I will show how constructors should looks like,

file vacuum.py in HA, should looks like this:

    host = config.get(CONF_HOST)
    name = config.get(CONF_NAME)
    username = config.get(CONF_USERNAME)
    password = config.get(CONF_PASSWORD)
    certificate = config.get(CONF_CERT)
    continuous = config.get(CONF_CONTINUOUS)
    delay = config.get(CONF_DELAY)

    roomba = Roomba(
        address=host,
        blid=username,
        password=password,
        cert_name=certificate,
        continuous=continuous,
        delay=delay,
    )
    _LOGGER.debug("Initializing communication with host %s", host)

If you don’t set delay in configuration, DEFAULT_DELAY will be used.
For that constructor controller the library should have this constructor:

    def __init__(
        self,
        address=None,
        blid=None,
        password=None,
        topic="#",
        continuous=True,
        delay=1,
        cert_name=None,
        roombaName=""
    ):

In your situation, one of this part could look different, if so this is cause of the problem.

I added in the delay: 600 and my led is no longer on. I am also no longer seeing the disconnect and connect in the logs.

thanks

I also added a delay of 600:


But in the log the connection is still made every 6 seconds:

2023-06-30 14:37:28.927 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:37:34.917 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":47}}}}'
2023-06-30 14:37:40.908 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":47}}}}'
2023-06-30 14:37:46.901 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:37:52.891 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-44,"snr":45}}}}'
2023-06-30 14:37:58.881 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-44,"snr":44}}}}'
2023-06-30 14:38:04.871 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:38:10.862 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:38:16.851 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:38:22.841 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-44,"snr":44}}}}'
2023-06-30 14:38:28.831 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-44,"snr":45}}}}'
2023-06-30 14:38:34.821 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:38:40.812 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:38:46.802 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:38:52.792 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:38:58.782 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:39:04.777 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":45}}}}'
2023-06-30 14:39:10.762 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":45}}}}'
2023-06-30 14:39:16.752 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:39:22.743 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:39:28.732 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:39:34.723 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:39:40.716 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":47}}}}'
2023-06-30 14:39:46.704 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:43:46.330 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":46}}}}'
2023-06-30 14:43:52.318 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:43:58.308 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":46}}}}'
2023-06-30 14:44:04.298 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":46}}}}'
2023-06-30 14:44:10.289 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":44}}}}'
2023-06-30 14:44:16.279 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":47}}}}'
2023-06-30 14:44:22.269 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-43,"snr":46}}}}'
2023-06-30 14:44:28.259 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":47}}}}'
2023-06-30 14:44:34.250 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":46}}}}'
2023-06-30 14:44:40.244 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":46}}}}'
2023-06-30 14:44:46.232 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":46}}}}'
2023-06-30 14:44:52.221 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":46}}}}'
2023-06-30 14:44:58.211 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":47}}}}'
2023-06-30 14:45:04.203 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":46}}}}'
2023-06-30 14:45:10.193 DEBUG (Thread-10 (_thread_main)) [roombapy.roomba] Received Roomba Data 192.168.178.54: wifistat, b'{"state":{"reported":{"signal":{"rssi":-42,"snr":46}}}}'

Track Add tests for periodic and continuous connection · Issue #264 · pschmitt/roombapy · GitHub for updates.