SYS-CON MEDIA Authors: Liz McMillan, Carmen Gonzalez, Zakia Bouachraoui, Roger Strukhoff, David Linthicum

Blog Feed Post

Greg Frank’s Smart Home Experiment: How one engineer/dad protected his home from flood, fire, and incomplete homework assignments.

Greg Frank is a VictorOps engineer on the plat-frastructure team. An iOT aficionado, Greg built a smart home system using SmartThings and VictorOps.

Over the years, I’ve had the misfortune of experiencing some small water leaks at my house. These were minor events: a leaky ice maker and a water valve for a sink. But among my friends and relatives, I have seen and assisted with cleanup for more severe water leaks that involved great expense and effort.

Configuring a smart home

My instinct as a developer is to attempt to find patterns of problems and connect them with general, proactive solutions that address the broadest category possible. This thinking process sent me down the path of evaluating smart home solutions and using automation to reduce the problems and stress of owning a home.

Throughout this search for a solution, my instinct toward DIY was tempered by a need to have something useful and reliable without inventing my way into constant troubleshooting and upgrades.

Looking at the various commercial options available, I was cautious of any choice that would limit an ability to integrate with the already existing large selection of sensors and actuators sold for smart homes. Of course, I also wanted the option to build some devices myself. SmartThings won me over with their large and growing selection of integrated devices and especially their (now discontinued) Arduino ThingShield with a zigBee module able to attach to a standard Arduino microcontroller.

Looking beyond the physical devices to the cloud platform, SmartThings also offers an extensively documented API with a web-based IDE for developing both new device handlers and “SmartApps.” I could not find another off-the-shelf solution for smart home hubs catering to my software developer need to tinker with everything.

Over the next year, our home system grew to include water sensors under every reasonable potential leak source, a smoke/CO alarm on each floor, some controlled outlets, a few controlled wall switches, and an automated master water valve for the whole house.

How the system works

Getting back to the original scenario of water leaks, these components all fit together very nicely. The SmartThings water sensor detects even a tiny amount of water and sends an event to the hub. From there, a SmartApp called “If Flood Turn Valve Off” receives the event and sends a “turn off” command to the main water valve and then sends me a text message. This configuration will help defend against scenarios where the source of the water is from the house plumbing, while still providing useful notification if the leak is originating from outside.

Our house already has the typical collection of required smoke/CO detectors, but there did not seem to be a convenient bridge to send data from that system into a smart home hub. So it seemed helpful to add one more alarm to each level of the home, giving the system some reasonable visibility into the state of the house.

When it comes to home security, there are so many systems and options, it would take a whole series of posts to cover that subject. Here is one specific use case to demonstrate the nuance of how a smart home can provide features above and beyond an ordinary alarm system.

Garage door closed?

Consider the scenario of driving away from your garage while the door is still on the way down and wondering if it hit some obstacle and proceeded to bounce back up. A tilt sensor on the door is commonly used to detect the up/down/currently moving state of a garage door. Couple that sensor with a SmartApp to detect “door is up,” followed by a bunch of motion ending with “door is up,” and it can send an alert for that specific situation. The added logic filters out alerts for everyday life and focuses alerts on truly noteworthy events.

tilt sensorhttps://victorops.com/wp-content/uploads/2017/06/garage_sensor-300x293.jpg 300w" sizes="(max-width: 250px) 100vw, 250px" />

Attic fan turned off?

We try to use the least amount of AC possible and depend on a whole-house fan to cool down the house on summer evenings. Unfortunately, it seems to bring a lot of pollen into the house if it runs past 2:00 am, causing allergies and sneezes for all family members. This started my hunt for a timer that could run something for three hours or turn off at 2:00 am, whichever comes first. Not long into that search, it became obvious that a Z-Wave wall switch coupled with a simple SmartApp would solve the problem quite easily. This gives the best combination of results with simple manual control from an ordinary switch on the wall and automatic shutoff timing from a background application keeping an eye on the switch.

Z-Wave wall switchhttps://victorops.com/wp-content/uploads/2017/06/ge_zwave_switch-172x300... 172w" sizes="(max-width: 315px) 100vw, 315px" />

Z-Wave wall switch

As our smart home system exited the proof-of-concept phase and became a regular, vital tool for home convenience and security, there were some clear limitations of the notification system.

Most smart home products offer a variety of contact methods such as phone calls, SMS, and email. This is very helpful, but just one contact attempt is not enough for truly severe situations.

Adding Incident Management to the system

It was right about this time when I started working for VictorOps, and for the first time in my career, the product I developed at work was something truly useful to me in my own home. The features needed to dial-in a perfect smart home notification solution turned out to be exactly what an incident management system offers.

Much of my professional life has involved receiving automated pages and emails related to the health of software systems under my care. Sadly, I had never experienced the reduction of stress possible when this happens within the context of a feature-rich incident management system. VictorOps truly offers an array of configuration choices and convenience settings to make everyday life so much more tolerable, while still keeping me connected.

The first step is to create a team for the users who will manage the incidents within the house. Here we have the Opsalot family with neighbor and relative:

Next, the single most helpful concept applicable to our smart home is an escalation policy.

Using the original example of a water leak, the ideal response is to make a few attempts to contact a member of the household, and then try reaching a next door neighbor, before calling an out-of-state relative. If you are going to have a system with automatic notifications, it is only fair to share the burden of being the first point of contact with a rotation:

Integrating with VictorOps

The first step was to write a SmartThings SmartApp to register for device events from a variety of devices (temperature sensors, battery states, water sensors) and forward them as alerts to VictorOps via our REST Integration API.

Smart Home Diagramhttps://victorops.com/wp-content/uploads/2017/06/Screen-Shot-2017-06-20-... 300w, https://victorops.com/wp-content/uploads/2017/06/Screen-Shot-2017-06-20-... 510w" sizes="(max-width: 600px) 100vw, 600px" />

The unique name of each device within a SmartThings hub is a natural fit for translation into a VictorOps EntityId.

Next, a value from the SmartThings device event had to be translated into Critical/Warning/Recovery states. For something like a battery level, you might use thresholds such as:

  • <= 10% is Critical
  • <= 30% is Warning
  • > 30% is Recovery

These thresholds can be defined as user-adjustable configuration values in a SmartApp to allow customization via the SmartThings mobile app.

Other devices such as water sensors or smoke alarms have natural distinct states easily translated into alert levels without thresholds. “On fire” or “water detected” are definitely always critical.

Recovery events on a VictorOps timeline are only desired when an EntityId is transitioning away from a Critical or Warning state to a healthy state. So, I used the SmartThings state feature to store the current state of each device and only transmit Recovery events to VictorOps at appropriate times.

SmartThings VictorOps Integration SmartApp Source

Integration sourcehttps://victorops.com/wp-content/uploads/2017/06/victorops_smartapp_scre... 300w, https://victorops.com/wp-content/uploads/2017/06/victorops_smartapp_scre... 768w, https://victorops.com/wp-content/uploads/2017/06/victorops_smartapp_scre... 1024w, https://victorops.com/wp-content/uploads/2017/06/victorops_smartapp_scre... 510w" sizes="(max-width: 600px) 100vw, 600px" />

A day in the life of the Smart Home with VictorOps

Let’s imagine the whole system working together in a realistic situation. We’ve all had a busy morning, and I start a load of laundry on the way out of the house before dropping the kids at school and heading to work. 45 minutes after we leave, the washer begins the spin cycle and the vibrations shake the 15-year-old water hose one last time, causing it to burst and spray a flood all over room. The water sensor on the floor detects water and sends a notification through the SmartThings App, indicating it is wet.

The “if-flood-turn-off-valve” SmartApp receives the water-detection event and sends a “close-valve” command to the LeakSmart valve installed on the main house water line. That action automatically stops the flood, but there is still a large amount of water on the floor. Meanwhile, the VictorOps SmartApp Integration has also received the water notification and forwarded it as a critical alert.

VictorOps incident management apphttps://victorops.com/wp-content/uploads/2017/06/victorops_incident_wate... 174w, https://victorops.com/wp-content/uploads/2017/06/victorops_incident_wate... 768w, https://victorops.com/wp-content/uploads/2017/06/victorops_incident_wate... 593w, https://victorops.com/wp-content/uploads/2017/06/victorops_incident_wate... 348w, https://victorops.com/wp-content/uploads/2017/06/victorops_incident_wate... 510w" sizes="(max-width: 300px) 100vw, 300px" />

The critical alert is routed to the family team within the family VictorOps organization and generates an incident.

Step One
Step One of the escalation policy is to send a push notification to me. Unfortunately, I’m in a long meeting with no technology and so I don’t receive the alert.

Step Two
After a couple of minutes, the water on the laundry room floor starts to drip down to the basement and spills into a ceiling light which shorts out and begins to send sparks. Meanwhile, five minutes after the first notification, the VictorOps escalation policy advances to Step Two (fortunately!) and alerts another family member.

That person is also unavailable to respond. At this point, the electrical short has a real risk of starting a fire.

Step Three
After two more minutes without an acknowledgement, Step Three of the VictorOps escalation policy kicks in, with the action of making a phone call to our next door neighbor.  Fortunately, the neighbors are home, head over to see smoke, and call the fire department.

How far can we take this?

Without annoying the whole family to the point where they leave me forever, just how far can we go down this path?

Do we need to connect the “late homework assignment” email from my kids’ school district to VictorOps, triggering an incident with its own escalation path?

Late homework policy

  1. 1) Page the child in question.
  2. 2) After a day, shut off the power and network to the Xbox.
  3. 3) After two days, notify a parent to intervene (interrupting our otherwise blissful life of leisure).

Switching to sanitation engineering, does the kitchen garbage can need a laser and optical sensor to detect when it is full, and assign an alert (to anyone but a parent) to take out the garbage?

Regardless of how far and silly this smart home concept goes, it’s clear that there are some good, practical, and fun applications for this technology.

So if you want to try this at home, head to Lowe’s for some sensors, hook up SmartThings, and sign up for a free trial of VictorOps. Let software solve your problems.                 </div>
      
                                  <p class=Read the original blog entry...

More Stories By VictorOps Blog

VictorOps is making on-call suck less with the only collaborative alert management platform on the market.

With easy on-call scheduling management, a real-time incident timeline that gives you contextual relevance around your alerts and powerful reporting features that make post-mortems more effective, VictorOps helps your IT/DevOps team solve problems faster.

Latest Stories
The platform combines the strengths of Singtel's extensive, intelligent network capabilities with Microsoft's cloud expertise to create a unique solution that sets new standards for IoT applications," said Mr Diomedes Kastanis, Head of IoT at Singtel. "Our solution provides speed, transparency and flexibility, paving the way for a more pervasive use of IoT to accelerate enterprises' digitalisation efforts. AI-powered intelligent connectivity over Microsoft Azure will be the fastest connected pat...
There are many examples of disruption in consumer space – Uber disrupting the cab industry, Airbnb disrupting the hospitality industry and so on; but have you wondered who is disrupting support and operations? AISERA helps make businesses and customers successful by offering consumer-like user experience for support and operations. We have built the world’s first AI-driven IT / HR / Cloud / Customer Support and Operations solution.
ScaleMP is presenting at CloudEXPO 2019, held June 24-26 in Santa Clara, and we’d love to see you there. At the conference, we’ll demonstrate how ScaleMP is solving one of the most vexing challenges for cloud — memory cost and limit of scale — and how our innovative vSMP MemoryONE solution provides affordable larger server memory for the private and public cloud. Please visit us at Booth No. 519 to connect with our experts and learn more about vSMP MemoryONE and how it is already serving some of...
Darktrace is the world's leading AI company for cyber security. Created by mathematicians from the University of Cambridge, Darktrace's Enterprise Immune System is the first non-consumer application of machine learning to work at scale, across all network types, from physical, virtualized, and cloud, through to IoT and industrial control systems. Installed as a self-configuring cyber defense platform, Darktrace continuously learns what is ‘normal' for all devices and users, updating its understa...
Codete accelerates their clients growth through technological expertise and experience. Codite team works with organizations to meet the challenges that digitalization presents. Their clients include digital start-ups as well as established enterprises in the IT industry. To stay competitive in a highly innovative IT industry, strong R&D departments and bold spin-off initiatives is a must. Codete Data Science and Software Architects teams help corporate clients to stay up to date with the mod...
As you know, enterprise IT conversation over the past year have often centered upon the open-source Kubernetes container orchestration system. In fact, Kubernetes has emerged as the key technology -- and even primary platform -- of cloud migrations for a wide variety of organizations. Kubernetes is critical to forward-looking enterprises that continue to push their IT infrastructures toward maximum functionality, scalability, and flexibility. As they do so, IT professionals are also embr...
Platform9, the leader in SaaS-managed hybrid cloud, has announced it will present five sessions at four upcoming industry conferences in June: BCS in London, DevOpsCon in Berlin, HPE Discover and Cloud Computing Expo 2019.
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
When you're operating multiple services in production, building out forensics tools such as monitoring and observability becomes essential. Unfortunately, it is a real challenge balancing priorities between building new features and tools to help pinpoint root causes. Linkerd provides many of the tools you need to tame the chaos of operating microservices in a cloud native world. Because Linkerd is a transparent proxy that runs alongside your application, there are no code changes required. I...
In his general session at 21st Cloud Expo, Greg Dumas, Calligo’s Vice President and G.M. of US operations, discussed the new Global Data Protection Regulation and how Calligo can help business stay compliant in digitally globalized world. Greg Dumas is Calligo's Vice President and G.M. of US operations. Calligo is an established service provider that provides an innovative platform for trusted cloud solutions. Calligo’s customers are typically most concerned about GDPR compliance, application p...
Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the bene...
"NetApp's vision is how we help organizations manage data - delivering the right data in the right place, in the right time, to the people who need it, and doing it agnostic to what the platform is," explained Josh Atwell, Developer Advocate for NetApp, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Druva is the global leader in Cloud Data Protection and Management, delivering the industry's first data management-as-a-service solution that aggregates data from endpoints, servers and cloud applications and leverages the public cloud to offer a single pane of glass to enable data protection, governance and intelligence-dramatically increasing the availability and visibility of business critical information, while reducing the risk, cost and complexity of managing and protecting it. Druva's...
Kubernetes as a Container Platform is becoming a de facto for every enterprise. In my interactions with enterprises adopting container platform, I come across common questions: - How does application security work on this platform? What all do I need to secure? - How do I implement security in pipelines? - What about vulnerabilities discovered at a later point in time? - What are newer technologies like Istio Service Mesh bring to table?In this session, I will be addressing these commonly asked ...
BMC has unmatched experience in IT management, supporting 92 of the Forbes Global 100, and earning recognition as an ITSM Gartner Magic Quadrant Leader for five years running. Our solutions offer speed, agility, and efficiency to tackle business challenges in the areas of service management, automation, operations, and the mainframe.