HI,
I got everything figured out, but now, when I start my Roomba, the python scripts crashes the moment the iRobot start to move:
[I 2018-04-04 11:56:35,292] Received Roomba Data : wifistat, {“state”:{“reported”:{“wlcfg”:{“sec”:7,“ssid”:“4D6F727068657573”}}}}
[I 2018-04-04 11:56:35,295] Received Roomba Data : wifistat, {“state”:{“reported”:{“mac”:“40:9f:38:33:15:0c”}}}
[I 2018-04-04 11:56:35,296] Received Roomba Data : $aws/things/3145C52061710780/shadow/update, {“state”:{“reported”:{“country”: “CA”}}}
[I 2018-04-04 11:56:35,321] Received Roomba Data : $aws/things/3145C52061710780/shadow/update, {“state”:{“reported”:{“cloudEnv”: “prod”}}}
[I 2018-04-04 11:56:35,322] Received Roomba Data : $aws/things/3145C52061710780/shadow/update, {“state”:{“reported”:{“svcEndpoints”:{“svcDeplId”: “v011”}}}}
[I 2018-04-04 11:56:35,405] Received Roomba Data : $aws/things/3145C52061710780/shadow/update, {“state”:{“reported”:{“mapUploadAllowed”:true}}}
[I 2018-04-04 11:56:35,407] Received Roomba Data : wifistat, {“state”:{“reported”:{“signal”:{“rssi”:-36,“snr”:54}}}}
[I 2018-04-04 11:56:35,447] Received Roomba Data : wifistat, {“state”:{“reported”:{“localtimeoffset”:-240,“utctime”:1522857385,“pose”:{“theta”:173,“point”:{“x”:462,“y”:125}}}}}
[I 2018-04-04 11:56:35,496] Received Roomba Data : $aws/things/3145C52061710780/shadow/update, {“state”:{“reported”:{“batPct”:54,“dock”:{“known”:true},“bin”:{“present”:true,“full”:false},“audio”:{“active”:false}}}}
[I 2018-04-04 11:56:35,611] Received Roomba Data : $aws/things/3145C52061710780/shadow/update, {“state”:{“reported”:{“cleanMissionStatus”:{“cycle”:“none”,“phase”:“charge”,“expireM”:0,“rechrgM”:27,“error”:0,“notReady”:0,“mssnM”:184,“sqft”:992,“initiator”:“rmtApp”,“nMssn”:12},“language”:0,“noAutoPasses”:true,“noPP”:false,“ecoCharge”:false}}}
[I 2018-04-04 11:56:35,615] updated state to: Charging
[I 2018-04-04 11:56:35,617] MAP: ignoring new co-ords in charge phase
[I 2018-04-04 11:56:35,663] MAP: writing text: pos: (0, 0), text: Charging: Battery: 54%
Exception in thread Thread-1:
Traceback (most recent call last):
File “c:\python27\lib\threading.py”, line 801, in __bootstrap_inner
self.run()
File “c:\python27\lib\threading.py”, line 754, in run
self.__target(*self.__args, **self.__kwargs)
File “c:\python27\lib\site-packages\paho\mqtt\client.py”, line 2630, in _thread_main
self.loop_forever(retry_first_connection=True)
File “c:\python27\lib\site-packages\paho\mqtt\client.py”, line 1410, in loop_forever
rc = self.loop(timeout, max_packets)
File “c:\python27\lib\site-packages\paho\mqtt\client.py”, line 926, in loop
rc = self.loop_read(max_packets)
File “c:\python27\lib\site-packages\paho\mqtt\client.py”, line 1209, in loop_read
rc = self._packet_read()
File “c:\python27\lib\site-packages\paho\mqtt\client.py”, line 1802, in _packet_read
rc = self._packet_handle()
File “c:\python27\lib\site-packages\paho\mqtt\client.py”, line 2278, in _packet_handle
return self._handle_publish()
File “c:\python27\lib\site-packages\paho\mqtt\client.py”, line 2464, in _handle_publish
self._handle_on_message(message)
File “c:\python27\lib\site-packages\paho\mqtt\client.py”, line 2624, in _handle_on_message
self.on_message(self, self._userdata, message)
File “c:\python27\lib\site-packages\roomba\roomba.py”, line 379, in on_message
self.decode_topics(json_data)
File “c:\python27\lib\site-packages\roomba\roomba.py”, line 621, in decode_topics
self.update_state_machine()
File “c:\python27\lib\site-packages\roomba\roomba.py”, line 738, in update_state_machine
self.draw_map(current_mission != self.current_state)
File “c:\python27\lib\site-packages\roomba\roomba.py”, line 1036, in draw_map
self.render_map(self.co_ords, self.previous_co_ords)
File “c:\python27\lib\site-packages\roomba\roomba.py”, line 1071, in render_map
self.save_text_and_map_on_whitebg(self.map_no_text)
File “c:\python27\lib\site-packages\roomba\roomba.py”, line 1269, in save_text_and_map_on_whitebg
self.mapPath + ‘/’ + self.roombaName + ‘map.png’)
WindowsError: [Error 183] Cannot create a file when that file already exists