Zigbee Device Integration via IoT Hub in Mobile App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Zigbee Device Integration via IoT Hub in Mobile App
Complex
~3-5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Zigbee Device Integration via IoT Hub into Mobile App

Zigbee — wireless protocol at 2.4 GHz (IEEE 802.15.4) with mesh topology. Devices relay signal through each other, giving good coverage without Wi-Fi. No direct Zigbee API in mobile apps — smartphones lack Zigbee radio. Always need a hub.

Hub Variants and Their APIs

Zigbee2MQTT — open-source bridge: Zigbee USB coordinator (SONOFF Zigbee 3.0, Conbee II, CC2652P) → MQTT broker. Most flexible for custom apps. Each device publishes state to topic zigbee2mqtt/{friendly_name}, accepts commands from zigbee2mqtt/{friendly_name}/set.

Motion sensor JSON state example (Aqara):

{
  "battery": 85,
  "occupancy": true,
  "tamper": false,
  "voltage": 2985,
  "linkquality": 102
}

Zigbee2MQTT also provides REST API via zigbee2mqtt/bridge/request/device/options for configuration management — useful for app-based setup.

Home Assistant — if Zigbee2MQTT runs as HA addon, mobile app works via HA REST API or WebSocket API. Unified interface for all devices regardless of protocol. POST /api/services/light/turn_on with entity_id — instead of direct MQTT.

Philips Hue Bridge — supports only Philips Hue Zigbee devices. Closed ecosystem, but excellent REST API.

IKEA Hub — supports TRÅDFRI devices. Proprietary protocol over CoAP. Integration via reverse-engineering or Home Assistant.

Amazon Echo (4th gen) / SmartThings Hub / Aqara Hub — have built-in Zigbee coordinator. Each has different API.

Zigbee2MQTT as Mobile App Foundation

For custom mobile app Zigbee2MQTT is best choice. MQTT protocol simple, Zigbee2MQTT docs excellent, supports 3000+ devices.

Connect mobile client to MQTT broker (Mosquitto) via WebSocket (ws://broker-ip:9001). On Flutter — mqtt_client:

final client = MqttServerClient.withPort('192.168.1.100', 'mobile_app_client', 9001);
client.websocketProtocols = MqttClientConstants.protocolsSingleDefault;
await client.connect();
client.subscribe('zigbee2mqtt/+', MqttQos.atLeastOnce);
client.updates!.listen((messages) {
  final topic = messages[0].topic;
  final payload = MqttPublishPayload.bytesToStringAsString(
    messages[0].payload.message
  );
  // parse JSON, update UI
});

Device command:

final builder = MqttClientPayloadBuilder();
builder.addString('{"state": "ON", "brightness": 200}');
client.publishMessage('zigbee2mqtt/living_room_light/set', MqttQos.atLeastOnce, builder.payload!);

Pairing New Devices from App

Zigbee2MQTT supports pairing mode via MQTT: zigbee2mqtt/bridge/request/permit_join with {"value": true, "time": 60} — 60 second window for new devices.

Mobile app starts pairing mode with button. Subscribes to zigbee2mqtt/bridge/event — on new device arrival: {"type": "device_joined", "data": {"friendly_name": "0x...", "ieee_address": "0x..."}}. Show user found device, offer naming and room assignment.

Rename: zigbee2mqtt/bridge/request/device/rename with {"from": "0x12345678", "to": "bedroom_sensor"}.

Device Network and Routing

Zigbee network self-organizes: routers (always-powered outlets, bulbs) relay signal for end devices (battery sensors). For diagnostics — zigbee2mqtt/bridge/request/networkmap with {"type": "raw", "routes": true}.

Visualize network in app: node and edge graph. On Flutter — graphview package or custom CustomPainter rendering. Nodes: coordinator, routers (green), end devices (gray). Edges: thickness proportional to LQI (Link Quality Indicator, 0–255).

Common Problems

Device dropout. Sensor stopped publishing. Zigbee2MQTT sets last_seen timestamp — check in app, warn if delay > N minutes. Usually battery depleted or device out of range.

Wi-Fi interference. Zigbee and Wi-Fi on 2.4 GHz. Wi-Fi channels 1, 6, 11 overlap with Zigbee channels 11–26. If unstable — check channel selection in Zigbee2MQTT (configuration.yaml, channel: 25).

Coordinator won't start. SONOFF Zigbee 3.0 USB Dongle Plus on some Linux requires explicit port in /dev/ttyUSB0 and user in dialout group. Docker — devices: ["/dev/ttyUSB0:/dev/ttyUSB0"].

Timeline

Zigbee2MQTT + MQTT client in app, basic device control — 2–3 weeks. Pairing from app, network visualization, diagnostics, automation — 5–8 weeks. Cost depends on device type count and additional features.