hi i made nodered automation but i not 100% sure if i made it right… to detect if hydro is right wait 5 min if the power is out check if the power is still out if it still is then run the steps… i remember someone saying i shouldnt use delay it hangs but i wasnt sure how to use the trigger node as a delay… so i could use help this is what i got so far
[{"id":"b3afeaf7337c498c","type":"poll-state","z":"227346dedf06f0cc","name":"Line Voltage","server":"915baa48.9b1898","version":3,"exposeAsEntityConfig":"","updateInterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputInitially":true,"outputOnChanged":false,"entityId":"sensor.bar_basement_lights_voltage","stateType":"num","ifState":"","ifStateType":"str","ifStateOperator":"is","outputs":1,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":70,"y":820,"wires":[["719b8ab0aaae9db7"]]},{"id":"719b8ab0aaae9db7","type":"switch","z":"227346dedf06f0cc","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"gte","v":"100","vt":"str"},{"t":"eq","v":"stop","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":250,"y":820,"wires":[["23af0d09ee369b25"],[],["dfc5719d35cbba60"]]},{"id":"2876e20dd0c32aae","type":"change","z":"227346dedf06f0cc","name":"Auto Turn On Generator","rules":[{"t":"set","p":"device","pt":"msg","to":"Generator_Back_Building","tot":"str"},{"t":"set","p":"command","pt":"msg","to":"Remote 2 Start","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":910,"y":800,"wires":[["623f81b8c9cf4d8e"]]},{"id":"5e88c3890c2152d7","type":"trigger","z":"227346dedf06f0cc","name":"Check Every 5 Min For Line Voltage","op1":"ALARM","op2":"0","op1type":"str","op2type":"str","duration":"-5","extend":false,"overrideDelay":false,"units":"min","reset":"stop","bytopic":"all","topic":"topic","outputs":1,"x":300,"y":940,"wires":[["719b8ab0aaae9db7"]]},{"id":"23af0d09ee369b25","type":"delay","z":"227346dedf06f0cc","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":400,"y":800,"wires":[["9a357065351d94dd"]]},{"id":"ef338b148133c977","type":"poll-state","z":"227346dedf06f0cc","name":"Line Voltage","server":"915baa48.9b1898","version":3,"exposeAsEntityConfig":"","updateInterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputInitially":true,"outputOnChanged":false,"entityId":"sensor.bar_basement_lights_voltage","stateType":"num","ifState":"100","ifStateType":"num","ifStateOperator":"gte","outputs":2,"outputProperties":[{"property":"payload","propertyType":"msg","value":"stop","valueType":"str"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":70,"y":940,"wires":[["5e88c3890c2152d7"],[]]},{"id":"623f81b8c9cf4d8e","type":"function","z":"227346dedf06f0cc","name":"Broadlink RM4 Pro Bedroom","func":"msg.entity =\"remote.broadlink_rm4_pro_bedroom\"\nmsg.hold_secs = \"2\"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1160,"y":800,"wires":[["251d4449e72059a7"]]},{"id":"251d4449e72059a7","type":"api-call-service","z":"227346dedf06f0cc","name":"Send Remote Commands","server":"915baa48.9b1898","version":5,"debugenabled":false,"domain":"remote","service":"send_command","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"device\": msg.device,\t \"command\": msg.command,\t \"entity_id\": msg.entity,\t \"hold_secs\": msg.hold_secs\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1150,"y":840,"wires":[[]]},{"id":"9a357065351d94dd","type":"api-call-service","z":"227346dedf06f0cc","name":"Fuel Switch On","server":"915baa48.9b1898","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.generator_2_building_fuel_switch"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":800,"wires":[["04b8377b86e523cd"]]},{"id":"04b8377b86e523cd","type":"delay","z":"227346dedf06f0cc","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":720,"y":800,"wires":[["2876e20dd0c32aae"]]},{"id":"dfc5719d35cbba60","type":"api-call-service","z":"227346dedf06f0cc","name":"Fuel Switch Off","server":"915baa48.9b1898","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.generator_2_building_fuel_switch"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":860,"wires":[["6d9ffd2ae93f4e18"]]},{"id":"6d9ffd2ae93f4e18","type":"delay","z":"227346dedf06f0cc","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":730,"y":860,"wires":[["494755b026b71853"]]},{"id":"494755b026b71853","type":"api-call-service","z":"227346dedf06f0cc","name":"Turn Off Generator","server":"915baa48.9b1898","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.generator_2_building_fuel_servo_power","switch.generator_2_building_power_remote_starter"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":860,"wires":[[]]},{"id":"fb06290cc822fb63","type":"comment","z":"227346dedf06f0cc","name":"Start Generator Info inside","info":"Checks every 5 Min for Hydro out\nif hydro out for 5 Min\nwait 5 min \nTurn On Fuel Value\nWait 2 Min For Fuel bowl to fill up\nStart Machine","x":590,"y":760,"wires":[]},{"id":"725cd102d91d57d5","type":"comment","z":"227346dedf06f0cc","name":"Stop Generator Info inside","info":"Checks every 5 Min for Hydro out or not\nif hydro back on after 5 Min\nTurn off Fuel Value\nlets Generator run till out of Fuel\n\nWait 10 Min For Fuel bowl to empty\nTurn Off Generator Power\nTurn off Servo Power\n","x":590,"y":900,"wires":[]},{"id":"6922402f91b9a30a","type":"comment","z":"227346dedf06f0cc","name":"Generator 2 (Back Building)","info":"","x":120,"y":760,"wires":[]},{"id":"915baa48.9b1898","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]
i noticed it doesnt do what i also want tit to do
if it detects power is out for 5 min… and it starts its delay 5 min before it starts the generator… i want it to check 1 more time to see if power is back on or not if its not on continue… if its back on then cancel… i think u you do that with the trigger node but i not sure