I want to pass countdown values to change the on/ off duration of motor using raspberry pi
Welcome to the forum @sanket
I think you will have to provide more information on what you are trying to do.
- What do you mean by 'on/off duration of motor'?
- How is the motor connected to the pi?
1.Suppose if I set countdown value to 5 minutes and press start button to start the motor then after 5 minutes motor will gets automatically off....(functionality like washing machine)
2.About Connection : We connect vfd converter module to ac motor and Raspberry pi to vfd.
3.Related nodes
[{"id":"945f38a2.0a8ed8","type":"ui_dropdown","z":"efbe1639.0302e8","name":"","label":"Pick the Time","tooltip":"","place":"-","group":"7561d62f.0c1518","order":7,"width":6,"height":1,"passthru":true,"multiple":false,"options":[{"label":"5 min","value":300,"type":"num"},{"label":"10 min","value":600,"type":"num"},{"label":"15 min","value":900,"type":"num"},{"label":"20 min","value":1200,"type":"num"},{"label":"25 min","value":1500,"type":"num"},{"label":"30 min","value":1800,"type":"num"},{"label":"35 min","value":2100,"type":"num"},{"label":"40 min","value":2400,"type":"num"},{"label":"45 min","value":2700,"type":"num"},{"label":"50 min","value":3000,"type":"num"},{"label":"55 min","value":3300,"type":"num"},{"label":"60 min","value":3600,"type":"num"}],"payload":"","topic":"","x":520,"y":880,"wires":[["1cb3a5b0.74489a"]]},{"id":"1cb3a5b0.74489a","type":"change","z":"efbe1639.0302e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":880,"wires":[["1063bb32.0e60d5"]]},{"id":"1063bb32.0e60d5","type":"countdown","z":"efbe1639.0302e8","name":"","topic":"","payloadTimerStart":"true","payloadTimerStartType":"bool","payloadTimerStop":"false","payloadTimerStopType":"bool","timer":"30","resetWhileRunning":false,"setTimeToNewWhileRunning":true,"startCountdownOnControlMessage":false,"x":750,"y":800,"wires":[[],["a1ad0f5b.58824"]]},{"id":"a1ad0f5b.58824","type":"ui_text","z":"efbe1639.0302e8","group":"b143eb26.a908c8","order":5,"width":6,"height":1,"name":"","label":"Time:","format":"{{msg.payload}}","layout":"row-spread","x":930,"y":807,"wires":[]},{"id":"7a3ad198.6e3f9","type":"ui_switch","z":"efbe1639.0302e8","name":"","label":"TIME ON","tooltip":"","group":"7561d62f.0c1518","order":5,"width":6,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":500,"y":800,"wires":[["1063bb32.0e60d5"]]},{"id":"bde85a1.868eea8","type":"function","z":"efbe1639.0302e8","name":"Calculate Percentage","func":"var distance = parseInt(msg.payload);\nvar EmptyDist = 80 - distance;\nmsg.payload = parseInt((EmptyDist/80)*100);\n//msg.payload =(100- parseInt((temp/125)*100));\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":1000,"wires":[["7aa94617.1fac58","c6b6cb6f.bbaa28"]]},{"id":"7aa94617.1fac58","type":"debug","z":"efbe1639.0302e8","name":"","active":false,"console":"false","complete":"false","x":830,"y":1040,"wires":[]},{"id":"c6b6cb6f.bbaa28","type":"ui_gauge","z":"efbe1639.0302e8","name":"","group":"b143eb26.a908c8","order":10,"width":5,"height":4,"gtype":"donut","title":"Tank Filled","label":"","format":"{{value}}","min":0,"max":"100","colors":["#b52100","#e6e600","#42ca38"],"seg1":"","seg2":"","x":830,"y":960,"wires":[]},{"id":"14334151.44f0df","type":"ui_dropdown","z":"efbe1639.0302e8","name":"","label":"","tooltip":"","place":"Select option","group":"7561d62f.0c1518","order":14,"width":6,"height":1,"passthru":true,"multiple":false,"options":[{"label":"48 inch","value":0,"type":"num"},{"label":"42 inch","value":12.25,"type":"num"},{"label":"36 inch","value":25,"type":"num"},{"label":"30 inch","value":37.25,"type":"num"},{"label":"24 inch","value":50,"type":"num"},{"label":"18 inch","value":62.25,"type":"num"},{"label":"12 inch","value":75,"type":"num"},{"label":"6 inch","value":87.25,"type":"num"},{"label":"0 inch","value":100,"type":"num"}],"payload":"","topic":"","x":260,"y":1040,"wires":[["bde85a1.868eea8"]]},{"id":"b47bf2dd.e385a","type":"rpi-srf","z":"efbe1639.0302e8","name":"","topic":"SRF","pulse":"0.5","pins":"7,11","x":250,"y":960,"wires":[["bde85a1.868eea8"]]},{"id":"25dcdb62.d9ddf4","type":"ui_button","z":"efbe1639.0302e8","name":"","group":"7561d62f.0c1518","order":11,"width":3,"height":1,"passthru":false,"label":"ON","tooltip":"","color":"white","bgcolor":"{{msg.colour}}","icon":"","payload":"ON","payloadType":"str","topic":"0","x":1230,"y":820,"wires":[["91c07e01.3c7e4","a27b2909.6cd088"]]},{"id":"91c07e01.3c7e4","type":"switch","z":"efbe1639.0302e8","name":"Only pass 'ON'","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":1260,"y":880,"wires":[["901be048.7e222"]]},{"id":"901be048.7e222","type":"change","z":"efbe1639.0302e8","name":"payload ==> 0 icon=>Check box","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"},{"t":"set","p":"icon","pt":"msg","to":"<font color = \"white\"><i class=\"material-icons\"> check_circle_outline</i></font>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":940,"wires":[["9dc58e.82eada7","4f57c663.0c3778","69ab59d5.f14fb8"]]},{"id":"564782af.e1f0cc","type":"change","z":"efbe1639.0302e8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1260,"y":1060,"wires":[["cc51a3ad.a1d89","37fdb3a9.8ab3bc"]]},{"id":"9dc58e.82eada7","type":"trigger","z":"efbe1639.0302e8","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":false,"units":"s","reset":"","bytopic":"all","name":"Wait 1 second and turn relay OFF","x":1320,"y":1000,"wires":[["564782af.e1f0cc"]]},{"id":"e3015f6b.d364e","type":"link in","z":"efbe1639.0302e8","name":"Button","links":["38a7065f.10b0aa","37fdb3a9.8ab3bc","4f57c663.0c3778"],"x":1070,"y":820,"wires":[["25dcdb62.d9ddf4"]],"l":true},{"id":"37fdb3a9.8ab3bc","type":"link out","z":"efbe1639.0302e8","name":"to Button","links":["e3015f6b.d364e"],"x":1800,"y":1120,"wires":[],"l":true},{"id":"6127b76c.553bf8","type":"link in","z":"efbe1639.0302e8","name":"Relay","links":["8fb69db3.49ad6","69ab59d5.f14fb8"],"x":1830,"y":920,"wires":[["46e36151.9d966","655baf5d.b218d"]],"l":true},{"id":"8fb69db3.49ad6","type":"link out","z":"efbe1639.0302e8","name":"to Relay","links":["6127b76c.553bf8"],"x":2060,"y":1060,"wires":[],"l":true},{"id":"46e36151.9d966","type":"rpi-gpio out","z":"efbe1639.0302e8","name":"motor","pin":"26","set":"","level":"0","freq":"","out":"pwm","x":2010,"y":920,"wires":[]},{"id":"a8cd268a.3aed28","type":"change","z":"efbe1639.0302e8","name":"payload ==> 0 icon=>Check box","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":1160,"wires":[["cc51a3ad.a1d89"]]},{"id":"b22b9d60.c0807","type":"ui_button","z":"efbe1639.0302e8","name":"OFF","group":"7561d62f.0c1518","order":12,"width":3,"height":1,"passthru":false,"label":"OFF","tooltip":"","color":"","bgcolor":"","icon":"","payload":"OFF","payloadType":"str","topic":"","x":1230,"y":1160,"wires":[["a8cd268a.3aed28"]]},{"id":"cc51a3ad.a1d89","type":"ui_dropdown","z":"efbe1639.0302e8","name":"","label":"KM/HR","tooltip":"","place":"Select option","group":"7561d62f.0c1518","order":9,"width":6,"height":1,"passthru":true,"multiple":false,"options":[{"label":"","value":"10","type":"str"},{"label":"","value":"20","type":"str"},{"label":"","value":"30","type":"str"},{"label":"","value":"40","type":"str"},{"label":"","value":"50","type":"str"},{"label":"","value":"60","type":"str"},{"label":"","value":"70","type":"str"},{"label":"","value":"80","type":"str"},{"label":"","value":"90","type":"str"},{"label":"","value":"100","type":"str"}],"payload":"","topic":"","x":1497,"y":1060,"wires":[["e9ff4df3.89059"]]},{"id":"4f57c663.0c3778","type":"link out","z":"efbe1639.0302e8","name":"to Button","links":["e3015f6b.d364e"],"x":1640,"y":960,"wires":[],"l":true},{"id":"69ab59d5.f14fb8","type":"link out","z":"efbe1639.0302e8","name":"to Relay","links":["6127b76c.553bf8"],"x":1640,"y":920,"wires":[],"l":true},{"id":"a27b2909.6cd088","type":"debug","z":"efbe1639.0302e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1630,"y":820,"wires":[]},{"id":"655baf5d.b218d","type":"debug","z":"efbe1639.0302e8","name":"Turn Relay ON/OFF","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":2040,"y":980,"wires":[]},{"id":"34010bcf.5c6ae4","type":"ui_slider","z":"efbe1639.0302e8","name":"","label":"Inch","tooltip":"","group":"b143eb26.a908c8","order":7,"width":5,"height":1,"passthru":true,"outs":"all","topic":"","min":0,"max":"48","step":"6","x":250,"y":1000,"wires":[["bde85a1.868eea8"]]},{"id":"4c9cb19d.d16ab","type":"rpi-gpio out","z":"efbe1639.0302e8","name":"TV","pin":"16","set":"","level":"0","freq":"","out":"out","x":1450,"y":1340,"wires":[]},{"id":"8dd465eb.05f358","type":"ui_switch","z":"efbe1639.0302e8","name":"TV","label":"TV","tooltip":"","group":"b143eb26.a908c8","order":16,"width":3,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"fa-television","oncolor":"blue","offvalue":"false","offvalueType":"bool","officon":"fa-television","offcolor":"black","x":690,"y":1320,"wires":[["1ffec3eb.63ca2c"]]},{"id":"827bcda9.d9d28","type":"ui_switch","z":"efbe1639.0302e8","name":"","label":"JACUZI","tooltip":"","group":"b143eb26.a908c8","order":13,"width":3,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"fa-tint","oncolor":"orange","offvalue":"false","offvalueType":"bool","officon":"fa-tint","offcolor":"black","x":880,"y":1320,"wires":[["79a93fb6.efc67"]]},{"id":"fa390b46.8c6378","type":"ui_switch","z":"efbe1639.0302e8","name":"Belt stop","label":"Belt Stop","tooltip":"","group":"b143eb26.a908c8","order":15,"width":3,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"10","onvalueType":"num","onicon":"fa-stop-circle-o","oncolor":"grey","offvalue":"0","offvalueType":"num","officon":"fa-stop-circle-o","offcolor":"black","x":1055,"y":1320,"wires":[["cc51a3ad.a1d89"]]},{"id":"d1c8343a.e8d318","type":"rpi-gpio out","z":"efbe1639.0302e8","name":"LIGHT","pin":"18","set":"","level":"0","freq":"","out":"out","x":1448,"y":1440,"wires":[]},{"id":"91f6eeab.96471","type":"rpi-gpio out","z":"efbe1639.0302e8","name":"JACUZI PUMP","pin":"22","set":"","level":"0","freq":"","out":"out","x":1480,"y":1520,"wires":[]},{"id":"e475927.1837b7","type":"link in","z":"efbe1639.0302e8","name":"TV","links":["1ffec3eb.63ca2c"],"x":1355,"y":1340,"wires":[["4c9cb19d.d16ab"]]},{"id":"1ffec3eb.63ca2c","type":"link out","z":"efbe1639.0302e8","name":"TO TV","links":["e475927.1837b7"],"x":935,"y":1480,"wires":[]},{"id":"2f56947e.aeb63c","type":"link out","z":"efbe1639.0302e8","name":"","links":["8dcb4d7b.383a1"],"x":795,"y":1480,"wires":[]},{"id":"8dcb4d7b.383a1","type":"link in","z":"efbe1639.0302e8","name":"","links":["2f56947e.aeb63c"],"x":1355,"y":1440,"wires":[["d1c8343a.e8d318"]]},{"id":"79a93fb6.efc67","type":"link out","z":"efbe1639.0302e8","name":"","links":["b199a28c.45bb3"],"x":1055,"y":1480,"wires":[]},{"id":"b199a28c.45bb3","type":"link in","z":"efbe1639.0302e8","name":"","links":["79a93fb6.efc67"],"x":1355,"y":1520,"wires":[["91f6eeab.96471"]]},{"id":"9d5b771e.861b98","type":"ui_template","z":"efbe1639.0302e8","group":"b143eb26.a908c8","name":"facility css","order":1,"width":0,"height":0,"format":"<html>\n <head>\n <style>\n/* Gauge */\n.nr-dashboard-theme md-content md-card{\n background-color: #A9CCE3 !important;\n border: 2px solid #000000;\n border-radius: 12px 12px 12px 12px;\n fill: black!important;\n}\n.nr-dashboard-theme .nr-dashboard-gauge {\n background-color: transparent !important;\n color:black !important;\n}\n.nr-dashboard-theme .nr-dashboard-gauge text {\n color:black !important;\n fill:black;\n margin: 8px;\n}\n.nr-dashboard-theme .nr-dashboard-gauge-title {\n color:black !important;\n margin: 6px 0px 20px 0px;\n z-index: 1;\n}\n.nr-dashboard-theme .nr-dashboard-gauge-titlel {\n font-size: larger;\n font-weight: 500 !important;\n z-index: 1;\n}\n.nr-dashboard-theme .nr-dashboard-gauge-titlem {\n font-weight: 100 !important;\n margin: 2px 0px 14px 0px;\n z-index: 1;\n}\n.nr-dashboard-theme .nr-dashboard-gauge-titles {\n font-size: x-small;\n margin-top: 2px;\n height: 10px;\n padding-bottom: 14px;\n z-index: 1;\n}\n\n/* Numeric */\n.nr-dashboard-theme .nr-dashboard-numeric {\n background-color: #A9CCE3 !important;\n border-radius: 12px 12px 12px 12px;\n border: 2px solid #000000;\n}\n.nr-dashboard-theme .nr-dashboard-numeric .value {\n background-color: transparent ;\n \n color: black;\n}\n.md-button.md-icon-button {\n margin: 0 6px;\n height: 40px;\n min-width: 0;\n line-height: 24px;\n padding: 8px;\n width: 60px;\n border-radius: 50%;\n}\n/* Slider */\n.nr-dashboard-theme .nr-dashboard-slider {\n background-color: #a9cce3 !important;\n border: 2px solid #000000;\n}\n.nr-dashboard-theme .nr-dashboard-slider .md-track {\n background-color: rgba(111, 111, 111, 0.5);\n}\n.nr-dashboard-theme .nr-dashboard-slider .md-track-fill {\n background-color: @widgetBackgroundColor;\n}\n.nr-dashboard-theme .nr-dashboard-slider .md-thumb:after {\n background-color: @widgetBackgroundColor;\n border-color: @widgetBackgroundColor;\n}\n.nr-dashboard-theme .nr-dashboard-slider .md-focus-ring {\n background-color: @widgetBackgroundColor;\n transform: scale(.4);\n opacity: 1;\n}\n.nr-dashboard-theme .nr-dashboard-slider .md-sign {\n background-color: @widgetBackgroundColor;\n}\n.nr-dashboard-theme .nr-dashboard-slider .md-sign:after {\n border-top-color: @widgetBackgroundColor !important;\n}\n.nr-dashboard-theme .nr-dashboard-slider .md-min[md-discrete] .md-sign {\n background-color: @widgetBackgroundColor;\n}\n.nr-dashboard-theme .nr-dashboard-slider md-slider[md-discrete] .md-sign,\n.nr-dashboard-theme .nr-dashboard-slider md-slider[md-discrete] .md-sign:after {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0) scale(1);\n transform: translate3d(0, 0, 0) scale(1);\n}\n.nr-dashboard-theme .nr-dashboard-slider .md-sign:after {\n border-top-color: @widgetBackgroundColor;\n}\n.nr-dashboard-theme md-slider.md-default-theme[md-vertical] .md-sign:after, .nr-dashboard-theme md-slider[md-vertical] .md-sign:after {\n content: none;;\n}\n.nr-dashboard-theme .nr-dashboard-slider md-slider.md-default-theme.md-min[md-discrete] .md-thumb:after, md-slider.md-min[md-discrete] .md-thumb:after {\n background-color: @widgetBackgroundColor;\n border-color: transparent;\n}\n.nr-dashboard-theme .nr-dashboard-slider md-slider .md-track-ticks {\n color: transparent;\n}\n.nr-dashboard-theme .nr-dashboard-slider md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-focus-ring {\n background-color:black !important;\n transform: scale(0.4);\n animation: unset;\n}\n\n/* Switch */\n.nr-dashboard-theme .nr-dashboard-switch {\n background-color: #A9CCE3 !important;\n border: 2px solid #000000;\n color:#000000;\n border-radius: 12px 12px 12px 12px;\n}\n\n.nr-dashboard-theme .nr-dashboard-switch md-switch .md-bar {\n background-color: rgba(111, 111, 111, 0.5);\n}\n.nr-dashboard-theme .nr-dashboard-switch md-switch.md-checked .md-bar {\n background-color: rgba(red(@widgetBackgroundColor), green(@widgetBackgroundColor), blue(@widgetBackgroundColor), 0.5);\n}\n.nr-dashboard-theme .nr-dashboard-switch md-switch .md-thumb {\n background-color: rgb(148, 148, 148);\n}\n.nr-dashboard-theme .nr-dashboard-switch md-switch.md-checked .md-thumb {\n background-color: rgba(red(@widgetBackgroundColor), green(@widgetBackgroundColor), blue(@widgetBackgroundColor), 1);\n}\n\n/* Text-Input */\n.nr-dashboard-theme .nr-dashboard-textinput {\n background-color: #A9CCE3 !important;\n border: 2px solid #000000;\n border-radius: 12px 12px 12px 12px;\n}\n.nr-dashboard-theme .nr-dashboard-textinput label {\n color: @widgetTextColor;\n}\n.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-has-value label {\n color: @widgetTextColor;\n}\n.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-focused label {\n color: @groupTextColor;\n}\n.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-focused input {\n border-color: @groupTextColor;\n font-family: inherit;\n}\n.nr-dashboard-theme .nr-dashboard-textinput md-input-container .md-input:invalid {\n color: #DA5252;\n}\n.nr-dashboard-theme .nr-dashboard-textinput input {\n border-color: @widgetTextColor;\n color: @widgetTextColor;\n border-bottom-width: 1px;\n font-family: inherit;\n padding-left: 8px;\n}\n.nr-dashboard-text {\n padding: 0 36px;\n}\n/* Text */\n.nr-dashboard-theme .nr-dashboard-text {\n background-color: #A9CCE3 !important;\n border: 2px solid #000000;\n border-radius: 12px 12px 12px 12px;\n}\n.nr-dashboard-theme .nr-dashboard-text p {\n margin-left:0;\n}\n</style>\n </head>\n <body>\n \n </body>\n</html>","storeOutMessages":true,"fwdInMessages":false,"resendOnRefresh":true,"templateScope":"local","x":330,"y":1320,"wires":[[]]},{"id":"6847a148.5d35f","type":"ui_template","z":"efbe1639.0302e8","group":"b143eb26.a908c8","name":"facility","order":2,"width":0,"height":0,"format":"<html>\n\n <head><style>\n ui-card-panel {\n background-image: url(\"/NEW 800x480.png\");\n \n background-repeat: no-repeat;\n background-position: CENTER;\n background-size:100%;\n \n }\n\n</style>\n\n</head>\n <body>\n \n </body>\n \n</html>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":170,"y":1320,"wires":[[]]},{"id":"5f026f6e.1b869","type":"comment","z":"efbe1639.0302e8","name":"FACILITY","info":"","x":180,"y":1220,"wires":[]},{"id":"6a2b574a.d9b3b8","type":"comment","z":"efbe1639.0302e8","name":"MAINTENANCE","info":"","x":200,"y":1500,"wires":[]},{"id":"ce880e7f.ad1e2","type":"ui_template","z":"efbe1639.0302e8","group":"7561d62f.0c1518","name":"user css","order":1,"width":0,"height":0,"format":"<html>\n <head>\n <style>\n \n /* Button */\n.nr-dashboard-theme .nr-dashboard-button .md-button {\n background-color: #B3FFFF;\n border-radius: 12px 12px 12px 12px;\n border: 2px solid #000000;\n color: black !important;\n}\n.nr-dashboard-theme .nr-dashboard-button .md-button:hover {\n background-color: lighten(@widgetBackgroundColor, 6);\n}\n.nr-dashboard-theme .nr-dashboard-template .md-button[disabled] {\n color: #888;\n}\n.nr-dashboard-theme .nr-dashboard-button .md-button.md-primary {\n color: black;\n background-color: lighten(@widgetBackgroundColor, 4);\n}\n.nr-dashboard-theme .nr-dashboard-button .md-button.md-raised:not([disabled]).md-focused {\n background-color: @widgetBackgroundColor;\n}\n\n/* Dropdown */\n.nr-dashboard-theme .nr-dashboard-dropdown {\n background-color: #b3ffff !important ;\n color: black;\n border: 2px solid #000000;\n border-radius: 12px 12px 12px 12px;\n}\n.nr-dashboard-theme .nr-dashboard-dropdown p.label {\n margin-left: 3px;\n}\n.nr-dashboard-theme .nr-dashboard-dropdown md-select .md-select-value,\n.nr-dashboard-theme .nr-dashboard-dropdown md-select .md-select-value.md-select-placeholder {\n color: @widgetTextColor;\n border-color: @widgetTextColor;\n border-bottom-width: 1px;\n padding: 0px 2px;\n}\n.nr-dashboard-theme .nr-dashboard-dropdown .md-select-icon {\n color: @widgetTextColor;\n}\n.nr-dashboard-theme .md-select-menu-container {\n max-height: 85%;\n overflow-y: auto;\n border: 1px solid @pageTitlebarBackgroundColor;\n}\n.nr-dashboard-theme md-select-menu {\n margin-left: -2px;\n max-height: 85%;\n}\n.nr-dashboard-theme md-select-menu md-content {\n padding: 0px;\n max-height: 85%;\n}\n.nr-dashboard-theme md-select-menu, .nr-dashboard-theme md-select-menu md-option {\n background-color: @groupBackgroundColor;\n color: @widgetTextColor;\n}\n.nr-dashboard-theme md-select-menu md-option[selected] {\n color: @groupTextColor !important;\n background-color: @groupBackgroundColor !important;\n}\n.nr-dashboard-theme md-select-menu[multiple] md-option.md-checkbox-enabled[selected] .md-icon {\n background-color: lighten(@widgetBackgroundColor, 10) !important;\n border-color: transparent !important;\n}\n.nr-dashboard-theme md-select-menu[multiple] md-option.md-checkbox-enabled .md-icon {\n border-color: @widgetBackgroundColor !important;\n}\n.nr-dashboard-theme md-select-menu.md-default-theme md-option:focus:not([disabled]):not([selected]),\nmd-select-menu md-option:focus:not([disabled]):not([selected]) {\n background-color: @groupBackgroundColor;\n}\n.nr-dashboard-theme md-select-menu md-option:hover {\n background-color: lighten(@widgetBackgroundColor, 4) !important;\n}\n.nr-dashboard-theme md-menu-content {\n background-color: @groupBackgroundColor;\n color: @widgetTextColor;\n}\n.nr-dashboard-theme md-menu-content md-menu-item {\n background-color: @groupBackgroundColor;\n color: @widgetTextColor;\n}\n\n/* Numeric */\n.nr-dashboard-theme .nr-dashboard-numeric {\n background-color: #A9CCE3 !important ;\n color: transparent;\n border: 2px solid #000000;\n border-radius: 12px 12px 12px 12px;\n}\n.nr-dashboard-theme .nr-dashboard-numeric .value {\n background-color: ;\n color: ;\n}\n\n\n\n/* Switch */\n.nr-dashboard-theme .nr-dashboard-switch {\n background-color: #B3FFFF;\n border: 2px solid #000000;\n border-radius: 12px 12px 12px 12px;\n}\n.nr-dashboard-theme .nr-dashboard-switch md-switch .md-bar {\n background-color: rgba(111, 111, 111, 0.5);\n}\n.nr-dashboard-theme .nr-dashboard-switch md-switch.md-checked .md-bar {\n background-color: rgba(red(@widgetBackgroundColor), green(@widgetBackgroundColor), blue(@widgetBackgroundColor), 0.5);\n}\n.nr-dashboard-theme .nr-dashboard-switch md-switch .md-thumb {\n background-color: rgb(148, 148, 148);\n}\n.nr-dashboard-theme .nr-dashboard-switch md-switch.md-checked .md-thumb {\n background-color: rgba(red(@widgetBackgroundColor), green(@widgetBackgroundColor), blue(@widgetBackgroundColor), 1);\n}\n/* Text-Input */\n.nr-dashboard-theme .nr-dashboard-textinput {\n background-color: transparent;\n}\n.nr-dashboard-theme .nr-dashboard-textinput label {\n color: @widgetTextColor;\n}\n.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-has-value label {\n color: @widgetTextColor;\n}\n.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-focused label {\n color: @groupTextColor;\n}\n.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-focused input {\n border-color: @groupTextColor;\n font-family: inherit;\n}\n.nr-dashboard-theme .nr-dashboard-textinput md-input-container .md-input:invalid {\n color: #DA5252;\n}\n.nr-dashboard-theme .nr-dashboard-textinput input {\n border-color: @widgetTextColor;\n color: @widgetTextColor;\n border-bottom-width: 1px;\n font-family: inherit;\n padding-left: 8px;\n}\n/* Text */\n.nr-dashboard-theme .nr-dashboard-text {\n background-color: transparent;\n border: 2px solid #000000;\n}\n.nr-dashboard-theme .nr-dashboard-text p {\n margin-left:0;\n}\n</style>\n </head>\n <body>\n \n </body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":320,"y":880,"wires":[[]]},{"id":"cd566c26.321d8","type":"ui_template","z":"efbe1639.0302e8","group":"7561d62f.0c1518","name":"user","order":2,"width":0,"height":0,"format":"<html>\n\n <head><style>\n ui-card-panel {\n background-image: url(\"/NEW 800x480.png\");\n \n background-repeat: no-repeat;\n background-position: CENTER;\n background-size:100%;\n \n }\n\n</style>\n\n</head>\n <body>\n \n </body>\n \n</html>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":170,"y":880,"wires":[[]]},{"id":"3a85159e.308a0a","type":"ui_switch","z":"efbe1639.0302e8","name":"LIGHT","label":"LIGHT","tooltip":"","group":"b143eb26.a908c8","order":12,"width":3,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"fa-lightbulb-o","oncolor":"red","offvalue":"false","offvalueType":"bool","officon":"fa-lightbulb-o","offcolor":"black","x":530,"y":1320,"wires":[["2f56947e.aeb63c"]]},{"id":"e9ff4df3.89059","type":"ui_numeric","z":"efbe1639.0302e8","name":"","label":"Set Speed","tooltip":"","group":"b143eb26.a908c8","order":8,"width":6,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{value}}","min":0,"max":"100","step":"5","x":1890,"y":1060,"wires":[["8fb69db3.49ad6"]]},{"id":"7561d62f.0c1518","type":"ui_group","z":"","name":"Default","tab":"1a71ce62.59dde2","order":1,"disp":false,"width":"12","collapse":false},{"id":"b143eb26.a908c8","type":"ui_group","z":"","name":"User Facility","tab":"98c1e670.831948","order":1,"disp":false,"width":12,"collapse":false},{"id":"1a71ce62.59dde2","type":"ui_tab","z":"","name":"USER","icon":"dashboard","order":5,"disabled":false,"hidden":false},{"id":"98c1e670.831948","type":"ui_tab","z":"","name":"Facility","icon":"dashboard","order":6,"disabled":false,"hidden":false}]
Hi, in order to make code more readable and importable it is important to surround your code with three backticks
```
like this
```
You can edit and correct your post by clicking the pencil icon.
See this post for more details - How to share code or flow json
You can use a Trigger node, passing in the delay in msg.delay
, to send the On message, then after the delay send the Off message.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.