violet-poolController-api 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- violet_poolcontroller_api-0.0.1/LICENSE +21 -0
- violet_poolcontroller_api-0.0.1/PKG-INFO +122 -0
- violet_poolcontroller_api-0.0.1/README.md +99 -0
- violet_poolcontroller_api-0.0.1/pyproject.toml +27 -0
- violet_poolcontroller_api-0.0.1/setup.cfg +4 -0
- violet_poolcontroller_api-0.0.1/setup.py +21 -0
- violet_poolcontroller_api-0.0.1/violet_poolController_api.egg-info/PKG-INFO +122 -0
- violet_poolcontroller_api-0.0.1/violet_poolController_api.egg-info/SOURCES.txt +16 -0
- violet_poolcontroller_api-0.0.1/violet_poolController_api.egg-info/dependency_links.txt +1 -0
- violet_poolcontroller_api-0.0.1/violet_poolController_api.egg-info/requires.txt +1 -0
- violet_poolcontroller_api-0.0.1/violet_poolController_api.egg-info/top_level.txt +1 -0
- violet_poolcontroller_api-0.0.1/violet_poolcontroller_api/__init__.py +0 -0
- violet_poolcontroller_api-0.0.1/violet_poolcontroller_api/api.py +957 -0
- violet_poolcontroller_api-0.0.1/violet_poolcontroller_api/circuit_breaker.py +172 -0
- violet_poolcontroller_api-0.0.1/violet_poolcontroller_api/const_api.py +136 -0
- violet_poolcontroller_api-0.0.1/violet_poolcontroller_api/const_devices.py +307 -0
- violet_poolcontroller_api-0.0.1/violet_poolcontroller_api/utils_rate_limiter.py +235 -0
- violet_poolcontroller_api-0.0.1/violet_poolcontroller_api/utils_sanitizer.py +488 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Basti (Xerolux)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: violet-poolController-api
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Asynchronous Python client for the Violet Pool Controller.
|
|
5
|
+
Home-page: https://github.com/Xerolux/violet-poolController-api
|
|
6
|
+
Author: Basti (Xerolux)
|
|
7
|
+
Author-email: "Basti (Xerolux)" <git@xerolux.de>
|
|
8
|
+
Project-URL: Homepage, https://github.com/Xerolux/violet-poolController-api
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/Xerolux/violet-poolController-api/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Topic :: Home Automation
|
|
15
|
+
Requires-Python: >=3.12
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
19
|
+
Dynamic: author
|
|
20
|
+
Dynamic: home-page
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
Dynamic: requires-python
|
|
23
|
+
|
|
24
|
+
# Violet Pool Controller API
|
|
25
|
+
|
|
26
|
+
[](https://pypi.org/project/violet-poolController-api/)
|
|
27
|
+
[](https://pypistats.org/packages/violet-poolcontroller-api)
|
|
28
|
+
[](https://pypi.org/project/violet-poolController-api/)
|
|
29
|
+
[](LICENSE)
|
|
30
|
+
|
|
31
|
+
[](https://www.buymeacoffee.com/xerolux)
|
|
32
|
+
[](https://ts.la/sebastian564489)
|
|
33
|
+
|
|
34
|
+
An asynchronous Python client for interacting with the **Violet Pool Controller**.
|
|
35
|
+
|
|
36
|
+
This library is primarily designed to power the official [Violet Pool Controller Home Assistant Integration](https://github.com/Xerolux/violet-hass), but it can be used independently for any Python project that needs to fetch readings or control a Violet Pool system.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
* **Asynchronous:** Fully async operations using `aiohttp`.
|
|
40
|
+
* **Resilient:** Built-in Circuit Breaker and Rate Limiter to protect both the client and the controller from overload.
|
|
41
|
+
* **Sanitization:** Strict payload input sanitization to prevent injection and invalid settings.
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install violet-poolController-api
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Basic Usage
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import asyncio
|
|
53
|
+
import aiohttp
|
|
54
|
+
from violet_poolcontroller_api.api import VioletPoolAPI, VioletPoolAPIError
|
|
55
|
+
|
|
56
|
+
async def main():
|
|
57
|
+
# Create an aiohttp ClientSession
|
|
58
|
+
async with aiohttp.ClientSession() as session:
|
|
59
|
+
# Initialize the API
|
|
60
|
+
api = VioletPoolAPI(
|
|
61
|
+
host="192.168.1.100",
|
|
62
|
+
username="admin",
|
|
63
|
+
password="your_password",
|
|
64
|
+
session=session
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
try:
|
|
68
|
+
# --- 1. Fetch current sensor readings ---
|
|
69
|
+
readings = await api.get_readings()
|
|
70
|
+
print("Current Pool Readings:")
|
|
71
|
+
print(readings)
|
|
72
|
+
|
|
73
|
+
# --- 2. Control the Filter Pump ---
|
|
74
|
+
# Set pump speed to 2 (Normal) permanently (duration=0)
|
|
75
|
+
await api.set_pump_speed(speed=2, duration=0)
|
|
76
|
+
print("\nPump speed set to 2.")
|
|
77
|
+
|
|
78
|
+
# --- 3. Set Target Temperature ---
|
|
79
|
+
# Set the target temperature for the heater to 28.5 degrees
|
|
80
|
+
await api.set_device_temperature("HEATER", 28.5)
|
|
81
|
+
print("\nHeater target temperature set to 28.5°C.")
|
|
82
|
+
|
|
83
|
+
# --- 4. Control Pool Lights ---
|
|
84
|
+
# Trigger the color pulse animation for the pool light
|
|
85
|
+
await api.set_light_color_pulse()
|
|
86
|
+
print("\nLight color pulse triggered.")
|
|
87
|
+
|
|
88
|
+
except VioletPoolAPIError as e:
|
|
89
|
+
print(f"An error occurred while communicating with the Violet controller: {e}")
|
|
90
|
+
|
|
91
|
+
if __name__ == "__main__":
|
|
92
|
+
asyncio.run(main())
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Advanced Operations
|
|
96
|
+
|
|
97
|
+
The API client includes many more functions tailored to the Violet Controller:
|
|
98
|
+
- `get_config(["PUMP_SPEED_1", "PUMP_SPEED_2"])`: Fetch specific configuration values.
|
|
99
|
+
- `set_ph_target(7.2)`: Change the pH target value.
|
|
100
|
+
- `set_orp_target(750)`: Change the ORP (Redox) target value.
|
|
101
|
+
- `set_pv_surplus(active=True)`: Enable the PV-Surplus mode.
|
|
102
|
+
- `manual_dosing(dosing_type="Chlor", duration=120)`: Trigger manual chemical dosing.
|
|
103
|
+
|
|
104
|
+
For a full list of available commands, please refer to the source code in `api.py`.
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
MIT License
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## About the Violet Pool Controller
|
|
112
|
+
|
|
113
|
+
Der **VIOLET Pool Controller** von [PoolDigital GmbH & Co. KG](https://www.pooldigital.de/) ist ein Premium Smart Pool Automation System aus deutscher Entwicklung – mit JSON API für nahtlose Home Assistant Integration.
|
|
114
|
+
|
|
115
|
+
- **Offizieller Shop:** [pooldigital.de](https://www.pooldigital.de/)
|
|
116
|
+
- **Community:** [PoolDigital Forum](http://forum.pooldigital.de/)
|
|
117
|
+
|
|
118
|
+
**Disclaimer:**
|
|
119
|
+
*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.*
|
|
120
|
+
|
|
121
|
+
⚠️ **WARNING - USE AT YOUR OWN RISK:**
|
|
122
|
+
*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.*
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Violet Pool Controller API
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/violet-poolController-api/)
|
|
4
|
+
[](https://pypistats.org/packages/violet-poolcontroller-api)
|
|
5
|
+
[](https://pypi.org/project/violet-poolController-api/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
[](https://www.buymeacoffee.com/xerolux)
|
|
9
|
+
[](https://ts.la/sebastian564489)
|
|
10
|
+
|
|
11
|
+
An asynchronous Python client for interacting with the **Violet Pool Controller**.
|
|
12
|
+
|
|
13
|
+
This library is primarily designed to power the official [Violet Pool Controller Home Assistant Integration](https://github.com/Xerolux/violet-hass), but it can be used independently for any Python project that needs to fetch readings or control a Violet Pool system.
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
* **Asynchronous:** Fully async operations using `aiohttp`.
|
|
17
|
+
* **Resilient:** Built-in Circuit Breaker and Rate Limiter to protect both the client and the controller from overload.
|
|
18
|
+
* **Sanitization:** Strict payload input sanitization to prevent injection and invalid settings.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install violet-poolController-api
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Basic Usage
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
import asyncio
|
|
30
|
+
import aiohttp
|
|
31
|
+
from violet_poolcontroller_api.api import VioletPoolAPI, VioletPoolAPIError
|
|
32
|
+
|
|
33
|
+
async def main():
|
|
34
|
+
# Create an aiohttp ClientSession
|
|
35
|
+
async with aiohttp.ClientSession() as session:
|
|
36
|
+
# Initialize the API
|
|
37
|
+
api = VioletPoolAPI(
|
|
38
|
+
host="192.168.1.100",
|
|
39
|
+
username="admin",
|
|
40
|
+
password="your_password",
|
|
41
|
+
session=session
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
try:
|
|
45
|
+
# --- 1. Fetch current sensor readings ---
|
|
46
|
+
readings = await api.get_readings()
|
|
47
|
+
print("Current Pool Readings:")
|
|
48
|
+
print(readings)
|
|
49
|
+
|
|
50
|
+
# --- 2. Control the Filter Pump ---
|
|
51
|
+
# Set pump speed to 2 (Normal) permanently (duration=0)
|
|
52
|
+
await api.set_pump_speed(speed=2, duration=0)
|
|
53
|
+
print("\nPump speed set to 2.")
|
|
54
|
+
|
|
55
|
+
# --- 3. Set Target Temperature ---
|
|
56
|
+
# Set the target temperature for the heater to 28.5 degrees
|
|
57
|
+
await api.set_device_temperature("HEATER", 28.5)
|
|
58
|
+
print("\nHeater target temperature set to 28.5°C.")
|
|
59
|
+
|
|
60
|
+
# --- 4. Control Pool Lights ---
|
|
61
|
+
# Trigger the color pulse animation for the pool light
|
|
62
|
+
await api.set_light_color_pulse()
|
|
63
|
+
print("\nLight color pulse triggered.")
|
|
64
|
+
|
|
65
|
+
except VioletPoolAPIError as e:
|
|
66
|
+
print(f"An error occurred while communicating with the Violet controller: {e}")
|
|
67
|
+
|
|
68
|
+
if __name__ == "__main__":
|
|
69
|
+
asyncio.run(main())
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Advanced Operations
|
|
73
|
+
|
|
74
|
+
The API client includes many more functions tailored to the Violet Controller:
|
|
75
|
+
- `get_config(["PUMP_SPEED_1", "PUMP_SPEED_2"])`: Fetch specific configuration values.
|
|
76
|
+
- `set_ph_target(7.2)`: Change the pH target value.
|
|
77
|
+
- `set_orp_target(750)`: Change the ORP (Redox) target value.
|
|
78
|
+
- `set_pv_surplus(active=True)`: Enable the PV-Surplus mode.
|
|
79
|
+
- `manual_dosing(dosing_type="Chlor", duration=120)`: Trigger manual chemical dosing.
|
|
80
|
+
|
|
81
|
+
For a full list of available commands, please refer to the source code in `api.py`.
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
MIT License
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## About the Violet Pool Controller
|
|
89
|
+
|
|
90
|
+
Der **VIOLET Pool Controller** von [PoolDigital GmbH & Co. KG](https://www.pooldigital.de/) ist ein Premium Smart Pool Automation System aus deutscher Entwicklung – mit JSON API für nahtlose Home Assistant Integration.
|
|
91
|
+
|
|
92
|
+
- **Offizieller Shop:** [pooldigital.de](https://www.pooldigital.de/)
|
|
93
|
+
- **Community:** [PoolDigital Forum](http://forum.pooldigital.de/)
|
|
94
|
+
|
|
95
|
+
**Disclaimer:**
|
|
96
|
+
*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.*
|
|
97
|
+
|
|
98
|
+
⚠️ **WARNING - USE AT YOUR OWN RISK:**
|
|
99
|
+
*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.*
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "violet-poolController-api"
|
|
7
|
+
version = "0.0.1"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Basti (Xerolux)", email="git@xerolux.de" },
|
|
10
|
+
]
|
|
11
|
+
description = "Asynchronous Python client for the Violet Pool Controller."
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.12"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Topic :: Home Automation",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"aiohttp>=3.9.0",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
"Homepage" = "https://github.com/Xerolux/violet-poolController-api"
|
|
27
|
+
"Bug Tracker" = "https://github.com/Xerolux/violet-poolController-api/issues"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="violet-poolController-api",
|
|
5
|
+
version="0.0.1",
|
|
6
|
+
author="Basti (Xerolux)",
|
|
7
|
+
description="Asynchronous Python client for the Violet Pool Controller.",
|
|
8
|
+
long_description=open("README.md").read(),
|
|
9
|
+
long_description_content_type="text/markdown",
|
|
10
|
+
url="https://github.com/Xerolux/violet-poolController-api",
|
|
11
|
+
packages=find_packages(),
|
|
12
|
+
classifiers=[
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
],
|
|
17
|
+
python_requires=">=3.12",
|
|
18
|
+
install_requires=[
|
|
19
|
+
"aiohttp>=3.9.0",
|
|
20
|
+
],
|
|
21
|
+
)
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: violet-poolController-api
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Asynchronous Python client for the Violet Pool Controller.
|
|
5
|
+
Home-page: https://github.com/Xerolux/violet-poolController-api
|
|
6
|
+
Author: Basti (Xerolux)
|
|
7
|
+
Author-email: "Basti (Xerolux)" <git@xerolux.de>
|
|
8
|
+
Project-URL: Homepage, https://github.com/Xerolux/violet-poolController-api
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/Xerolux/violet-poolController-api/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Topic :: Home Automation
|
|
15
|
+
Requires-Python: >=3.12
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
19
|
+
Dynamic: author
|
|
20
|
+
Dynamic: home-page
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
Dynamic: requires-python
|
|
23
|
+
|
|
24
|
+
# Violet Pool Controller API
|
|
25
|
+
|
|
26
|
+
[](https://pypi.org/project/violet-poolController-api/)
|
|
27
|
+
[](https://pypistats.org/packages/violet-poolcontroller-api)
|
|
28
|
+
[](https://pypi.org/project/violet-poolController-api/)
|
|
29
|
+
[](LICENSE)
|
|
30
|
+
|
|
31
|
+
[](https://www.buymeacoffee.com/xerolux)
|
|
32
|
+
[](https://ts.la/sebastian564489)
|
|
33
|
+
|
|
34
|
+
An asynchronous Python client for interacting with the **Violet Pool Controller**.
|
|
35
|
+
|
|
36
|
+
This library is primarily designed to power the official [Violet Pool Controller Home Assistant Integration](https://github.com/Xerolux/violet-hass), but it can be used independently for any Python project that needs to fetch readings or control a Violet Pool system.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
* **Asynchronous:** Fully async operations using `aiohttp`.
|
|
40
|
+
* **Resilient:** Built-in Circuit Breaker and Rate Limiter to protect both the client and the controller from overload.
|
|
41
|
+
* **Sanitization:** Strict payload input sanitization to prevent injection and invalid settings.
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install violet-poolController-api
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Basic Usage
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import asyncio
|
|
53
|
+
import aiohttp
|
|
54
|
+
from violet_poolcontroller_api.api import VioletPoolAPI, VioletPoolAPIError
|
|
55
|
+
|
|
56
|
+
async def main():
|
|
57
|
+
# Create an aiohttp ClientSession
|
|
58
|
+
async with aiohttp.ClientSession() as session:
|
|
59
|
+
# Initialize the API
|
|
60
|
+
api = VioletPoolAPI(
|
|
61
|
+
host="192.168.1.100",
|
|
62
|
+
username="admin",
|
|
63
|
+
password="your_password",
|
|
64
|
+
session=session
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
try:
|
|
68
|
+
# --- 1. Fetch current sensor readings ---
|
|
69
|
+
readings = await api.get_readings()
|
|
70
|
+
print("Current Pool Readings:")
|
|
71
|
+
print(readings)
|
|
72
|
+
|
|
73
|
+
# --- 2. Control the Filter Pump ---
|
|
74
|
+
# Set pump speed to 2 (Normal) permanently (duration=0)
|
|
75
|
+
await api.set_pump_speed(speed=2, duration=0)
|
|
76
|
+
print("\nPump speed set to 2.")
|
|
77
|
+
|
|
78
|
+
# --- 3. Set Target Temperature ---
|
|
79
|
+
# Set the target temperature for the heater to 28.5 degrees
|
|
80
|
+
await api.set_device_temperature("HEATER", 28.5)
|
|
81
|
+
print("\nHeater target temperature set to 28.5°C.")
|
|
82
|
+
|
|
83
|
+
# --- 4. Control Pool Lights ---
|
|
84
|
+
# Trigger the color pulse animation for the pool light
|
|
85
|
+
await api.set_light_color_pulse()
|
|
86
|
+
print("\nLight color pulse triggered.")
|
|
87
|
+
|
|
88
|
+
except VioletPoolAPIError as e:
|
|
89
|
+
print(f"An error occurred while communicating with the Violet controller: {e}")
|
|
90
|
+
|
|
91
|
+
if __name__ == "__main__":
|
|
92
|
+
asyncio.run(main())
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Advanced Operations
|
|
96
|
+
|
|
97
|
+
The API client includes many more functions tailored to the Violet Controller:
|
|
98
|
+
- `get_config(["PUMP_SPEED_1", "PUMP_SPEED_2"])`: Fetch specific configuration values.
|
|
99
|
+
- `set_ph_target(7.2)`: Change the pH target value.
|
|
100
|
+
- `set_orp_target(750)`: Change the ORP (Redox) target value.
|
|
101
|
+
- `set_pv_surplus(active=True)`: Enable the PV-Surplus mode.
|
|
102
|
+
- `manual_dosing(dosing_type="Chlor", duration=120)`: Trigger manual chemical dosing.
|
|
103
|
+
|
|
104
|
+
For a full list of available commands, please refer to the source code in `api.py`.
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
MIT License
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## About the Violet Pool Controller
|
|
112
|
+
|
|
113
|
+
Der **VIOLET Pool Controller** von [PoolDigital GmbH & Co. KG](https://www.pooldigital.de/) ist ein Premium Smart Pool Automation System aus deutscher Entwicklung – mit JSON API für nahtlose Home Assistant Integration.
|
|
114
|
+
|
|
115
|
+
- **Offizieller Shop:** [pooldigital.de](https://www.pooldigital.de/)
|
|
116
|
+
- **Community:** [PoolDigital Forum](http://forum.pooldigital.de/)
|
|
117
|
+
|
|
118
|
+
**Disclaimer:**
|
|
119
|
+
*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.*
|
|
120
|
+
|
|
121
|
+
⚠️ **WARNING - USE AT YOUR OWN RISK:**
|
|
122
|
+
*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.*
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.py
|
|
5
|
+
violet_poolController_api.egg-info/PKG-INFO
|
|
6
|
+
violet_poolController_api.egg-info/SOURCES.txt
|
|
7
|
+
violet_poolController_api.egg-info/dependency_links.txt
|
|
8
|
+
violet_poolController_api.egg-info/requires.txt
|
|
9
|
+
violet_poolController_api.egg-info/top_level.txt
|
|
10
|
+
violet_poolcontroller_api/__init__.py
|
|
11
|
+
violet_poolcontroller_api/api.py
|
|
12
|
+
violet_poolcontroller_api/circuit_breaker.py
|
|
13
|
+
violet_poolcontroller_api/const_api.py
|
|
14
|
+
violet_poolcontroller_api/const_devices.py
|
|
15
|
+
violet_poolcontroller_api/utils_rate_limiter.py
|
|
16
|
+
violet_poolcontroller_api/utils_sanitizer.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
aiohttp>=3.9.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
violet_poolcontroller_api
|
|
File without changes
|