Skip to main content

Python client library for WyBot pool robots (HTTP, MQTT, and BLE).

Project description

pywybot

A Python client library for WyBot pool robots. It provides the transport clients and data models used to talk to WyBot devices:

  • HTTP (WyBotHTTPClient) — cloud login and device/status retrieval.
  • MQTT (WyBotMQTTClient) — real-time status and command relay.
  • BLE (WyBotBLEClient) — local Bluetooth control using the AA55 binary protocol.

This library is transport-agnostic for Bluetooth: you inject a BluetoothAdapter that knows how to discover and resolve BLE devices, so the same client works under Home Assistant's Bluetooth stack or a bare bleak setup. It was extracted from the hass-wybot Home Assistant integration.

Installation

pip install pywybot

Usage

Cloud (HTTP)

from wybot import WyBotHTTPClient, WybotAuthError, WybotConnectionError

client = WyBotHTTPClient("you@example.com", "password")
try:
    client.authenticate()
except WybotAuthError:
    ...  # invalid credentials
except WybotConnectionError:
    ...  # network/server error

groups = client.get_indexed_current_grouped_devices()

The HTTP client raises WybotAuthError for rejected credentials and WybotConnectionError for network failures (both subclass WybotError).

Bluetooth (BLE)

WyBotBLEClient takes a BluetoothAdapter:

from wybot import WyBotBLEClient, BluetoothAdapter


class MyAdapter:  # implements the BluetoothAdapter protocol
    def scanner_count(self) -> int: ...
    def discovered_devices(self): ...            # -> list[bleak BLEDevice]
    def device_from_address(self, address): ...  # -> BLEDevice | None


ble = WyBotBLEClient(MyAdapter())

Home Assistant supplies an adapter backed by homeassistant.components.bluetooth.

License

GPL-3.0-or-later. See LICENSE.

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

pywybot-0.1.0.tar.gz (65.1 kB view details)

Uploaded Source

Built Distribution

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

pywybot-0.1.0-py3-none-any.whl (51.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pywybot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f295054468d58b10d63a2d13221cc474ff4c2b31674c0535a76ac4ca7c81de2
MD5 1195aa16cabc24305740c6879e220d30
BLAKE2b-256 6b92566946bb3a4574dad265d1e10be072ab88db0a8887b5ff012447dc753695

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on bassrock/pywybot

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

File details

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

File metadata

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

File hashes

Hashes for pywybot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 020c01557b0fa64a7ade2620707cd1fd8eb7811c730ebfe57fd78614bd336ecb
MD5 89c61ed94281d1a14f66cbe330e47a04
BLAKE2b-256 8bf8872cd837413b606a43f98fa9b8598739a5ae12085eaa02684a73ebf4a783

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on bassrock/pywybot

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