jdomeij / node-red-contrib-node-lifx

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

Output Node doesn't include lightLabel or id? #2

Closed cakefornoreason closed 7 years ago

cakefornoreason commented 7 years ago

Thanks for responding so quickly to the last issue I posted!

I'm continuing to work with the updated version and this is less of a bug and more of a feature request, so please take it as such--it's your code and I don't want to be a backseat driver.

In my particular implementation of your code, I'd like to use many light nodes attached to a single function node to record global light status. Since the output node doesn't transmit lightLabel or bulb id in the payload, it doesn't appear to be possible to do this in one function.

Any chance you might consider adding lightLabel or id to the output node?

jdomeij commented 7 years ago

This information already exists, the properties id, address and label is attached to the root level of the output node. I haven't found any real guidelines of how to format the output from the node but the ones i found indicated that the important information is added to the payload and additional values is provided as root properties.

cakefornoreason commented 7 years ago

As someone fairly new to this, Node Red in general focuses so much on the payload that I didn't even think to look in the root level of the message. Knowing that, though, I was able to solve my problem with using a single function with multiple light outputs. All good on this front!