pylitterbot


Namepylitterbot JSON
Version 2023.4.11 PyPI version JSON
download
home_pagehttps://github.com/natekspencer/pylitterbot
SummaryPython package for controlling Whisker automatic robots.
upload_time2024-04-05 18:01:35
maintainerNone
docs_urlNone
authorNathan Spencer
requires_python<4.0.0,>=3.8.1
licenseMIT
keywords whisker litter-robot feeder-robot litter box pet feeder asynchronous
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![pypi](https://img.shields.io/pypi/v/pylitterbot?style=for-the-badge)](https://pypi.org/project/pylitterbot)
[![downloads](https://img.shields.io/pypi/dm/pylitterbot?style=for-the-badge)](https://pypi.org/project/pylitterbot)
[![Buy Me A Coffee/Beer](https://img.shields.io/badge/Buy_Me_A_☕/🍺-F16061?style=for-the-badge&logo=ko-fi&logoColor=white&labelColor=grey)](https://ko-fi.com/natekspencer)
[![Purchase Litter-Robot](https://img.shields.io/badge/Buy_a_Litter--Robot-Save_$25-lightgrey?style=for-the-badge&labelColor=grey)](https://www.gopjn.com/t/SENKTktMR0lDSEtJTklPQ0hKS05HTQ)

# pylitterbot

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

```bash
pip install pylitterbot
```

Alternatively, clone the repository and run

```bash
poetry install
```

## Usage

```python
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
```

To start a clean cycle

```python
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()

---

## TODO

- Improve support for Litter-Robot 4
- Improve support for Feeder-Robot

---

## Support Me

I'm not employed by Whisker and provide this python package as-is.

If you don't already own a Litter-Robot, please consider using [my affiliate link](https://www.gopjn.com/t/SENKTktMR0lDSEtJTklPQ0hKS05HTQ) to purchase your own robot and save $25!

If you already own a Litter-Robot and/or want to donate to me directly, consider buying me a coffee (or beer) instead by using the link below:

<a href='https://ko-fi.com/natekspencer' target='_blank'><img height='35' style='border:0px;height:46px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' />

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/natekspencer/pylitterbot",
    "name": "pylitterbot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": "Whisker, Litter-Robot, Feeder-Robot, litter box, pet feeder, asynchronous",
    "author": "Nathan Spencer",
    "author_email": "natekspencer@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/26/d1/bc400cafdc70c953d0ccb44a9c97f4e38cb4d5ac38b6b62677a0d2ea75c3/pylitterbot-2023.4.11.tar.gz",
    "platform": null,
    "description": "[![pypi](https://img.shields.io/pypi/v/pylitterbot?style=for-the-badge)](https://pypi.org/project/pylitterbot)\n[![downloads](https://img.shields.io/pypi/dm/pylitterbot?style=for-the-badge)](https://pypi.org/project/pylitterbot)\n[![Buy Me A Coffee/Beer](https://img.shields.io/badge/Buy_Me_A_\u2615/\ud83c\udf7a-F16061?style=for-the-badge&logo=ko-fi&logoColor=white&labelColor=grey)](https://ko-fi.com/natekspencer)\n[![Purchase Litter-Robot](https://img.shields.io/badge/Buy_a_Litter--Robot-Save_$25-lightgrey?style=for-the-badge&labelColor=grey)](https://www.gopjn.com/t/SENKTktMR0lDSEtJTklPQ0hKS05HTQ)\n\n# pylitterbot\n\nPython package for controlling Whisker connected self-cleaning litter boxes and feeders.\n\nThis is an unofficial API for controlling various Whisker automated robots. It currently supports Litter-Robot 3 (with connect), Litter-Robot 4 and Feeder-Robot.\n\n## Disclaimer\n\nThis 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.\n\n## Installation\n\nInstall using pip\n\n```bash\npip install pylitterbot\n```\n\nAlternatively, clone the repository and run\n\n```bash\npoetry install\n```\n\n## Usage\n\n```python\nimport asyncio\n\nfrom pylitterbot import Account\n\n# Set email and password for initial authentication.\nusername = \"Your username\"\npassword = \"Your password\"\n\n\nasync def main():\n    # Create an account.\n    account = Account()\n\n    try:\n        # Connect to the API and load robots.\n        await account.connect(username=username, password=password, load_robots=True)\n\n        # Print robots associated with account.\n        print(\"Robots:\")\n        for robot in account.robots:\n            print(robot)\n    finally:\n        # Disconnect from the API.\n        await account.disconnect()\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nwhich will output something like:\n\n```\nName: Litter-Robot Name, Serial: LR3C012345, id: a0123b4567cd8e\n```\n\nTo start a clean cycle\n\n```python\nawait robot.start_cleaning()\n```\n\nIf no exception occurred, your Litter-Robot should now perform a clean cycle.\n\nCurrently the following methods are available in the Robot class:\n\n- refresh()\n- start_cleaning()\n- reset_settings()\n- set_panel_lockout()\n- set_night_light()\n- set_power_status()\n- set_sleep_mode()\n- set_wait_time()\n- set_name()\n- get_activity_history()\n- get_insight()\n\n---\n\n## TODO\n\n- Improve support for Litter-Robot 4\n- Improve support for Feeder-Robot\n\n---\n\n## Support Me\n\nI'm not employed by Whisker and provide this python package as-is.\n\nIf you don't already own a Litter-Robot, please consider using [my affiliate link](https://www.gopjn.com/t/SENKTktMR0lDSEtJTklPQ0hKS05HTQ) to purchase your own robot and save $25!\n\nIf you already own a Litter-Robot and/or want to donate to me directly, consider buying me a coffee (or beer) instead by using the link below:\n\n<a href='https://ko-fi.com/natekspencer' target='_blank'><img height='35' style='border:0px;height:46px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' />\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python package for controlling Whisker automatic robots.",
    "version": "2023.4.11",
    "project_urls": {
        "Homepage": "https://github.com/natekspencer/pylitterbot",
        "Repository": "https://github.com/natekspencer/pylitterbot"
    },
    "split_keywords": [
        "whisker",
        " litter-robot",
        " feeder-robot",
        " litter box",
        " pet feeder",
        " asynchronous"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9cf58553c9f51b612d49682aa54c160b17757261cc028f4e5f1b56db4e0f59c",
                "md5": "030deddcffd59e91e2d36c90e3c875d2",
                "sha256": "97445e1185d3c0d5095b5864d6df44ccd93a46d7a17dded49013c9197a5b2a87"
            },
            "downloads": -1,
            "filename": "pylitterbot-2023.4.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "030deddcffd59e91e2d36c90e3c875d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 33798,
            "upload_time": "2024-04-05T18:01:33",
            "upload_time_iso_8601": "2024-04-05T18:01:33.321878Z",
            "url": "https://files.pythonhosted.org/packages/a9/cf/58553c9f51b612d49682aa54c160b17757261cc028f4e5f1b56db4e0f59c/pylitterbot-2023.4.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26d1bc400cafdc70c953d0ccb44a9c97f4e38cb4d5ac38b6b62677a0d2ea75c3",
                "md5": "16289f92f9e5fd560a32f60f7ee39a16",
                "sha256": "fdb901967c3d7a29f336f6c3df893287dfae8521499d6072b285492ff4c87c20"
            },
            "downloads": -1,
            "filename": "pylitterbot-2023.4.11.tar.gz",
            "has_sig": false,
            "md5_digest": "16289f92f9e5fd560a32f60f7ee39a16",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 25941,
            "upload_time": "2024-04-05T18:01:35",
            "upload_time_iso_8601": "2024-04-05T18:01:35.371159Z",
            "url": "https://files.pythonhosted.org/packages/26/d1/bc400cafdc70c953d0ccb44a9c97f4e38cb4d5ac38b6b62677a0d2ea75c3/pylitterbot-2023.4.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-05 18:01:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "natekspencer",
    "github_project": "pylitterbot",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "pylitterbot"
}
        
Elapsed time: 0.37693s