Design a Mobile Smart Home App: Bluetooth, Local Network, and Cloud

Smart home apps (Apple Home, Google Home, SmartThings, Hue) sit at an unusual intersection of mobile development, IoT, network protocols, and the messy reality of consumer devices that range from “well-engineered” to “barely works.” The interview tests whether you understand the layers and the standards.

Functional requirements

  • Discover and pair smart-home devices (lights, thermostats, locks, cameras)
  • Control devices on the local network
  • Control devices remotely via cloud
  • Schedule and automate
  • Voice control via Siri / Assistant / Alexa

The protocol stack

2026 is converging on Matter — the universal smart-home standard. Devices speak Matter; apps speak Matter. Multiple ecosystems (Apple Home, Google Home, Amazon, Samsung) interoperate.

Underneath Matter, the transport may be:

  • Wi-Fi: for higher-bandwidth devices (cameras, thermostats)
  • Thread: low-power mesh; ideal for battery-powered devices
  • Bluetooth Low Energy: for setup and proximity-based control

Pairing

Standard flow:

  1. User taps “add device” in the app
  2. App scans QR code on the device packaging — encodes pairing data
  3. BLE handshake establishes initial connection
  4. App provisions Wi-Fi or Thread credentials
  5. Device joins the home network
  6. Device commissions to the app’s controller

This is the Matter “commissioning” flow — designed to work across ecosystems.

Local control

Once on the network, control commands go directly between phone and device — sub-100ms latency. The cloud is not in the loop for “turn off the light.”

Discovery via mDNS (Bonjour). Phone broadcasts “looking for Matter devices”; devices respond with their addresses.

Remote control

When the user is away from home, control routes through cloud:

  • Phone → cloud → home hub → device
  • Hub is typically Apple TV, HomePod, Echo, or Google Nest Hub

Latency is higher (200–800ms) but reliability is good.

Automation

Two patterns:

  • Local: running on the home hub. “Sunset → turn on porch light.” Fast, works without cloud.
  • Cloud: for more complex flows. “If user enters geofence AND time is after 6pm AND no one else is home, turn on lights.”

State management

Each device has a state model: light’s power state, brightness, color. Synced via:

  • Direct query on app open
  • Server-pushed updates (when status changes)
  • Polling fallback for unreliable devices

Voice integration

iOS: HomeKit exposes devices to Siri. Android: Google Home or Alexa Skills. Both have well-defined intent schemas.

Privacy

  • Local control means no cloud sees the data
  • Camera streams stay local where possible (Apple HomeKit Secure Video keeps even cloud streams encrypted with device key)
  • End-to-end encryption for hub-to-cloud-to-app paths

Battery

  • Phone-side: minimal — most devices are not battery-powered
  • Device-side: Thread is designed for years of battery life on coin cells
  • App: don’t poll devices continuously; subscribe to push updates

Frequently Asked Questions

Why did Matter take so long?

Standardizing across competing ecosystems (Apple, Google, Amazon, Samsung) was political and technical. The result is more interoperable than any prior smart-home effort.

Do I need a hub for Matter?

For local-only control, no. For remote access, voice control, and automation, you need a hub. Apple TV, HomePod, Google Nest Hub, and Echo all serve this role.

How does my mobile app discover devices that have no internet?

Bluetooth Low Energy advertisements during commissioning, mDNS once on the network. Both work without internet.

Scroll to Top