13 december 2019
From the category: Apparatuses

Data credit lamp 2

This lamp indicates the status of the data credit of my T-Mobile home internet connection.

Technologies used: Greasemonkey, JavaScript, webscraping, ESP8266 (with Arduino program), HTML5 audio, PHP, Python. That's all that's required!

Red=Topping up is possible
Blinking red=Topping is required
Blue=Almost time to top up my credits
Green=Enough credits

It works because a Greasemonkey script monitors the T-Mobile website (which holds the credit) and then controls a local web server. The web server is built into the lamp (with a D1 mini).

The Greasemonkey script also triggers a locally running PHP web server that controls a Python script to top up the credit automatically. This automatic works because the Python script controls a mobile phone (via Android ADB) on which the T-Mobile app runs. Sometimes the T-Mobile app is offline (meat heads) and then the automatic part does not work, so I need the lamp as an indicator to top up the credit manually (on their website, outside of the app) if necessary.

Download

Greasemonkey script
Lamp webserver (D1 mini)
Lamp (OpenScad)
PHP script
Python script
 

Comment

Name:

Comment:

 
(C) 2019 marcelv
 
Should a website to which I refer fail, I always have a backup.