GithubHelp home page GithubHelp logo

myt-usage-checker's Introduction

No longer working due to Mauritius Telecom website change.

my.t Usage Checker

A script that retrieves the remaining monthly volume allowance from the my.t (Mauritius Telecom) portal and sends a notification.

Requirements

You need Python 3.9 or later.

In Ubuntu, Mint and Debian you can install Python 3 like this:

$ sudo apt-get install python3 python3-pip

For other Linux flavors, macOS and Windows, packages are available at

http://www.python.org/getit/

How To Use

  1. Clone or download this repository to your computer

  2. Edit the config.ini file (refer to the configuration section below).

  3. Navigate to the folder and install the requirementspython3 -m pip install -r requirements.txt

  4. Run the script python3 mytusage.py

  5. You can run the script on a schedule using cron, Windows Task Scheduler, or any other scheduler that supports python scripts.

Configuration

The config.ini file is used to configure the script. The following values should be set:

USERNAME and PASSWORD: These are the same credentials that you use to log in to internetaccount.myt.mu. If you don't know your login details, contact the Mauritius Telecom Hotline

THRESHOLD: The default value of 0 will send all notifications. Setting a value here will send you a notification only if your remaining data is below a certain amount. For example, a value of 100 will notify you if you have 99 GB left, but will not send a notification if you have 200 GB left.

TIME: The time format. The only valid values are 12h or 24h

SYNTAX: The Apprise syntax which will determine the type of notification you will receive. You can leave this blank if you only need command line output.

Apprise Syntax:

Refer to the Apprise documentation for detailed examples. Over 40 different services are supported.

Examples:

mailto://{userid}:{password}@gmail.com will send the notification by email.

pbul://{accesstoken} will send a Pushbullet notification

windows:// will send the notification to the Windows Notification Centre (pypwin32 required).

Home Assistant Component

If you are a Home Asssistant user, I have also created a component that will save the value as a sensor, which can then be displayed in your UI: my.t Usage (Home Assistant)

Credits

myt-usage-checker's People

Contributors

sjdvda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

devansh-ramen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.