Hi there,
I’m relatively new to HA and node-red, and intermediate level programming skills.
This seems like a very simple thing to do, but I must be missing something.
I want to send a notification to iPhone via the notify node. But I need the message text to be dynamic.
I have read a bunch of documents and forum posts on the topic, and others seem to get this going, but I must be missing something, or need it dumbed down perhaps.
Firstly, clearly, the notify node can’t extract actual values from msg.* or flow.* locations. It must be a pre-formed, JSON formatted “data” argument.
One common theme I have found with online solutions to this is the use of a template node. This puts things in a {"data":{"message":{{payload}}}
structure. Only, when it is sent to the notify node, it sends a message like this as an example “message text (object) [Object] additional message text”. Literally, says object Object in my notification message. Alternatively, trying other things, the template node also doesn’t extract the values I want from the msg.* or flow.* locations. Have tried so many alternatives. I ended up just writing a javascript function that coerces the notify message text into the JSON statement required by the notify node, with the dynamic text added in the function.
What am I missing? Seems like a really basic thing that I am just not understanding