This repo / library originally started with So Fresh, So Clean paper and the paper sample lib at: BiTLab-BaggiliTruthLab/PyRoomba along with the discussion in koalazak/dorita980/issues/148
It is something of a proof of concept and not for production user currently. It is also not in a library form yet. It allows the retrieving of much of your data from the iRobot cloud including detailed map reconstruction.
When the primary script is run it will run a local web server you can access from your browser. You login with your iRobot cloud login. From there you can see your maps, clean run history (missions) and more.
- Clone or download this repo
- Enter the repo directory from a command line (be in the same folder as roomba.py)
- Setup a python virtual environment to store the deps in:
python -m venv virtenv - Activate the environment (needed each time you go to use PyRoomba) this is generally in linux:
source virtenv/bin/activateor windows:./virtenv/bin/activate.ps1 - install the deps
pip install -r requirements.txt
- Activate the environment per above if not already activated
- Run the roomba.py script, by default it will run the webserver on 127.0.0.1 port 5000. You can alter this by using the --host [ip] or --port [port] args.
- Open the browser and visit http://127.0.0.1:5000 login with your iRobot login just as you would with the app
There are some other preferences as well including defaultRobotId which if you have multiple roombas will pick the newest firmware one. There isn't a UI picker to change this but you can edit the preferences and take another robot ID from the allRobots pref section and set that as the default to change its default pick.
Preferences are stored in prefs.json locally as well if you don't want to edit through the web UI.
Time estimates doesn't seem to work that data is there though look at how we store and show room names as it is located in the same datablock.
Stalls are when the brush encounters something that reduces it spin ability generally this might happen against walls but if its happening often check your brush for issues.
If you want to see the raw traffic and data you can run roomba.py under a proxy using env vars like: HTTPS_PROXY="http://127.0.0.1:9999" HTTP_PROXY="http://127.0.0.1:9999" REQUESTS_CA_BUNDLE="/sandbox/proxy.crt" python roomba.py.
While previously it was possible to get the real time position of the roomba to generate an exact map that is no more (disabled by newer firmwares). The post mission report has some timestamped events but largely things are not timestamped only categorized. The exception is the timeline. It isn't overly granular but is timestamped and has room ids so one could reconstruct at least the room order.
It should move towards being a proper library rather than application. The caching and session storing should be kept but moved to be an external interface.
2025-01
- Made brush stalls paint smaller and can toggle if it should be drawn (good if you get constant stalls)
- Added auth caching (removed re-authing on every request, sometimes multiple times per request)
- Added URL caching (prevent hitting iRobot for the same resource multiple times within a two hour window)
- Ability to toggle if the cleaned area should be drawn
- Made non standard floor types translucent, draw floor types, stalls, and cleaned area before all other map items so easier to see other items
- Removed legend items being duplicated when that item appeared multiple times on the map
- Added web preference configuration page
- Show room names, map names, rather than just their ids
- Show time information in local time and more readable, also show mission durations and mission maps
- Show event log for the entire mission
- Make the clickable items in the UI show up as proper links