Another Scriptable widget that displays your data plan from the telekom-API on your home & lock screen1
- Homescreen
- Small
- Medium
- Lockscreen
- Inline
- Circular
- Recatngular
Light- & Darkmode is only available fot the homescreen widgets.
All widgets have an indicator that shows your connection that was present during the last run.
Internet or Cellular. This means how fresh your datas are.
The Wifi symbol means, your datas are from the last run in cellular network.
This Cellular symbol means your datas are fresh and live from the API.
Its also reduces the widget opacity if you connected via WiFi.
If you have booked an 24h unlimited dataplan, this will also be displayed in the widget.
A timer is also displayed showing your remaining time.
The Rectangular-Lockscreen and the Homescreen widget shows a prograss bar which displays your current consumption.
The Circular-Lockscreen widget shows it as a Circular Progress.
On the left it shows your used Datavolume and on the rigt it shows what is remaining.
This small indicator in the progress bar shows you your consumption limit. this tells you whether you have reached your requirement or not.
The widget footer shows three timestamps.
1st: Last update in the API
2nd: Last run of the widget with Wifi or Cellular
3th: Next Update in the API
The script updates itself2
Set your widget parameter
const refreshInt = 60 //in minutes
const widgetURL = 'https://pass.telekom.de'
const remainingText = "Remaining for " //de: verbleibend für ; en: remaining for ;
const usedOf = 'of X used' //de: von X verbraucht; en: of X used;
const replacer = ['.', ','] // replaces point with coma or vice versa (e.g. 2.5 => 2,5);
It downloads following files from the github repo and saves it in the "Telekom Progress" directory.
iCloud Drive/
├─ Scriptable/
│ ├─ Telekom Progress/
│ │ ├─ telekomModule.js
│ │ ├─ Telekom.png
│ │ ├─ telekomDataPlan.json
{
"passName": "Your Telekom data plan",
"usedVolumeStr": "3.95 GB",
"hasOffers": true,
"remainingSeconds": 1426444,
"remainingTimeStr": "16 days 12 hours",
"usedAt": 1718358344000,
"validityPeriod": 2,
"usedPercentage": 40,
"title": "",
"initialVolume": 10737418240,
"initialVolumeStr": "10 GB",
"passType": 103,
"nextUpdate": 10800,
"subscriptions": [
"speedon",
"roamLikeHome",
"tns"
],
"usedVolume": 4241800089,
"passStage": 1,
"sessionState": 0
}
Footnotes
-
Over the years I have used many different scriptable-telekom-widgets. At some point I started to build my own and used parts from the other widgets. So if you find parts of your code in mine, contact me and I will add you to my credits. ↩
-
Ground Function is written by the amazing @mvan231 ↩