Closed marcus-j-davies closed 3 years ago
Oh. Does related not work the same for discussions? It didn't pop up over there that we are here...
Working Progress.
Suggestion... fields for node and params similar to the NR official inject node?
what if my new brightness to set is at msg.hap.allChars.Brightness
... I would like to put that in. The input could come direct from NRCHKB.
Also, if "node" input could be the node name, that would really put a smile on my face... since my topics are already node names.
Params and / or node can be taken from a msg part Params will expect an array object (either strongly typed) or taken from a msg part
so in your case.
you set params to something like msg.payload.paramaters
where parameters will be set prior like this msg.payload.paramaters = [msg.hap.allChars.Brightness]
or Evan msg.payload = [msg.hap.allChars.Brightness]
where the Params path is set to msg.payload
then send your msg
to this node
remember that params are an array - not a single object, so the Params box is asking what msg path your parameters array is in
Well I just had a beautiful message all typed out on my phone here with an example json input and whatever... then it disappeared.
Apart from whether my topic can be a node name (for easy code readability instead of abstract node number) you answered my question and this looks awesome.
the demo above is nothing more than a doodle. the paths to get the value can be any MSG part
For anyone wanting to use this, it's available now. Some more instructions linked below.
https://github.com/zwave-js/node-red-contrib-zwave-js/wiki/Command-Factory
Instructions are still a work in progress. Feel free to open a new issue or discussion with more questions.
What is your idea?
@lurendrejer
@crxporter, As also discussed in discord
Example of its existence.