I use emoncms to log telemetry readings from various sources (wireless sensor nodes, software bots etc), the so logged data helps my IoT connected gadgets make decisions, based on pre-defined rules. For example, my heat pump monitors outside weather conditions (temperature, humidity, wind, time of day, day of week) and adjusts its operation accordingly. Adding notifications when feed readings match a criteria is quite an useful feature that the “events module” provides – you can setup actions to occur when a feed goes above, below or is equal a set value. Prowl, NMA, Curl, Twitter and Email notifications are supported. I needed to set up threshold values for some of the feeds, for example
- Solar hot water tank temperature exceeding 85 degrees C ( I need to dump the excess hot water before it boils)
- Solar water tank temperature lower than 5 degrees C (I need to start the electric heater to prevent freezing)
- Some of my battery operated wireless nodes stops reporting (needs battery replacement)
- Room temperature exceeds 40 degrees (possible fire)
- Flood sensor reports flood event
- My wireless doorbell is activated
- and so forth
Setting up the events module is easy
sudo apt-get update sudo apt-get install php5-mcrypt php5-curl cd /var/www/emoncms/Modules sudo git clone https://github.com/emoncms/event.git
and then you need to visit “http://YOUREMONCMS/admin/view” to create the database structure required for the module to operate.
If all goes good, a new menu “Extras” appears:
Lets set it up, this is done by visiting the ‘event settings’ hyperlink that appears on the top right corner of events module. It takes you to the this screen:I only need to setup email notifications, since I can do Twitter, Facebook, SMS and so forth notifications from IFTTT, it only requires gmail access.
Here is how setting up the rules looks, this particular rule will send me an email if the solar water tank temperature exceeds 85 degrees C:
There is a ‘mute’ parameter: it specifies how long to keep quiet about this event after initially sending a notification. If you don’t set it, you will get notifications on every feed update. I have set mine to only alert me once every 3 hours on this particular feed.
So basically this is it, quite easy and very practical, “must-have” feature.
Page views: 7861