skillfed

pyfritzhome

Fritz!Box Smarthome Python Library

pyfritzhome v0.6.20 76.2K downloads/30d#14,649 on PyPI58
Permissive license MIT Active released

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 pyfritzhome

uv

uv add pyfritzhome

poetry

poetry add pyfritzhome

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

fritz box home automationfritzbox smart home controldect device python libraryhome automation thermostatsmart home device integrationfritzbox api pythonhome automation monitoring
home-automationfritzboxiot-integration

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

fritzconnection

Communicate with AVM FRITZ!Box routers via…

permissive · top 15,000 on PyPI

jaraco.abode

A Python library that interfaces with the Abode…

permissive · top 15,000 on PyPI

python-ecobee-api

A Python library for communicating with Ecobee3…

permissive · top 15,000 on PyPI

maxcube-api

Provides a Python API to query and control…

unclear · top 15,000 on PyPI

PyViCare

PyViCare provides Python access to Viessmann…

permissive · top 15,000 on PyPI

pyswitchbee

A Python library for controlling SwitchBee…

permissive · top 15,000 on PyPI

homematicip

A Python wrapper for the HomematicIP REST API…

copyleft · top 15,000 on PyPI

boschshcpy

Python client library for the Bosch Smart Home…

permissive · top 15,000 on PyPI

nexia

Async Python library for controlling Nexia…

permissive · top 15,000 on PyPI

yalexs

Async Python client library for Yale Access…

permissive · top 15,000 on PyPI