Open lougreenwood opened 1 year ago
+1 for this request. Thanks for a great addition to NR. Its pretty much a NR convention that msg objects are passed-through with the node only making the specified changes based on its function.
+1 for this request. Thanks for a great addition to NR. Its pretty much a NR convention that msg objects are passed-through with the node only making the specified changes based on its function.
Noted :)
Hi! This should be marked as must have, not enhancement, as it is nearly impossible to stop any loop without the pass-through. The plugin is highly customizable and works very well, apart from this trivial to fix issue. Thank you!
Hello, will look into this. @crxporter any thoughts?
Apologies, just read the section: https://nrchkb.github.io/wiki/nodes/output-messages/#differentiate-between-passthrough-or-from-homekit-messages on how to stop loops.
This one is tough to implement. @lougreenwood
I see that this is deprecated, however at the moment you can use the Context
attribute to pass an object from the input to the output:
Input:
msg: {
payload: {
Context: 'Some value here'
}
}
Output:
msg: {
hap: {
context: 'Some value here'
}
}
In fact, onInput
should be asynchronous - it should wait for the response from the callback then send the message (original msg + hap response).
Currently this function only takes msg
as argument which makes it synchronous, it should take 3.
Your Current NRCHKB Plugin Version
1.5.0
Operating System
No response
What is your idea?
When a NK service node is triggered, it should be possible to pass additional metadata through the service node and receive that metadata on the output.
For example, if I pass the following data to a
switch
, I would expect the following output:Service node input
Service node output
I already have message passthrough enabled, but it seems that a
service
node builds a completely new message and disregards almost all values passed to it's input.Any more details?
If this is specific to some hardware or specific software version, please explain here.
Additional comments?
Additional comments here, if any.
Any code or functions to add?
No response