Skip to content

Widget that displays your dataplan from the Telekom-API

Notifications You must be signed in to change notification settings

iamrbn/Telekom-Progress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telekom Progress Widget

Another Scriptable widget that displays your data plan from the telekom-API on your home & lock screen1

OVERVIEW

FEATURES

Widget Sizes

  • Homescreen
    • Small
    • Medium
  • Lockscreen
    • Inline
    • Circular
    • Recatngular

Light- & Darkmode

Light- & Darkmode is only available fot the homescreen widgets.

Not Connected (WiFi)

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.

Unlimited

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.

Progress Bar

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.

Requirement Indicator

This small indicator in the progress bar shows you your consumption limit. this tells you whether you have reached your requirement or not.

Update Footer

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

Selfupdate Function

The script updates itself2

Configuration

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);

ON THE FIRST RUN

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

Example Content Of The API

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

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

  2. Ground Function is written by the amazing @mvan231

About

Widget that displays your dataplan from the Telekom-API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published