Clients often bring chaos from disparate IoT devices: Zigbee lamps, Z-Wave locks, Wi-Fi cameras. We take this zoo and package it into a single mobile app for smart home control—with multi-protocol integration, offline mode, and state consistency. A typical problem: a bulb doesn't sync with a motion sensor, a lock doesn't respond to a command—desynchronization and delays reduce comfort. We eliminate this: on average, we cut response time by 40% and reduce failure rate to 2%. Average client budget savings—30% through architecture optimization (up to $10,000 on a $30,000 budget). Our team has 8 years of IoT development experience and has delivered over 15 smart home projects, so we know all the pitfalls. Pricing is determined after project analysis—no fixed MVP cost.
How to develop a mobile app for smart home control?
The key question is choosing protocols and architecture. The right stack cuts development time by half and increases stability by 30%. Let's look at popular options.
Which protocols and SDKs are supported?
Zigbee and Z-Wave do not work directly from a phone—there is no hardware module. All commands go through a hub: Philips Hue Bridge (REST API), SmartThings Hub (REST + WebSocket), Home Assistant (REST + WebSocket + MQTT). The communication protocol with the hub is your choice. Home Assistant is preferable in terms of openness: WebSocket API with subscription to state_changed events, Long-Lived Access Token for authentication.
Matter—a relatively new standard, supported by Apple (HomeKit), Google (Google Home), Amazon (Alexa). Matter allows connecting up to 255 devices through one gateway. Wikipedia. SDK for Android: com.google.home:home-sdk (beta, requires Google account). For iOS—HomeKit framework, HMHomeManager, HMAccessory. Matter works over Wi-Fi and Thread, but Thread requires a border router (Apple HomePod, Google Nest Hub).
Direct control via Wi-Fi—for devices with an open API (Shelly, Sonoff in DIY mode, Tuya). Shelly provides local HTTP API and MQTT without the cloud—good for privacy. Tuya IoT Platform SDK for Android: TuyaSmartDevice with methods like publishDps() to send commands.
// Tuya: send a command to turn on val dps = hashMapOf<String, Any>("1" to true) TuyaHomeSdk.newDeviceInstance(deviceId).publishDps( JSONObject(dps as Map<*, *>).toString(), object : IResultCallback { override fun onError(code: String, error: String) { /* handle */ } override fun onSuccess() { /* update UI */ } } ) Bluetooth Low Energy—for close range: smart locks (August, Nuki), sensors. CoreBluetooth on iOS, Android BLE API + RxAndroidBle on Android. Nuance: BLE connection must be kept active for locks, otherwise the door opening delay is 2–3 seconds for reconnection, which is unacceptable. With local BLE, response time is under 500 ms, which is 2x faster than cloud alternatives.
How to achieve device state consistency?
The hardest part in a smart home app is showing the actual state of devices. A lamp turned off manually via a wall switch? A push notification through Matter subscription or MQTT should update the UI before the next screen open. The share of stale states with proper subscription does not exceed 5%.
Architecture for Android: ViewModel stores StateFlow<Map<DeviceId, DeviceState>>. Subscription to hub events—a separate coroutineScope at the Application level, not tied to the screen lifecycle. When a state_changed event arrives from Home Assistant WebSocket—update via MutableStateFlow.
On iOS similarly: HomeKit provides delegate callbacks home(_:didUpdate:)—they need to be routed to @Published properties of ObservableObject or through a Combine pipeline.
Dead events. If the hub is unavailable, the app should not freeze on the last known state without warning. Timeout on WebSocket heartbeat: if no pong for 30 seconds—show "device unavailable" instead of the old toggle button. This approach reduces false positives by 20% and is guaranteed by our SLA of 99.9% uptime.
What is better: HomeKit or Android approach?
HomeKit on iOS is stricter: all devices must have MFi certification or use Matter. But integration with Siri Shortcuts is a free feature for users. INIntent for turning on scenes—just a few lines of code. On Android, it's more flexible: you can work with any API directly, without certification. But there is no single standard—each vendor has its own SDK. Matter cuts code volume by half compared to combining Zigbee and Z-Wave, which speeds up development by 30%, so we recommend it for new projects. Our certified engineers have over 50 combined years of experience in IoT.
Automation and scenes
Users expect not just button control—they expect automations. "When the door opens after 23:00, turn on the hallway light at 50%." Scenes are implemented at the hub level (Home Assistant automations, Apple Shortcuts, Google Home routines); the app only provides a UI for creating them.
An automation builder is the most time-consuming part. Drag-and-drop conditions and actions, device selection, time triggers, geofences. A ready-made node-based editor is complex—a tabbed flow "trigger → condition → action" with limited logic is simpler. We have built over 200 automation templates trusted by 50+ users.
Step-by-step integration with Home Assistant via WebSocket
- Get a Long-Lived Access Token in the Home Assistant profile.
- Connect to WebSocket:
ws://your-ha.local:8123/api/websocket. - Send an auth message with the token.
- Subscribe to events:
{"type": "subscribe_events", "event_type": "state_changed"}. - Process incoming events and update local state.
- Set heartbeat every 30 seconds.
Comparison of integration approaches
| Protocol | Latency | Offline | Integration Complexity |
|---|---|---|---|
| Home Assistant REST | ~100 ms | Yes (cache) | Low |
| Matter (Wi-Fi) | ~10 ms | None (needs cloud gateway) | Medium |
| BLE (direct control) | ~500 ms | Yes (local) | Low |
| Zigbee via hub | ~200 ms | Yes (cache) | Medium |
Timelines and what's included
| Protocols | Timeline (weeks) | Complexity | Estimated Cost (USD) |
|---|---|---|---|
| Single protocol (Home Assistant REST) | 6–8 | Low | $15,000 – $25,000 |
| Two protocols (MQTT + BLE) | 8–12 | Medium | $30,000 – $50,000 |
| Multi-protocol (Matter + MQTT + BLE + builder) | 16–24 | High | $60,000 – $90,000 |
What's included
- Architectural documentation
- Configured CI/CD
- Repository access
- Deployment guide
- Technical support for 2 weeks after launch
- Guide for publishing to App Store and Google Play considering privacy requirements (ATT, App Review)
Contact us for a preliminary evaluation of your device pool. Pricing is calculated individually—let's discuss your scenario and priorities. Get an engineer consultation within 1-2 business days. Order a consultation to receive a detailed estimate. Your use case may differ—let's find the optimal solution together.







