[![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_$50-lightgrey?style=for-the-badge&labelColor=grey)](https://share.litter-robot.com/x/JUdcNx)
# 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 referral link](https://share.litter-robot.com/x/JUdcNx) 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/7f/4d/d6c17ba277ed0d074bb748527d361fc43e2e4189d31831daa089e3f99457/pylitterbot-2023.5.1.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_$50-lightgrey?style=for-the-badge&labelColor=grey)](https://share.litter-robot.com/x/JUdcNx)\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 referral link](https://share.litter-robot.com/x/JUdcNx) 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.5.1",
"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": "3af2720bebc5583242d59d91baf7e932e14bfe97dcace46f9cf82687f8f44d7c",
"md5": "98c315b4db54f9e29db7570707cde171",
"sha256": "3b7cf5d0a280fbab95741ae6de63449f0b42cba6fbf3ccb77cdffb5bdb9fc072"
},
"downloads": -1,
"filename": "pylitterbot-2023.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "98c315b4db54f9e29db7570707cde171",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.8.1",
"size": 36670,
"upload_time": "2024-07-13T02:36:49",
"upload_time_iso_8601": "2024-07-13T02:36:49.553704Z",
"url": "https://files.pythonhosted.org/packages/3a/f2/720bebc5583242d59d91baf7e932e14bfe97dcace46f9cf82687f8f44d7c/pylitterbot-2023.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7f4dd6c17ba277ed0d074bb748527d361fc43e2e4189d31831daa089e3f99457",
"md5": "ab56e7da63cc16a70c6af14cf8c65e17",
"sha256": "db33d766ba66b8facd3103d67798b72aadf9bacebbeefc4a3aab9c54e4991d34"
},
"downloads": -1,
"filename": "pylitterbot-2023.5.1.tar.gz",
"has_sig": false,
"md5_digest": "ab56e7da63cc16a70c6af14cf8c65e17",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.8.1",
"size": 28315,
"upload_time": "2024-07-13T02:36:51",
"upload_time_iso_8601": "2024-07-13T02:36:51.300001Z",
"url": "https://files.pythonhosted.org/packages/7f/4d/d6c17ba277ed0d074bb748527d361fc43e2e4189d31831daa089e3f99457/pylitterbot-2023.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-13 02:36:51",
"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"
}