Skip to content

sarthakgupta072/vaccine_sms_notifier

Repository files navigation

Vaccine SMS Notifier

License

Your personal vaccine slots tracker

Description

A platform independent application which sends an sms to your phone when vaccination slots are available for a particular pincode within the next 30 days. It checks for slots every 5 minutes. If a slot is available it will send you an SMS at that instant itself. If a slot is not available, it will not send an SMS.

Prerequisites

  1. Docker installation (Any version should work) - (Recommended)Installation for Mac, Installation for Windows, Installation for Ubuntu(Recommeded)

  2. A Twilio account - Open a free account(credit card not required). Create a trial phone number. When you go to the console menu, you'll see an interface like this:

twillio_config

You would need these details later...

Note: Twilio offers a free account with a limit of around 100 messages. Can be more or less. Use the above link to get $10 dollar extra credit if you upgrade.

Usage

Please do the below given steps very carefully...

  1. Clone the repository using
$ git clone https://github.com/sarthakgupta072/vaccine_sms_notifier.git
  1. Go to config folder under the main vaccine_sms_notifier folder.
Via Terminal
$ cd vaccine_sms_notifier/config
  1. Update the values in the file by referring the Twillio console info as shown above. The PHONE field will contain Twillio Phone number and not your personal phone number. Save the file. (This is a sensitive file, please donot share with anyone). You can use any text editor to do this.
Via Terminal
$ nano sms_config.py
  1. Open the app_config.py and update your pincode, age and phone_number. Enter the phone number without +91 prefix. Save this file and go to the vaccine_sms_notifier folder again. You can use any text editor to do this.
Via Terminal
$ nano app_config.py
  1. Build the docker image
$ docker build  -t <PINCODE> .

Eg: docker build -t 180012 .

  1. Run this command to start the application in the container
$ docker run -d --env PYTHONPATH=/usr/local/bin/python3 <PINCODE>

Eg: $ docker run -d --env PYTHONPATH=/usr/local/bin/python3 180012

The application will start running. You can check if the application container is running by doing docker ps. And you'll see a new container there. Also you can open the docker desktop application and see your info there.

If slots are available, you'll get a message as shown below(format subjected to change based on feedback) sms

How to test if my application is working or not?

For testing purpose, change your age to anything > 45 years and select a pincode for which slots are available for 45+ ages. Then follow the steps from Step 5. After your application is running, you should receive a message every 5 mins. Wait for 5 mins to receive the first msg. Close the terminal after confirmation.

What to do if I accidently closed my terminal session?

Follow the instructions from Step 6 again.

OR

See the stopped container by doing $ docker ps -a. Copy the container ID of the stopped contained and start the container using docker start <CONTAINER_ID>

What to do if I don't want these SMS alerts any more?

After you book a vaccine session successfully or you don't want these sms on you phone. Stop the container by closing the terminal window.

What to do if I want SMS Alerts for multiple pincode?

You can build an image(Step 5) with different pincodes, and run the application/container for each of those pincodes.

Caution: Please check if container is running by doing docker ps everytime you close the lid of your laptop. This problem will not come if you have deployed this application somewhere

Contributing

Feel free to open an issue or a PR to address an issue.

Versioning

The project is still in BETA state. Changes ca be made regulary based on feedback.

License

This project is covered by the Apache License 2.0 also shipped with this repository.

Releases

No releases published

Packages

No packages published