mqtt-discover

0.1.1 • Public • Published

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();

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i mqtt-discover

    Weekly Downloads

    0

    Version

    0.1.1

    License

    ISC

    Last publish

    Collaborators

    • 4908admin