Skip to main content

Asynchronous Python client for Aquatlantis Ori Smart Controller

Project description

Python Aquatlantis Ori

PyPI version License Codecov Sonar quality gate GitHub repo stars Buy me a coffee

An asynchronous Python client for the Aquatlantis Ori Smart Controller

[!CAUTION] This project is a personal, unofficial effort and is not affiliated with Aquatlantis. It was created to learn and experiment with controlling my own aquarium. The Ori API was reverse-engineered for this purpose, and functionality may break at any time if Aquatlantis changes their API. I'm not responsible for any damage or issues that may arise from using this client. Use at your own risk!

Installation

You can install this package using your preferred package manager. For example, using pip:

pip install aquatlantis-ori

Usage

To use the Aquatlantis Ori client, you can import it in your Python scripts and start interacting with your Ori controller. Here is a simple example:

import asyncio
import logging

from aquatlantis_ori import AvailabilityType, AquatlantisOriClient, LightOptions, PowerType

logging.basicConfig(level=logging.WARNING)
logging.getLogger("aquatlantis_ori").setLevel(logging.INFO)


async def main() -> None:
    async with AquatlantisOriClient("email", "password") as client:
        await client.connect()
        device = client.get_devices()[0]

        if device.availability_state is not AvailabilityType.AVAILABLE:
            raise RuntimeError("Device is not currently available")

        scenarios: list[dict] = [
            {"power": PowerType.ON, "options": LightOptions(intensity=100, red=100, green=0, blue=0, white=0)},
            {"power": PowerType.ON, "options": LightOptions(intensity=100, red=0, green=100, blue=0, white=0)},
            {"power": PowerType.ON, "options": LightOptions(intensity=100, red=0, green=0, blue=100, white=0)},
            {"power": PowerType.ON, "options": LightOptions(intensity=100, red=0, green=0, blue=0, white=100)},
            {"power": PowerType.ON, "options": LightOptions(intensity=100, red=100, green=100, blue=100, white=100)},
            {"power": PowerType.OFF},
            {"power": PowerType.ON, "options": LightOptions(intensity=80, red=0, green=0, blue=0, white=100)},
            {"power": PowerType.ON, "options": LightOptions(intensity=60, red=0, green=0, blue=0, white=100)},
            {"power": PowerType.ON, "options": LightOptions(intensity=40, red=0, green=0, blue=0, white=100)},
            {"power": PowerType.ON, "options": LightOptions(intensity=20, red=0, green=0, blue=0, white=100)},
            {"power": PowerType.ON, "options": LightOptions(intensity=1, red=0, green=0, blue=0, white=100)},
            {"power": PowerType.OFF},
        ]

        for scenario in scenarios:
            device.set_light(
                power=scenario.get("power"),
                options=scenario.get("options"),
            )
            await asyncio.sleep(2)


if __name__ == "__main__":
    asyncio.run(main())

device.status remains the raw vendor-reported protocol value for diagnostics. Use device.availability_state as the canonical runtime liveness signal:

  • AvailabilityType.UNKNOWN: No MQTT liveness evidence has been observed yet.
  • AvailabilityType.AVAILABLE: Recent MQTT telemetry or an explicit online status proves the device is alive.
  • AvailabilityType.UNAVAILABLE: A fresh explicit offline status was received, or MQTT activity has gone stale.

Contributing

Contributions are welcome! Please familiarize yourself with the contribution guidelines. This document will also help you set up your development environment.


Thank you for your interest in the Python Aquatlantis Ori client! If you have any questions or need further assistance, feel free to open an issue or submit a pull request.

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

aquatlantis_ori-0.0.15.tar.gz (96.6 kB view details)

Uploaded Source

Built Distribution

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

aquatlantis_ori-0.0.15-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file aquatlantis_ori-0.0.15.tar.gz.

File metadata

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

File hashes

Hashes for aquatlantis_ori-0.0.15.tar.gz
Algorithm Hash digest
SHA256 4cb1e4ba5e726bceaa651ab16cb9383db77b70f32f220efd8294b6bbd022fdac
MD5 8eb71c9496fac6d9bc7116ee3d56c039
BLAKE2b-256 3d7e83f6b92cfeb32d8710791b5693dda67925a097e78e618c5dd70045572ab1

See more details on using hashes here.

Provenance

The following attestation bundles were made for aquatlantis_ori-0.0.15.tar.gz:

Publisher: release.yaml on golles/python-aquatlantis-ori

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

File details

Details for the file aquatlantis_ori-0.0.15-py3-none-any.whl.

File metadata

File hashes

Hashes for aquatlantis_ori-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 4ab85b96df627a5c419ea59e300d43d2a2af0afb30f3847b168e2514cf3bf056
MD5 0ca993c70a878a77d2c8a570be30dc1b
BLAKE2b-256 436443a6fa1c6d90bb361c7ee42e2e448b83234ade9b65d57b397b528c7a7b76

See more details on using hashes here.

Provenance

The following attestation bundles were made for aquatlantis_ori-0.0.15-py3-none-any.whl:

Publisher: release.yaml on golles/python-aquatlantis-ori

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