how can I show a popup either image or text in node-red dashboard
Use the dashboard notification node
thank you very much, didn't know anything about it
can i use a picture for notification?
From the node info
" Accept raw HTML/JavaScript input in msg.payload to format popup."
So you should be able to display an image using html
can you please tell me the code for function?
not the HTML code,
or the code for function:
[{"id":"ac6b35e3.5028f","type":"inject","z":"5e6253ed.de8d9c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"360","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":360,"wires":[["23cf2170.805e26","dd1d5e4f.9df498","4b3d69ca.edff4","97ea56ae.90e4a8"]]},{"id":"ffc51f3d.9fb2c","type":"debug","z":"5e6253ed.de8d9c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1110,"y":180,"wires":[]},{"id":"43f76cab.45d814","type":"ui_text","z":"5e6253ed.de8d9c","d":true,"group":"6209999e.5b1f8","order":12,"width":8,"height":1,"name":"Restmüll","label":"","format":"<font size=6><font color=grey>{{payload[0].date}}{{msg.payload[0].summary}}","layout":"row-center","x":1100,"y":240,"wires":[]},{"id":"dd1d5e4f.9df498","type":"ical-upcoming","z":"5e6253ed.de8d9c","confignode":"f2a499cf.b09a4","cron":"","timeout":"","name":"Restmüll","offset":"","endpreview":"17","endpreviewUnits":"days","pastview":"","pastviewUnits":"days","trigger":"match","filter":"Restmüll","x":520,"y":260,"wires":[["43f76cab.45d814","49f392f8.ca0e34","eeda55ad.840d7","f25a5328.2e4698"]]},{"id":"49f392f8.ca0e34","type":"ui_toast","z":"5e6253ed.de8d9c","position":"bottom right","displayTime":"120","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":true,"topic":"home_new_in.png","name":"test","x":1010,"y":120,"wires":[],"inputLabels":["12"]},{"id":"eeda55ad.840d7","type":"function","z":"5e6253ed.de8d9c","name":"","func":"msg.payload = (msg.payload[0].date);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":830,"y":220,"wires":[["49f392f8.ca0e34","ffc51f3d.9fb2c"]]},{"id":"f25a5328.2e4698","type":"function","z":"5e6253ed.de8d9c","name":"","func":"var pic = \"home_new_in.png\";\nmsg.payload = pic;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":690,"y":140,"wires":[["49f392f8.ca0e34"]]},{"id":"6209999e.5b1f8","type":"ui_group","z":"","name":"Default","tab":"","disp":true,"width":"6","collapse":true},{"id":"f2a499cf.b09a4","type":"ical-config","z":"5e6253ed.de8d9c","url":"/root/.node-red/public/12.ics","username":"","password":"","caldav":"false","name":"12.ics","language":"de","replacedates":true,"calendar":"","pastWeeks":"0","futureWeeks":"4"}]
Sorry confused, what code do you want?
example
[{"id":"7533350a.0a63a4","type":"ui_toast","z":"4484ee28.caa3c","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":true,"topic":"","name":"","x":260,"y":600,"wires":[]},{"id":"583937f0.9ecdd8","type":"ui_button","z":"4484ee28.caa3c","name":"","group":"165e1e1a.e752fa","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":240,"y":520,"wires":[["d24370e8.0964d8"]]},{"id":"d24370e8.0964d8","type":"change","z":"4484ee28.caa3c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"<img src=\"https://homepages.cae.wisc.edu/~ece533/images/airplane.png\">","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":560,"wires":[["7533350a.0a63a4"]]},{"id":"165e1e1a.e752fa","type":"ui_group","z":"","name":"Default","tab":"f9b58883.fa613","order":1,"disp":true,"width":"12","collapse":false},{"id":"f9b58883.fa613","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
you have the Accept raw HTML/Javascript input to format popup
checked off, but you are not sending valid HTML, all you have sent is the name of the file. You would need an <img src=.....>
html statement as @E1cid shows in his example
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.