Welcome to HAP-python’s documentation!

This documentation contains everything you need to know about HAP-python.

Getting Help

Having Trouble? Post an issue on the GitHub repo, with as much information as possible about your issue.

First Steps

HAP-python at a glance

HAP-python at a glance: the object model, and how the accessory, services, characteristics and the driver interact.

Installation Guide

How to install HAP-python on a Debian based system, such as a Raspberry Pi, or Ubuntu.

Tutorials

Get started building your first HomeKit Accessory.

Examples

A set of prebuilt accessories to either build your own class around, or to use as a starting point into your own custom Accessory class.

Advanced

State management

The state file: what is persisted, when it is loaded and saved, and how your accessory keeps its own settings across restarts.

Async rules and helpers

The event loop rules: what runs where, what must not block, and the scheduling utilities HAP-python provides.

Camera Streaming

Camera streaming

The Camera accessory: classic RTP streaming, HomeKit Secure Video recording, and the 17.99 multi-tier and WebRTC stream services with their delegates and sessions.

Camera streaming design

How the camera stream services share one media pull per channel and keep the per-packet work off the caller’s loop.

API Reference

API Index

API documentation for HAP-python.