Skip to content

jsfi/hue-discover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hue-discover

Discover your Philips Hue base station

Install

This module requires node >=4.0.0

$ git clone git@github.com:jsfi/hue-discover.git

Usage

require('./hue-discover')(configuration);

Example

let bridges = require('./hue-discover')();
// returns array with IP-addresses of available hue bridges

Configuration

{
    timeout: 45000,
    bridges: 1,
    find: 'meethue.com'
}

Timeout

default: 45000 (45s)

This option configures the maximal amount of time the function will search the network for bridges.

Bridges

default: 1

This option configures the quantity of bridges you expect in the network. If the quantity is found the function will return before the timeout ends.

Find

default: 'meethue.com'

This option configures the string that is searched inside the description. If it is found, the IP will be added to the result array.

Returned Value

[ IP1, ... ]

The function returns an array with all the bridges that were found in the network during the time configured in the timeout. If the number of found bridges matches the configured number, the function will return early.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published