stvmallen / homebridge-roomba-stv

Homebrige plugin for Roomba 9xx
MIT License
38 stars 15 forks source link

Homebridge Devices Fail to update after roomba is docked for a while and Roomba fails to update. (Red No Response) #50

Open PaRkThEcAr opened 4 years ago

PaRkThEcAr commented 4 years ago

The issue: when my roomba is docked for a while, it causes all my HomeBridge accessories to go into "No Response" i can tap on most of them to get the status, however, tapping on the Roomba fails to update and give me information. i can temporarily fix this by restarting the Homebridge service.

to reproduce this bug, have the roomba in the dock for a while. this is my config. i have checked the bild and Password and that they are accurate (considering Automation still works) this is my config "accessory": "Roomba", "name": "Roomba", "model": "e5", "blid": "NO PEEKING", "robotpwd": "NOPE", "ipaddress": "NOT SPEAKING", "autoRefreshEnabled": true, "keepAliveEnabled": false, "cacheTTL": 10

the only log information made is that it is connecting and getting status from roomba. there isnt a failure or anything

i feel it prudent to also put in my iOS version. my iPhone is running 13.3.1 beta 1 my MacBook is running catalina and my AppleTV's are alo on 13.3.1. my server is a Mac Mini late 2012 running Mojave 14.6

crockpotveggies commented 4 years ago

Perhaps this is because keepAliveEnabled is false?

PaRkThEcAr commented 4 years ago

I had this issue when it was enabled as well I disabled it however so I could access wireless settings in local mode.

Sent from my iPhone

On Dec 26, 2019, at 11:54 PM, Justin Long notifications@github.com wrote:

 Perhaps this is because keepAliveEnabled is false?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

roberto-montanari commented 4 years ago

The same thing happens to me too

solbadguy2010 commented 4 years ago

I still have the Problem, that Homebridge freezes when the Roomba Battery is empty. I think this Plugin needs a „Roomba not reachable -> Skip“ routine.

iAnatoly commented 4 years ago

I personally recommend running Homebridge plugins as separate instances in docker containers. That provides sufficient isolation from other plugins misbehaving. I use this particular docker image: https://github.com/oznu/docker-homebridge. Please let me know if you need more details.

RaymondMouthaan commented 4 years ago

As @iAnatoly advised, I am running 12 homebridge containers based on the https://github.com/oznu/docker-homebridge, one of the containers has homebridge-roomba-stv and don't have any issues what so ever :)

PaRkThEcAr commented 4 years ago

@iAnatoly and @RaymondMouthaan, i tried messing around with creating Docker Images, however, i found it had issues with a number of plugins. and, as i have it now, its runs very neatly as a service in macOS 10.14.6 at minimal impact on my hardware. and moving away from OSX really isnt an option for me due to the large number of cameras i run in my home with Dafang Hacks.

why does running each plugin in a docker image work? is the only way to get this working to create several docker images for all my plugins? that seems like a ton of work for getting just ONE plugin to work ya know?

more over, my issue isnt that it stops other accessories from working, but it just makes all my plugins show as "no response" untill i tap on them WITH the exclusion of the Roomba, which requires a Homebridge reboot. there is also another strange issue where occasionally, if wireless is dropped, the plugin causes Homebridge to reboot on end untill i update the Password in the config for the Roomba.

PaRkThEcAr commented 4 years ago

also, when going back to the device and plugin, it seems to cause my issue ONLY when i start or stop the roomba. my initial report said it was whenever, but that doesnt seems to happen anymore. it only happens when i start a cleaning.

solbadguy2010 commented 4 years ago

You guys know that this is a workaround, at best. Not a solution. Other Plugins don't freeze the Bridge when the controlled device is unreachable. They show them as "not available".

PaRkThEcAr commented 4 years ago

@solbadguy2010 i have had this issue with another plugin, Homebridge-Roku. more often than not, its because the Roku changed IP addresses when it reset or something. the issue with Roomba more or less stems from the fact the IP address isnt really changing (i set it static on my router), but the plugin hangs the bridge when running the roomba causing THAT specific device to become unresponsive. i can still control my Roku, TP link plugs, and so on. so to me, the issue mostly comes from THIS plugin, rather than running everything as separate Docker instances. so to that end, @solbadguy2010 IS RIGHT in that running each plugin that way isnt a solution, its a work around. and to compound it, MOST docker images wont work in OSX. specifically the ones that @iAnatoly and @RaymondMouthaan suggested (it says it on the darn first page)

iAnatoly commented 4 years ago

@PaRkThEcAr Yes, it is a workaround rather than a permanent fix. Feel free to submit a PR once you come up with a permanent fix for this issue.

Docker container is a preferred way to run a process you do not fully trust (and I am not sure why would anyone fully trust anything that has npm in its toolchain). It is trivial to create your own docker image that would work on macos. Running separate node processes as an unprivileged user is also an option.