https://github.com/inverse/python-aiotomato
https://github.com/inverse/python-aiotomato
client-sdk python router
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/inverse/python-aiotomato
- Owner: inverse
- License: mit
- Created: 2021-12-29T21:42:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-16T08:05:15.000Z (over 3 years ago)
- Last Synced: 2025-02-10T23:41:46.463Z (over 1 year ago)
- Topics: client-sdk, python, router
- Language: Python
- Homepage:
- Size: 99.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AIOTomato

[](https://github.com/psf/black)
A simple and limited wrapper for Tomato based router firmwares such as [FreshTomato][0].
It's limited to only WIFI enabled devices due to what the API provides.
## Usage
Below is an example of how it can be used to print out a list of devices and get their online status.
```python
import os
from aiotomato.client import Client
client = Client(
os.getenv("ROUTER_HOST", ""),
os.getenv("ROUTER_USER", ""),
os.getenv("ROUTER_PASS", ""),
os.getenv("ROUTER_HTTP_ID", ""),
)
for device in client.fetch_devices():
print(f"name: {device.name}")
print(f"ip: {device.ip}")
print(f"mac: {device.mac}")
print(f"is_online: {device.is_online}")
```
Where the HTTP ID can be obtained by inspecting the source code when logged into the admin inteface of the router searching for `http_id`.
## Licence
MIT
[0]: https://freshtomato.org/