Add backward action

Add backward action
This commit is contained in:
Brian Martin
2019-01-13 21:22:19 -05:00
parent c1f6814f8e
commit ef0bd2e90d
3 changed files with 16 additions and 7 deletions
+6 -4
View File
@@ -582,10 +582,11 @@ class EcoVacsIOT():
def _handle_ctl(self, action, message):
resp = self._ctl_to_dict(action, message['resp'])
if resp is not None:
for s in self.ctl_subscribers:
s(resp)
if not message == {}:
resp = self._ctl_to_dict(action, message['resp'])
if resp is not None:
for s in self.ctl_subscribers:
s(resp)
def _ctl_to_dict(self, action, xmlstring):
@@ -709,6 +710,7 @@ class EcoVacsXMPP(ClientXMPP):
class VacBotCommand:
ACTION = {
'forward': 'forward',
'backward': 'backward',
'left': 'SpinLeft',
'right': 'SpinRight',
'turn_around': 'TurnAround',
+7 -3
View File
@@ -215,9 +215,13 @@ def run(actions, debug):
vacbot = VacBot(api.uid, api.REALM, api.resource, api.user_access_token, vacuum, config['continent'])
#vacbot.connect_and_wait_until_ready()(
#vacbot.run(Clean('spotarea', 'normal', 'start', '2'))
vacbot.request_all_statuses()
vacbot.run(Move('backward'))
vacbot.run(Move('backward'))
vacbot.run(Move('stop'))
#vacbot.run(Clean('spotarea', 'normal', 'start', '0'))
#vacbot.request_all_statuses()
# for action in actions:
# click.echo("performing " + str(action.vac_command))
# vacbot.run(action.vac_command)