Skip to main content

pylitterbot

PyPI - Version Buy Me A Coffee/Beer Sponsor on GitHub Purchase Litter-Robot

GitHub License PyPI - Python Version Pepy Total Downloads PyPI - Downloads

Python package for controlling Whisker connected self-cleaning litter boxes and feeders.

This is an unofficial API for controlling various Whisker automated robots. It currently supports Litter-Robot 3 (with connect), Litter-Robot 4 and Feeder-Robot.

Disclaimer

This API is experimental and was reverse-engineered by monitoring network traffic and decompiling source code from the Whisker app since no public API is currently available at this time. It may cease to work at any time. Use at your own risk.

Installation

Install using pip

pip install pylitterbot

To include the MCP server for AI assistant integration:

pip install pylitterbot[mcp]

Alternatively, clone the repository and run

uv sync

Usage

import asyncio

from pylitterbot import Account

# Set email and password for initial authentication.
username = "Your username"
password = "Your password"


async def main():
    # Create an account.
    account = Account()

    try:
        # Connect to the API and load robots.
        await account.connect(username=username, password=password, load_robots=True)

        # Print robots associated with account.
        print("Robots:")
        for robot in account.robots:
            print(robot)
    finally:
        # Disconnect from the API.
        await account.disconnect()


if __name__ == "__main__":
    asyncio.run(main())

which will output something like:

Name: Litter-Robot Name, Serial: LR3C012345, id: a0123b4567cd8e

If you only want to discover specific robot families, pass the classes you want to query when you create the account or when you load robots:

from pylitterbot import Account, LitterRobot4, LitterRobot5

...

account = Account(robot_types=[LitterRobot4, LitterRobot5])

await account.connect(
    username=username,
    password=password,
    load_robots=True,
)

To start a clean cycle

await robot.start_cleaning()

If no exception occurred, your Litter-Robot should now perform a clean cycle.

Currently the following methods are available in the Robot class:

  • refresh()
  • start_cleaning()
  • reset_settings()
  • set_panel_lockout()
  • set_night_light()
  • set_power_status()
  • set_sleep_mode()
  • set_wait_time()
  • set_name()
  • get_activity_history()
  • get_insight()

MCP Server

pylitterbot includes an optional MCP (Model Context Protocol) server that lets AI assistants like Claude monitor and control your robots through natural language.

Installation

pip install pylitterbot[mcp]

Running

pylitterbot-mcp

or

python -m pylitterbot.mcp

Claude Desktop configuration

Add this to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "litter-robot": {
      "command": "python",
      "args": ["-m", "pylitterbot.mcp"],
      "env": {
        "LITTER_ROBOT_USERNAME": "your@email.com",
        "LITTER_ROBOT_PASSWORD": "your_password"
      }
    }
  }
}

Note: The configuration above stores credentials in plaintext. Ensure appropriate file permissions on your config file (owner-only read/write) and avoid committing it to version control.

Available tools

Status and info: get_robots, get_robot_status, get_activity_history, get_insight, get_pets

Commands: start_cleaning, reset_robot, give_snack, set_power_status

Settings: set_name, set_night_light, set_night_light_brightness, set_night_light_mode, set_panel_lockout, set_wait_time, set_sleep_mode

Compound operations that combine multiple API calls:

Tool Description
fleet_overview Prioritized status across all robots with alerts
clean_all_ready Start cleaning on all robots in READY state
sync_settings Copy one robot's settings to all others of the same model
pet_usage_report Activity data across all robots with pet info
maintenance_forecast Estimate when each robot needs emptying
household_digest Time-bounded summary of all activity
troubleshooting_report Diagnostic bundle for a robot with errors
robot_comparison Compare settings and metrics across robots

Contributing

Thank you for your interest in contributing! Please see CONTRIBUTING.md for how to get started.


TODO

  • Add support for Litter-Robot 5 cameras

❤️ Support Me

I maintain this python project in my spare time. If you find it useful, consider supporting development:

If you don't already own a Litter-Robot, please consider using my referral link to purchase your own robot and save $50!

📈 Star History

Star History Chart

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylitterbot-2025.6.4.tar.gz (68.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylitterbot-2025.6.4-py3-none-any.whl (85.8 kB view details)

Uploaded Python 3

File details

Details for the file pylitterbot-2025.6.4.tar.gz.

File metadata

  • Download URL: pylitterbot-2025.6.4.tar.gz
  • Upload date:
  • Size: 68.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pylitterbot-2025.6.4.tar.gz
Algorithm Hash digest
SHA256 9ab5cbf81151ff5d073990b443c1dcf73255064a896ba8b9aada62efba83f5b9
MD5 8fbe946ec0e441a3776f515b05239f6a
BLAKE2b-256 741984f7d5078ef3add6ee8e9b9972020a47d0489f1eb88d6a6a0876d7acdee4

See more details on using hashes here.

File details

Details for the file pylitterbot-2025.6.4-py3-none-any.whl.

File metadata

  • Download URL: pylitterbot-2025.6.4-py3-none-any.whl
  • Upload date:
  • Size: 85.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pylitterbot-2025.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c402a7de7c1e303b1b6fa9d31b2373fa85146108c1536ef3f614ef5023043283
MD5 70cb7781e0c058b4ecfb36895eff4004
BLAKE2b-256 0d44da42aa0bbb16b7e962cec8114327336be5e33fe54b055a6edb708598542b

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page