Skip to main content

A module helping you find out when internet and power outages happen.

Project description

# Outage Detector Simple module meant to notify user if a power outage has occured or if the internet has been down.

## What it does

At every run it writes to a text file timestamps for power and internet, whether the last run was scheduled or at boot and the last calculated periodicity.

If the script was run after a boot up, it will assume there was a power outage (the system is meant to run 24/7, for example a Raspberry Pi Zero) and send a notification, approximating the power outage duration through the last known timestamp and calculated periodicity of the runs.

Internet downtime is detected if the 2 timestamps written to the file differ and the downtime is approximated again through the calculated periodicity. It is possible that an internet downtime is missed if the script is run too rarely.

## How to run it

Install the module in a virtual environment with pip:

` pip install Outage-Detector `

Alternatively, you can also install the module by cloning this git repo and running setup.py

` git clone https://github.com/fabytm/Outage-Detector.git python setup.py install `

Afterwards, all you need to do is to run the outage_detector command line interface for the initialization process:

` outage_detector --init `

From here you can choose the way you want to be notified and will be prompted to enter either your e-mail information or PushBullet API key.

Additionally, it will also ask you if you want to set up scheduling for this module. Choosing to do so is recommended for inexperienced users (this will create 2 cron jobs, one running at boot time and one every 5 minutes, to check in on internet status and record timestamp if either the internet connection drops or a power outage happens).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Outage Detector-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Outage_Detector-1.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file Outage Detector-1.0.0.tar.gz.

File metadata

  • Download URL: Outage Detector-1.0.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.6

File hashes

Hashes for Outage Detector-1.0.0.tar.gz
Algorithm Hash digest
SHA256 881b2c6581129aad92edbb6a784c5ce3919d03c145082244c961907bce61b7c4
MD5 2e592ed0085162c428332c5fe49fde4f
BLAKE2b-256 9f7cac184e5716b08a6c2fd78b9d9bb1600b0ef133535ede741fbd70bc710128

See more details on using hashes here.

File details

Details for the file Outage_Detector-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: Outage_Detector-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.6

File hashes

Hashes for Outage_Detector-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc6ff59547c4e03062a74ffde5090ecc8f30cd8046e63b61b5196e6f1df3664c
MD5 d083315c3ad41309384f6f3508fbc9ef
BLAKE2b-256 23faded8ec28372f60e916897a6afb8fcf855369356115e6f0e4396e747a2790

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page