Can anybody tell me what node i can use to switch on a relay for 3 seconds

good day
can anybody tell me what node i can use to switch on a relay for 3 seconds

Trigger node (and something to start the flow like a UI button or inject node)

E.g.

Inject > trigger > your-relay-node

Here is how I control one of my blinds by activating a relay that simulates a press on the remote control button

[{"id":"2ae520f2e33428fd","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"bb898f1fbb7cf2f6","type":"delay","z":"2ae520f2e33428fd","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"x":460,"y":180,"wires":[["1006b2767f798513"]]},{"id":"039e470f5f32386d","type":"mqtt out","z":"2ae520f2e33428fd","name":"Relais 6","topic":"cmnd/ESP-Stores/POWER3","qos":"","retain":"","broker":"702ec46.d6e003c","x":740,"y":160,"wires":[]},{"id":"1006b2767f798513","type":"function","z":"2ae520f2e33428fd","name":"OFF","func":"msg.payload = 'OFF'\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":180,"wires":[["039e470f5f32386d"]]},{"id":"59a7628d3f584be7","type":"function","z":"2ae520f2e33428fd","name":"ON","func":"msg.payload = 'ON'\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":160,"wires":[["039e470f5f32386d","bb898f1fbb7cf2f6"]]},{"id":"332531dab392cc3e","type":"switch","z":"2ae520f2e33428fd","name":"Store Sud","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":160,"y":180,"wires":[["59a7628d3f584be7"],[]]},{"id":"702ec46.d6e003c","type":"mqtt-broker","name":"MQTT-Debian64","broker":"192.168.1.160","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

I'm new to this and i'm trying to automate my house please give more detail on how to use this sring of code

thank you but please tell me how to set up (Inject > trigger > your-relay-node) im new to this and trying to automate my house as a project

open your flow editor, go to the top right menu, click on "Import" and paste the example I gave you. Then you can study how it works by opening each node. This is very telling by itself.

ok thank you i will try
now im having a problem opening node-red it cant connect to server

what happens when you run the node-red-start command from the console? Please put a screenshot

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.