Average Brew Time – This panel is fairly self-explanatory, but I wanted to see if I could not only figure out how long each individual cup of coffee takes to make, but also on average, how long should I be expecting a cup to take? This type of mathematical function could help me later on to determine numerical outliers in my brew times. It could also help me paint a picture of really how convenient it is for someone like me to just make my own coffee in the morning rather than spend the time driving somewhere.
Yesterday’s Energy Usage – This is a panel that is pretty self-explanatory. What I’ve done is created a single-value visualization to show me how many kilowatt hours (kWh) my coffee maker used yesterday. This will show how much energy it takes me to brew a cup of coffee.
Brew Times – This is every single cup of coffee I’ve made during the time I specified using my time picker.
Brew Statistics – This is a detailed chart of various measures of energy usage over my specified time. I can look at Amps, Volts, Watts, and kWh all side-by-side with one another.
Total Energy Usage by Day – Last but not least, I can look at my energy usage per day. This visualization is very powerful because it shows me how much energy I’m drawing, even on days when I didn’t even make any coffee. Imagine how many other things we’re leaving plugged in in our homes that are drawing energy and providing us no value? An energy minimalist may take that information and start unplugging every appliance in their house. I can honestly say I’m not on that level, but it’s interesting to be able to quantify this.
Where did I get the data?
Retrieving this data was fairly straightforward once I had the correct tools in place. The IoT devices that made it all happen were the TP-Link HS110 and a Rasperry Pi.
– TP-Link HS110
– Raspberry Pi
– Splunk Universal Forwarder for ARM
– TP-Link HS110 Add-on for Splunk
Setting up the ingredients
The TP-Link HS110 comes with it’s own set of setup instructions, so I’m not going to reiterate them here. Suffice it to say that having a TP-Link HS110 on your network though is a very obvious required step for this project. The TP-Link HS110 has two nice features that made the project possible. For starters, it can measure energy usage in real-time. Unfortunately, the TP-Link HS100 does not have that feature, so be careful to choose the right device when you are purchasing. Second, after setting up the TP-Link HS110, this device is directly connected to WiFi in your home. This direct connections makes it completely possible for a Rasperry Pi to query it at any moment.
I have a Raspberry Pi running for all sorts of home automation pieces already, so in order to retrieve the data from my TP-Link HS110, I didn’t have much work to do. If you’ve never setup a Raspberry Pi before, this isn’t the blog for that topic, but there are plenty of tutorials online to get started. One specific nice feature of my Raspberry Pi is that It has a copy of the Splunk Universal Forwarder running on it. So for this project you’ll want to get your Raspberry Pi up and running and the Splunk Universal Forwarder installed. This made retrieving new data just a matter of writing the correct script and having it sent to my Splunk Enterprise installation. If you’re looking for an ARM compatible Splunk Universal Forwarder, it is freely downloadable via the Splunk Universal Forwarder download site.
TP-LINK HS110 ADD-ON FOR SPLUNK
With my Raspberry Pi in place and TP-Link hooked up, the rest was pretty straight forward. I created and installed a technology Add-on (mentioned above).