Dashboard pop-up notification with timeout?

hi there,
I am looking for dashboard pop-up notification with dialog BUT with timeout!

The notification node is great. However, I have a use case where the popup message should be auto-"terminated" / "cancelled" after a certain time out with no user interaction.

I am controlling our EV charger from node red. When you plug it into our car (charger connected but locked) and the entrance door is being opened, this automatically unlocks the charger.

However, with a smart meter tariff, that kicks in later at night, I want to change this so that the default action would be to wait until later to do so. The pop up would be triggered when the car is connected and door is opened and would be shown on all displays with a message like "Charge car now?" with default "No" but optional "Yes" answer. That message should however disappear automatically say, after 1 min. So, as you enter, you can quickly override the "no", in case it should be charged right away.

Any thoughts or suggestions would be great!

THANKS

Will this work?

[{"id":"3b1a5f642bcdfb3d","type":"ui_toast","z":"49e963ece3867f01","position":"prompt","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"Cancel","raw":false,"className":"","topic":"","name":"","x":590,"y":600,"wires":[["4201b26575c16233"]]},{"id":"85ad2b240822f958","type":"change","z":"49e963ece3867f01","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":680,"wires":[["3b1a5f642bcdfb3d"]]},{"id":"f3a058e8cdc69d3d","type":"ui_button","z":"49e963ece3867f01","name":"","group":"73f30215bd2b2363","order":3,"width":"5","height":"2","passthru":false,"label":"Trigger Dialog","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Ask a Question","payloadType":"str","topic":"Question","topicType":"str","x":200,"y":600,"wires":[["e88af46798e268e9","3b1a5f642bcdfb3d"]]},{"id":"4201b26575c16233","type":"ui_button","z":"49e963ece3867f01","name":"","group":"73f30215bd2b2363","order":3,"width":"5","height":"2","passthru":false,"label":"{{payload}}","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Asking a Question","payloadType":"str","topic":"Question","topicType":"str","x":770,"y":600,"wires":[[]]},{"id":"e88af46798e268e9","type":"delay","z":"49e963ece3867f01","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":380,"y":680,"wires":[["85ad2b240822f958"]]},{"id":"73f30215bd2b2363","type":"ui_group","name":"Group 1","tab":"eb50d071f25d4da0","order":1,"disp":true,"width":"26","collapse":false,"className":""},{"id":"eb50d071f25d4da0","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

Fab, thank you @smanjunath211 !
I did not know that sending the empty payload would close the pop-up box!
image
This now works exactly as I need it to!

2 Likes

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