2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
pyirobot
This ia a python module for controlling the iRobot Roomba 980 (and possibly Roomba 960 and Braava Jet, but those are untested)
iRobot does not povide an official API for their robots; I reverse engineered this from the communication between my robot, the iRobot iOS app, and the Axeda IoT cloud service. The names of methods and attributes are mapped as closely as possible to the way the ap presents them.
This module is published to pypi, so you can install it via pip install pyirobot
Usage
Robot Password
To use any of the robot functions, you will need to get the password of your robot. Robot.GetPassword() can help you do this. Make sure your robot is on the home base and then hold down the home button for 3-4 seconds, until the LEDs illuminate and the robot emits a series of tones. Then quickly call Robot.GetPassword with the IP address of your robot.
Controlling the Robot
You can start and stop cleaning and send the robot back to the home base with StartCleaning, PauseCleaning, ResumeCleaning, EndCleaning and ReturnHome
from pyirobot import Robot
robot = Robot("192.168.0.0", "MtccDqXskShX|4jXnTd")
robot.StartCleaning()
robot.StopCleaning()
robot.ReturnHome()
Robot Configuration/Status
GetCleaningPreferences returns the cleaning preferences for the robot. CarpetBoost, CleaningPasses, EdgeClean and FinishWhenBinFull are all enums in the module.
import json
from pyirobot import Robot
robot = Robot("192.168.0.0", "MtccDqXskShX|4jXnTd")
print robot.GetCleaningPreferences()
print json.dumps(robot.GetCleaningPreferences(), sort_keys=True, indent=4)
Output:
{u'lang': 0, u'cleaningPasses': <CleaningPasses.Two: 1025>, u'name': u'Roomba', u'finishWhenBinFull': <FinishWhenBinFull.Off: 32>, u'carpetBoost': <CarpetBoost.Auto: 0>, u'edgeClean': <EdgeClean.On: 0>, u'timezone': u'America/Chicago'}
{
"carpetBoost": "Auto",
"cleaningPasses": "Auto",
"edgeClean": "On",
"finishWhenBinFull": "Off",
"lang": 0,
"name": "Roomba",
"timezone": "America/Chicago"
}
GetMission returns real time status about the robot, including battery and bin as well as the current cleaning status, if the robot is currently cleaning.
print robot.GetMission()
{u'binStatus': <BinStatus.Normal: (0,)>, u'readyStatus': <ReadyStatus.Ready: 0>, u'robotPosition': {u'theta': -79, u'point': {u'y': -22, u'x': 2}}, u'robotStatus': <RobotStatus.Charging: 'charge'>, u'missionCoveredSquareFootage': 0, u'missionElapsedMinutes': 0, u'batteryPercentage': 100}
print json.dumps(robot.GetMission(), sort_keys=True, indent=4)
{
"batteryPercentage": 100,
"binStatus": "Normal",
"missionCoveredSquareFootage": 0,
"missionElapsedMinutes": 0,
"readyStatus": "Ready",
"robotPosition": {
"point": {
"x": 2,
"y": -22
},
"theta": -79
},
"robotStatus": "Charging"
}
There are other functions for getting the cleaning schedule, robot time, and various other settings, as well as the corresponding Set functions, and enums for the various fields.
print robot.GetSchedule()
{'Sunday': {'startTime': datetime.time(9, 0), 'clean': False}, 'Monday': {'startTime': datetime.time(10, 0), 'clean': True}, 'Tuesday': {'startTime': datetime.time(10, 0), 'clean': True}, 'Wednesday': {'startTime': datetime.time(10, 0), 'clean': True}, 'Thursday': {'startTime': datetime.time(10, 0), 'clean': True}, 'Friday': {'startTime': datetime.time(10, 0), 'clean': True}, 'Saturday': {'startTime': datetime.time(10, 0), 'clean': False}}
print json.dumps(robot.GetSchedule(), indent=4)
{
"Sunday": {
"startTime": "09:00:00",
"clean": false
},
"Monday": {
"startTime": "10:00:00",
"clean": true
},
"Tuesday": {
"startTime": "10:00:00",
"clean": true
},
"Wednesday": {
"startTime": "10:00:00",
"clean": true
},
"Thursday": {
"startTime": "10:00:00",
"clean": true
},
"Friday": {
"startTime": "10:00:00",
"clean": true
},
"Saturday": {
"startTime": "10:00:00",
"clean": false
}
}
Errors
Any error coming back from the robot’s API is thrown as a RobotError. Errors from networking/communication with the robot are thrown by requests and uncaught/unmodified by this library.
Known Issues
This module is still a work in progress, so error handling and unit tests are pretty light and the API isn’t complete yet This first release only supports local communication with the robot; remote/cloud support is in progress
Metadata
Release files for pyirobot 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyirobot-1.0.5.tar.gz | 7.9 kB | Without provenance | Details for pyirobot-1.0.5.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| pyirobot-1.0.5-py3.6.egg | Legacy Egg format | - | - | Details for pyirobot-1.0.5-py3.6.egg |
| pyirobot-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for pyirobot-1.0.5-py3-none-any.whl |
| pyirobot-1.0.5-py2.7.egg | Legacy Egg format | - | - | Details for pyirobot-1.0.5-py2.7.egg |
| pyirobot-1.0.5-py2-none-any.whl | Python 2 | none | any | Details for pyirobot-1.0.5-py2-none-any.whl |
Total release size: 61.2 kB
Release files / pyirobot-1.0.5.tar.gz
| Download URL | pyirobot-1.0.5.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
147a66b0d32accb369632390ca05d6f697cb092597de923f8449ac92f163ed9f
|
|
BLAKE2b-256 checksum How to use checksums |
aa4d4a0521069a5ed43d99970756a055dd446fac87d458e30069477d8287e239
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyirobot-1.0.5-py3.6.egg
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pyirobot-1.0.5-py3.6.egg |
|---|---|
| Size | 16.1 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
4d5977971378a03ca4cb9fe15e5a98c57e9721969f4942fd6f7aece8978584ca
|
|
BLAKE2b-256 checksum How to use checksums |
e6ea2ad8121433bbda5206ead6521a91d69b0a6a6e3c2a3e5d2294a23e9b48cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyirobot-1.0.5-py3-none-any.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pyirobot-1.0.5-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c1fcfa4569d3abec9eb3528ae350f3f4c18fb405f99f733c0e3dd45da2d566e
|
|
BLAKE2b-256 checksum How to use checksums |
92bf7f7651422b54a1ad34f840935bdd85bfe5398a3ae62ee939d4b09db2983b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyirobot-1.0.5-py2.7.egg
| Download URL | pyirobot-1.0.5-py2.7.egg |
|---|---|
| Size | 15.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
1836ba99c767ad00b49a7f5371733812b079858c8497dad6778f7909857ef7e9
|
|
BLAKE2b-256 checksum How to use checksums |
dd8a4f5f5acbbac82b0142187008ba9d66630624849147bfb92ebe8b5804df9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyirobot-1.0.5-py2-none-any.whl
| Download URL | pyirobot-1.0.5-py2-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
a6e03468cd6282304054ff11bed817a0b6436f8625e78e06a7dfe33437ee22b3
|
|
BLAKE2b-256 checksum How to use checksums |
7c5cef6109f205deb2081795f8c661a1672028e847a0949dc95a72f49da022ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyirobot 1.0.5
Upload timing
Files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.