Communicate with the AVM FRITZ!Box
Project description
Python-Tool to communicate with the AVM Fritz!Box. Uses the TR-064 protocol over UPnP.
Installation:
For installation use pip
$ pip install fritzconnection or $ pip install fritzconnection[qr]
The latter will install the dependency to enable QR-code creation for wifi login.
Quickstart:
Using fritzconnection is as easy as:
from fritzconnection import FritzConnection fc = FritzConnection(address='192.168.178.1') fc.reconnect() # get a new external ip from the provider print(fc) # print router model informations
Here the fc.reconnect() is a shortcut. The basic method FritzConnection provides to access the FritzOS-API is the call_action() method. A reconnection by means of call_action() would look like this:
fc = FritzConnection(address='192.168.178.1') fc.call_action("WANIPConn1", "ForceTermination")
The method call_action() expects a service- and an action-name (and optional arguments). In general FritzConnection can execute every service and action provided by the (model-specific) API as documented by AVM. For i.e. this can be network settings, status informations, access to home automation devices and much more. In case a call to the FritzOS-API provides information the call_action() method returns a dictionary with the results.
The package comes with some library-modules as examples how to implement applications on top of FritzConnection.
Documentation
The full documentation and release notes are at https://fritzconnection.readthedocs.org
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file fritzconnection-1.11.0.tar.gz
.
File metadata
- Download URL: fritzconnection-1.11.0.tar.gz
- Upload date:
- Size: 46.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 970ea8d6502ba7a9b43472b0bc9470830932535cce9cf2a8b0ff1db9dc13cf74 |
|
MD5 | 1e2b8aa67f6666db4b256efdecabf9f2 |
|
BLAKE2b-256 | 8b54e3ea519c60d8b9a188472dd218eecb19d646c925726b6a6c85ceac6a87b7 |