Skip to main content

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

The client is fully async (aiohttp / aiomqtt).

Cloud (HTTP)

import aiohttp
from wybot import WyBotHTTPClient, WybotAuthError, WybotConnectionError

async with aiohttp.ClientSession() as session:
    # Pass a session to reuse it (e.g. Home Assistant's shared session);
    # omit it and the client creates and owns one (call await client.close()).
    client = WyBotHTTPClient("you@example.com", "password", session=session)
    try:
        await client.authenticate()
    except WybotAuthError:
        ...  # invalid credentials
    except WybotConnectionError:
        ...  # network/server error

    groups = await 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.

Download files

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

Source Distribution

pywybot-1.3.0.tar.gz (79.9 kB view details)

Uploaded Source

Built Distribution

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

pywybot-1.3.0-py3-none-any.whl (54.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pywybot-1.3.0.tar.gz
  • Upload date:
  • Size: 79.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pywybot-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a0841a9ad8eb6511646a5783552c9bc42e2e6b4158fdfdbc7fdaea3db555bae2
MD5 5e982b01734a3c530129c264132e9976
BLAKE2b-256 152a6fc9a1785e7b1b4bcb86073b8d2d2dc05d6a5c6cc7ca224b27f1c0851c75

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywybot-1.3.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-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: pywybot-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 54.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pywybot-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c1e437633f572e239154073bfa37b75ab8667ee770e68948fdf2863f4d1010c
MD5 651fd28132b37d39d9e9f6cc2f3dd355
BLAKE2b-256 6f383cea5ae330efe1ce05a34e82faec60e2bbc352ed8e9b9e6537fdd09c5d6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywybot-1.3.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.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page