slavkobojanic / Cmonoptus
Programming Languages
Projects that are alternatives of or similar to Cmonoptus
CmonOptus
CmonOptus is a python3 script which runs speed tests every now and again, to see whether the speeds that you're currently getting; are similar to that of what you pay for.
Credit
These users helped me improve this script.
Dependencies
Installation
Part A - Downloading the files
Installing Dependencies
All four dependencies can be installed with Python's package manager, pip.
Option 1 - Installing dependances globally
Once you have pip installed, you can install the four dependencies with:
pip install pyspeedtest tweepy pyyaml
Option 2 - Installing VirtualENV for contained environment
Instead of installing the dependancies globally and potentially breaking other apps, you can install the dependancies in a contained environment. First install virtualenv with:
pip install virtualenv
then set up the virtual environment inside the root repo folder:
virtualenv venv
venv is the name of the folder where all the dependancies will be stored. Now activate venv using the method for your operating system.
Linux/Mac: source venv/bin/activate
Windows: ./venv/Scripts/activate
A requirements file has been created to make installation easier, just type the following to finish installing the dependancies.
pip install -r requirements.txt
You will need to have virtualenv activated whenever you are working, running, or developing on the project. Follow the above instructions again to activate.
When finished, you can deactivate by typing deactivate
.
Installing CmonOptus
Option 1 - Downloading here
Simply press the download button on this page, then proceed to press 'Download as ZIP'.
Option 2 - Downloading through Git
- Firstly, you will need to download Git.
- To do this you need to navigate to the following page: git-scm.com.
- You should then hit the download button which can be found on that page.
- After downloading, install the software as you would any other (just hit next...)
- Navigate to your desired directory in Terminal or Command Prompt and execute the following command -
git clone https://github.com/slavkobojanic/CmonOptus
- If you check the folder that you designated to put it in; you should see a folder called 'CmonOptus'.
Part B - Creating a Twitter App
- Head to the Twitter App Site.
- Hit 'Create New App'.
- Fill in the form displayed (only name, description, and website are needed), and agree to the developer agreement.
- Hit 'Create App'.
- You are now on your app management page, here you can find your app's details.
- Hit the 'Keys and Access Tokens' tab near the top of the page.
- It will display your consumer key and consumer secret.
- To get your access key and access secret, scroll down and hit 'Create my access token'. The page will refresh and display your access codes.
- Keep these close-by because they are important for the next part (consumer key, consumer secret, access key, access secret).
Part C - Setting up the config.yaml file
- In that /CmonOptus/ folder there is a file named 'config.yaml', open up this file in your favorite text editor and alter the values as needed.
-
consumer_key
,consumer_secret
,access_token
, andaccess_token_secret
are on the Twitter App Keys and Tokens page -
check_interval
value should be how often you want the software to run the speed test in seconds (the software randomly generates a time between check_interval0.75 and check_interval1.25, to look more legitimate). -
timeout_interval
value will set a hard limit on how often CmonOptus can tweet. For example, it has a default of no more than once every hour (3600 seconds). -
paid_upload_speed
andpaid_download_speed
should be the internet speed promised in your contract, in Mb/s. -
service_provider
is the twitter handle of your ISP, keep the twitter handle wrapped in quotes. -
location
is the state or province you are testing/located in.
Part D - Running the app.
Option A - Simple
- Simply run the command (this may be different if you choose to rename the file) -
python3 CmonOptus.py
- Monitor the software to make sure it's working properly.
- Voila.
Option B - Advanced
- You can make as many '.yaml' files as you like with different app details, if you have multiple apps.
- Run the command -
python3 CmonOptus.py (filename).yaml
- Monitor the software to make sure it's working properly.
- Voila.