Today We're Talking About "Smart" Lightbulbs
As Part 2 of the Internet of Things Series, I present the LIFX Add-on for Splunk. If you haven’t heard of LIFX before or “Smart” Lightbulbs in general, these are great IoT devices for a number of reasons. Oh, and if you're interested in checking out Part 1, here you go -- IoT Series Part 1: Flower Power Add-on for Splunk.
There are a lot of “Smart” lightbulbs on the market these days including LIFX, Philips Hue, and many more. LIFX bulbs aren’t the only bulbs that use WiFi for connectivity. They aren’t necessarily the cheapest bulb on the market either. They did however meet a very unique set of criteria that I was looking for. I selected them because they had a very clean app, they can be integrated with both Nest and Amazon Alexa, they are directly connected to Wi-Fi, and they fall into a mid-range price range. The reasons these criteria were so important to me were simple.
For starters, when thinking of “cool” IoT devices, a smart lightbulb is exactly the type of thing you think of. This device is online, it’s fun, and you can directly interact with it using other IoT devices or an App. The connectivity piece is what makes IoT such a powerful area of technology. I didn’t know exactly why or how these bulbs would end up being useful in my own home, but I liked the idea anyway. Since I knew I had Nest devices and I knew I had an Amazon Alexa, making sure that the device I was purchasing was going to offer integration for those two other sets of devices was crucial so that I could explore the usefulness of this type of technology.
So, We Know They're Cool... But What's the Benefit?
One of the next biggest benefits of LIFX for me was that there weren’t any hubs in between them and the internet. Each bulb is connected via WiFi meaning they are online and sending and receiving data constantly. Some other IoT devices don’t report data that frequently. They need to synchronize via a technology like Bluetooth or only “check-in” every so often. This is true of lightbulbs, or even the Flower Power Add-on I brought up a couple weeks ago.
Another common setup is devices that use a “hub”. The hub can come packaged with a device or sometimes they’re even sold separately. This changes the true cost of a bulb, but I think my biggest annoyance with this was the addition of one more piece of technology that I had to worry about in my home. What if that hub failed or stopped working? How easy would it be to set up? A lot of additional questions started to surface, but I felt like keeping it simple.
Let's Take a Look at Couple Examples
So what types of information does LIFX report? As a couple examples we have the following searches that answer questions like “Are my lights on?” “Are they off?” Etc.
Chart points in time where the Lightbulb was not connected to wifi. This could indicate a bulb had no physical power (meaning a physical light switch was off). For me, this became very useful when I installed my lightbulb with my garage’s motion sensor outlet. I immediately had a very low-tech security system.
index=lifx | eval wifi = case(seconds_since_seen<1, "1", 1=1, "0") |timechart max(wifi) by label span=10m
Chart or times that the bulb was set to be powered on from the LIFX app. For users who use the LIFX App, versus a light switch, this would simply mean that the bulb was powered off in the app, rather than physically powered off.
index=lifx | eval power=case(power=="on", "1", power=="off", "0") |timechart max(power) by label span=10m
The next logical step from pulling data, would be pushing data to the bulbs. It’s one thing to be able to read the state of the lights in your house, but with a tool like Splunk there are so many other options. Take for example Splunk alerting. These are the default options for alerts. They include things like sending e-mails, webhooks, or logging an event. But imagine if we could turn on a lightbulb and change it’s color?
In my next segment I’ll talk about an app I created that was able to use Splunk searches and data from the Flower Power App to utilize my LIFX bulbs as an alert mechanism. This type of integration of devices is exactly what makes IoT and Splunk so powerful.