Dashboard notificatioin question

When using the dashboard notification, I noticed the output does not convey any message components handed to it, except payload and topic among other items. I need information passed such that I can continue logic back to the callling nodes. For instance, logic for replying to notification will need to return to different flows, depending on origin. The message needs to contain a variable to know where to return. If this is lost in the notification, the only way to retain it is in flow, or global variable. This is not ideal. Ideally, it would be contained in the message. Why is the notification node removing message content?

What is the full name of the notification node you are using? i.e. node-red-????

Can you provide a small flow showing the issue?

Most of the dashboard nodes only send the payload part of the message as that is what they need to display (for output nodes) and for input nodes they just generate a payload and topic. This is on purpose and to save both bandwidth / help responsiveness and to not accidentally leak information - ie any credentials or inner workings in rest of message.

I have just tried it with the ui_notification node, and it does appear to pass on the full message contents, so we need to know more about exactly what @hp_apcc is seeing.

Thanks Colin. Maybe an older version ?

Sorry for the delay to respond. Busy on projects. Yes the node is dashboard. Node-RED-Dashboard: notification toast.

version is 3.2.0. So it should be reasonably updated. If I load a value to the message other than payload or topic, it will not pass these values in the message.

As @dceejay says, its working by design. It is designed to strip everything besides certain message content. This is however unfortunate for anyone that is needing to carry return information with the message. I was looking to grab the value off the message and return after the input was processed.

How about enabling a some single entity which would need loading on purpose. This will keep it deliberate. It should be possible to load values to an object, array or variable. Then you can use the message to contain something which can be used to do returns? Please.

The alternative is juggling values in and out of flow/global variables.

What I am doing to require this?:
Scanners for quality system parts matching. 6 parts in all plus carton information to match. Errors bring the logic to a message log. The notification is used to display dialog. Sometimes the dialog requires YES/NO or Password information (low security level confirmation codes). These have logic per scanner or print function which need the notification to pass the values back to the calling flow logic.

@dceejay, Thanks for your work and attention to my request.

Kind Regards,

Can you post a simple example where it does not work? This example works for me, msg.hello is successfully passed through the notification node.

[{"id":"d87dd1fe3d7906eb","type":"ui_button","z":"2fbaad6f2b46c829","name":"","group":"343f7063521c327e","order":2,"width":0,"height":0,"passthru":false,"label":"Hello","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"clicked","payloadType":"str","topic":"topic","topicType":"msg","x":100,"y":1280,"wires":[["dfabd43a66fa727a"]]},{"id":"dfabd43a66fa727a","type":"change","z":"2fbaad6f2b46c829","name":"","rules":[{"t":"set","p":"hello","pt":"msg","to":"hello world","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":1280,"wires":[["683f78f5c53415bd"]]},{"id":"fb29a13f11e74889","type":"debug","z":"2fbaad6f2b46c829","name":"debug 46","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":580,"y":1360,"wires":[]},{"id":"683f78f5c53415bd","type":"ui_toast","z":"2fbaad6f2b46c829","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"OK/Cancel","x":450,"y":1280,"wires":[["fb29a13f11e74889"]]},{"id":"343f7063521c327e","type":"ui_group","name":"test","tab":"62712bbf.888b94","order":3,"disp":true,"width":"6","collapse":false,"className":""},{"id":"62712bbf.888b94","type":"ui_tab","name":"test","icon":"dashboard","disabled":false,"hidden":false}]

@hp_apcc Having had a poke at it - we do seem to pass though extra properties.

[{"id":"d95719a11482132a","type":"inject","z":"27d4cd61f8c2d5ed","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"},{"p":"id","v":"Bing","vt":"str"},{"p":"foo","v":"bar","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Alert","payload":"","payloadType":"date","x":260,"y":675,"wires":[["4f7b280213be62aa"]]},{"id":"4f7b280213be62aa","type":"ui_toast","z":"27d4cd61f8c2d5ed","position":"prompt","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"Cancel","raw":false,"className":"","topic":"feedback","name":"","x":460,"y":675,"wires":[["9aab056219372396"]]},{"id":"9aab056219372396","type":"debug","z":"27d4cd61f8c2d5ed","name":"debug 42","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":645,"y":675,"wires":[]}]

Sends a notification... and if I reply "hi" - I get back

I put together a simple check on my home laptop and its fine. I'll check my logic and flow to be sure.

Thanks for your help and consideration.

OK. I goofed when I was constructing my statements. I mentioned the "Notification" as the problem and I am WRONG.

What I meant to write was the Dashboard DROP DOWN. As you can see the debug nodes show the entire message before the dropdown and after. The msg.msgid = "15" is lost. Only "topic" is preserved.



In that case I refer you to my first answer.
Though being the select you can pass in anything as the value of your options so you can pass though an object if you like. eg:

msg.options = [
        "Choice 1": {
            "foo": "bar",

OK, Tried it. Thanks. You embed the values in the body of each of the selections and it returns the body of the "Choice" selection you made plus the extras that are in the json object. Gotta love json.

Sorry for the confusion from my first post title. That's me not paying attention to details.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.