Skip to main content

pybotvac

This is an unofficial API for controlling Neato Botvac Connected vacuum robots. The code is based on https://github.com/kangguru/botvac and credit for reverse engineering the API goes to Lars Brillert @kangguru

Disclaimer

This API is experimental. Use at your own risk. Feel free to contribute if things are not working.

Installation

Install using pip

pip install pybotvac

Alternatively, clone the repository and run

python setup.py install

Usage

Robot

If the serial and secret for your robot is known, simply run

>>> from pybotvac import Robot
>>> robot = Robot('OPS01234-0123456789AB', '0123456789ABCDEF0123456789ABCDEF', 'my_robot_name')
>>> print(robot)
Name: sample_robot, Serial: OPS01234-0123456789AB, Secret: 0123456789ABCDEF0123456789ABCDEF

The format of the serial should be 'OPSxxxxx-xxxxxxxxxxxx', and the secret should be a string of hex characters 32 characters long. These can be found by using the Account class.

To start cleaning

robot.start_cleaning()

If no exception occurred, your robot should now get to work.

Currently the following methods are available in the Robot class:

  • get_robot_state()
  • start_cleaning()
  • start_spot_cleaning()
  • pause_cleaning()
  • stop_cleaning()
  • send_to_base()
  • enable_schedule()
  • disable_schedule()
  • get_schedule()

For convenience, properties exist for state and schedule

# Get state
state = robot.state

# Check if schedule is enabled
robot.schedule_enabled

# Disable schedule
robot.schedule_enabled = False

Account

If the serial and secret are unknown, they can be retrieved using the Account class. You need a session instance to create an account. There are three different types of sessions available. It depends on your provider which session is suitable for you.

  • PasswordSession lets you authenticate via E-Mail and Password. Even though this works fine, it is not recommended.
  • OAuthSession lets you authenticate via OAuth2. You have to create an application here in order to generate client_id, client_secret and redirect_url.
  • PasswordlessSession is known to work for users of the new MyKobold App. The only known client_id is KY4YbVAvtgB7lp8vIbWQ7zLk3hssZlhR.
from pybotvac import Account, Neato, OAuthSession, PasswordlessSession, PasswordSession, Vorwerk

email = "Your email"
password = "Your password"
client_id = "Your client it"
client_secret = "Your client secret"
redirect_uri = "Your redirect URI"

# Authenticate via Email and Password
password_session = PasswordSession(email=email, password=password, vendor=Neato())

# Authenticate via OAuth2
oauth_session = OAuthSession(client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri, vendor=Neato())
authorization_url = oauth_session.get_authorization_url()
print("Visit: " + authorization_url)
authorization_response = input("Enter the full callback URL: ")
token = oauth_session.fetch_token(authorization_response)

# Authenticate via One Time Password
passwordless_session = PasswordlessSession(client_id=client_id, vendor=Vorwerk())
passwordless_session.send_email_otp(email)
code = input("Enter the code: ")
passwordless_session.fetch_token_passwordless(email, code)

# Create an account with one of the generated sessions
account = Account(password_session)

# List all robots associated with account
for robot in account.robots:
    print(robot)

Information about maps and download of maps can be done from the Account class:

>>> from pybotvac import Account
>>> # List all maps associated with a specific robot
>>> for map_info in Account(PasswordSession('sample@email.com', 'sample_password')).maps:
...     print(map_info)

A cleaning map can be downloaded with the account class. Returns the raw image response. Example shows latest map. You need the url from the map output to do that:

>>> from pybotvac import Account
>>> # List all maps associated with a specific robot
>>> map = Account(PasswordSession('sample@email.com', 'sample_password')).maps
>>> download_link = map['robot_serial']['maps'][0]['url']
>>> Account('sample@email.com', 'sample_password').get_map_image(download_link)

Metadata

Release files for pybotvac 0.0.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybotvac 0.0.29
File Size Uploaded
pybotvac-0.0.29.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybotvac 0.0.29
File Interpreter ABI Platform
pybotvac-0.0.29-py3-none-any.whl Python 3 none any Details

Total release size: 28.8 kB

Release files / pybotvac-0.0.29.tar.gz

Download URL pybotvac-0.0.29.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f666a93c5cdd000cc7245b856b18b21a1d2eb739f34d25f345ae806518ff3aaf
BLAKE2b-256 checksum
How to use checksums
5d55add14f45bab831437e06dded56c997e601dc1156637b448b6c6ae1904b91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / pybotvac-0.0.29-py3-none-any.whl

Download URL pybotvac-0.0.29-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9ca0d12c4147869fb1c9deb20fd337512c11714f5b5f4ccdaeb399eca57859b
BLAKE2b-256 checksum
How to use checksums
911a450174e91e344ac1abe2e0ac7c3afecc77337f918f20138230369553649d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.0.29 This release

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page