luftpost

Crates.ioluftpost
lib.rsluftpost
version1.0.0
sourcesrc
created_at2017-07-02 20:12:57.688541
updated_at2017-08-30 11:23:02.237891
descriptionWatches luftdaten.info particulates sensors and sends E-Mails if measurements exceed thresholds
homepage
repositoryhttps://github.com/lukaspustina/luftpost
max_upload_size
id21634
size51,518
crates (github:ostreedev:crates)

documentation

README

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.

Future Work

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

  • Maybe support for directly queuering a sensor

Commit count: 94

cargo fmt