Closed hav0ck closed 4 years ago
Good suggestion. Ill change it.
Actually, looking at the documentation I have here, I'm not sure whats unclear. I definitely don't want to get in the habit of documenting other nodes / node-red itself as part of this nodes documentation, and INJECT node usage kinda falls under that unbrella. I will add a note that clarifies a little bit that the message structure must match that exactly though to hopefully make it clear that passing on a MODIFIED message from an earlier step can cause issues though.
Like I said, definitely user error. I think it was a case of jumping in feet first without full/partial understanding of proper structure.
If you're coming from the old cast node, its an easy mistake to make as they blurred the lines between msg
and msg.payload
in some ways that were confusing. I explicitly split payload
to be the "command" being executed, and only have a few items in msg
related to the "target" that your sending it to.
I was going to ask for help on how to send radio streams to the castv2 node.
I read the issue about the casting array and passing the info to msg.payload andnot just msg.
Can I make a suggestion to flush out an example a bit more to help those like me that are new to Node-Red.
It would be super helpful to mention that when using an inject node the payload: portion needs to be dropped.
So maybe something like:
Using an Inject Node: Make sure you set the payload type to JSON.
Thanks for the great node!