Skip to main content

This little script (daemon) will poll for the status of all window sensors known to a MAX Cube system and check for open windows

Project description

This little script (daemon) will poll for the status of all window sensors known to a MAX Cube system (http://www.eq-3.de) and check for open windows.

It will then check the temperature at the location of your house using Open Weather Map (http://openweathermap.org), and if the temperature is bellow a specified threshold it will send a notification using a notifier plugin.

Today the only available notifier plugin is using the Pushover service (https://pushover.net) to send notifications e.g. to mobile phones.

It has been created to safe energy by reminding you to close your windows after ventilation.

Installation

Max Open Window Notifier can be installed using PIP

sudo pip install maxwindownotify

Usage

You can use the CLI help function to get the details on how to start the daemon, and what options are available:

$ maxwindownotify --help
usage: maxwindownotify.py [-h] [-i INTERVAL] [-n NETWORK] [-c CITY]
                          [-t THRESHOLD] -k OWMAPPID [-s] [-u USER] [-p TOKEN]
                          [-v]

This deamon polls the MAX Cube for all window status. If a window is open
longer than twice the poll interval a notification will be sent using the
notifier plugin

optional arguments:
  -h, --help            show this help message and exit
  -i INTERVAL, --interval INTERVAL
                        polling interval in minutes (default 30 minutes)
  -n NETWORK, --network NETWORK
                        Network Address to send search broadcast for MAX Cube
                        (default 192.168.178.0/24)
  -c CITY, --city CITY  the city name or code in OpenWeatherMap to retrieve
                        the outside temperature from (default Munich, Germany)
  -t THRESHOLD, --threshold THRESHOLD
                        the temperature threshold for suppressing
                        notifications (default: 12C)
  -k OWMAPPID, --owmappid OWMAPPID
                        the API Key (APPID) to authenticate with Open Weather
                        Map
  -s, --simulation      randomly simulate open windows
  -u USER, --user USER  the username (or user key) used for the notifier
                        module
  -p TOKEN, --token TOKEN
                        the password (or app token) used for the notifier
                        module
  -v, --verbose         increase output verbosity

As an alternative to the commandline, params can be placed in a file, one per
line, and specified on the commandline like 'maxwindownotify.py @params.conf'.

Example:

maxwindownotify -k 82k4v1b99s41212e5bf5490432bb89f4 -u abcCKnM9uYhjng3kLV6czGFUsmZ76D -p ahxYZcjhXT6P5zDt265LGyuLVaDQNx -i 15 -c Berlin -t 8

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

maxwindownotify-1.0.tar.gz (10.0 kB view details)

Uploaded Source

File details

Details for the file maxwindownotify-1.0.tar.gz.

File metadata

File hashes

Hashes for maxwindownotify-1.0.tar.gz
Algorithm Hash digest
SHA256 f9024f15e1666461099e9915c0094f71b9b14d3310ebc87cad1014c3913d3722
MD5 d525c3c688a66f6f52dacaff342961d2
BLAKE2b-256 8ecfc1271bc018f7da07a7f5421f83562e3078d92d25eef9aaec22a2627018a8

See more details on using hashes here.

Supported by

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