Skip to main content

Communicate with the AVM FritzBox

Project description

fritzconnection

Python-Tool to communicate with the AVM FritzBox. Uses the TR-064 protocol.

Installation:

pip install fritzconnection

Dependencies

fritzconnection requires the python modules lxml and requests:

pip install lxml requests

Available Modules, Commands and Tools

fritzconnection.py makes the SOAP interface of the FRITZ!Box available on the command line. Shows all available services and actions when run with the argument -c.

fritzstatus.py is a command line interface to display status information of the FRITZ!Box. It also serves as an example on how to use the fritzconnection module.

fritzmonitor.py is a Tkinter GUI to display current IP as well as the upstream and downstream rates. It also makes it easy to reconnect and thus get a different IP from your ISP.

fritzhosts.py is a command line interface to display the hosts known by the FRITZ!Box with IP, name, MAC and status.

Other Files

fritztools.py contains some helper functions and test.py contains unit tests.

Quickstart

Inspect the API:

>>> import fritzconnection as fc
>>> fc.print_api(password='your_password')

An API-Call is made by the call_action-method of the FritzConnection-Class. This method takes the servicename, the actionname and optional arguments as parameter and may return a dictionary with the results (as described in the TR-064 protocoll description). A simple example is to reconnect for a new external ip:

>>> from fritzconnection import FritzConnection
>>> connection = FritzConnection()
>>> connection.call_action('WANIPConnection', 'ForceTermination')
# or more comfortable:
>>> connection.reconnect()

The latter wrapps the call_action-method. For a more complete example look at the fritzhosts.py souce-code.

Resources

Information on TR-064: - AVM’s manual First Steps with TR-064 http://www.avm.de/de/Extern/files/tr-064/AVM_TR-064_first_steps.pdf - TR-064 Technical Report DSL Forum http://www.broadband-forum.org/technical/download/TR-064.pdf

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fritzconnection-0.4.6.tar.gz (14.5 kB view details)

Uploaded Source

File details

Details for the file fritzconnection-0.4.6.tar.gz.

File metadata

File hashes

Hashes for fritzconnection-0.4.6.tar.gz
Algorithm Hash digest
SHA256 7f4da2957632d65bbc054d96d06b79e5c7ee57f75a60af0991abd866a81b7285
MD5 e4c27941fc4a015d27f29351c0b5c307
BLAKE2b-256 f1c22ab22df572f4c7fba112f11f6b78faaf47a1e9250545e2f8f08ad2deb1aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page