-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Retrieve internet tickets from Fritzbox and print on a Zebra printer | ||
==================================================================== | ||
|
||
The [AVM FRITZ!Box](https://avm.de/produkte/fritzbox/) (FB) routers have a feature to allow Internet access to specific devices only for a certain amount of time. If that time is exceeded then the owner can print [Internet Tickets](https://en.avm.de/service/fritzbox/fritzbox-7490/knowledge-base/publication/show/3408_Extending-the-online-time-permitted-in-the-parental-controls-with-tickets/) that allow another 45 minutes of surfing. | ||
|
||
The code in this repo helps to automate the retrieval and distribution of such Internet tickets. | ||
|
||
Retrieving Tickets | ||
------------------ | ||
|
||
The `fritzbox-get-internet-tickets.py` program will connect to the FB, retrieve the 10 available Internet tickets via web scraping (there is no API for that) and print them as a list to STDOUT. | ||
|
||
Set the password via the `FRITZBOX_PASSWORD` environment variable and check the code for more options. | ||
|
||
This program is usually not used directly, unless you plan to distribute the tickets yourself. | ||
|
||
Printing Tickets | ||
---------------- | ||
|
||
The `fritzbox-internet-ticket` program is the main program and will first retrieve the tickets from the FB and then send the first ticket to a print queue. This program also has a Desktop starter called "Print Internet Ticket". | ||
|
||
Optionally it will upload the remaining 9 Internet tickets to a Google form for further processing. To enable this feature set the `FRITZBOX_GOOGLE_FORM_ID` and `FRITZBOX_GOOGLE_FORM_ENTRY_ID` variables to suitable values (get the values from a prefilled link to your form. The form should simply contain one text entry field). | ||
|
||
Configuration | ||
------------- | ||
|
||
All configuration parameters are stored in `/etc/fritzbox-internet-ticket.conf` like this: | ||
```bash | ||
FRITZBOX_PASSWORD=mySuperSecretPasswort | ||
FRITZBOX_PRINT_QUEUE=Zebra | ||
FRITZBOX_GOOGLE_FORM_ID=1FAIpQLSfhbfiefhb437ghffsUW-WULIAkPL_J-RtJN_Kiu4Fhjdwshgw | ||
FRITZBOX_GOOGLE_FORM_ENTRY_ID=1598434206 | ||
``` | ||
|
||
Take care to protect this file with file system permissions if you are on a multi user system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters