I have nine LIFX lights of which two are IR capable. The two lights were not listed in the node editor with but they were found by node-lifx (found this out with some debug prints). The issue seems to be that light.getMaxIR() times out and returns an error and due to that the light never gets added on the list of lights. The pull request fixes the issue by emitting a warning once during init instead of passing the error forward with the callback. The solution is not exactly beautiful but at least allows using the lights which otherwise could not be used.
The light.maxIR(value) does seem to work though so I would not disable the IR capability altogether. I'm a collaborator on the node-lifx project and I believe this is an issue there rather than with this package. The getMaxIR() call does not return any value. I'll create an issue to node-lifx on this. My guess is that it has broken with some recent firmware update.
Unfortunately I could not think of a good way to unit test this change but the current tests pass after the change at least. If this PR is ok and you can suggest a way to test this, I can update the PR with such test.
I have nine LIFX lights of which two are IR capable. The two lights were not listed in the node editor with but they were found by node-lifx (found this out with some debug prints). The issue seems to be that
light.getMaxIR()
times out and returns an error and due to that the light never gets added on the list of lights. The pull request fixes the issue by emitting a warning once during init instead of passing the error forward with the callback. The solution is not exactly beautiful but at least allows using the lights which otherwise could not be used.The
light.maxIR(value)
does seem to work though so I would not disable the IR capability altogether. I'm a collaborator on the node-lifx project and I believe this is an issue there rather than with this package. ThegetMaxIR()
call does not return any value. I'll create an issue to node-lifx on this. My guess is that it has broken with some recent firmware update.Unfortunately I could not think of a good way to unit test this change but the current tests pass after the change at least. If this PR is ok and you can suggest a way to test this, I can update the PR with such test.