"FRITZ!Box Log Saver" is a Python application that allows you to log in to a FRITZ!Box device, retrieve the event log data, and save it to a CSV file. This tool simplifies the process of accessing and saving log data from your FRITZ!Box router.
-
Clone the repository:
git clone https://github.com/yourusername/FRITZ-Box-Log-Saver.git
-
Change to the project directory:
cd FRITZBox_Log_Saver
-
Install the required Python packages:
pip install -r requirements.txt
-
Make sure you have created a settings.yaml by renaming the example file ex_settings.yaml or by creating the settings.yaml
1.1 Modify the settings with your specific configuration.
1.2 The settings.yaml must be in the same folder as the main.py -
Run the application:
python main.py
-
The application will log in to your FRITZ!Box, retrieve event log data, and save it to a CSV file.
-
Create a settings.yaml file with the following configuration:
url: http://fritz.box # URL of your FRITZ!Box username: your_username # Your FRITZ!Box username password: your_password # Your FRITZ!Box password exclude: - ExcludedKeyword1 # List of keywords to exclude from log - ExcludedKeyword2 logpath: fritzLog.csv # Path to the CSV log file
-
Modify the values according to your FRITZ!Box login credentials and preferences.
-
For a more detailed example please look in the Example File ex_settings.yaml
You can schedule the "FRITZ!Box Log Saver" to run automatically at specific times using crontab. To run the script daily at 00:00, follow these steps:
-
Open your crontab configuration for editing:
crontab -e
-
Add the following line to schedule the script daily at midnight:
0 0 * * * /usr/bin/python /path/to/FRITZ-Box-Log-Saver/main.py
Replace '/usr/bin/python' with the path to your Python interpreter (you can find it by running 'which python').
Replace '/path/to/FRITZ-Box-Log-Saver' with the actual path to your project directory.
-
Save and exit the crontab editor.
This will run your script every day at midnight.
Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please open an issue or a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.