-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot (really) control Roomba 980 #128
Comments
You don’t seem to know how asyncio works. roomba.connect() and roomba.disconnect() are not async methods. |
Sorry, I was a bit exhausted then... I'm now using this wrapper class:
The properties (phase, current_state and sku) are None when run without the start-stop-dock code. Is that the case with your Roomba too? Besides that, since I'm running Python 3.12.3 I had to modify roomba.py: diff --git a/roomba/roomba.py b/roomba/roomba.py
index 09da3bf..4a6c021 100755
--- a/roomba/roomba.py
+++ b/roomba/roomba.py
@@ -609,7 +609,7 @@ class Roomba(object):
async def _disconnect(self):
#if self.ws:
# await self.ws.cancel()
- tasks = [t for t in asyncio.Task.all_tasks() if t is not asyncio.Task.current_task()]
+ tasks = [t for t in asyncio.all_tasks(asyncio.get_event_loop()) if t is not asyncio.current_task()]
[task.cancel() for task in tasks]
self.log.info("Cancelling {} outstanding tasks".format(len(tasks)))
await asyncio.gather(*tasks, return_exceptions=True) Thank you for maintainig this module! |
Hi!
I'm working with the current script:
This indeed starts the Roomba 980 at 172.17.23.104, but that's the last thing that works. The vacuum never stops or docks as it should. The output of this script is as follows:
The text was updated successfully, but these errors were encountered: