From aea75338f6391cfa936016c268c2c22fbc0133cc Mon Sep 17 00:00:00 2001 From: bittles Date: Mon, 2 Jan 2023 22:28:22 -0500 Subject: [PATCH] some init logging to catch whether bumper or sucks is handling pings --- custom_components/ecovacs/sucksbumper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/custom_components/ecovacs/sucksbumper.py b/custom_components/ecovacs/sucksbumper.py index 1c25778..dae0177 100644 --- a/custom_components/ecovacs/sucksbumper.py +++ b/custom_components/ecovacs/sucksbumper.py @@ -451,21 +451,26 @@ class VacBot(): def connect_and_wait_until_ready(self): # use bmartins exmaple if defining our own server, couldn't get this to work without defining, probably xmpp port but idk if self.server_address: - logging.info("connecting to bumper ******************") + _LOGGER.info("connecting to bumper ******************") # self.xmpp.connect(self.server_address) # self.xmpp.process() if not self.vacuum['iotmq']: + _LOGGER.info("connecting to xmpp server for bumper ******************") self.xmpp.connect_and_wait_until_ready() self.xmpp.schedule('Ping', 300, lambda: self.send_ping(), repeat=True) else: + _LOGGER.info("connecting to mqtt server for bumper ******************") self.iotmq.connect_and_wait_until_ready() self.iotmq.schedule(30, self.send_ping) # keep rest of bmartins fork intact else: + _LOGGER.info("connecting to NOT bumper ******************") if not self.vacuum['iotmq']: + _LOGGER.info("connecting to NOT bumper, xmpp server ******************") self.xmpp.connect_and_wait_until_ready() self.xmpp.schedule('Ping', 30, lambda: self.send_ping(), repeat=True) else: + _LOGGER.info("connecting to NOT bumper, mqtt server ******************") self.iotmq.connect_and_wait_until_ready() self.iotmq.schedule(30, self.send_ping) #self.xmpp.connect_and_wait_until_ready() #Leaving in case xmpp is given to iotmq in the future