Push to Edge
Use this node on a cloud instance to selectively push data to one or more ThingsBoard Edge instances — for example, distributing firmware configuration updates only to edges that need them, or synchronising alarms to the relevant edge for local processing.
Configuration
Section titled “Configuration”- Attributes scope — required. Default attribute scope for attribute-related messages (
SERVER_SCOPE,CLIENT_SCOPE, orSHARED_SCOPE). Can be overridden per message by including ascopekey in the message metadata.
Supported message types
Section titled “Supported message types”| Message type | Message type |
|---|---|
POST_TELEMETRY_REQUEST | ALARM |
POST_ATTRIBUTES_REQUEST | ALARM_ACK |
ATTRIBUTES_UPDATED | ALARM_CLEAR |
ATTRIBUTES_DELETED | CONNECT_EVENT |
TIMESERIES_UPDATED | DISCONNECT_EVENT |
TO_SERVER_RPC_REQUEST | ACTIVITY_EVENT / INACTIVITY_EVENT |
Message processing algorithm
Section titled “Message processing algorithm”- Verify that the message type is supported. If not, route via
Failure. - Build an edge event from the message.
- If the originator is an
EDGEentity: push the event to that specific edge. - If the originator is another entity type: find all edges the entity is assigned to and push the event to each. If the entity is not assigned to any edge, acknowledge the message and finish without further action.
- Route via
Success.
Output connections
Section titled “Output connections”| Connection | Condition |
|---|---|
Success | Edge event(s) written to persistent storage. Outgoing message is unchanged. |
Failure | Unsupported message type or unexpected error. |
Examples
Section titled “Examples”Example 1 — Push device telemetry to assigned edges
Section titled “Example 1 — Push device telemetry to assigned edges”Originator: DEVICE assigned to two Edge instances | Type: POST_TELEMETRY_REQUEST.
{ "temperature": 22.5, "humidity": 65.3}{ "scope": "SERVER_SCOPE"}Result: edge events queued for both assigned edges; they will retrieve and process the telemetry. Routes via Success.
JSON schema
Section titled “JSON schema”{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "TbMsgPushToEdgeNodeConfiguration", "type": "object", "required": ["scope"], "additionalProperties": false, "properties": { "scope": { "type": "string", "enum": ["SERVER_SCOPE", "CLIENT_SCOPE", "SHARED_SCOPE"], "description": "Default attribute scope for attribute-related messages." } }}