In our earlier post, How to Run the ThingsBoard Mobile App on Android (Self-Hosted Server), we walked through connecting the ThingsBoard Mobile App to your own server.
Now, let’s build a responsive mobile dashboard for devices using the temp-humidity
profile. This dashboard will automatically display in the ThingsBoard Mobile App when users tap a device.
Prerequisites
You’ll need:
- ThingsBoard Community Edition (CE)
- A device profile named
temp-humidity
- Devices publishing telemetry:
temperature
,humidity
- Tenant administrator access
- ThingsBoard Mobile App
- Create the Dashboard
- Go to Dashboards
- Click “+” → Create new dashboard
- Name it: temp-humidity
- Click Add, then open the dashboard
- Add Entity Alias
- Click Aliases (top toolbar)
- Click “Add alias”
- Set:
Field | Value |
---|---|
Alias name | Selected Device |
Filter type | Entity from dashboard state |
Entity type | Device |
- Click Save.
This allows the dashboard to display telemetry for the device selected in the mobile app.
- Add Widgets
Temperature Value Card
- Click Add widget → Cards → Value Card
- Datasource
Field | Value |
---|---|
Entity alias | Selected Device |
Data key | temperature (Time series) |
- Appearance
Field | Value |
---|---|
Label | Temperature |
Value | °C |
Decimals | 0 |
Icon | Thermometer |
Humidity Value Card
- Datasource
Field | Value |
---|---|
Entity alias | Selected Device |
Data key | humidity (Time series) |
Appearance
Field | Value |
---|---|
Label | Humidity |
Value | % |
Decimals | 0 |
Icon | water-percent |
- Assign the Dashboard to a Device Profile
- Go to Device profiles
- Click on the
temp-humidity
profile - Go to the Details tab
- Under Mobile dashboard, choose
temp-humidity
- Save
- User Access Requirements
The mobile dashboard will only work if the user has:
Requirement | Description |
---|---|
Device Access | The device must be assigned to the user (directly or via customer) |
Dashboard Access | The dashboard must be assigned to the user or their customer |
- Test in the Mobile App
- Log in with the correct user
- Tap a
temp-humidity
device - Verify the dashboard shows:
- Real-time temperature and humidity
- Proper mobile layout
Done! You now have a mobile dashboard for IoT devices.
