skillfed

aiohue

Python module to talk to Philips Hue.

aiohue v4.9.0 91.2K downloads/30d#13,533 on PyPI73
Permissive license Apache-2.0 Active released

What it is and what it does

Aiohue is an asynchronous Python library for communicating with Philips Hue Bridges to control lights and smart home devices. It wraps the Hue Bridge REST API in an async-first interface using aiohttp and asyncio, allowing non-blocking control of lights, scenes, and device groups. The library supports both the newer V2 API (which enables event-based updates without polling) and the legacy V1 API for backward compatibility with older bridges.

The library is designed for integration into larger async applications, particularly home automation systems. It requires Python 3.11 or later and depends on aiohttp for HTTP communication, asyncio-throttle for rate limiting, and awesomeversion for version comparison. The codebase mirrors the Philips Hue API structure, making it straightforward for developers familiar with the official API documentation to work with the library.

Use it for:

  • Automate home lighting scenes and schedules via asyncio-based applications.
  • Build smart home integrations that react to Hue light state changes using V2 event subscriptions.
  • Control individual lights or groups programmatically without polling overhead.
  • Integrate Hue devices into larger home automation or IoT orchestration systems.
  • Monitor and respond to light state changes in real-time applications.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Asynchronous Python library for controlling Philips Hue lights and devices via the Hue Bridge, supporting both V2 event-based and V1 polling APIs.

Yes. The package is actively maintained, has low install friction, carries no known security vulnerabilities, and uses a permissive license. It fills a clear niche for async-first Hue control in Python. Install it if you need to automate Philips Hue devices in an asyncio application or home automation system.

Install

aiohue on PyPI

pip

pip install aiohue

uv

uv add aiohue

poetry

poetry add aiohue

Installing aiohue

Before you install

Low install friction with a pure-Python wheel and minimal runtime dependencies. Actively maintained with a recent release and ongoing repository activity.

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.

Quickstart

pip install aiohue

import asyncio
from aiohue import Bridge

async def main():
    bridge = Bridge(host="hue_bridge_ip")
    await bridge.initialize()
    # Access lights and control them

asyncio.run(main())

Requires Python 3.11 or later; requires network access to a Philips Hue Bridge on the local network.

Verify before relying

  • Whether the library handles authentication/pairing flow with the Hue Bridge automatically or requires manual setup.
  • Performance characteristics when managing large numbers of lights or frequent state updates.
  • Whether V2 API event subscriptions require persistent connection or support reconnection.
  • Compatibility with third-party Hue-compatible devices beyond official Philips products.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 3 — aiohttp, asyncio-throttle, awesomeversion
Maintenance actively maintained — 15 days since the last release
Last repo commit
First released
Downloads 91,182/month — #13,533 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aiohue-4.9.0-py3-none-any.whl

Environment :: ConsoleProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

philips hue control libraryasync hue bridge apismart light automation pythonhue device control asynciohome automation lightinghue v2 api pythonasyncio smart home lights
smart-homeiot-controlasyncio

More WWW/HTTP packages