6 releases (1 stable)
Uses old Rust 2015
1.0.0 | Aug 30, 2017 |
---|---|
0.0.5 | Aug 29, 2017 |
0.0.4 | Jul 3, 2017 |
#686 in Hardware support
52 downloads per month
50KB
1K
SLoC
luftpost
Watches luftdaten.info particulates sensors and sends E-Mails if measurements exceed thresholds.
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
Dependencies
~29MB
~506K SLoC