【发布时间】:2023-03-25 12:00:01
【问题描述】:
我想在我的 LAN 上使用我的 ESP 和 LUA 来发现我的 Mosquitto MQTT 代理。我的 ESP8266 在同一个网络上。
我在跑步
NodeMCU custom build by frightanic.com
branch: master
commit: 4905381c004bdeaf744a60bb940c1906c2e052d4
SSL: false
modules: bme280,dht,file,gpio,http,mdns,mqtt,net,node,rtctime,sjson,sntp,tmr,uart,wifi
build created on 2019-04-28 18:59
powered by Lua 5.1.4 on SDK 2.2.1(6ab97e9)
当我连接到知道 IP 和端口的代理时,一切都按预期工作:
m:connect("10.0.1.97", 1883, 0, function(client)
...
但是我怎样才能发现运行代理的设备的 IP 地址和端口呢? Mosquitto 的设置如下:
http://dagrende.blogspot.com/2017/02/find-mqtt-broker-without-hard-coded-ip.html
LUA mdns 模块不提供发现,对吗?
【问题讨论】:
标签: lua mqtt mosquitto nodemcu zeroconf