Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/natekspencer/pylitterbot
Python package for controlling a Whisker connected self-cleaning litter boxes and feeders
https://github.com/natekspencer/pylitterbot
feeder-robot litter-robot python whisker
Last synced: 8 days ago
JSON representation
Python package for controlling a Whisker connected self-cleaning litter boxes and feeders
- Host: GitHub
- URL: https://github.com/natekspencer/pylitterbot
- Owner: natekspencer
- License: mit
- Created: 2020-12-13T22:09:22.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-03T19:43:52.000Z (about 1 month ago)
- Last Synced: 2024-10-24T18:16:36.145Z (14 days ago)
- Topics: feeder-robot, litter-robot, python, whisker
- Language: Python
- Homepage:
- Size: 1.48 MB
- Stars: 87
- Watchers: 11
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![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/QJGfYd)# 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 asynciofrom 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/QJGfYd) to purchase your own robot and save $50!
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: