NickWaterton / Roomba980-Python

Python program and library to control iRobot Roomba 980 Vacuum Cleaner
MIT License
384 stars 108 forks source link

replace roombaName in log messages with address when roombaName not known #53

Open turboc1208 opened 5 years ago

turboc1208 commented 5 years ago

When roombaName is unknown, the log messages which display self.roombaName display an empty string for the name. Please either look up the name from the config file or somewhere when the name is unknown, or replace it with the address (IP address). This will significantly aid in log readability when more than one roomba is in the house. The following code snippet might prove useful.

self.password = password if roombaName == "": self.roombaName=address else: self.roombaName = roombaName self.log.info("Setting roombaName to {}".format(self.roombaName)) self.topic = topic This could impact the set_mqtt_client function, and map file naming.