In my LAN there are several MQTT-enabled devices (Tasmota) and I am writing an MQTT client (Javascript, through mosquitto websocket and PAHO client library).
Which is the best way to discover all online devices in the LAN and their corresponding device name? I thought using the LWT message that every device sends, but I don't know how to subscribe to all LWT message from unknown devices.
The LWT "Online" messages are coming through with this path: tele/<device_name>/LWT
, but I don't want to subscribe to ALL "tele" messages, as they are too many.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…