Created on 05-24-2016 02:56 AM - edited 08-17-2019 12:17 PM
Recently I decided it was time to give my lawn a makeover. Years of brutally hot Atlanta summers have taken their toll on my grass and its well … dead. I chose the do it yourself route and as usual went over budget and invested far more time than I had planned. None the less I now have a decent looking backyard.
Given my investment and how much I travel I decided it would be worth the extra money to install an automated sprinkler system. There are several of these that exist in the market so I set out doing my research. I chose Rachio (http://rachio.com) for its ability to control watering based on weather and other conditions which is awesome! While Rachio is a great product with several features it had a few shortcomings that I was hoping to supplement with my existing home setup (powered by Apache NiFi of course). The idea was the use all of the existing features that Rachio offered and then use data from my local home automation setup to further supplement the watering system. There were two main features that Rachio didn’t offer that I wanted to add.
After settling on the features that I wanted to my system I set out to solve the technical implementation and landed on the approaches listed below.
Dog (Zeke) Location - This problem was a little tough to solve. I finally landed on installing an iBeacon (Gimbal Series 10) on Zeke’s collar and setting up a custom Raspberry PI BLE scanner that I had made for another project. This is out of the scope of this blog but at a high level the scanner sits at his only entrance/exit to the yard and toggles between him being either inside of outside. This is c++ and python application that uses Linux bluez. An instance of Apache NiFi is also running on this Raspberry PI and forwarding the JSON iBeacon payload to my NiFi master cluster for further analysis.
Outdoor Gatherings - Similar to tracking Zeke with his iBeacon collar I have a separate wireless network in my backyard and uses a MikroTik RouterOS software to monitor for MAC addresses of friends and family’s mobile phones. The logic is if a known MAC address is connected to that network in the backyard then someone is back there and we should delay the sprinklers being turned on. Another instance of Apache NiFi is gathering output from RouterOS and sending that information the the main NiFi instance for further analysis.
To recap I have three instances of Apache NiFi running. Two instances are gathering data from its point of inception and passing that data along to the third instance where the data is analyzed. This instance also sends requests to the Rachio API to turn off the watering system if a dog or human being is detected in the backyard. Lets take a look at the NiFi workflow of the third instance that ultimately controls the water system.
The workflow was created with out of the box features and simple steps to follow. Clearly Apache NiFi is the cadillac of integrating with other awesome 3rd party systems!
Created on 05-24-2016 06:23 AM
Mr.Dyer, your article inspired me!! This is such an inspirational post.I'm a new bee to the hadoop world, and you made my day.May god bless you with more technologies.