mqtt-discover
v0.1.1
Published
Find MQTT broker using localhost and mDNS.
Downloads
5
Readme
MQTT Discover
This tool uses mDNS-SD to discover a nearby MQTT broker. It firsts checks the localhost, then tries to find a broker on the local subnet.
Usage
var MQTTDiscover = require('mqtt-discover');
MQTTDiscover.on('mqttBroker', function (mqtt_client) {
// Start the gateway
console.log('Found MQTT client: ' + mqtt_client.options.href);
});
// Find MQTT server
MQTTDiscover.start();