Skip to content

Watches luftdaten.info particulates sensors and sends E-Mails if measurements exceed thresholds

License

Notifications You must be signed in to change notification settings

lukaspustina/luftpost

Repository files navigation

luftpost

Watches luftdaten.info particulates sensors and sends E-Mails if measurements exceed thresholds.

Linux & OS X Build Status Windows Build status GitHub release Ansible Role MIT licensed

luftdaten.info offers a very easy do-it-yourself instruction on how to build an inexpensive yet powerful particulates sensor together with a fully functional firmware. This firmware regularly measures the particulates concentration and transmits the resulting data to luftdaten.info where it is processed and displayed on a world map. Even though most sensors are deployed in Germany you can find sensors all over the world.

luftpost is a simple program that monitors luftdaten.info sensors and notifies you via E-Mail in case a particulates concentration measurement exceeds a thresholds. The E-Mail is nicely formatted and may contain the very same graphs that luftdaten.info offers -- see below for an example. The notification can be triggered to be send on every measurement, only when a measurement exceeds a threshold, or on changes only, i.e., once after exceeding a threshold and then after returning back below a threshold -- see the Configuration section for details.

There are binaries for Linux, Raspberry Pi, and Windows as well as Debian packages for and a Homebrew recipe. Furthermore, there is an Ansible role for easy installation on Linux and Raspberry Pi -- see the Installation section for details.

Table of Contents

Configuration

Please see this example for a full description of all available configuration parameters. This example shows the minimal configuration required to run luftpost.

luftpost uses the Handlebars templating language provided through handlebars-rust. Please mind that handlebars-rust has a few limitations compared to the original JavaScript Handlebars implementation. Please check the respective documentation if you want to develop your own templates.

Installation

Ubuntu [x86_64 and Raspberry Pi]

Please add my PackageCloud open source repository and install luftpost via apt.

curl -s https://packagecloud.io/install/repositories/lukaspustina/opensource/script.deb.sh | sudo bash
sudo apt-get install luftpost

Linux Binaries [x86_64 and Raspberry Pi]

There are binaries available at the GitHub release page. The binaries get compiled on Ubuntu.

Windows Binaries [x86_64 and i686]

There are binaries available at the GitHub release page.

macOS

Please use Homebrew to install luftpost on your system.

brew install lukaspustina/os/luftpost

Sources

Please install Rust via rustup and then run

cargo install luftpost

Ansible

There is also an Ansible role available at Ansible Galaxy that automates the installation of luftpost.

Postcardware

You're free to use luftpost. If you find it useful, I would highly appreciate you sending me a postcard from your hometown mentioning how you use luftpost. My work address is

Lukas Pustina
CenterDevice GmbH
Rheinwerkallee 3
53227 Bonn
Germany

Future Work

  • Move sending E-Mails to futures once lettre 0.7 is released

  • Maybe support for directly queuering a sensor