Update __init__.py
This commit is contained in:
+2
-3
@@ -584,6 +584,7 @@ class VacBot():
|
|||||||
if not self.vacuum['iot']:
|
if not self.vacuum['iot']:
|
||||||
self.xmpp.send_command(action.to_xml(), self._vacuum_address())
|
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
|
self.iot.send_command(action, self._vacuum_address()) #IOT devices need the full action for additional parsing
|
||||||
|
|
||||||
def run(self, action):
|
def run(self, action):
|
||||||
@@ -772,7 +773,7 @@ class EcoVacsMQTT(ClientMQTT):
|
|||||||
|
|
||||||
def _ctl_to_dict(self, topic, xmlstring):
|
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
|
#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
|
#Including changes from jasonarends @ 28da7c2 below
|
||||||
result = xml.attrib.copy()
|
result = xml.attrib.copy()
|
||||||
@@ -813,10 +814,8 @@ class EcoVacsMQTT(ClientMQTT):
|
|||||||
rc = self._send_simple_command(MQTTPublish.paho.PINGREQ)
|
rc = self._send_simple_command(MQTTPublish.paho.PINGREQ)
|
||||||
if rc == MQTTPublish.paho.MQTT_ERR_SUCCESS:
|
if rc == MQTTPublish.paho.MQTT_ERR_SUCCESS:
|
||||||
_LOGGER.debug("*** MQTT ping acknowledged ***")
|
_LOGGER.debug("*** MQTT ping acknowledged ***")
|
||||||
print(rc)
|
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
print(rc)
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user