Welcome to the FritzBox project
This project is derived from my former project FritzBoxPresenceDetection which provided the functionality to connect to an AVM FritzBox to check the presence of WLAN devices. While adding more features and the ability to interact with the FritzBox Home Automation actors (like switch plugs) using HTTP requests I decided to setup a complete new project with a new structure that encapsules the features for presence detection and home automation in separate modules. Furthermore I moved all the FritzBox communication related methods like authentication and lua-page loading to a new core module.
This module provides the class FBCore that encapsules all methods for communication with the FritzBox like authentication and loading of lua-pages.
This module provides the class FBPresence that encapsules all methods for determination of the WLAN device connection status on the FritzBox.
This module provides the class FBHomeAuto that encapsules all methods for interacting with the AVM home automation actors connected to a FritzBox.
Using the distribution files
First you need to download a source distribution file from the dist subfolder.
Afterwards you can easily install it on your environment by invoking the following command. As the package name may differ, please adapt it before executing the command.
sudo pip3 install fritzbox-0.1.tar.gz
Once successfully installed you can use the package inside your scripts. Please find an example below.
from fritzbox.FBHomeAuto import FBHomeAuto fbHA = FBHomeAuto(ip="192.168.0.1", password="pass1234") print(fbHA.getSwitchPlugs())
Create source distribution
Before creating the source distribution make sure to adapt the following attributes in the file setup.py to your needs.
name = "fritzbox", version = "0.2",
To create the source distribution go to the root folder of the archive and execute the following command
This creates a source distribution in both .zip and .tar.gz format in the subfolder dist with the following naming using above attributes:
Execute module tests
A shell script module has been added to execute all included module tests. To execute the module tests execute the following command in the root folder of the source code: