Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cibernox/pypoolstation
Python library to interact the the Poolstation platform
https://github.com/cibernox/pypoolstation
Last synced: 2 months ago
JSON representation
Python library to interact the the Poolstation platform
- Host: GitHub
- URL: https://github.com/cibernox/pypoolstation
- Owner: cibernox
- License: mit
- Created: 2021-09-03T21:09:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-08T21:12:47.000Z (4 months ago)
- Last Synced: 2024-10-20T22:46:52.949Z (2 months ago)
- Language: Python
- Size: 62.5 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## PyPoolstation
Python Library that acts as a wrapper to interact with the Poolstation platform (https://poolstation.net/)
for controlling pools.#### Disclaimer
Poolstation is a domotic platform developed by Idegis (https://idegis.net/)
I'm the owner of an Idegis Chlorinator compatible with the platform, but I am
not associated with Idegis in any other way or form.#### Usage
This library has three public classes, `Account`, `Pool` and `Relay`, but for the most part you will only need the last two.
You can obtaining a list of all your pools calling `await Pool.all(username, password)`.
The for each pool you can use `await pool.sync_info()` to refresh its information (temperature, salt concentration, its relays' state, target and current ph, etc...).
Each pool as a `pool.relays` property containing an array of `Relay` objects. Each relay can be turned on and off with `await Relay.set_active(True)` and `await Relay.set_active(False)`.```py
[pool] = await Pool.all('[email protected]', 'secret') # who has several pools really?
await pool.sync_info()
print(vars(pool)) # {id: 123, alias: 'The name of your pool', current_ph: 7.11, target_ph: 7.2, relays: [{ id: 777, name: 'Pool lights', sign: 'mc', active: True }], ... }
await pool.relays[0].(False) # Turns off the relay with the given ID
```