Skip to content

Python script that saves the Log-File from Fritz!Box routers by AVM as a csv File

License

Notifications You must be signed in to change notification settings

PascalHaury/FRITZBox_Log_Saver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FRITZ!Box Log Saver

GitHub license

Description

"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.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/FRITZ-Box-Log-Saver.git
  2. Change to the project directory:

    cd FRITZBox_Log_Saver
  3. Install the required Python packages:

    pip install -r requirements.txt

Usage

  1. 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

  2. Run the application:

    python main.py
  3. The application will log in to your FRITZ!Box, retrieve event log data, and save it to a CSV file.

Configuration

  1. 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
  2. Modify the values according to your FRITZ!Box login credentials and preferences.

  3. For a more detailed example please look in the Example File ex_settings.yaml

Scheduled logging

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:

  1. Open your crontab configuration for editing:

    crontab -e
  2. 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.

  3. Save and exit the crontab editor.

This will run your script every day at midnight.

Contributing

Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please open an issue or a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Python script that saves the Log-File from Fritz!Box routers by AVM as a csv File

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages