Skip to main content

hyperhdr-py

A Python library for controlling HyperHDR ambient lighting systems.

This library builds on Dermot Duffy’s hyperion-py.

HyperHDR logo

Features

  • Full async support with asyncio
  • Connect to the HyperHDR JSON API
  • Control colors, effects, components, and more
  • Subscribe to real-time state updates
  • Support for HyperHDR v19 through v22+
  • Optional WebSocket LED color/gradient streaming (requires aiohttp)

New in v0.1.0 (HyperHDR v20–v22)

  • Average color — Average color of current LED output
  • Smoothing control — Adjust smoothing, including v22 interpolators
  • HDR tone mapping — Tone mapping mode and automatic detection (v21+)
  • Service discovery — Discover HyperHDR instances on the network
  • Current LED colors — Read colors being sent to LEDs
  • Performance benchmarking — Run server benchmarks
  • Config management — Save/load the configuration database

Installation

pip install hyperhdr-py-sickkick

Quick start

import asyncio
from hyperhdr import client, const

async def main():
    async with client.HyperHDRClient("hyperhdr.local") as hc:
        if hc:
            adjustment = hc.adjustment
            if adjustment:
                print(f"Brightness: {adjustment[0][const.KEY_BRIGHTNESS]}%")

            await hc.async_set_color(color=[255, 0, 0], priority=50)
            await hc.async_set_effect(effect={"name": "Rainbow swirl"}, priority=50)

asyncio.run(main())

LED streaming (WebSocket)

Install dependencies before using the stream helpers:

pip install aiohttp

If you use convert_to_jpeg=True, install Pillow as well, or use the extras:

pip install "hyperhdr-py-sickkick[stream]"
pip install "hyperhdr-py-sickkick[stream-jpeg]"
import asyncio
from hyperhdr.stream import HyperHDRLedColorsStream, HyperHDRLedGradientStream

async def main():
    led_colors = HyperHDRLedColorsStream("hyperhdr.local", token="YOUR_TOKEN")
    await led_colors.start()
    frame = await led_colors.wait_for_frame()
    if frame and frame.raw:
        print("LED bytes:", len(frame.raw))
    await led_colors.stop()

    led_gradient = HyperHDRLedGradientStream("hyperhdr.local")
    async for frame in led_gradient.frames():
        print("Gradient update:", frame.source)
        break
    await led_gradient.stop()

asyncio.run(main())

See examples/stream_leds.py for a runnable script.

API and data model

Request and response shapes follow the HyperHDR JSON API. Async methods on HyperHDRClient are named async_* and match that API; see hyperhdr/client.py for the full list.

For threaded use without asyncio, use ThreadedHyperHDRClient (same method names without the async_ prefix). After start(), call wait_for_client_init() before connecting.

Credits

Thanks to Dermot Duffy for hyperion-py, which this project extends.

Feel free to open an issue if you run into problems.

Metadata

Release files for hyperhdr-py-sickkick 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hyperhdr-py-sickkick 0.2.2
File Size Uploaded Provenance Actions
hyperhdr_py_sickkick-0.2.2.tar.gz 28.1 kB Without provenance Details for hyperhdr_py_sickkick-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hyperhdr-py-sickkick 0.2.2
File Interpreter ABI Platform Actions
hyperhdr_py_sickkick-0.2.2-py3-none-any.whl Python 3 none any Details for hyperhdr_py_sickkick-0.2.2-py3-none-any.whl

Total release size: 57.4 kB

Release files / hyperhdr_py_sickkick-0.2.2.tar.gz

Download URL hyperhdr_py_sickkick-0.2.2.tar.gz
Size 28.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fd1ea3454b7bb639944083613a2e59d39ce2892ea1921996047b8154f937fd49
BLAKE2b-256 checksum
How to use checksums
63dd449c5b8f1b839b7b69c4a031f6952c0ab12db8a110f8c7b899a23a763616
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / hyperhdr_py_sickkick-0.2.2-py3-none-any.whl

Download URL hyperhdr_py_sickkick-0.2.2-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d65fc96f90cca69d1a90fcccd9e56670a9a62218e18e302e658b1852bb75394
BLAKE2b-256 checksum
How to use checksums
316b751f25072a48192783a5c5982e7865cf9dba0bf8a247d118ffb0ec7db242
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for hyperhdr-py-sickkick 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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