Building a Bluetooth Mesh Smart Home
Practical mesh deployment for lighting and sensors
Mesh for Smart Home
Bluetooth Mesh has become the dominant wireless protocol for mains-powered smart lighting and growing numbers of smart home sensors. Its native interoperability with BLE-capable phones (via proxy), standardized Mesh Models, and compatibility with Thread/Wi-Fi." data-category="Protocols & Profiles">Matter through the Thread bridge make it the most future-proof choice for building automation.
Lighting Control
The Generic OnOff, Generic Level, and Light Lightness models are the building blocks of mesh lighting:
| Model | Opcode | Typical Use |
|---|---|---|
| Generic OnOff | Set / Set Unacknowledged |
Binary switch control |
| Generic Level | Level Set |
Dimmer (−32768 to 32767) |
| Light Lightness Actual | Lightness Set |
Luminance (0–65535) |
| Light CTL (Color Temperature) | CTL Set |
Warm/cool white mixing |
| Light HSL | HSL Set |
Full color RGB |
A typical deployment has wall switches as Generic OnOff Client elements, and light bulbs as Generic OnOff Server + Light Lightness Server elements. Transition Time and Delay fields allow bulbs to fade smoothly over a defined duration with a configurable start delay — enabling chase effects without application-layer orchestration.
Sensor Models
The Sensor model (0x1100/0x1101) standardizes how sensor data is published to the mesh. Each sensor element publishes a Sensor Status message containing one or more Property ID / Value pairs drawn from the ATT">GATT Bluetooth Characteristic namespace.
Common property IDs in building automation:
| Property ID | Name | Typical Range |
|---|---|---|
| 0x004F | Present Ambient Temperature | −64 to 63.5 °C |
| 0x004D | Present Illuminance | 0–167772 lux |
| 0x002B | Motion Sensed | 0–100% |
| 0x0068 | Relative Runtime in a Correlated Colour Temp. Range | Hours |
Sensor publishing intervals are configured via the Sensor Cadence state, which supports minimum/maximum publish intervals and a delta threshold — the sensor publishes immediately when the value changes by more than the threshold, reducing network traffic during stable conditions.
Provisioning Workflow
Adding a smart home device follows a standard flow:
- Factory reset the device (restores unprovisioned state, UUID hardcoded in firmware)
- Open provisioning app (phone becomes Provisioner via GATT proxy to mesh)
- Scan: App discovers the device's Unprovisioned Device Beacon
- Authenticate: Static OOB (scan QR on box) or Output OOB (device flashes N times)
- Configure: App assigns address, network key, app key; binds models; sets pub/sub addresses
Production tip: Use a commissioning tool that exports the mesh configuration database (JSON per the Bluetooth Mesh Provisioning Data Model). If the provisioner device is lost, the configuration can be restored.
Low-Power Node Design
Battery-powered sensors (motion detectors, door/window contacts, temperature loggers) should operate as Low-Power Nodes paired with a nearby Friend Node.
A Friend Node (always-on, mains-powered — typically the nearest smart bulb or hub) queues incoming messages for the LPN while it sleeps. When the LPN wakes, it polls the Friend with a Friend Poll message; the Friend replies with queued messages (or Friend Update if the queue is empty).
LPN power budget example (coin cell CR2032, 220 mAh):
| Activity | Current | Duty Cycle | Avg µA |
|---|---|---|---|
| Sleep | 2 µA | 99.7% | 2.0 µA |
| Friend Poll (every 5 s) | 8 mA | 0.3% | 24 µA |
| Publish sensor data | 8 mA | 0.05% | 4 µA |
| Total | — | — | ~30 µA |
Estimated life: 220 mAh / 30 µA ≈ 7,300 hours ≈ 10 months.
Matter Integration
Matter (formerly CHIP) defines an application-layer interoperability standard for smart home devices. Matter over Thread uses 802.15.4 radio; Matter over Wi-Fi uses IP networking. Neither uses BLE for data transport — BLE is used only for Matter commissioning (onboarding a device to the Matter fabric).
For existing Bluetooth Mesh deployments, a Bluetooth Mesh–to–Matter Bridge (typically a hub running both stacks) exposes mesh nodes as virtual Matter endpoints. The Bluetooth Mesh Foundation Model's publication/subscription data is translated into Matter cluster attributes. This bridge approach is ratified in Matter 1.3's Bridge specification.
Interoperability checklist:
- [ ] Flash the device with a Matter-certified firmware (or use a certified bridge hub)
- [ ] Ensure mesh provisioner exports full configuration DB for bridge sync
- [ ] Test both mesh-native and Matter control paths for latency regression
자주 묻는 질문
Yes, our guides range from beginner introductions to advanced topics. Each guide indicates its difficulty level and prerequisites so you can find the right starting point.