Connect to an MQTT Broker
程序员文章站
2022-07-14 22:46:42
...
Connect to an MQTT Broker
Problem
You want to connect to an MQTT broker running locally.
Solution
Use the MQTT Input input or MQTT Output node and an associated MQTT Config node to connect to an MQTT broker.
Example
Show flow
Discussion
Many users will run an MQTT broker such as mosquitto on the same Raspberry Pi or PC that Node-RED is running on. Once you have an MQTT input or output node in your flow, you create an MQTT Config node by clicking on the Server configuration pop-up and selecting Add an MQTT broker.... Assuming your broker is open, set the server host to localhost and leave the port set to 1883.
To connect to non-local, secured brokers, other MQTT Config node options will need to be set according to your broker’s connectivity requirements.
Problem
You want to connect to an MQTT broker running locally.
Solution
Use the MQTT Input input or MQTT Output node and an associated MQTT Config node to connect to an MQTT broker.
Example
Show flow
Discussion
Many users will run an MQTT broker such as mosquitto on the same Raspberry Pi or PC that Node-RED is running on. Once you have an MQTT input or output node in your flow, you create an MQTT Config node by clicking on the Server configuration pop-up and selecting Add an MQTT broker.... Assuming your broker is open, set the server host to localhost and leave the port set to 1883.
To connect to non-local, secured brokers, other MQTT Config node options will need to be set according to your broker’s connectivity requirements.
上一篇: node red 调研
推荐阅读
-
使用sqlyog远程连接mysql错误2003 cant connect to mysql 10060/_MySQL
-
Oracle 树查询 性能优化纪实(start with, connect by)
-
Learning Experience of Big Data: Deploying Tomcat 8.0 and connect ssh without password
-
CodeIgniter错误mysql_connect(): No such file or directory解决方法_PHP
-
Can't connect to local MySQL server 时 修改 root 用户名
-
Can t connect to MySQL server on localhost (10061)
-
guzzle 中如何获取connect time.就是连接成功需要多长时间;
-
SpringBoot整合MQTT
-
阿里云ECS Linux服务器外网无法连接MySQL解决方法(报错2003- Can't connect MySQL Server on 'x.x.x.x'(10038))
-
CodeIgniter错误mysql_connect(): No such file or directory解决方法,nosuchfile_PHP教程