This is a multi-layered configuration issue common in sapiot-24. Here’s the comprehensive solution:
Dashboard Configuration:
The dashboard needs to be explicitly linked to MQTT data sources with proper topic mapping:
{
"dashboard_id": "industrial_monitoring_001",
"data_sources": [
{
"source_id": "device_telemetry_stream",
"topic_pattern": "sensors/+/telemetry",
"refresh_interval_seconds": 30
}
]
}
Update this via Dashboard Settings → Data Sources → Edit Configuration.
MQTT Topic Permissions:
The critical issue: data source permissions in sapiot-24 require explicit wildcard authorization. Update your data source:
PUT /viz/v1/data-sources/device_telemetry_stream
{
"allow_topic_wildcards": true,
"topic_patterns": ["sensors/+/telemetry"],
"authorized_roles": ["admin", "analyst", "operator"],
"data_retention_hours": 168
}
Data Source Permissions:
Verify role-based access at the data source level:
GET /viz/v1/data-sources/device_telemetry_stream/permissions
Should return:
{
"role_permissions": [
{"role": "admin", "access": "read_write"},
{"role": "analyst", "access": "read"}
],
"wildcard_enabled": true
}
Implementation steps:
- Enable wildcard support on your data source (this is disabled by default in sapiot-24)
- Add your MQTT topic pattern to the data source’s authorized patterns list
- Refresh dashboard topic subscriptions after updating data source config
- Clear the dashboard cache: Dashboard Settings → Advanced → Clear Cache
- Verify data flow using diagnostics API: GET /viz/v1/diagnostics/data-source/device_telemetry_stream/message-count
The access_denied error occurs because sapiot-24 treats wildcard topic subscriptions as a security-sensitive feature. Even with admin role access, wildcards must be explicitly enabled at the data source level. This prevents accidental exposure of device data through overly broad topic patterns.
After enabling wildcard support and refreshing the dashboard, your widgets should populate within 30-60 seconds (one refresh interval). If data still doesn’t appear, check the MQTT topic mapping in the device configuration - the devices must be publishing to topics that exactly match your pattern (sensors/device_id/telemetry, not sensors/device_id/data or similar variations).
For your 320 sensors, I also recommend creating a device group filter in the dashboard to avoid performance issues when rendering all devices simultaneously. Use widget-level filtering to show subsets of devices per dashboard page.