Zigbee2MQTT dashboard on iPhone and iPad
Updated
Show your Zigbee sensors and control lamps and plugs from a dashboard on your iPhone or iPad. Zigbee2MQTT already publishes every device to your MQTT broker, and Routix Dash connects to that broker directly. No extra software is needed.
You need a running Zigbee2MQTT and the address of the MQTT broker it uses.
Zigbee2MQTT topics in short
Each device publishes its state as JSON to zigbee2mqtt/ followed by its friendly name. The examples use a sensor named Bedroom sensor and a lamp named Desk lamp.
| Topic | What it carries |
|---|---|
zigbee2mqtt/Bedroom sensor |
Readings, for example {"temperature": 21.4, "humidity": 48, "battery": 97} |
zigbee2mqtt/Desk lamp |
State, for example {"state": "ON", "brightness": 180} |
zigbee2mqtt/Desk lamp/set |
A command, for example {"state": "OFF"} |
1. Connect Routix Dash to the broker
Open the menu → MQTT connections → Add MQTT connection. Enter a Name, the broker's Host and Port, and the user name and password if it needs them. Tap Test, then the save tick.
2. Show a sensor
Create a data source: menu → Data sources → Add data source. Set Data source type to MQTT, choose the connection, and set Topic filters (subscribe) to zigbee2mqtt/Bedroom sensor. Save.
On a data section, tap Add data piece manually and pick Design your own data piece. Set the new source as the root data source.
Add one Label per reading. On each Label, turn Inherited off and add a Simple expression transformer under Data transformers pipe:
- Temperature:
value?.temperature - Humidity:
value?.humidity - Battery:
value?.battery
For a gauge, add a Dial gauge and set Default value to {{ value.temperature }}.
3. Switch a lamp
Create a second MQTT data source for zigbee2mqtt/Desk lamp. In a new data piece that uses it, add a Toggle:
- Default value —
{{ value.state }} - On value —
ON - Off value —
OFF
Under Events → On tap, a new Toggle already has Apply value. It flips 1 and 0, so tap it and change Value to {{ value == "ON" ? "OFF" : "ON" }}: the toggle then flips between ON and OFF.
Then tap Add... below it, choose MQTT send, pick the connection and set:
- the topic to
zigbee2mqtt/Desk lamp/set - Payload to
{"state": "{{ value }}"}
Save. The toggle switches the lamp, and it follows the lamp when you switch it somewhere else.
4. Dim it
Add a Slider to the same data piece:
- Default value —
{{ value.brightness }} - Minimum —
0, Maximum —254, Step —1
Under Events → On changed, add MQTT send with the same topic and the Payload {"brightness": {{ value }}}. The lamp changes when you let go of the handle.
Tips
- A device shows nothing until its next report. Battery sensors report only now and then. To see the last state right after the app connects, turn on Retain for that device in Zigbee2MQTT.
- A different base topic. If you changed the base topic in Zigbee2MQTT, use it in place of
zigbee2mqtt. - All devices at once. Subscribe to
zigbee2mqtt/+and readctx.transport.topicto tell the devices apart. - Low battery warning. An Alarm banner shows only while there is something to report. Give it a transformer that returns a message when
value?.batteryis low and an empty text otherwise.