NickWaterton / Roomba980-Python

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

DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated. #117

Open rahmanonik18 opened 1 year ago

rahmanonik18 commented 1 year ago

2023-06-23 13:51:02 INFO [Roomba.Password] 0 robot(s) already defined in file./config.ini, found 1 robot(s) on network 2023-06-23 13:51:02 INFO [Roomba.Password] To add/update Your robot details,make sure your robot (Roomba) at IP 192.168.126.102 is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light. Press to continue... s to skip configuring this robot: 2023-06-23 13:53:36 INFO [Roomba.Password] Roomba (Roomba) IP address is: 192.168.126.102 F:\PHD\software\Roomba980-Python\roomba\password.py:194: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated. context = ssl.SSLContext() F:\PHD\software\Roomba980-Python\roomba\password.py:194: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated context = ssl.SSLContext() 2023-06-23 13:53:46 ERROR [Roomba.Password] Connection Timeout Error (for 192.168.126.102): timed out 2023-06-23 13:53:46 ERROR [Roomba.Password] Unable to get password from roomba 2023-06-23 13:53:46 ERROR [Roomba.Password] Error getting password for robot Roomba at ip192.168.126.102, received 0 bytes. Follow the instructions and try again.

Getting the follwing error. Any suggestion regarding this

NickWaterton commented 1 year ago

Yes, please read the instructions for obtaining blid and password from the cloud.

https://github.com/NickWaterton/Roomba980-Python#getting-your-usernameblid-and-password-from-the-irobot-cloud

rahmanonik18 commented 1 year ago

Please correct me if I am wrong, I was thinking we can get the blid and password using the roomba ip address and it will write the config file as well. We do not have to provide Roomba account id and password to access the blid and password from the cloud, is my assumption correct?

NickWaterton commented 1 year ago

No, the newer Roombas don’t support obtaining the password locally, you have to use the cloud version with them (I, s, j versions).

Older Roombas support local password.

rahmanonik18 commented 1 year ago

Okay. Thanks.

rahmanonik18 commented 12 months ago

I have updated the config.ini file and now when I am running the roomba.py it get connection error. Though it says it found the roomba. Following is my output

F:\PHD\software\Roomba980-Python\roomba>python roomba.py [2023-07-06 13:46:07,999] INFO [2023-07-06 13:46:08,009] INFO Program Started [2023-07-06 13:46:08,009] INFO [2023-07-06 13:46:08,010] INFO Roomba.py Version: 2.0i [2023-07-06 13:46:08,010] INFO Python Version: 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] [2023-07-06 13:46:08,011] INFO Paho MQTT Version: 1.6.1 [2023-07-06 13:46:08,011] INFO CV Version: 4.7.0 [2023-07-06 13:46:08,012] INFO PIL Version: 9.5.0 [2023-07-06 13:46:08,013] INFO to Exit [2023-07-06 13:46:08,013] INFO Roomba MQTT data Interface [2023-07-06 13:46:08,014] INFO Using Password version 2.1 [2023-07-06 13:46:08,047] INFO reading/writing info from config file ./config.ini [2023-07-06 13:46:08,048] INFO 1 Roombas Found [2023-07-06 13:46:08,054] INFO Creating Roomba object 192.168.162.102, Roomba [2023-07-06 13:46:08,056] INFO Using Password version 2.1 [2023-07-06 13:46:08,057] INFO Posting DECODED data [2023-07-06 13:46:08,073] INFO MAP: Maps Enabled [2023-07-06 13:46:08,074] INFO Connecting... [2023-07-06 13:46:08,076] INFO Setting TLS [2023-07-06 13:46:08,078]WARNI error loading font: %s, loading default font [2023-07-06 13:46:08,078] INFO Setting TLS - OK [2023-07-06 13:46:08,249] INFO MAP: opening existing map_notext.png [2023-07-06 13:46:08,250]WARNI MAP: unable to load map_notext.png: [Errno 2] No such file or directory: './Roombamap_notext.png': set to None [2023-07-06 13:46:08,251] INFO MAP: home_pos: (400,750) [2023-07-06 13:46:08,252] INFO MAP: Initialisation complete [2023-07-06 13:46:13,093]ERROR Connection Error: timed out [2023-07-06 13:46:14,108]ERROR Attempting retry Connection# 0 [2023-07-06 13:46:14,108] INFO Attempting to Reconnect... [2023-07-06 13:46:19,120]ERROR Connection Error: timed out [2023-07-06 13:46:20,121]ERROR Attempting retry Connection# 1 [2023-07-06 13:46:20,122] INFO Attempting to Reconnect... [2023-07-06 13:46:25,124]ERROR Connection Error: timed out [2023-07-06 13:46:26,141]ERROR Attempting retry Connection# 2 [2023-07-06 13:46:26,142] INFO Attempting to Reconnect... [2023-07-06 13:46:31,144]ERROR Connection Error: timed out [2023-07-06 13:47:31,145]ERROR Attempting retry Connection# 3 [2023-07-06 13:47:31,146] INFO Attempting to Reconnect... [2023-07-06 13:47:36,149]ERROR Connection Error: timed out [2023-07-06 13:48:36,157]ERROR Attempting retry Connection# 4 [2023-07-06 13:48:36,157] INFO Attempting to Reconnect...

Any idea why is that? I am trying to visualize the map

NickWaterton commented 12 months ago

What Roomba is this for? New Roombas don’t support the mapping function any more. iRobot removed it from the firmware about 2 years ago.

Old Roombas (900 series) still support it.

And what does your BLID and password look like? You may not have included it all. (You can replace some of the middle letters etc if you don’t want to post your Roomba password as is).

rahmanonik18 commented 12 months ago

Following is my config file,

[192.168.162.102] blid = 340EE4928078487E853BF9F3180A3898 password = :1:1686085055:rtxChL5q2x5TrJYf data = {'cap': {"binFullDetect": 2, "addOnHw": 1, "oMode": 10, "odoa": 5, "dockComm": 1, "maps": 3, "pmaps": 10, "mc": 2, "tLine": 2, "area": 1, "eco": 1, "multiPass": 2, "edge": 0, "pp": 0, "team": 1, "pose": 2, "lang": 2, "hm": 0, "5ghz": 1, "prov": 3, "sched": 2, "svcConf": 1, "ota": 2, "log": 2, "langOta": 0, "ns": 1, "expectingUserConf": 2}, 'hostname': 'iRobot-340EE4928078487E853BF9F3180A3898', 'ip': '192.168.162.102', 'mac': 'F0:03:1C:13:64:5B', 'nc': 0, 'proto': 'mqtt', 'robotname': 'Roomba', 'sku': 'j715020', 'sw': 'sapphire+22.52.7+2023-04-03-89db6eeac96+Firmware-Production+135', 'ver': '4'} drawmap = True

Mine is Roomba J series. I do have coordinates and mapid, I need to know how to use these coordinated to visualize a map

NickWaterton commented 12 months ago

That looks Ok, but I’m not sure what you mean about “visualize a map”, the later Roombas (like the j7) don’t send co-ordinates for mapping.

rahmanonik18 commented 11 months ago

I did get coordinates for J7 using mitmproxy and map id, Following is a snapshot of my map details.

'format_version': '4.8.0', 'debug_file_header': {'blid': [], 'robot_name': ''}, 'maps': [{'map_header': {'id': 'Tde1DgVmTnqX7rYhWioGpg', 'version': '230710T185510', 'name': 'Main Floor', 'learning_percentage': 100, 'create_time': 1689015313, 'resolution': 0.1049, 'user_orientation_rad': 0.0, 'robot_orientation_rad': 4.8258, 'area': 12.2206}, 'regions': [{'id': '1', 'geometry': {'type': 'polygon', 'ids': [['100000', '100001', '100002', '100003', '100004', '100005', '100006', '100007', '100008', '100009', '100000']]}, 'features': [], 'name': '', 'region_type': 'unspecified', 'policies': {'odoa_mode': 0, 'odoa_feats': {}, 'disabled_operating_modes': 0, 'override_operating_modes': 0}}], 'doors': [], 'borders': [{'id': '0', 'free_type': 'free', 'geometry': {'type': 'polygon', 'ids': [['100000', '100001', '100002', '100003', '100004', '100005', '100006', '100007', '100008', '100009', '100000']]}}], 'layers': [{'layer_type': 'coverage', 'geometry': {'type': 'multipoint2d', 'point_area': [0.1049, 0.1049], 'coordinates': [[-1.7324, 0.8924], [-1.6274, 0.8924], [-1.3125, 0.8924], [-1.2074, 0.8924], [-2.2574, 0.7874], [-2.1524, 0.7874], [-2.0474, 0.7874], [-1.9424, 0.7874], [-1.8374, 0.7874], [-1.7324, 0.7874], [-1.6274, 0.7874], [-1.5224, 0.7874], [-1.4174, 0.7874], [-1.3125, 0.7874], [-1.2074, 0.7874], [-1.1024, 0.7874], [-0.9974, 0.7874], [-0.8924, 0.7874], [-0.7874, 0.7874], [-0.6825, 0.7874], [-0.5774, 0.7874], [-0.4724, 0.7874], [-0.3674, 0.7874], [-0.2624, 0.7874], [-0.1574, 0.7874], [-0.0524, 0.7874], [0.0524, 0.7874], [0.1574, 0.7874], [0.2624, 0.7874], [0.3674, 0.7874], [0.4724, 0.7874], [0.5774, 0.7874], [0.6825, 0.7874], [0.7874, 0.7874], [0.8924, 0.7874], [0.9974, 0.7874], [1.1024, 0.7874], [1.2074, 0.7874], [-2.2574, 0.6825], [-2.1524, 0.6825], [-2.0474, 0.6825], [-1.9424, 0.6825], [-1.8374, 0.6825], [-1.7324, 0.6825], [-1.6274, 0.6825], [-1.5224, 0.6825], [-1.4174, 0.6825], [-1.3125, 0.6825], [-1.2074, 0.6825], [-1.1024, 0.6825], [-0.9974, 0.6825], [-0.8924, 0.6825], [-0.7874, 0.6825], [-0.6825, 0.6825], [-0.5774, 0.6825], [-0.4724, 0.6825], [-0.3674, 0.6825], [-0.2624, 0.6825], [-0.1574, 0.6825], [-0.0524, 0.6825], [0.0524, 0.6825], [0.1574, 0.6825], [0.2624, 0.6825], [0.3674, 0.6825], [0.4724, 0.6825], [0.5774, 0.6825], [0.6825, 0.6825], [0.7874, 0.6825], [0.8924, 0.6825], [0.9974, 0.6825], [1.1024, 0.6825], [1.2074, 0.6825], [1.3125, 0.6825], [1.4174, 0.6825], [1.5224, 0.6825], [1.6274, 0.6825], [1.7324, 0.6825], [-2.3624, 0.5774], [-2.2574, 0.5774], [-2.1524, 0.5774], [-2.0474, 0.5774], [-1.9424, 0.5774], [-1.8374, 0.5774], [-1.7324, 0.5774], [-1.6274, 0.5774], [-1.5224, 0.5774], [-1.4174, 0.5774], [-1.3125, 0.5774], [-1.2074, 0.5774], [-1.1024, 0.5774], [-0.9974, 0.5774], [-0.8924, 0.5774], [-0.7874, 0.5774], [-0.6825, 0.5774], [-0.5774, 0.5774], [-0.4724, 0.5774], [-0.3674, 0.5774], [-0.2624, 0.5774], [-0.1574, 0.5774], [-0.0524, 0.5774], [0.0524, 0.5774], [0.1574, 0.5774], [0.2624, 0.5774], [0.3674, 0.5774], [0.4724, 0.5774], [0.5774, 0.5774], [0.6825, 0.5774], [0.7874, 0.5774], [0.8924, 0.5774], [0.9974, 0.5774], [1.1024, 0.5774], [1.2074, 0.5774], [1.3125, 0.5774], [1.4174, 0.5774], [1.5224, 0.5774], [1.6274, 0.5774], [1.7324, 0.5774], [1.8374, 0.5774], [1.9424, 0.5774], [-2.3624, 0.4724], [-2.2574, 0.4724], [-2.1524, 0.4724], [-2.0474, 0.4724], [-1.9424, 0.4724], [-1.8374, 0.4724], [-1.7324, 0.4724], [-1.6274, 0.4724], [-1.5224, 0.4724], [-1.4174, 0.4724], [-1.3125, 0.4724], [-1.2074, 0.4724], [-1.1024, 0.4724], [-0.9974, 0.4724], [-0.8924, 0.4724], [-0.7874, 0.4724], [-0.6825, 0.4724], [-0.5774, 0.4724], [-0.4724, 0.4724], [-0.3674, 0.4724], [-0.2624, 0.4724], [-0.1574, 0.4724], [-0.0524, 0.4724], [0.0524, 0.4724], [0.1574, 0.4724], [0.2624, 0.4724], [0.3674, 0.4724], [0.4724, 0.4724], [0.5774, 0.4724], [0.6825, 0.4724], [0.7874, 0.4724], [0.8924, 0.4724], [0.9974, 0.4724], [1.1024, 0.4724], [1.2074, 0.4724], [1.3125, 0.4724], [1.4174, 0.4724], [1.5224, 0.4724], [1.6274, 0.4724], [1.7324, 0.4724], [1.8374, 0.4724], [1.9424, 0.4724], [-2.3624, 0.3674], [-2.2574, 0.3674], [-2.1524, 0.3674], [-2.0474, 0.3674], [-1.9424, 0.3674], [-1.8374, 0.3674], [-1.7324, 0.3674], [-1.6274, 0.3674], [-1.5224, 0.3674], [-1.4174, 0.3674], [-1.3125, 0.3674], [-1.2074, 0.3674], [-1.1024, 0.3674], [-0.9974, 0.3674], [-0.8924, 0.3674], [-0.7874, 0.3674], [-0.6825, 0.3674], [-0.5774, 0.3674], [-0.4724, 0.3674], [-0.3674, 0.3674], [-0.2624, 0.3674], [-0.1574, 0.3674], [-0.0524, 0.3674], [0.0524, 0.3674], [0.1574, 0.3674], [0.2624, 0.3674], [0.3674, 0.3674], [0.4724, 0.3674], [0.5774, 0.3674], [0.6825, 0.3674], [0.7874, 0.3674], [0.8924, 0.3674], [0.9974, 0.3674], [1.1024, 0.3674], [1.2074, 0.3674], [1.3125, 0.3674], [1.4174, 0.3674], [1.5224, 0.3674], [1.6274, 0.3674], [1.7324, 0.3674], [1.8374, 0.3674], [1.9424, 0.3674], [-2.3624, 0.2624], [-2.2574, 0.2624], [-2.1524, 0.2624], [-2.0474, 0.2624], [-1.9424, 0.2624], [-1.8374, 0.2624], [-1.7324, 0.2624], [-1.6274, 0.2624], [-1.5224, 0.2624], [-1.4174, 0.2624], [-1.3125, 0.2624], [-1.2074, 0.2624], [-1.1024, 0.2624], [-0.9974, 0.2624], [-0.8924, 0.2624], [-0.7874, 0.2624], [-0.6825, 0.2624], [-0.5774, 0.2624], [-0.4724, 0.2624], [-0.3674, 0.2624], [-0.2624, 0.2624], [-0.1574, 0.2624], [-0.0524, 0.2624], [0.0524, 0.2624], [0.1574, 0.2624], [0.2624, 0.2624], [0.3674, 0.2624], [0.4724, 0.2624], [0.5774, 0.2624], [0.6825, 0.2624], [0.7874, 0.2624], [0.8924, 0.2624], [0.9974, 0.2624], [1.1024, 0.2624], [1.2074, 0.2624], [1.3125, 0.2624], [1.4174, 0.2624], [1.5224, 0.2624], [1.6274, 0.2624], [1.7324, 0.2624], [1.8374, 0.2624], [1.9424, 0.2624], [-2.3624, 0.1574], [-2.2574, 0.1574], [-2.1524, 0.1574], [-2.0474, 0.1574], [-1.9424, 0.1574], [-1.8374, 0.1574], [-1.7324, 0.1574], [-1.6274, 0.1574], [-1.5224, 0.1574], [-1.4174, 0.1574], [-1.3125, 0.1574], [-1.2074, 0.1574], [-1.1024, 0.1574], [-0.9974, 0.1574], [-0.8924, 0.1574], [-0.7874, 0.1574], [-0.6825, 0.1574], [-0.5774, 0.1574], [-0.4724, 0.1574], [-0.3674, 0.1574], [-0.2624, 0.1574], [-0.1574, 0.1574], [-0.0524, 0.1574], [0.0524, 0.1574], [0.1574, 0.1574], [0.2624, 0.1574], [0.3674, 0.1574], [0.4724, 0.1574], [0.5774, 0.1574], [0.6825, 0.1574], [0.7874, 0.1574], [0.8924, 0.1574], [0.9974, 0.1574], [1.1024, 0.1574], [1.2074, 0.1574], [1.3125, 0.1574], [1.4174, 0.1574], [1.5224, 0.1574], [1.6274, 0.1574], [1.7324, 0.1574], [1.8374, 0.1574], [-2.3624, 0.0524], [-2.2574, 0.0524], [-2.1524, 0.0524], [-2.0474, 0.0524], [-1.9424, 0.0524], [-1.8374, 0.0524], [-1.7324, 0.0524], [-1.6274, 0.0524], [-1.5224, 0.0524], [-1.4174, 0.0524], [-1.3125, 0.0524], [-1.2074, 0.0524], [-1.1024, 0.0524], [-0.9974, 0.0524], [-0.8924, 0.0524], [-0.7874, 0.0524], [-0.6825, 0.0524], [-0.5774, 0.0524], [-0.4724, 0.0524], [-0.3674, 0.0524], [-0.2624, 0.0524], [-0.1574, 0.0524], [-0.0524, 0.0524], [0.0524, 0.0524], [0.1574, 0.0524], [0.2624, 0.0524], [0.3674, 0.0524], [0.4724, 0.0524], [0.5774, 0.0524], [0.6825, 0.0524], [0.7874, 0.0524], [0.8924, 0.0524], [0.9974, 0.0524], [1.1024, 0.0524], [1.2074, 0.0524], [1.3125, 0.0524], [1.4174, 0.0524], [1.5224, 0.0524], [1.6274, 0.0524], [1.7324, 0.0524], [1.8374, 0.0524], [-2.3624, -0.0524], [-2.2574, -0.0524], [-2.1524, -0.0524], [-2.0474, -0.0524], [-1.9424, -0.0524], [-1.8374, -0.0524], [-1.7324, -0.0524], [-1.6274, -0.0524], [-1.5224, -0.0524], [-1.4174, -0.0524], [-1.3125, -0.0524], [-1.2074, -0.0524], [-1.1024, -0.0524], [-0.9974, -0.0524], [-0.8924, -0.0524], [-0.7874, -0.0524], [-0.6825, -0.0524], [-0.5774, -0.0524], [-0.4724, -0.0524], [-0.3674, -0.0524], [-0.2624, -0.0524], [-0.1574, -0.0524], [-0.0524, -0.0524], [0.0524, -0.0524], [0.1574, -0.0524], [0.2624, -0.0524], [0.3674, -0.0524], [0.4724, -0.0524], [0.5774, -0.0524], [0.6825, -0.0524], [0.7874, -0.0524], [0.8924, -0.0524], [0.9974, -0.0524], [1.1024, -0.0524], [1.2074, -0.0524], [1.3125, -0.0524], [1.4174, -0.0524], [1.5224, -0.0524], [1.6274, -0.0524], [1.7324, -0.0524], [1.8374, -0.0524], [-2.3624, -0.1574], [-2.2574, -0.1574], [-2.1524, -0.1574], [-2.0474, -0.1574], [-1.9424, -0.1574], [-1.8374, -0.1574], [-1.7324, -0.1574], [-1.6274, -0.1574], [-1.5224, -0.1574], [-1.4174, -0.1574], [-1.3125, -0.1574], [-1.2074, -0.1574], [-1.1024, -0.1574], [-0.9974, -0.1574], [-0.8924, -0.1574], [-0.7874, -0.1574], [-0.6825, -0.1574], [-0.5774, -0.1574], [-0.4724, -0.1574], [-0.3674, -0.1574], [-0.2624, -0.1574], [-0.1574, -0.1574], [-0.0524, -0.1574], [0.0524, -0.1574], [0.1574, -0.1574], [0.2624, -0.1574], [0.3674, -0.1574], [0.4724, -0.1574], [0.5774, -0.1574], [0.6825, -0.1574], [0.7874, -0.1574], [0.8924, -0.1574], [0.9974, -0.1574], [1.1024, -0.1574], [1.2074, -0.1574], [1.3125, -0.1574], [1.4174, -0.1574], [1.5224, -0.1574], [1.6274, -0.1574], [1.7324, -0.1574], [1.8374, -0.1574], [1.9424, -0.1574], [-2.4674, -0.2624], [-2.3624, -0.2624], [-2.2574, -0.2624], [-2.1524, -0.2624], [-2.0474, -0.2624], [-1.9424, -0.2624], [-1.8374, -0.2624], [-1.7324, -0.2624], [-1.6274, -0.2624], [-1.5224, -0.2624], [-1.4174, -0.2624], [-1.3125, -0.2624], [-1.2074, -0.2624], [-1.1024, -0.2624], [-0.9974, -0.2624], [-0.8924, -0.2624], [-0.7874, -0.2624], [-0.6825, -0.2624], [-0.5774, -0.2624], [-0.4724, -0.2624], [-0.3674, -0.2624], [-0.2624, -0.2624], [-0.1574, -0.2624], [-0.0524, -0.2624], [0.0524, -0.2624], [0.1574, -0.2624], [0.2624, -0.2624], [0.3674, -0.2624], [0.4724, -0.2624], [0.5774, -0.2624], [0.6825, -0.2624], [0.7874, -0.2624], [0.8924, -0.2624], [0.9974, -0.2624], [1.1024, -0.2624], [1.2074, -0.2624], [1.3125, -0.2624], [1.4174, -0.2624], [1.5224, -0.2624], [1.6274, -0.2624], [1.7324, -0.2624], [1.8374, -0.2624], [1.9424, -0.2624], [-2.3624, -0.3674], [-2.2574, -0.3674], [-2.1524, -0.3674], [-2.0474, -0.3674], [-1.9424, -0.3674], [-1.8374, -0.3674], [-1.7324, -0.3674], [-1.6274, -0.3674], [-1.5224, -0.3674], [-1.4174, -0.3674], [-1.3125, -0.3674], [-1.2074, -0.3674], [-1.1024, -0.3674], [-0.9974, -0.3674], [-0.8924, -0.3674], [-0.7874, -0.3674], [-0.6825, -0.3674], [-0.5774, -0.3674], [-0.4724, -0.3674], [-0.3674, -0.3674], [-0.2624, -0.3674], [-0.1574, -0.3674], [-0.0524, -0.3674], [0.0524, -0.3674], [0.1574, -0.3674], [0.2624, -0.3674], [0.3674, -0.3674], [0.4724, -0.3674], [0.5774, -0.3674], [0.6825, -0.3674], [0.7874, -0.3674], [0.8924, -0.3674], [0.9974, -0.3674], [1.1024, -0.3674], [1.2074, -0.3674], [1.3125, -0.3674], [1.4174, -0.3674], [1.5224, -0.3674], [1.6274, -0.3674], [1.7324, -0.3674], [1.8374, -0.3674], [1.9424, -0.3674], [-2.3624, -0.4724], [-2.2574, -0.4724], [-2.1524, -0.4724], [-2.0474, -0.4724], [-1.9424, -0.4724], [-1.8374, -0.4724], [-1.7324, -0.4724], [-1.6274, -0.4724], [-1.5224, -0.4724], [-1.4174, -0.4724], [-1.3125, -0.4724], [-1.2074, -0.4724], [-1.1024, -0.4724], [-0.9974, -0.4724], [-0.8924, -0.4724], [-0.7874, -0.4724], [-0.6825, -0.4724], [-0.5774, -0.4724], [-0.4724, -0.4724], [-0.3674, -0.4724], [-0.2624, -0.4724], [-0.1574, -0.4724], [-0.0524, -0.4724], [0.0524, -0.4724], [0.1574, -0.4724], [0.2624, -0.4724], [0.3674, -0.4724], [0.4724, -0.4724], [0.5774, -0.4724], [0.6825, -0.4724], [0.7874, -0.4724], [0.8924, -0.4724], [0.9974, -0.4724], [1.1024, -0.4724], [1.2074, -0.4724], [1.3125, -0.4724], [1.4174, -0.4724], [1.5224, -0.4724], [1.6274, -0.4724], [1.7324, -0.4724], [1.8374, -0.4724], [1.9424, -0.4724], [-2.4674, -0.5774], [-2.3624, -0.5774], [-2.2574, -0.5774], [-2.1524, -0.5774], [-2.0474, -0.5774], [-1.9424, -0.5774], [-1.8374, -0.5774], [-1.7324, -0.5774], [-1.6274, -0.5774], [-1.5224, -0.5774], [-1.4174, -0.5774], [-1.3125, -0.5774], [-1.2074, -0.5774], [-1.1024, -0.5774], [-0.9974, -0.5774], [-0.8924, -0.5774], [-0.5774, -0.5774], [-0.4724, -0.5774], [-0.3674, -0.5774], [-0.2624, -0.5774], [-0.1574, -0.5774], [-0.0524, -0.5774], [0.0524, -0.5774], [0.1574, -0.5774], [0.2624, -0.5774], [0.3674, -0.5774], [0.4724, -0.5774], [0.5774, -0.5774], [0.6825, -0.5774], [0.7874, -0.5774], [0.8924, -0.5774], [0.9974, -0.5774], [1.1024, -0.5774], [1.2074, -0.5774], [1.3125, -0.5774], [1.4174, -0.5774], [1.5224, -0.5774], [1.6274, -0.5774], [1.7324, -0.5774], [1.8374, -0.5774], [1.9424, -0.5774], [-2.3624, -0.6825], [-2.2574, -0.6825], [-2.1524, -0.6825], [-2.0474, -0.6825], [-1.9424, -0.6825], [-1.8374, -0.6825], [-1.7324, -0.6825], [-1.6274, -0.6825], [-1.5224, -0.6825], [-1.4174, -0.6825], [-1.3125, -0.6825], [-1.2074, -0.6825], [-1.1024, -0.6825], [-0.9974, -0.6825], [-0.8924, -0.6825], [-0.3674, -0.6825], [-0.2624, -0.6825], [-0.1574, -0.6825], [-0.0524, -0.6825], [0.0524, -0.6825], [0.1574, -0.6825], [0.2624, -0.6825], [0.3674, -0.6825], [0.4724, -0.6825], [0.5774, -0.6825], [0.6825, -0.6825], [0.7874, -0.6825], [0.8924, -0.6825], [0.9974, -0.6825], [1.1024, -0.6825], [1.2074, -0.6825], [1.3125, -0.6825], [1.4174, -0.6825], [1.5224, -0.6825], [1.6274, -0.6825], [1.7324, -0.6825], [1.8374, -0.6825], [1.9424, -0.6825], [-2.2574, -0.7874], [-2.1524, -0.7874], [-1.9424, -0.7874], [-1.8374, -0.7874], [-1.7324, -0.7874], [-1.6274, -0.7874], [-1.5224, -0.7874], [-1.4174, -0.7874], [-1.3125, -0.7874], [-1.2074, -0.7874], [-1.1024, -0.7874], [-0.9974, -0.7874], [-0.8924, -0.7874], [-0.7874, -0.7874], [-0.3674, -0.7874], [-0.2624, -0.7874], [-0.1574, -0.7874], [-0.0524, -0.7874], [0.0524, -0.7874], [0.1574, -0.7874], [0.2624, -0.7874], [0.3674, -0.7874], [0.4724, -0.7874], [0.5774, -0.7874], [0.6825, -0.7874], [0.7874, -0.7874], [0.8924, -0.7874], [0.9974, -0.7874], [1.1024, -0.7874], [1.2074, -0.7874], [1.3125, -0.7874], [1.4174, -0.7874], [1.5224, -0.7874], [1.6274, -0.7874], [1.7324, -0.7874], [1.8374, -0.7874], [1.9424, -0.7874], [2.0474, -0.7874], [-2.1524, -0.8924], [-1.9424, -0.8924], [-1.8374, -0.8924], [-1.7324, -0.8924], [-1.6274, -0.8924], [-1.5224, -0.8924], [-1.4174, -0.8924], [-1.3125, -0.8924], [-1.2074, -0.8924], [-1.1024, -0.8924], [-0.9974, -0.8924], [-0.8924, -0.8924], [-0.7874, -0.8924], [-0.3674, -0.8924], [-0.2624, -0.8924], [-0.1574, -0.8924], [-0.0524, -0.8924], [0.0524, -0.8924], [0.1574, -0.8924], [0.2624, -0.8924], [0.3674, -0.8924], [0.4724, -0.8924], [0.5774, -0.8924], [0.6825, -0.8924], [0.7874, -0.8924], [0.8924, -0.8924], [0.9974, -0.8924], [1.1024, -0.8924], [1.2074, -0.8924], [1.3125, -0.8924], [1.4174, -0.8924],

Can I create a map like yours using this? I dont understand the details. Need some help to figure this out and create a map to view like the one you did

NickWaterton commented 11 months ago

That’s very interesting. Can you say how you got these co-ordinates? We haven’t been able to intercept any plotting information for a while now. Are these in response to an https query?

the maps I was drawing take x,y and orientation, basically the Roomba used to send “pose” information, which was its location on the map and what direction it was facing. You then just joined the co-ordinates together, and you had a map of where it went.

iRobot removed that feature a couple of years ago.

It looks to me, if you join those co-ordinates together, you might get a similar map (not real time though).

My program won’t do it as-is, but it would be easy to slap something together to see what the co-ordinates draw.

rahmanonik18 commented 11 months ago

I am having trouble to understand this map details, can you help me to describe this one. Which information I should use to create the map and any libaries to join this corordinates and create a map

rahmanonik18 commented 11 months ago

@NickWaterton I am having as issue in authorization when I am trying to access an api.

"message":"The security token included in the request is invalid."

I am trying to access the following api https://auth2.prod.iot.irobotapi.com/v1/340EE4928************************/missionhistory?filterType=omit_quickly_canceled_not_scheduled&supportedDoneCodes=dndEnd,returnHomeEnd&app_id=ANDROID-2E20FC16-06BE-438E-8637-CE568FA4351C HTTP/1.1

The GET Request to fetch the api which i got from mitmproxy is following

GET https://auth2.prod.iot.irobotapi.com/v1/340EE4928************************/missionhistory?filterType=omit_quickly_canceled_not_scheduled&supportedDoneCodes=dndEnd,returnHomeEnd&app_id=ANDROID-2E20FC16-06BE-438E-8637-CE568FA4351C HTTP/1.1
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae4************
Authorization: AWS4-HMAC-SHA256 Credential=ASIAU3IUYSB7O4YNT25I/20230724/us-east-1/execute-api/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=d9a597effadc06ee019eb4b06e************
Content-type: application/json; charset=utf-8
X-Amz-Date: 20230724T173009Z
Accept: application/json; charset=utf-8
Host: auth2.prod.iot.irobotapi.com
x-amz-security-token: IQoJb3JpZ2luX2VjEIL//////////wEaCXVzLWVhc3QtMSJHMEUCIQCbkogl6uf8HSaOGbcY5nhTpmhYlvY1mYV9SuhWNfXgnAIgdS9nwuF6kt7p0xXUzS42TA8zy+iIZ+blboTbp7mftGYqkwQIGxADGgwzMzM0NDAzODkyNDYiDOSiUCCJ5Tcylj2MMCrwA7yRfWKfCAQbfAyP5gb5QvkzoI194t2yyOOMox9CLP87nkkmCtbDwMsM2WYOZ5aigXpfq000THMkT4CHB3djvPCBwwzircTUqTBHmQ2wcwpEmubntVDgnu2zNMSE/aeize4LVeJNmycKJrhFqw2kqtPEoBKeTlii6pyLXxn67E8w+5V3vlzi8bjZVWuXE3HEw/RnKPg/8Eea9PVruYtxR17N/oSLvbXfd5+PCbWIASIwFiSlU0ka24UClpfFHyffVBOCJZ9V6WLE55XoSbnMRj9Ot+U0ny2B01xh+kV+Q6DGq1Ruw99PxjguzLaPa6u1NCH1KSSlKrCDpBsVS3Sm5uoIeSIoANvViXfvSSlYgKQnMmZKLMufNC5x14w1JVUn9Ho5SiTyTVo73jJHQM1FUnyp/2+tkgeVlXTMcZUFLE3ZCJIdFLpyGpsOB93VfI/L4m7fDWoNTuc2oM5drH3czyE/hWe0+GV1OapM0mBfqB9yiVs4oYO6IcQhyGHLBFP4FxHeZiGnTaxGXEayEkpuS8esk9bcyhXjkJgitOofLg+U0IqvH4pA98dap3TTk3sK+upzNvN2KRRuxCf+IMaGEqZDkUXXx72zt67IwJWlSQ3ngzx4S+btbvM2NBQPlPg3po3/UUbgwWBKaEGb0xJ6gjownur6pQY6hQJ47MvvwKLoWfz8XTVgGVDRATJbTrlUttU4+zu58Kd8Rwy2l+qa1AQrebz100Z3JXxjmtOpAlsOanDjMAP1dmdRgvwDSIWPMSKLjxH3bf29sSdRAEBoXVxCQK78uBOvqZUDlYr8Lb+/zYCTmEQzdwQ//sbRby/dUIbdQ7X2MJ5TrgaL71k+O1XW9qwLtWXO0+MccaJIS+Xt561FK9EFBEreuAWmGTizN+3d+H5wCz7DO1FuhHM9k1hEJfgIefQVP6FtfhHcDWXP4peVKtbRY9Rs4K5jme+aeOtBezo/4tKCvqcZ8iYOxcuygUOpS0TKDArDRXnkNRBUC/bpPx1rVRcW/TckryQ=
User-Agent: Dalvik/2.1.0 (Linux; U; Android 12; SM-G975U1 Build/SP1A.210812.016)
Connection: Keep-Alive
Accept-Encoding: gzip

I have used your authorization code following code for authentication

import sys, os, base64, datetime, hashlib, hmac
import random
import requests
import time
import urllib.parse
#Authentiction : aws4-hmac-sha256

class AwsRequest:
    def __init__(self, region, access_key, secret_key, session_token, service):
        self.region = region
        self.access_key = access_key
        self.secret_key = secret_key
        self.session_token = session_token
        self.service = service

    #Return signature using HMAC-SHA256 from key + msg
    def sign(self, key, msg):
        return hmac.new(key, msg.encode('utf-8'), hashlib.sha256).digest()

    #Generate AWS4-HMAC-SHA256 signing key from key,date stamp, region, and service name
    def generate_signature_key(self, key, dateStamp, regionName, serviceName):
        key_date = self.sign(('AWS4' + key).encode('utf-8'), dateStamp)
        key_region = self.sign(key_date, regionName)
        key_service = self.sign(key_region, serviceName)
        key_sign = self.sign(key_service, 'aws4_request')
        return key_sign

    def get(self, host, uri, query=""):

        method = "GET"
        t = datetime.datetime.utcnow()
        amzdate = t.strftime('%Y%m%dT%H%M%SZ') 
        datestamp = t.strftime('%Y%m%d')# Datetime credential scope

        canonical_uri = uri 
        canonical_querystring = query
        canonical_headers = 'host:' + host + '\n' + 'x-amz-date:' + amzdate + '\n' + 'x-amz-security-token:' + self.session_token + '\n'

        #signed_headers = 'host;x-amz-date;x-amz-security-token'
        signed_headers ='host;x-amz-content-sha256;x-amz-date;x-amz-security-token'
        payload_hash = hashlib.sha256(('').encode('utf-8')).hexdigest()
        canonical_request = method + '\n' + canonical_uri + '\n' + canonical_querystring + '\n' + canonical_headers + '\n' + signed_headers + '\n' + payload_hash

        algorithm = 'AWS4-HMAC-SHA256'
        credential_scope = datestamp + '/' + self.region + '/' + self.service + '/' + 'aws4_request'
        string_to_sign = algorithm + '\n' +  amzdate + '\n' +  credential_scope + '\n' +  hashlib.sha256(canonical_request.encode('utf-8')).hexdigest()

        signing_key = self.generate_signature_key(self.secret_key, datestamp, self.region, self.service)
        signature = hmac.new(signing_key, (string_to_sign).encode('utf-8'), hashlib.sha256).hexdigest()

        authorization_header = algorithm + ' ' + 'Credential=' + self.access_key + '/' + credential_scope + ', ' +  'SignedHeaders=' + signed_headers + ', ' + 'Signature=' + signature
        headers = {'x-amz-security-token': self.session_token, 'x-amz-date':amzdate, 'Authorization':authorization_header}

        print("headers==> ",headers)

        req = "https://%s%s" % (host, uri)
        if query != "":
            req += "?%s" % query
            print("request==>",req)
        return requests.get(req, headers=headers)