Get available channels for a node. Filters channels based on:
The node to get channels for
Array of available channels in priority order
Get the effective channel order for a node. Priority: node.subscriptionConfig.channelOrder > global channel order
The node to get channel order for
Array of channel IDs in priority order
Get the global channel order.
Array of channel IDs in priority order
Initialize the subscription manager. This initializes all registered channels. Should be called during SDK initialization.
Promise that resolves when initialization is complete
Register a new subscription channel.
The channel to register
Whether to initialize the channel immediately (default: true)
Set the global default channel order. This order is used for all nodes unless they have a custom order in subscriptionConfig.
Array of channel IDs in priority order (first = highest priority)
Subscribe to updates for all nodes.
Array of nodes to subscribe to
Function to call when any node is updated
Subscribe to updates for a specific node using priority-based channel selection. Tries channels in order until one succeeds.
The node to subscribe to
Function to call when updates are received
Unsubscribe from updates for a specific node across all channels.
ID of the node to unsubscribe from.
Optionalcallback: (update: ESPNodeUpdateData) => voidOptional specific subscriber to remove. When provided, only that callback is detached (the node's other subscribers keep receiving updates); when omitted, all subscribers for the node are removed AND the node's MQTT shadow binding on NodeMQTTOrchestrator is cleared — so the next subscribe re-registers a fresh shadow name (needed when app-side membership changes the node's shadow topic).
Manages subscription channels and coordinates node update subscriptions. This is the central hub for all parameter update subscriptions from various sources (custom channels)
The manager uses a priority-based approach:
Subscription pattern: register one or more channels, set global channel order, then subscribeToNode(node, callback). Node must have .id; for channel selection it may have .type, .metadata, .subscriptionConfig.channelOrder. Callback receives ESPNodeUpdateData.
Example