jdomeij / node-red-contrib-node-lifx

Node RED nodes for controlling Lifx lights
Apache License 2.0
7 stars 9 forks source link

Unclear how to send "off" message #1

Closed cakefornoreason closed 7 years ago

cakefornoreason commented 7 years ago

I happened to catch this project after you'd just forked it from the lifx2 node to add state checking and successfully built a great setup for my LIFX bulbs and Flic buttons using that version in Node Red, though I'm intrigued by this new approach.

I've been kicking it around and can't figure out how to send a payload to turn a light off, even though I've tried the obvious { "on": false } approach. Am I doing it wrong or is this a bug?

I'm fairly new to coding, but I'm glad to help with testing or improving this project in any way I can.

jdomeij commented 7 years ago

Cool somebody is using this. First I only wanted to say that this is not fork of lifx2, I was inspired by lifx2 in that way that I thought it was cool but I wanted to control specific lights, we use the same library to talk to lifx but that is all.

The on/off problem is an bug, I have been refactoring the code and this "feature" got lost. I fixed the problem for the hue node last night because the lights didn't turn off.

The problem is fixed now, sending { "on": false } as the payload should turn of the light

jdomeij commented 7 years ago

I just added support for sending non-object input, so now it's possible to send true,false,'on' and 'off' to turn the light on/off, an number will be interpreted as brightness modification (the light will also be turned on)

Closing this as fixed now