Home, SafeHome: Smart Home Reliability with Visibility and Atomicity

Shegufta Bakht Ahsan, Rui Yang, Shadi A. Noghabi, Indranil Gupta

Introduction

Modern smart homes rely on complex "routines"—sequences of commands like "turn off the lights, lock the door, and close the garage"—to automate daily life. However, as device counts grow, these systems often fail to provide basic reliability guarantees. Current platforms operate on a "best-effort" basis, leading to atomicity failures (partial routine execution) and isolation issues (conflicting routines). SafeHome is a management system designed to bring database-like reliability to the smart home by introducing formal visibility models and concurrency controls.

The Reliability Gap in Smart Homes

Current smart home ecosystems suffer from three primary issues:

  1. Lack of Atomicity: Interrupted routines leave the home in unintended partial states.
  2. Lack of Isolation: Concurrent routines can clash, leading to hardware damage or security risks.
  3. Device Unreliability: IoT devices frequently crash, and systems lack formal methods to handle these failures during active routines.

SafeHome Architecture and Methods

SafeHome acts as an edge-based controller that implements several novel mechanisms to ensure consistency without sacrificing responsiveness.

Visibility Models

The core of SafeHome is a spectrum of visibility models that balance safety and performance. Unlike databases, smart home actions are physically visible to users. SafeHome defines:

  • Global Strict Visibility (GSV): Executes routines sequentially. It is perfectly safe but suffers from high latency.
  • Partitioned Strict Visibility (PSV): Allows parallel execution of routines that do not share devices.
  • Eventual Visibility (EV): The most relaxed model. It allows routines to overlap even on shared devices, guaranteeing that the final state is correct while permitting "temporary incongruence" for speed.
Comparison of visibility models (GSV, PSV, EV) showing how Eventual Visibility (EV) allows for temporary incongruence to improve performance.

Virtual Locking and Leasing

To manage concurrency on unmodified IoT devices, SafeHome uses "virtual locks" on the edge hub. It introduces Pre-Leasing and Post-Leasing, which allow routines to temporarily yield control of a device during idle periods (e.g., while a sprinkler is running), preventing system-wide bottlenecks.

Failure Serialization

SafeHome treats device failures and restarts as events that must be serialized within the routine order. This allows the system to logically determine if a routine should be aborted or if a failure occurred after its critical commands were completed.

Detailed comparison of visibility models across various execution and failure scenarios.

Evaluation and Key Results

The authors evaluated SafeHome using real-world traces from three smart homes, an analysis of 182 public IoT applications, and three synthetic benchmarks (Morning, Party, and Factory scenarios).

  • Performance vs. Safety: The EV model proved to be the "sweet spot." It is only 0% to 23.1% slower than current "Weak Visibility" (best-effort) systems but eliminates all final-state errors.
  • Latency Improvements: Compared to the sequential GSV model, EV improved median latency by 16x in high-concurrency scenarios.
  • Leasing Efficacy: Lock leasing improved system latency by 3x to 5.5x, highlighting its importance for long-running routines.
  • Resilience: Under failure conditions, the EV model required the fewest rollbacks, minimizing disruption to the user.

Conclusion and Future Work

SafeHome demonstrates that database-inspired consistency can be effectively applied to the smart home. By leveraging the Eventual Visibility model, the system provides strong final-state guarantees with minimal performance overhead. Future work includes addressing Byzantine failures (malicious or malfunctioning devices), integrating complex triggers (IFTTT), and expanding the system to handle physical safety verification.

Summary updated

BibTeX
@inproceedings{ahsan2021home,
  author = {Shegufta Bakht Ahsan and Rui Yang and Shadi A. Noghabi and Indranil Gupta},
  title = {{Home, SafeHome: Smart Home Reliability with Visibility and Atomicity}},
  booktitle = {EuroSys},
  year = {2021},
  doi = {10.1145/3447786.3456261},
}
Figure