Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @holusion/product-scanner with all npm packages installed. Try it out:

var productScanner = require("@holusion/product-scanner")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@holusion/product-scanner v2.2.1

MDNS network scanner for holusion products


MDNS network scanner for holusion products

see example.js for usage.


Use the scanner object

const {Scanner} = require("@holusion/product-scanner");
const s = new Scanner({});


Supported constructor options are :

autostart Set to false if we want to start scanning later (default true)
initial initial list of connected devices, for testing purposes or to copy a list of devices
autorefresh  only when autostart = true <=0 to disable, or a time in ms



Emitted with the new Node object when a new node is added


Emitted with the modified Node object when a network client is modified


Emitted when a network node is removed with the Node data. Due to it being no longer reachable, its data might be partial. It should at least have a valid name property.


Emitted with the full array of active Nodes when anything is modified. It is always fired after a "add", "update" or "remove" event.


One will generaly mainly interact with the Events API. A few utility methods are however made to be publicly usable


rafraichit la liste des Nodes accessibles.


Known bugs :

  • products sometimes don't get removed from the list when shut down
  • on linux, avahi prints warning logs on deprecated Bonjour compatibility layer usage
  • on linux, /etc/nsswitch.conf will choose resolve order :

IPV4-LL support

This module relies on the dns-sd protocol to find products.

As an apple standard, dns-sd is provided by Bonjour on every apple device and well integrated in the ecosystem.

On linux, avahi is installed and enabled by default on every recent product. it is avahi-autoipd that handles the ipv4ll assignment.

On Windows, Apple provides an installable MSI that provides the Bonjour daemon.

Microsoft does ship ipv4-ll support since ~Windows10. dns-sd works well on windows once Bonjour is installed.

In theory support should be manually enabled with :


    IPAutoconfigurationEnabled = 1

But this data seems outdated...

Once the link-local ip is assigned, service name resolution should work OK. It might be blocked on very tight enterprise networks. In this case, there is no known fallback.

Older protocols could be used like LLMNR if we wanted to be dependency-free on windows, but it won't tackle the main problem of bad ipv4_ll support.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free