here is a bit of a flow I have that might help, you will need node-red-contrib-mytimeout. I use this to shut off my coffeepot after 20 minutes (you can see the project here) I've pulled this from the actual flow and used an inject to show how to start it up.
[{"id":"32ed9f58.c8e028","type":"mytimeout","z":"1562c5a5.1c9992","name":"Coffee OFF delay","outtopic":"","outsafe":"1","outwarning":"","outunsafe":"0","warning":"5","timer":"4","debug":false,"ndebug":false,"ignoreCase":false,"repeat":false,"again":false,"x":450,"y":320,"wires":[[],["8bcc5f98.d63d08","8cd9d5ed.78576","ac88657a.307ce"]]},{"id":"8bcc5f98.d63d08","type":"ui_gauge","z":"1562c5a5.1c9992","d":true,"name":"Coffee Pot Status","group":"a4715954.81739","order":3,"width":0,"height":0,"gtype":"donut","title":"Coffee Pot Status","label":"","format":"","min":"0","max":"1200","colors":["#b1de8c","#00b500","#ffc777"],"seg1":"300","seg2":"800","x":730,"y":320,"wires":[]},{"id":"8cd9d5ed.78576","type":"change","z":"1562c5a5.1c9992","name":"change to hh:ss","rules":[{"t":"set","p":"payload","pt":"msg","to":"(payload-(payload%60))/60 & \":\" & $pad($string(payload%60),-2,\"0\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":440,"wires":[["9ed66bce.4eccc8","e2a2066a.d91f68"]]},{"id":"37580157.30264e","type":"comment","z":"1562c5a5.1c9992","name":"Displays countdown till pot turns off","info":"","x":760,"y":400,"wires":[]},{"id":"9ed66bce.4eccc8","type":"ui_text","z":"1562c5a5.1c9992","d":true,"group":"a4715954.81739","order":4,"width":0,"height":0,"name":"Time till shutoff","label":"","format":"{{msg.payload}}</br>poweroff","layout":"col-center","x":900,"y":440,"wires":[]},{"id":"ac88657a.307ce","type":"debug","z":"1562c5a5.1c9992","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":690,"y":280,"wires":[]},{"id":"afbca350.e8ce08","type":"inject","z":"1562c5a5.1c9992","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"payload\":\"on\",\"timeout\":60,\"warning\":30}","payloadType":"json","x":250,"y":320,"wires":[["32ed9f58.c8e028"]]},{"id":"e2a2066a.d91f68","type":"debug","z":"1562c5a5.1c9992","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":830,"y":520,"wires":[]},{"id":"a4715954.81739","type":"ui_group","z":"","name":"Coffee Pot","tab":"ff3a300e.77abd","order":1,"disp":false,"width":"6","collapse":false},{"id":"ff3a300e.77abd","type":"ui_tab","z":"","name":"Coffee Pot","icon":"dashboard","order":1,"disabled":false,"hidden":false}]