Nutella Peanut-Butter Marshmallow
Miss any of our Open RFC calls?Watch the recordings here! »

tinkerhub-ssdp

0.2.2 • Public • Published

SSDP browser

This library is a simple SSDP browser based on node-ssdp that will track when devices become available and when they are no longer available.

const browser = require('tinkerhub-ssdp').browser('ssdp:all');
browser.on('available', service => console.log('Service available', service));
browser.on('unavailable', service => console.log('Service unavailable', service));
 
// Filter and map services
browser.filter(service => service.headers['HUE-BRIDGEID'])
  .map(service => {
    // Change the identifier being tracked
    service.id = service.headers['HUE-BRIDGEID'];
    return service;
  });
 
// Start discovering services
browser.start();
 
// Stop discovering services
browser.stop();

Install

npm i tinkerhub-ssdp

DownloadsWeekly Downloads

11

Version

0.2.2

License

MIT

Last publish

Collaborators

  • avatar