Display Data examples
This project contains three examples showing how to query data from different services and display it on our custom architecture dashboard.
Services Used
-
FIWARE Orion – Context broker
-
EMQX – MQTT broker
-
PostgreSQL database – Used to store and query data
List of used nodes
-
Inject/Timestamp – Triggers the flow
-
Function – Adds custom JavaScript logic
-
HTTP Request – Sends HTTP requests to external services
-
Debug – Outputs messages to the debug console
-
JSON – Converts data to/from JSON format
-
Change – Updates values within the
msg
object -
Websocket - Manages WebSocket connection
-
PostgreSQL node – Executes SQL queries provided via the
msg.query
property
For details, see Node-RED Documentation |
FLOW: Get EMQX Data
This flow retrieves metrics from the EMQX Nodes API. An authorization header is required to access the data.
For details, see Making HTTP Requests in Node-RED. |
The received data is structured into an object and sent via WebSocket to the front-end hosted by Node-RED.
FLOW: Get Orion Online Status
This flow checks the status of the FIWARE Orion context broker via an API call. A successful call (HTTP 2xx) confirms the service is accessible.
FLOW: Get Postgres Data
This flow performs a query to count tables in a PostgreSQL database.
For details, see Executing PostgreSQL queries in Node-RED. |