← API Reference Home
RainMakerNG Bridge MQTT API 1.0.0

MQTT API definitions for the Bridge add-on of the ESP RainMaker Neo platform.

A bridge is a RainMaker node that fronts one or more non-IP child devices (Zigbee, Matter-bridge, etc.). Children are represented as their own AWS IoT Things named <parent>--<suffix>; the bridge publishes and subscribes on their behalf. This spec documents the MQTT surface that is specific to the bridge feature:

  • the bridge-only control-plane channel for child-Thing lifecycle (addChild / removeChild) and its bridgeAck reply;
  • the rewritten bridge-namespace channels that let a bridge cover all of its children with a single wildcard subscription (IoT Rules A / B);
  • how a bridge rides the core node topics (shadow / timeseries / notification / config) on behalf of its children.

The bridge is a fully optional add-on: core (MQTT_Node.yaml) documents the canonical node topics with no bridge references. This spec depends one-way on those core definitions and references them by name where payloads are shared. Section references (§) point at bridge.md in this same directory.

Servers

  • mqtt://{iot-endpoint}-ats.iot.{region}.amazonaws.com/mqttproduction

    AWS IoT Core endpoint (region-specific, TLS mutual auth)

    Security:
    • X509:

      X.509 certificate-based mutual TLS authentication with AWS IoT Core. A bridge authenticates with its own certificate; the bridge IoT policy grants the child-scoped --* publish substitutions described in bridge.md §3.5.

Operations

  • SEND rainmaker/bridges/{parentNodeId}/to_cloud

    [Bridge → Cloud] Dedicated control-plane channel for child-Thing lifecycle (addChild, removeChild). See bridge.md §3.4 and §4.

    Routed by bridge_to_cloud_rule which gates with WHERE clientid() = topic(3), so a bridge can only publish on its own control plane. Basic-ingest variant $aws/rules/bridge_to_cloud_rule/rainmaker/bridges/{parentNodeId}/to_cloud is also accepted.

    Replies are published by the cloud Lambda back on the bridge's own fromCloud channel (rainmaker/nodes/{parentNodeId}/from_cloud) as a bridgeAck event.

    Bridge publishes child-lifecycle control events (addChild / removeChild)

    Dedicated control-plane channel for child-Thing lifecycle. See bridge.md §3.4 / §4. Replies arrive on the bridge's own fromCloud channel as a bridgeAck event (subscribeBridgeAck).

    Operation IDpublishBridgeToCloud

    Available only on servers:

    object
    parentNodeId
    required
    string

    Bridge thing name (the parent in a <parent>--<suffix> child relationship). Bridge thing names are guaranteed by registration not to contain --. See bridge.md §3.1.

      Examples values:
    • "bridge-hub-001"

    Accepts the following message:

    bridgeControl

    Bridge-only child-Thing lifecycle control event

    Message IDbridgeControl

    Bridges publish child-lifecycle requests on rainmaker/bridges/{parentNodeId}/to_cloud. The cloud Lambda dispatches on the event array (one or more of addChild, removeChild) and replies as a bridgeAck event on the bridge's own fromCloud channel (rainmaker/nodes/{parentNodeId}/from_cloud).

    Authorization is enforced by bridge_to_cloud_rule's WHERE clause (clientid() = topic(3)); a bridge can only publish on its own control plane. See bridge.md §3.4 / §4.

    object

    Examples

  • RECEIVE rainmaker/nodes/{parentNodeId}/from_cloud

    [Cloud → Bridge] The bridge's own core fromCloud channel. In addition to the standard cloud responses (see MQTT_Node.yaml fromCloudMessage), this is where the bridgeAck reply to an addChild / removeChild request arrives. See bridge.md §4.1.

    Bridge receives the bridgeAck reply to addChild / removeChild

    The cloud Lambda replies to a control-plane request as a bridgeAck event on the bridge's own fromCloud topic (rainmaker/nodes/{parentNodeId}/from_cloud) — the same core channel a node uses for cloud responses. See bridge.md §4.1.

    Operation IDsubscribeBridgeAck

    Available only on servers:

    object
    parentNodeId
    required
    string

    Bridge thing name (the parent in a <parent>--<suffix> child relationship). Bridge thing names are guaranteed by registration not to contain --. See bridge.md §3.1.

      Examples values:
    • "bridge-hub-001"

    Accepts the following message:

    bridgeAck

    Response to an addChild / removeChild request

    Message IDbridgeAck

    Response to an addChild or removeChild request published on the bridge control-plane channel (bridgeToCloud). Arrives on the bridge's own fromCloud (rainmaker/nodes/{parentNodeId}/from_cloud) as a bridgeAck event, alongside the standard core fromCloud events. See bridge.md §4.1. Errors use codes from §4.2 / §4.3 (e.g. invalid_suffix, bridge_not_associated, child_suffix_in_use, child_not_owned).

    object

    Examples

  • RECEIVE rainmaker/bridges/{parentNodeId}/children/{childNodeId}/from_cloud

    [Cloud → Bridge] A child's from_cloud traffic, rewritten by AWS IoT Rule A onto the bridge namespace so the bridge can pick up every child's cloud→device messages with one wildcard subscription: rainmaker/bridges/{self}/children/+/from_cloud. See bridge.md §3.3 / §3.4.

    Payload shape is identical to the core fromCloud channel (fromCloudMessage in MQTT_Node.yaml) — Rule A is a pure-SQL Republish, no payload transform.

    Bridge receives a child's cloud→device traffic (rewritten by Rule A)

    IoT Rule A rewrites every publish to rainmaker/nodes/{child}/from_cloud onto the bridge namespace so a single wildcard subscription on the bridge covers all of its children. Payload shape is identical to the core fromCloud channel (fromCloudMessage in MQTT_Node.yaml).

    Operation IDsubscribeBridgeChildFromCloud

    Available only on servers:

    object
    parentNodeId
    required
    string

    Bridge thing name (the parent in a <parent>--<suffix> child relationship). Bridge thing names are guaranteed by registration not to contain --. See bridge.md §3.1.

      Examples values:
    • "bridge-hub-001"
    childNodeId
    required
    string

    Bridged child thing name, of the form <parent>--<suffix>. <suffix> matches ^[a-zA-Z0-9_]{1,32}$ (no hyphens). See bridge.md §3.2.

      Examples values:
    • "bridge-hub-001--child_A"

    Accepts the following message:

  • RECEIVE rainmaker/bridges/{parentNodeId}/children/{childNodeId}/user/{groupInfoStr}/params

    [Cloud → Bridge] A child's unicast parameter-control traffic, rewritten by AWS IoT Rule B onto the bridge namespace. Bridge picks every child's commands up with one wildcard subscription: rainmaker/bridges/{self}/children/+/user/+/params. See bridge.md §3.3 / §3.4.

    Payload shape is identical to the core userParams channel (paramControlMessage in MQTT_Node.yaml) — Rule B is a pure-SQL Republish, no payload transform.

    Bridge receives a child's unicast parameter control (rewritten by Rule B)

    IoT Rule B rewrites every publish to rainmaker/nodes/{child}/user/{groupInfoStr}/params onto the bridge namespace. Payload shape is identical to the core userParams channel (paramControlMessage in MQTT_Node.yaml).

    Operation IDsubscribeBridgeChildUserParams

    Available only on servers:

    object
    parentNodeId
    required
    string

    Bridge thing name (the parent in a <parent>--<suffix> child relationship). Bridge thing names are guaranteed by registration not to contain --. See bridge.md §3.1.

      Examples values:
    • "bridge-hub-001"
    childNodeId
    required
    string

    Bridged child thing name, of the form <parent>--<suffix>. <suffix> matches ^[a-zA-Z0-9_]{1,32}$ (no hyphens). See bridge.md §3.2.

      Examples values:
    • "bridge-hub-001--child_A"
    groupInfoStr
    required
    string

    Group info string: <group_id>[-<sub1>-<sub2>-…] with subgroups sorted alphabetically. Empty string if unassociated. See MQTT_Node.yaml.

      Examples values:
    • "a1bc2d"
    • "a1bc2d-sg1-sg2"
    • ""

    Accepts the following message:

  • SEND rainmaker/nodes/{nodeId}/to_cloud

    [Bridge → Cloud] Core node→cloud channel. A bridge publishes its own and its children's setNodeConfig here; {nodeId} is the bridge or a child Thing. Child publishes are authorized by the bridge IoT policy's ChildrenPublish statement (bridge.md §3.5). Payload schema is the core toCloudMessage (MQTT_Node.yaml). Child-Thing lifecycle (addChild / removeChild) is not carried here — it has its own bridgeToCloud control plane.

    Bridge publishes its own and its children's setNodeConfig on the core to_cloud

    A bridge publishes setNodeConfig for itself and for each child on the core rainmaker/nodes/{nodeId}/to_cloud channel. For a child, {nodeId} is the child Thing (<parent>--<suffix>) and the publish is authorized by the bridge IoT policy's ChildrenPublish statement (bridge.md §3.5). The payload schema is identical to a direct device's — bridge-ness is carried only in Thing attributes, never in the config.

    Operation IDpublishBridgeConfig

    Available only on servers:

    object
    nodeId
    required
    string

    Node identifier (Thing Name / MQTT Client ID). For bridge-ridden core topics this is the bridge or a child Thing.

      Examples values:
    • "bridge-hub-001"
    • "bridge-hub-001--child_A"

    Accepts the following message:

    bridgeConfig

    setNodeConfig payloads published by a bridge for itself and its children

    Message IDbridgeConfig

    These ride the core toCloud channel with the core toCloudMessage schema; they are collected here to show the bridge-specific publisher and topic. Bridge-ness is recorded in the node_type=bridge Thing attribute at registration, never in the config payload.

    object

    See the referenced core message schema in MQTT_Node.yaml for the authoritative payload definition; the examples below are the bridge-specific instances.

    Examples

  • SEND $aws/things/{nodeId}/shadow/name/params-{groupInfoStr}/update

    [Bridge → AWS IoT Shadow] Core named shadow update, published by the bridge on behalf of a child with {nodeId} set to the child Thing. Authorization is via the bridge IoT policy substitution $aws/things/{self}--*/shadow/name/*/update (bridge.md §3.5). Fire-and-forget at QoS 1 — the bridge does NOT subscribe to /update/accepted or /update/rejected for children (§9.3). The child's online flag is set by the bridge from protocol-side reachability. Payload schema is the core namedShadowUpdateMessage (MQTT_Node.yaml).

    Bridge publishes a child's named shadow on the core canonical topic

    A bridge publishes its children's shadow updates directly on the core canonical topic with {nodeId} set to the child Thing. Authorization is via the bridge IoT policy substitution $aws/things/{self}--*/shadow/name/*/update (bridge.md §3.5). The model is fire-and-forget at QoS 1: bridges do not subscribe to /update/accepted or /update/rejected for children, to keep the per-bridge subscription count bounded (§9.3).

    Operation IDpublishChildShadowUpdate

    Available only on servers:

    object
    nodeId
    required
    string

    Node identifier (Thing Name / MQTT Client ID). For bridge-ridden core topics this is the bridge or a child Thing.

      Examples values:
    • "bridge-hub-001"
    • "bridge-hub-001--child_A"
    groupInfoStr
    required
    string

    Group info string: <group_id>[-<sub1>-<sub2>-…] with subgroups sorted alphabetically. Empty string if unassociated. See MQTT_Node.yaml.

      Examples values:
    • "a1bc2d"
    • "a1bc2d-sg1-sg2"
    • ""

    Accepts the following message:

    childShadow

    Named shadow updates published by a bridge for itself and its children

    Message IDchildShadow

    These ride the core named-shadow channel with the core namedShadowUpdateMessage schema; collected here to show the bridge-specific publisher, topic and authorization.

    object

    See the referenced core message schema in MQTT_Node.yaml for the authoritative payload definition; the examples below are the bridge-specific instances.

    Examples

  • SEND rainmaker/nodes/{nodeId}/ts/{groupInfoStr}

    [Bridge → Cloud] Core timeseries channel, published by the bridge on behalf of a child with {nodeId} set to the child Thing. Authorized by the bridge IoT policy's ChildrenPublish statement (bridge.md §3.5). Server-side ingestion is identical to a direct device's. Payload schema is the core timeseriesMessage (MQTT_Node.yaml).

    Bridge publishes a child's timeseries on the core canonical topic

    A bridge publishes its children's timeseries directly on the core canonical topic with {nodeId} set to the child Thing. Authorization is via the bridge IoT policy's ChildrenPublish statement (bridge.md §3.5). Server-side ingestion is identical to a direct device's — node_ts_rule extracts the child from topic(3).

    Operation IDpublishChildTimeseries

    Available only on servers:

    object
    nodeId
    required
    string

    Node identifier (Thing Name / MQTT Client ID). For bridge-ridden core topics this is the bridge or a child Thing.

      Examples values:
    • "bridge-hub-001"
    • "bridge-hub-001--child_A"
    groupInfoStr
    required
    string

    Group info string: <group_id>[-<sub1>-<sub2>-…] with subgroups sorted alphabetically. Empty string if unassociated. See MQTT_Node.yaml.

      Examples values:
    • "a1bc2d"
    • "a1bc2d-sg1-sg2"
    • ""

    Accepts the following message:

  • SEND rainmaker/nodes/{nodeId}/notify/{groupInfoStr}

    [Bridge → Cloud] Core notification channel, published by the bridge on behalf of a child with {nodeId} set to the child Thing. Authorized by the bridge IoT policy's ChildrenPublish statement (bridge.md §3.5). Payload schema is the core notificationMessage (MQTT_Node.yaml).

    Bridge publishes a child's notification on the core canonical topic

    A bridge publishes its children's notifications directly on the core canonical topic with {nodeId} set to the child Thing. Authorization is via the bridge IoT policy's ChildrenPublish statement (bridge.md §3.5).

    Operation IDpublishChildNotification

    Available only on servers:

    object
    nodeId
    required
    string

    Node identifier (Thing Name / MQTT Client ID). For bridge-ridden core topics this is the bridge or a child Thing.

      Examples values:
    • "bridge-hub-001"
    • "bridge-hub-001--child_A"
    groupInfoStr
    required
    string

    Group info string: <group_id>[-<sub1>-<sub2>-…] with subgroups sorted alphabetically. Empty string if unassociated. See MQTT_Node.yaml.

      Examples values:
    • "a1bc2d"
    • "a1bc2d-sg1-sg2"
    • ""

    Accepts the following message:

Messages

  • #1bridgeToCloudMessage

    Bridge-only child-Thing lifecycle control event

    Message IDbridgeToCloudMessage

    Bridges publish child-lifecycle requests on rainmaker/bridges/{parentNodeId}/to_cloud. The cloud Lambda dispatches on the event array (one or more of addChild, removeChild) and replies as a bridgeAck event on the bridge's own fromCloud channel (rainmaker/nodes/{parentNodeId}/from_cloud).

    Authorization is enforced by bridge_to_cloud_rule's WHERE clause (clientid() = topic(3)); a bridge can only publish on its own control plane. See bridge.md §3.4 / §4.

    object
  • #2bridgeAckMessage

    Response to an addChild / removeChild request

    Message IDbridgeAckMessage

    Response to an addChild or removeChild request published on the bridge control-plane channel (bridgeToCloud). Arrives on the bridge's own fromCloud (rainmaker/nodes/{parentNodeId}/from_cloud) as a bridgeAck event, alongside the standard core fromCloud events. See bridge.md §4.1. Errors use codes from §4.2 / §4.3 (e.g. invalid_suffix, bridge_not_associated, child_suffix_in_use, child_not_owned).

    object
  • #3bridgeConfigExamples

    setNodeConfig payloads published by a bridge for itself and its children

    Message IDbridgeConfigExamples

    These ride the core toCloud channel with the core toCloudMessage schema; they are collected here to show the bridge-specific publisher and topic. Bridge-ness is recorded in the node_type=bridge Thing attribute at registration, never in the config payload.

    object

    See the referenced core message schema in MQTT_Node.yaml for the authoritative payload definition; the examples below are the bridge-specific instances.

  • #4bridgeShadowExamples

    Named shadow updates published by a bridge for itself and its children

    Message IDbridgeShadowExamples

    These ride the core named-shadow channel with the core namedShadowUpdateMessage schema; collected here to show the bridge-specific publisher, topic and authorization.

    object

    See the referenced core message schema in MQTT_Node.yaml for the authoritative payload definition; the examples below are the bridge-specific instances.

Schemas

  • object

    See the referenced core message schema in MQTT_Node.yaml for the authoritative payload definition; the examples below are the bridge-specific instances.