1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/io/mdns
2015-04-10 11:56:17 +01:00
..
icons Add discovery (mdns) and SNMP nodes 2015-03-04 19:55:53 +00:00
LICENSE Add discovery (mdns) and SNMP nodes 2015-03-04 19:55:53 +00:00
mdns.html Add discovery (mdns) and SNMP nodes 2015-03-04 19:55:53 +00:00
mdns.js Tidy up node-red-nodes 2015-04-10 11:56:17 +01:00
package.json Fix type in Discovery, add extra fields to IRC. 2015-04-09 11:26:07 +01:00
README.md Fix type in Discovery, add extra fields to IRC. 2015-04-09 11:26:07 +01:00

node-red-node-discover

A Node-RED node that uses Bonjour / Avahi to discover local network services such as iTunes libraries, printers, etc.

Prerequisites

please read the install instructions for the underlying npm.

For Debian / Ubuntu this requires installing

sudo apt-get install libavahi-compat-libdnssd-dev

Install

Run the following command in the root directory of your Node-RED install

npm install node-red-node-discovery

Usage

Uses a javascript implenetation of mdns ( mdns-js ) to provide a Bonjour / Avahi service discovery capability.

msg.payload contains the service object on both arrival and leaving.

msg.state contains boolean true or false depending if the service has arrived (true) or gone away (false)..

Within the msg.payload object the most interesting things are:

  • msg.payload.name
  • msg.payload.interface
  • msg.payload.port
  • msg.payload.addresses
  • msg.payload.txtRecord

For a full list of official service types see [this list](http://www.dns-sd.org/ServiceTypes.html" target="_new).

Note: When Node-RED starts you will get a big WARNING message about the Bonjour compatability layer... this is just a warning so don't worry.