I am trying to use a dropdown in the dashboard to set who will receive an email message when the machine has an error. I have the drop down populated with some names and when I select one it will send a message immediately with their name. I would like the dropdown to set a variable and join that with the original machine error message when triggered by an alarm. All the dropdown topics I have seen on the forum seem to populate the dropdown and not the other way around. Thanks.
You cannot set a node-red variable direct from a Dashboard drop-down since the Dashboard runs in the browser and node-red on the server.
But the drop-down sends the data to node-red so simply connect a change node to the output and use that to set a node-red variable. Better still pass that output direct to your email send node.
Here is what I have so far. The machine alarm inject node is triggered by a machine alarm in my full flow and it send a message to the person or persons I have hard coded in my flow. I want to be able to use the dashboard to choose who gets the message at the beginning of their shift. What I think I would like to see is when I have a machine alarm (the inject node, time stamp) join with the persons name and use the switch to send an email. FYI I have the email portion working, just not to a specific person. Thanks.
Is it possible to enable and disable email nodes using a drop down from the dashboard?
[{"id":"9497e77c.532ff8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"75abaadc.61a7a4","type":"time-switch","z":"9497e77c.532ff8","name":"","lat":"","lon":"","startTime":"06:00","endTime":"16:30","startOffset":0,"endOffset":0,"x":410,"y":460,"wires":[["d5e22895.ab0b68","84a3c6f6.8472b8"],[]]},{"id":"df1fd3b1.6f6af","type":"ui_dropdown","z":"9497e77c.532ff8","name":"","label":"Dayshift List","tooltip":"","place":"","group":"a017097b.3c1108","order":0,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"John Doe","value":"John","type":"str"},{"label":"Jane Doe","value":"Jane","type":"str"}],"payload":"","topic":"","x":190,"y":300,"wires":[["1d9cbb6f.339215","be7c9c21.75b25"]]},{"id":"1d9cbb6f.339215","type":"debug","z":"9497e77c.532ff8","name":"Dayshift","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":360,"y":220,"wires":[]},{"id":"82beaa80.f88788","type":"switch","z":"9497e77c.532ff8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"John","vt":"str"},{"t":"cont","v":"Jane","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":300,"wires":[[],[]]},{"id":"d5e22895.ab0b68","type":"debug","z":"9497e77c.532ff8","name":"time","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":460,"wires":[]},{"id":"2a451afb.0921c6","type":"debug","z":"9497e77c.532ff8","name":"join","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":790,"y":220,"wires":[]},{"id":"84a3c6f6.8472b8","type":"join","z":"9497e77c.532ff8","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"","joinerType":"str","accumulate":false,"timeout":"","count":"1","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":590,"y":300,"wires":[["2a451afb.0921c6","82beaa80.f88788"]]},{"id":"be7c9c21.75b25","type":"change","z":"9497e77c.532ff8","name":"","rules":[{"t":"set","p":"flow","pt":"msg","to":"topic","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":300,"wires":[["cc816dec.efd38","84a3c6f6.8472b8"]]},{"id":"cc816dec.efd38","type":"debug","z":"9497e77c.532ff8","name":"change","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":620,"y":200,"wires":[]},{"id":"67f3782a.b56dd8","type":"inject","z":"9497e77c.532ff8","name":"Machine Alarm Message","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":460,"wires":[["75abaadc.61a7a4"]]},{"id":"a017097b.3c1108","type":"ui_group","name":"Dayshift","tab":"22daeffd.b2613","order":2,"disp":true,"width":"6","collapse":false},{"id":"22daeffd.b2613","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.