Comments (3)
Excellent questions all. I don't have more than one vacuum, so I have no strong opinions here. Since the API isn't documented, I also can't really code anything related to this.
But I'd encourage you to take a swing at it if you like, as it seems like a great case to cover. If you'd like to discuss approaches, I suggest joining the mailing list: https://groups.google.com/forum/#!forum/sucks-users
Then you can get feedback from all contributors.
from sucks.
I have 2 devices, and modify cli.py like this to get them both going at the same time:
if actions:
config = read_config()
api = EcoVacsAPI(config['device_id'], config['email'], config['password_hash'],
config['country'], config['continent'])
vacuum = api.devices()[0]
vacbot0 = VacBot(api.uid, api.REALM, api.resource, api.user_access_token, vacuum, config['continent'])
vacbot0.connect_and_wait_until_ready()
vacuum = api.devices()[1]
vacbot1 = VacBot(api.uid, api.REALM, api.resource, api.user_access_token, vacuum, config['continent'])
vacbot1.connect_and_wait_until_ready()
for action in actions:
click.echo("performing " + str(action.vac_command))
vacbot0.run(action.vac_command)
vacbot1.run(action.vac_command)
action.wait.wait(vacbot0)
vacbot0.disconnect(wait=True)
vacbot1.disconnect(wait=True)
from sucks.
I finally got around to solving this for my particular use case this weekend, and I thought I'd share the result. I made my own script which builds on the excellent API. Here it is, feel free to use or modify.
Some notes on what I've done. Generally, I want all my vacuums to run all at once when I leave the house. So this script iterates through all my vacuums and runs each one. I have a similar script to charge them.
I use a try
block because occasionally one of my vacuums is unreachable (due to bad wifi, dead battery, solar flares...) and I want to make sure it doesn't prevent the other, reachable vacuums from running.
from sucks import *
import configparser
import itertools
import os
def config_file():
return '/home/pi/tuckvac/sucks/sucks.conf'
def read_config():
parser = configparser.ConfigParser()
with open(config_file()) as fp:
parser.read_file(itertools.chain(['[global]'], fp), source=config_file())
return parser['global']
def main():
config = read_config()
api = EcoVacsAPI(config['device_id'], config['email'], config['password_hash'],
config['country'], config['continent'])
uid = api.uid
realm = api.REALM
res = api.resource
uat = api.user_access_token
devs = api.devices()
for dev in devs:
try:
vacbot = VacBot(uid, realm, res, uat, dev, config['continent'])
vacbot.connect_and_wait_until_ready()
vacbot.run(Clean())
vacbot.disconnect(wait=True)
except Exception:
pass
if __name__ == '__main__':
main()
from sucks.
Related Issues (20)
- Ecovacs Ozmo 950 - home assistant integration - Recipient unavailable
- Get consumables working in the UK HOT 1
- Ozmo950 - Json Communication HOT 5
- Is there a way to control multiple robots? HOT 2
- sleekxmppfs.basexmpp WARNING fulljid property deprecated. Use boundjid.resource HOT 1
- Deebot 600 Series - "performing clean command" then does nothing HOT 1
- Could you please make a release? HOT 7
- Error type: wait, Error condition: recipient-unavailable HOT 1
- Incorrect Ecovacs continent code for some countries HOT 4
- Cannot connect: 404 wait recipient-unavailable xmlns error? HOT 3
- How to directly controll the robot
- Who helps me? HOT 1
- Deebot 600 on HA not working HOT 9
- Request for official Ecovacs API docs HOT 18
- Support for deebot 500? HOT 1
- DEEBOT OZMO 610 Clean not working
- How to logon from the UK? HOT 4
- I hoping to support China. HOT 1
- Hard coded Client Secrets HOT 1
- get status
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sucks.