pyfritzhome
Fritz!Box Smarthome Python Library
What it is and what it does
pyfritzhome is a Python client library for controlling and monitoring AVM Fritz!Box home automation devices over HTTP. It wraps the Fritz!Box AHA HTTP interface to let you query and control smart home actors like thermostats, power switches, door/window sensors, and smart plugs connected to your Fritz!Box. The library handles authentication, device enumeration, and state queries, exposing device properties such as temperature, battery level, switch state, and power consumption.
You interact with it by creating a FritzHome connection object with your Fritz!Box hostname and credentials, then calling methods to list devices or read their state. It includes both a Python API and a command-line tool (fritzhome) for scripting or manual queries. The package depends on requests for HTTP communication and cryptography for secure credential handling.
Use it for:
- Monitor room temperatures from multiple Comet DECT or FRITZ!DECT thermostats in a home automation dashboard.
- Automate heating schedules by querying thermostat state and adjusting comfort/eco targets programmatically.
- Track power consumption from FRITZ!DECT 200 switches and smart plugs for energy auditing.
- Build alerts when door/window sensors report open state or battery levels drop below a threshold.
- Script bulk operations on device groups (e.g., set all living room thermostats to a target temperature).
- Integrate Fritz!Box device data into a broader home automation or monitoring system via Python.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python access to AVM Fritz!Box home automation devices and sensors, including thermostats, switches, and door/window contacts, via HTTP API.
Yes, if you own a Fritz!Box and need programmatic control or monitoring of its smart home devices. The library is actively maintained, has low install friction, carries a permissive MIT license, and supports modern Python versions. No known security vulnerabilities. The main prerequisite is having a Fritz!Box device and configuring a user account with smarthome rights.
Install
pyfritzhome on PyPI
pip
pip install pyfritzhomeuv
uv add pyfritzhomepoetry
poetry add pyfritzhomeInstalling pyfritzhome
Before you install
Low install friction with only two runtime dependencies (requests and cryptography). Actively maintained as of 2026-02-22 with recent releases.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both personal and commercial projects.
Quickstart
pip install pyfritzhome
from pyfritzhome import FritzHome
fh = FritzHome(host='fritz.box', user='smarthome', password='smarthome')
fh.get_devices()
Requires a Fritz!Box device on the network and a user account configured in the device's web interface with smarthome access rights.
Verify before relying
- Whether the library supports all Fritz!Box models beyond those explicitly listed in the description.
- Current Python version support floor (requires_python field is unspecified in metadata).
- Whether the package includes async/await support for concurrent device operations.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — requests, cryptography |
| Maintenance | actively maintained — 173 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 76,194/month — #14,649 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyfritzhome-0.6.20-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
fritzconnectionCommunicate with AVM FRITZ!Box routers via…
permissive · top 15,000 on PyPI
jaraco.abodeA Python library that interfaces with the Abode…
permissive · top 15,000 on PyPI
python-ecobee-apiA Python library for communicating with Ecobee3…
permissive · top 15,000 on PyPI
maxcube-apiProvides a Python API to query and control…
unclear · top 15,000 on PyPI
PyViCarePyViCare provides Python access to Viessmann…
permissive · top 15,000 on PyPI
pyswitchbeeA Python library for controlling SwitchBee…
permissive · top 15,000 on PyPI
homematicipA Python wrapper for the HomematicIP REST API…
copyleft · top 15,000 on PyPI
boschshcpyPython client library for the Bosch Smart Home…
permissive · top 15,000 on PyPI
nexiaAsync Python library for controlling Nexia…
permissive · top 15,000 on PyPI
yalexsAsync Python client library for Yale Access…
permissive · top 15,000 on PyPI