Skip to main content

Async Python library for the Pooldigital Violet pool controller.

Project description

myviolet — Python client for the Pooldigital Violet pool controller

Lint Test CodeQL Documentation PyPI Package release

PyPI Python Versions

Async Python library for the Pooldigital Violet pool controller — the successor to the ProCon.IP unit (sister library: proconip). Primarily intended as the foundation for a Home Assistant integration, but usable on its own for any Python application that talks to the controller.

Requirements

  • Python ≥ 3.13
  • aiohttp >= 3.13.5, < 4
  • yarl >= 1.23.0, < 2

Dependency ranges match the Home Assistant Core 2026.5 pins.

Install

pip install myviolet

Usage

Reading state

import asyncio
import aiohttp
from myviolet import VioletClient

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with VioletClient(
            session,
            host="violet.local",
            username="admin",
            password="...",
        ) as client:
            snapshot = await client.readings.get()
            if snapshot.water_chemistry.ph is not None:
                print(f"pH:  {snapshot.water_chemistry.ph.value}")
            if snapshot.water_chemistry.orp is not None:
                print(f"ORP: {snapshot.water_chemistry.orp.value} mV")
            if snapshot.pump is not None and snapshot.pump.state.is_on:
                print(f"Pump running for {snapshot.pump.runtime}")

asyncio.run(main())

Control

async with VioletClient(session, host="violet.local", username="admin", password="...") as client:
    await client.control.pump("ON", speed=2)
    await client.control.heater("AUTO")
    await client.control.dosing("CL", "ON", duration=60)
    await client.targets.set_ph(7.2)                 # validates 6.8-7.8 range
    await client.control.cover_open(acknowledge_unsafe=True)

Cover movement is gated behind a mandatory acknowledge_unsafe=True keyword because the vendor disallows fully-automated cover control (people / debris in the pool). Callers are expected to add their own safety logic.

The Violet API at a glance

  • Pure JSON over HTTP, HTTP Basic auth, no WebSocket / SSE — polling.
  • Reads: GET /getReadings?ALL,DOSAGE,RUNTIMES returns ~400 keys.
  • Writes: GET /setFunctionManually?<KEY>,<ACTION>,<DURATION>,<VALUE>, GET /setTargetValues?..., POST /setConfig, POST /setDosingParameters.
  • ~200 documented fields are exposed via typed views (with shared enums for OutputState, CoverState, etc.); the remaining ~200 firmware-specific keys remain accessible via snapshot.raw[...].

Disclaimer

I have nothing to do with the development, selling, marketing, or support of the Violet pool controller itself. This library is a community project intended to make the controller easier to integrate with Home Assistant and other Python-based automations.

License

Apache-2.0 — see LICENSE. Chosen specifically for compatibility with Home Assistant Core's licensing requirements.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myviolet-0.1.0.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myviolet-0.1.0-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file myviolet-0.1.0.tar.gz.

File metadata

  • Download URL: myviolet-0.1.0.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for myviolet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8e364cd3f0b1b1ff80145f8e42ca8c987bcff789ae6d0ed63703cc71ab399d24
MD5 22ae5eb633244607cd345644dca1e958
BLAKE2b-256 ea5f7e400b8fe8b99c658e21da7a9b3caa2483ea64b486c86a969da326ad404f

See more details on using hashes here.

Provenance

The following attestation bundles were made for myviolet-0.1.0.tar.gz:

Publisher: python-publish.yml on ylabonte/myviolet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file myviolet-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: myviolet-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for myviolet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5759bcce4b8fe1ca47e8ba9f314e444a4de71a8bda32dca4d5449ff63ebb669e
MD5 9175a2cbc412b4eba3f9dd5df56cb353
BLAKE2b-256 df03cd0e5d888fe0a1e1aff21dfa24b0b9fe966a8e28ac90caf0f12c60d9bbda

See more details on using hashes here.

Provenance

The following attestation bundles were made for myviolet-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on ylabonte/myviolet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page