From 6ff7173ddc316f28285a78393e63ccdbba9b3404 Mon Sep 17 00:00:00 2001 From: Brian Martin Date: Thu, 17 Jan 2019 23:15:35 -0500 Subject: [PATCH] Update __init__.py --- sucks/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sucks/__init__.py b/sucks/__init__.py index 31fc804..55977fd 100644 --- a/sucks/__init__.py +++ b/sucks/__init__.py @@ -583,7 +583,8 @@ class VacBot(): def send_command(self, action): if not self.vacuum['iot']: self.xmpp.send_command(action.to_xml(), self._vacuum_address()) - else: + else: + #IOT issues commands via restAPI, and listens on MQTT for status updates self.iot.send_command(action, self._vacuum_address()) #IOT devices need the full action for additional parsing def run(self, action): @@ -772,7 +773,7 @@ class EcoVacsMQTT(ClientMQTT): def _ctl_to_dict(self, topic, xmlstring): #I haven't seen the need to fall back to data within the topic (like we do with IOT rest call actions), but it is here in case of future need - xml = ET.fromstring(xmlstring) #Convert from string to xm (like IOT rest calls), other than this it is similar to XMPP + xml = ET.fromstring(xmlstring) #Convert from string to xml (like IOT rest calls), other than this it is similar to XMPP #Including changes from jasonarends @ 28da7c2 below result = xml.attrib.copy() @@ -813,10 +814,8 @@ class EcoVacsMQTT(ClientMQTT): rc = self._send_simple_command(MQTTPublish.paho.PINGREQ) if rc == MQTTPublish.paho.MQTT_ERR_SUCCESS: _LOGGER.debug("*** MQTT ping acknowledged ***") - print(rc) return True else: - print(rc) return False