homebridge-plugins / homebridge-roomba2

Homebridge plugin to connect iRobot Roomba devices with Homebridge/HomeKit.
MIT License
146 stars 17 forks source link

Roomba turns on when automation or Siri tries to turn it off #29

Closed ajcord closed 3 years ago

ajcord commented 3 years ago

Expected Behavior

I have a HomeKit automation to turn off the Roomba when the first person arrives home. If the Roomba is on when the automation triggers, the Roomba should turn off. If the Roomba is already off, then it should stay off.

Current Behavior

I noticed that if the Roomba is already off when the automation triggers, then the Roomba is instead turned on by the automation instead of being turned off.

The same behavior also happens for other automation triggers, such as at a certain time of day.

Steps to Reproduce (for bugs)

  1. Ensure the Roomba is off and docked.
  2. Create an automation in the Home app: trigger at a time 2 minutes in the future, select the Roomba accessory and have it turn off when the automation runs.
  3. Either wait for the automation to trigger, or tap "Test This Automation" to avoid waiting.

The Roomba will turn on instead of remaining off.

Versions

Configuration

        {
            "name": "Roomba",
            "model": "E5",
            "blid": "[redacted]",
            "robotpwd": "[redacted]",
            "ipaddress": "[redacted]",
            "autoRefreshEnabled": true,
            "keepAliveEnabled": true,
            "dockContactSensor": true,
            "runningContactSensor": false,
            "binContactSensor": true,
            "cacheTTL": 30,
            "accessory": "Roomba2"
        }

Homebridge Log / Command Output

Here are the logs from one instance when it was mistakenly triggered by the automation:

[2/4/2021, 10:58:10 PM] [Roomba] Running status requested
[2/4/2021, 10:58:10 PM] [Roomba] Roomba pause and dock
[2/4/2021, 10:58:10 PM] [Roomba] Roomba is pausing
[2/4/2021, 10:58:10 PM] [Roomba] Roomba paused, returning to Dock
[2/4/2021, 10:58:11 PM] [Roomba] Roomba is not running
ajcord commented 3 years ago

This also happens if I ask Siri to turn off the Roomba when it’s already off. This is easier to reproduce than using an automation.

lesleyblankendal commented 3 years ago

Just noticed this bug today after installing homebridge yesterday. A fix or workaround available?

BertoTavira commented 3 years ago

Same here, I edited my Good Night scene (or any other) to not include my roomba as workaround.

But if I ask to turn off everything, it starts, very annoying

sudoischenny commented 3 years ago

Could a Siri shortcut that has an if command work?

If the contact sensor has no contact then turn it off, if it does have contact then do nothing.

karlvr commented 3 years ago

Duplicate of #43 and resolved in 44c026c