homebridge-plugins / homebridge-roomba2

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

How can you dock the Roomba? #62

Closed SpencerKaiser closed 2 years ago

SpencerKaiser commented 3 years ago

Expected Behavior

The README states that this plugin supports docking on demand but I can't figure out how to do that...

Current Behavior

Unsure how to dock; I can only figure out how to turn it on and off

Steps to Reproduce (for bugs)

N/A

rcoletti116 commented 3 years ago

I think the docs just mean when you turn it off, it goes home. The current functionality is that when turned off in HomeKit the job pauses and the roomba returns to the dock.

karlvr commented 3 years ago

@SpencerKaiser does this match the behaviour that you're observing when you turn off Roomba using the Home app?

@rcoletti116 perhaps re #63 we should be looking to change the default behaviour of stopping and introduce a "button" to send Roomba home.

lainath commented 3 years ago

@karlvr Thanks for the great plugin! I just set it up today and it works great!

Just adding that I would love the ability to have a separate dock functionality!

I have the opposite problem from what @SpencerKaiser has: it doesn't stop, it instead looks for a dock. This is a problem in my home, because I have door thresholds that it can't pass properly, so I usually manually pick it up and let it do its thing in each room with doors closed, while the charging station remains in the original room. So it can't dock, it just keeps looking for the base until it runs out of battery.

The official app used to work fine, but a recent update made it so you can no longer stop it, but I can at least pause it, put it in front of the dock, and then send it home. Still annoying, because that means I can't just vacuum the bedroom, then start a new job in the living room, and then finally dock it in the kitchen. I have to first dock it before it can start a new job, otherwise if I just pause and move it, it will not be very thorough in the 2nd room.

I believe the IFTTT Roomba functionality also changed along with the app, so that Stop now sends it looking for the dock, instead of stopping.

Hopefully this is still doable locally, with your awesome plugin, though it may be tricky :(

SpencerKaiser commented 3 years ago

@karlvr I think I experienced a weird scenario my first time using it because of #29... idk if yall have the same problem with HomeKit stuff, but using the watch has like 70% success and when I tried to stop the Roomba via my watch for the first time, it said "The Roomba isn't responding" so I tried again... it stopped hard, didn't dock, and then restarted 10ish seconds later. At that point I wasn't sure what was going on and I just used the Roomba app to turn it off and dock it.

I do understand the desire that @lainath mentioned, but I don't personally have need for it. That being said, you could totally use the same style switch that things like Alarm systems use to have a 3 state switch:

Not sure if that's even possible, but here's what I'm talking about: image

karlvr commented 3 years ago

@lainath if I understand correctly, you want to be able to stop Roomba without docking so you can then move it to another room, and have it start cleaning again?

There's a bit of activity in this space at the moment. #63 is related but opposed I think? It wants to optionally always pause Roomba, assuming that you just want a moment's peace and quiet.

Currently the plugin should pause Roomba and then send it looking for its dock, I'm not sure yet but I think that doesn't stop the clean cycle. More investigation is needed.

I'm not sure if your request of stopping the clean cycle without heading home is a common case. Perhaps we could add a separate switch as a configuration option to support that. However you're picking up Roomba anyway so I guess you could stop the clean with a 3 second clean-hold!

I'm keen to keep discussing.

rcoletti116 commented 3 years ago

The plugin currently pauses and sends home. The roomba when paused+docked will eventually resume on it's own.

I'm not sure if your request of stopping the clean cycle without heading home is a common case.

@karlvr the function added in #63 does stop the cycle, not a pause. It may not be the ideal case, but it may be the only that will work. That is because of how the Clean vs. Resume commands work. A paused robot needs a resume command and if you run the 'clean' command it will generate an error.

So if we want to pause and then resume, we would first need to know that the robot is in a paused state - currently I do not see this data presented in the dorita980 library. I've opened a case over there in case someone knows.

karlvr commented 3 years ago

@rcoletti116 I'm still hoping that we can solve it and use pause.

karlvr commented 3 years ago

@SpencerKaiser in the latest on the main branch I've added a Docking contact sensor to show when Roomba is docking. I'm thinking about making it a switch instead so you can trigger docking manually... and stop it.

karlvr commented 3 years ago

@SpencerKaiser @rcoletti116 please give beta 9 a try... I've changed the Docking sensor to a switch... it appears to work! It changes the behaviour of Roomba in the Home app so that now when you tap the switch you get the settings and two switches... take a look and see what you think.

SpencerKaiser commented 3 years ago

That sounds awesome, I'll check it out soon. Also just realized you're the author of Charles Proxy... I used that for years when I used to do mobile dev and you saved my bacon! Great work! šŸ¤£

redeemer666 commented 3 years ago

Hi @karlvr, just updated to beta 9. Discovered in the setup that there are a duplicated voice, check the image attached.

Thanks as always for your commitment B1660334-2308-406D-A04B-AC84F193C6AB

karlvr commented 3 years ago

@redeemer666 thank you, I've actually just reworking the config schema quite a bit. Take a look at beta 10 and let me know what you think.

@SpencerKaiser I've changed it again in beta 10, now there is a separate option for adding a "Home" switch.

redeemer666 commented 3 years ago

@karlvr wow Personally I like a lot the new setup.

One question: the ā€œreturning homeā€ sensor will appear as open only when the robot is re-entering after a job is finished or also when he needs to charge/refill during a job?

karlvr commented 3 years ago

@redeemer666 fantastic. I'm not actually sure whether it will show returning home when Roomba is going back to charge! That will take a bit of organisation or patience to observe! It probably will.