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

Infrared support for new LIFX+ #42

Closed
wants to merge 3 commits into from

Conversation

bmv437
Copy link
Contributor

@bmv437 bmv437 commented Nov 7, 2016

This is in response to Issue #40

Support for getInfrared, setInfrared, stateInfrared packets.
maxIR(brightness) and getMaxIR() functions for light objects.
unit tests for maxIR() and getMaxIR().

Note: I don't own any LIFX+ bulbs, so I can't actually test that this works yet. If anyone has a LIFX+ bulb, please give this branch a try and report any issues.

getInfrared, setInfrared, stateInfrared packets.
maxIR() and getMaxIR() functions for light objects.
tests for maxIR() and getMaxIR().
@codecov-io
Copy link

codecov-io commented Nov 7, 2016

Current coverage is 57.88% (diff: 59.01%)

Merging #42 into master will increase coverage by 0.05%

@@             master        #42   diff @@
==========================================
  Files            42         45     +3   
  Lines          1252       1313    +61   
  Methods         103        110     +7   
  Messages          0          0          
  Branches        195        202     +7   
==========================================
+ Hits            724        760    +36   
- Misses          528        553    +25   
  Partials          0          0          

Powered by Codecov. Last update 1a01749...aeb4cad

@ristomatti
Copy link
Collaborator

I received few LIFX+ bulbs and LIFX Z strips yesterday. I tested the code and it appears to be working without any tweaking. Great work @bmv437!

Interestingly I could not find where to set the IR LED brightness in the official Android app. What the app currently does is turn on the IR LED to 100% when the bulb has <10% brightness or when it is toggled off. So with the official app you cannot cucrently turn off the IR LED off in any other means then using a physical switch..

@ristomatti
Copy link
Collaborator

I wanted to have this for my own project that uses node-lifx. In the process of getting this and the latest changes in node-lifx combined, I squashed the three commits, fixed merge conflicts and pushed the changes to my fork (https://github.com/ristomatti/node-lifx/tree/feature/infrared_support). If it's of any use I can make a PR from there? The original committer info has been preserved when squashing.

In case someone is interested in testing the IR brightness control it can be done using my interactive CLI lifxsh with some effort (IR feature is only in a dev branch):

git clone [email protected]:ristomatti/lifxsh.git
git checkout ir-brightness
npm install
npm run build
node dist/cli.js

Usage info can be found from the README I just got myself into writing.

@MariusRumpf
Copy link
Owner

Thanks a lot, merged with help of @ristomatti to develop and just landed in newest release.

@MariusRumpf MariusRumpf closed this Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants