Asynchronous Python client for the Violet Pool Controller.
Project description
Violet Pool Controller API
An asynchronous Python client for interacting with the Violet Pool Controller.
This library is primarily designed to power the official Violet Pool Controller Home Assistant Integration, but it can be used independently for any Python project that needs to fetch readings or control a Violet Pool system.
📖 Wiki & Documentation: For comprehensive documentation, full usage examples, and all available endpoints, please visit the Violet Pool Controller API Wiki.
Features
- Asynchronous: Fully async operations using
aiohttp. - Resilient: Built-in Circuit Breaker and Rate Limiter to protect both the client and the controller from overload.
- Sanitization: Strict payload input sanitization to prevent injection and invalid settings.
Installation
pip install violet-poolController-api
Basic Usage
import asyncio
import aiohttp
from violet_poolcontroller_api.api import VioletPoolAPI, VioletPoolAPIError
async def main():
# Create an aiohttp ClientSession
async with aiohttp.ClientSession() as session:
# Initialize the API
# Note: In a standard setup, just enter the IP address without a port.
# A port (e.g. "192.168.1.100:8080") can optionally be provided if you use a proxy or alternative setup.
api = VioletPoolAPI(
host="192.168.1.100",
username="admin",
password="your_password",
session=session
)
try:
# --- 1. Fetch current sensor readings ---
readings = await api.get_readings()
print("Current Pool Readings:")
print(readings)
# --- 2. Control the Filter Pump ---
# Set pump speed to 2 (Normal) permanently (duration=0)
await api.set_pump_speed(speed=2, duration=0)
print("\nPump speed set to 2.")
# --- 3. Set Target Temperature ---
# Set the target temperature for the heater to 28.5 degrees
await api.set_device_temperature("HEATER", 28.5)
print("\nHeater target temperature set to 28.5°C.")
# --- 4. Control Pool Lights ---
# Trigger the color pulse animation for the pool light
await api.set_light_color_pulse()
print("\nLight color pulse triggered.")
except VioletPoolAPIError as e:
print(f"An error occurred while communicating with the Violet controller: {e}")
if __name__ == "__main__":
asyncio.run(main())
Advanced Operations
The API client includes many more functions tailored to the Violet Controller:
get_config(["PUMP_SPEED_1", "PUMP_SPEED_2"]): Fetch specific configuration values.set_ph_target(7.2): Change the pH target value.set_orp_target(750): Change the ORP (Redox) target value.set_pv_surplus(active=True): Enable the PV-Surplus mode.manual_dosing(dosing_type="Chlor", duration=120): Trigger manual chemical dosing.
For a full list of available commands and more detailed examples, please refer to the Wiki or the source code in api.py.
License
GNU Affero General Public License v3.0 or later (AGPLv3+)
About the Violet Pool Controller
Der VIOLET Pool Controller von PoolDigital GmbH & Co. KG ist ein Premium Smart Pool Automation System aus deutscher Entwicklung – mit JSON API für nahtlose Home Assistant Integration.
- Offizieller Shop: pooldigital.de
- Community: PoolDigital Forum
Disclaimer: This is an unofficial, community-driven project. It is not affiliated with, endorsed by, or associated with PoolDigital GmbH & Co. KG in any way. "VIOLET" and any related trademarks are the property of their respective owners.
⚠️ WARNING - USE AT YOUR OWN RISK: This software interacts with physical hardware and automation systems that control water chemistry (pH, Chlorine/ORP) and electrical equipment (pumps, heaters). A bug, network issue, or incorrect configuration could result in hardware damage, unsafe water conditions, or other hazards. By using this software, you acknowledge and agree that you are solely responsible for any damage, injury, or loss of property that may occur. Please always monitor your pool's chemistry and hardware independently.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file violet_poolcontroller_api-0.0.4.tar.gz.
File metadata
- Download URL: violet_poolcontroller_api-0.0.4.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6075a3b91774e06948c5838244bed71e950b44695f93ecff931dad9e89873479
|
|
| MD5 |
37a84afb879cdcc35321dc103f3754e4
|
|
| BLAKE2b-256 |
2757ce989787aa6a8e9a88d6b618acc5b5c16bef0ead1a91cfe6e27ae984145f
|
Provenance
The following attestation bundles were made for violet_poolcontroller_api-0.0.4.tar.gz:
Publisher:
python-publish.yml on Xerolux/violet-poolController-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
violet_poolcontroller_api-0.0.4.tar.gz -
Subject digest:
6075a3b91774e06948c5838244bed71e950b44695f93ecff931dad9e89873479 - Sigstore transparency entry: 1200878697
- Sigstore integration time:
-
Permalink:
Xerolux/violet-poolController-api@ce1b75998e5330207a96837c9625775010ac6039 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Xerolux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ce1b75998e5330207a96837c9625775010ac6039 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file violet_poolcontroller_api-0.0.4-py3-none-any.whl.
File metadata
- Download URL: violet_poolcontroller_api-0.0.4-py3-none-any.whl
- Upload date:
- Size: 39.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0399092b4ef9aa1b7dba57d8a0181c1174d1d5407b1ec1bf8c29e6330b7abc0a
|
|
| MD5 |
2b685be3d3a6d7533f495a6d772e5fef
|
|
| BLAKE2b-256 |
d7b016647658a5a3e9920fc636810d9071cfcc91df140db521f9a975d8623e6d
|
Provenance
The following attestation bundles were made for violet_poolcontroller_api-0.0.4-py3-none-any.whl:
Publisher:
python-publish.yml on Xerolux/violet-poolController-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
violet_poolcontroller_api-0.0.4-py3-none-any.whl -
Subject digest:
0399092b4ef9aa1b7dba57d8a0181c1174d1d5407b1ec1bf8c29e6330b7abc0a - Sigstore transparency entry: 1200878755
- Sigstore integration time:
-
Permalink:
Xerolux/violet-poolController-api@ce1b75998e5330207a96837c9625775010ac6039 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Xerolux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ce1b75998e5330207a96837c9625775010ac6039 -
Trigger Event:
workflow_dispatch
-
Statement type: