Skip to content

SSDP browser tracking when devices become available and unavailable

Notifications You must be signed in to change notification settings

thingbound/tinkerhub-ssdp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

SSDP browser tracking when devices become available and unavailable

Resources

Stars

Watchers

Forks

Packages

No packages published