dear all
for the node mqtt-in how to use variable broker?
dear all
for the node mqtt-in how to use variable broker?
You can use dynamic subscriptions to connect to different brokers. It is all in the sidebar help text.
There are plenty of examples posted on forum to, a quick search for mqtt bynamic broker connect brings up many.
The node can be configured to dynamically control the MQTT connection and its subscriptions. When enabled, the node will have an input and can be controlled by passing it messages.
These only apply when the node has been configured for dynamic subscriptions.
actionstring
the name of the action the node should perform. Available actions are: "connect"
, "disconnect"
, "subscribe"
and "unsubscribe"
.
topicstring|object|array
For the "subscribe"
and "unsubscribe"
actions, this property provides the topic. It can be set as either:
topic
and qos
propertiesbrokerbroker
For the "connect"
action, this property can override any of the individual broker configuration settings, including:
broker
port
url
- overrides broker/port to provide a complete connection urlusername
password
If this property is set and the broker is already connected an error will be logged unless it has the force
property set - in which case it will disconnect from the broker, apply the new settings and reconnect.
and here is a demo of most features: Dynamic MQTT LWT birth, Close & Will Property - #2 by Steve-Mcl
thank you sir for the answer.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.