SYS-CON MEDIA Authors: Pat Romanski, Gary Arora, Zakia Bouachraoui, Yeshim Deniz, Liz McMillan

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
While a hybrid cloud can ease that transition, designing and deploy that hybrid cloud still offers challenges for organizations concerned about lack of available cloud skillsets within their organization. Managed service providers offer a unique opportunity to fill those gaps and get organizations of all sizes on a hybrid cloud that meets their comfort level, while delivering enhanced benefits for cost, efficiency, agility, mobility, and elasticity.
Isomorphic Software is the global leader in high-end, web-based business applications. We develop, market, and support the SmartClient & Smart GWT HTML5/Ajax platform, combining the productivity and performance of traditional desktop software with the simplicity and reach of the open web. With staff in 10 timezones, Isomorphic provides a global network of services related to our technology, with offerings ranging from turnkey application development to SLA-backed enterprise support. Leadin...
DevOps has long focused on reinventing the SDLC (e.g. with CI/CD, ARA, pipeline automation etc.), while reinvention of IT Ops has lagged. However, new approaches like Site Reliability Engineering, Observability, Containerization, Operations Analytics, and ML/AI are driving a resurgence of IT Ops. In this session our expert panel will focus on how these new ideas are [putting the Ops back in DevOps orbringing modern IT Ops to DevOps].
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...
Enterprises are striving to become digital businesses for differentiated innovation and customer-centricity. Traditionally, they focused on digitizing processes and paper workflow. To be a disruptor and compete against new players, they need to gain insight into business data and innovate at scale. Cloud and cognitive technologies can help them leverage hidden data in SAP/ERP systems to fuel their businesses to accelerate digital transformation success.
Concerns about security, downtime and latency, budgets, and general unfamiliarity with cloud technologies continue to create hesitation for many organizations that truly need to be developing a cloud strategy. Hybrid cloud solutions are helping to elevate those concerns by enabling the combination or orchestration of two or more platforms, including on-premise infrastructure, private clouds and/or third-party, public cloud services. This gives organizations more comfort to begin their digital tr...
Most organizations are awash today in data and IT systems, yet they're still struggling mightily to use these invaluable assets to meet the rising demand for new digital solutions and customer experiences that drive innovation and growth. What's lacking are potent and effective ways to rapidly combine together on-premises IT and the numerous commercial clouds that the average organization has in place today into effective new business solutions.
Keeping an application running at scale can be a daunting task. When do you need to add more capacity? Larger databases? Additional servers? These questions get harder as the complexity of your application grows. Microservice based architectures and cloud-based dynamic infrastructures are technologies that help you keep your application running with high availability, even during times of extreme scaling. But real cloud success, at scale, requires much more than a basic lift-and-shift migrati...
David Friend is the co-founder and CEO of Wasabi, the hot cloud storage company that delivers fast, low-cost, and reliable cloud storage. Prior to Wasabi, David co-founded Carbonite, one of the world's leading cloud backup companies. A successful tech entrepreneur for more than 30 years, David got his start at ARP Instruments, a manufacturer of synthesizers for rock bands, where he worked with leading musicians of the day like Stevie Wonder, Pete Townsend of The Who, and Led Zeppelin. David has ...
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...
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Addteq is a leader in providing business solutions to Enterprise clients. Addteq has been in the business for more than 10 years. Through the use of DevOps automation, Addteq strives on creating innovative solutions to solve business processes. Clients depend on Addteq to modernize the software delivery process by providing Atlassian solutions, create custom add-ons, conduct training, offer hosting, perform DevOps services, and provide overall support services.
Contino is a global technical consultancy that helps highly-regulated enterprises transform faster, modernizing their way of working through DevOps and cloud computing. They focus on building capability and assisting our clients to in-source strategic technology capability so they get to market quickly and build their own innovation engine.
When applications are hosted on servers, they produce immense quantities of logging data. Quality engineers should verify that apps are producing log data that is existent, correct, consumable, and complete. Otherwise, apps in production are not easily monitored, have issues that are difficult to detect, and cannot be corrected quickly. Tom Chavez presents the four steps that quality engineers should include in every test plan for apps that produce log output or other machine data. Learn the ste...
Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...