Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to stop discovery when predefined lights are found (base branch es2015) #61

Open
wants to merge 5 commits into
base: es2015
Choose a base branch
from

Conversation

ristomatti
Copy link
Collaborator

I've used a prototype version of this implementation for quite some time to avoid lights dropping out occasionally in my node-red home automation setup.

If for example below settings are passed to client on init, the discovery process will stop after the listed lights have been discovered. This prevents discovery processing setting lights offline if they don't respond for some reason. I've found this does not necessarily prevent packets being processed on the lights.

{
  light: ['192.168.1.10', '192.168.1.11'],
  stopAfterDiscovery: true
}

Client will emit discovery-completed after the lights are found if the configuration option is enabled.

This PR is done against the base branch es2015 like my earlier PR #60 from today.

@codecov-io
Copy link

codecov-io commented Oct 29, 2017

Codecov Report

Merging #61 into es2015 will increase coverage by 0.72%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           es2015      #61      +/-   ##
==========================================
+ Coverage   58.41%   59.13%   +0.72%     
==========================================
  Files          50       50              
  Lines        1688     1713      +25     
  Branches      255      259       +4     
==========================================
+ Hits          986     1013      +27     
+ Misses        702      700       -2
Impacted Files Coverage Δ
lib/lifx/client.js 90.66% <0%> (+1.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0468de6...62a4052. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants