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

Doesn't set color for LIFX Mini Color #10

Open
shanness opened this issue Jul 22, 2018 · 6 comments
Open

Doesn't set color for LIFX Mini Color #10

shanness opened this issue Jul 22, 2018 · 6 comments

Comments

@shanness
Copy link

Hey,

I'm using this :-
{on : true,hex: "#FF0000", brightness: 100};

And it's working for my two Color 1000 lights, but not my Mini Color. The python lifxlan module is working though when I run

lifx.set_color_all_lights(RED, rapid=True)

Not sure what the issue is, but thought I should let you know in case you do.

@jdomeij
Copy link
Owner

jdomeij commented Jul 22, 2018

The only thing I can think of is that the MariusRumpf/node-lifx (base communication library) have added support for the Mini Color but they haven't published it to npm yet

You could go to the node-red installation folder and change the dependency in the package.json file for this project to

"node-lifx": "git://github.com/MariusRumpf/node-lifx.git#ffd9df0"

@shanness
Copy link
Author

Ahh, thanks, looks like you are right, the npm version (0.8.0) is 2 years old and about 11 months before the mini colour was fixed.

Thanks for the code change, helpful.

I had to do basically this to get it to pick up that version

cd ~/.node-red
rm -rf node_modules/node-lifx
npm install git://github.com/MariusRumpf/node-lifx.git#ffd9df0

(as well as your change, which I couldn't get to force the install, but I'm a bit of a node newbie, so might be me, just thought it might help others.).

@johnwalicki
Copy link

I've tripped on this same issue when trying to change the color of my LIFX Mini Color using these nodes. The commit is still not included (Jan 2019) in the node-lifx release npm package.
Bummer - I've switched to the node-red-contrib-lifx-api nodes

@cakefornoreason
Copy link

@jdomeij is right—the problem is actually with the node-lifx dependency. This is actually the same issue as we discussed in this issue thread:

#16

The fix is actually pretty easy, though. You just have to get an updated products.json file from LIFX’s GitHub and replace it in the node-lifx package on your machine. My post goes into a little more detail at the link above and includes a side conversation with another user, @ristomatti, who’s forked this repository and added a custom dependency that fixes this.

Take a look at that other issue for more info, but if you have trouble implementing the solution, let me know. I can definitely get into the details. I also may have to follow ristomatti’s lead and just fork the package with an updated LIFX dependency. 😉

@ristomatti
Copy link

ristomatti commented Nov 7, 2019

In case someone ends up reading this thread, my fork has since been changed to use lifx-lan-client (a fork of node-lifx which I'm also helping to maintain). So a simple fix to this is to install github:ristomatti/node-red-contrib-node-lifx instead of node-lifx-contrib-node-lifx.

Maybe we'll fork this package under the same GitHub organization created for lifx-lan-client at some point.

@johnwalicki
Copy link

Thanks for the tip. I'll take a look at your fork.

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

No branches or pull requests

5 participants