Skip to content

wgnf/fritzy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fritzy

A small project to gather internet-stats from a fritz-box

how to develop

The .env.template file acts as a template for the needed .env file. Because of some current limitations you have to copy that file to all underlying components to be able to use the values that are set up there.

scripts

The scripts are written in Python 3, so you have to install Python v3.
To prepare your environment, run the following from the ./src/scripts/ directory:

pip install --no-cache-dir -r requirements.txt

To run it, run the following from the ./src/scripts/ directory:

python exec.py

As exec.py kinda acts like a chron-job that runs every morning at 3 AM, to debug, you'd have to change the interval when the underlying script is called. Alternatively you can also run the underlying script directly, by runnin the following from the ./src/scripts/ directory:

python -c 'import fritzy; fritzy.execute()'

server

The server portion is written using NodeJS version 18, so you have to install NodeJS v18 or later.
To prepare your environment, run the following from the ./src/server/ directory:

npm install

To run the server locally, you simply have to run the following from the ./src/server/:

node server.js

website

The website is simply written in vanilla JavaScript, HTML and CSS. So to run it, you simply have to open the ./src/website/index.html file in your favourite browser.
To host the website in a docker-container NGINX is used.

how to setup your fritz-box and fritzy

To setup your fritz-box and fritzy to enable gathering data from the web, you have to do the following:

  1. Enable "MyFRITZ!" and create an account under https://fritz.box/#mfSet (Internet -> MyFRTIZ! Account)
  2. Enable internet-access for that account and choose which users can access your fritz-box from the internet
  3. For this you can optionally create a new user under https://fritz.box/#user (System -> FRITZ!Box Users). The user has to have all permissions enabled (except for "Access to NAS contents" and "VPN") and needs to be allowed to connect from the internet
  4. Under https://fritz.box/#mfSet (Internet -> MyFRTIZ! Account) you should also enable "Internet access to the FRITZ!Box via HTTPS enabled"
  5. To connect to your fritz-box you can now use the address presented under "MyFRITZ! internet access". This is the address you have to use in your .env in FRITZ_BASE_URL
  6. If you created a separate user for the internet-access you have to place that user-name and password in your .env under FRITZ_USER and FRITZ_PASSWORD
  7. Other values in your .env don't need to be changed, so you're good to go. Enjoy! 🚀

how to run

first you have to rename .env.template to .env and enter the values that fit your needs.

to run you simply have to use docker-compose like so:

docker compose -f ./src/docker-compose.yml up --build -d

to stop the docker-containers simply use:

docker compose -f ./src/docker-compose.yml stop

and to remove the docker-containers entirely use:

docker compose -f ./src/docker-compose.yml down

About

A small project to gather internet-stats from a fritz-box

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published