There's a need for a relay button that returns to the original position after a chosen time limit

I need a button for my relay that would switch back to the original position after a brief period once I activated the relay.

I only need a momentary pulse to open my garage door and gate.

Please help. My project is stranded. I’m not a developer so I cant write my own code.

Johann

Hello Sir,
Welcome to the Cayenne Community! :slight_smile:
I recommend to read this part of the documentation → Cayenne Docs
What kind of platform do you use ? :slight_smile:
You can set up a relay module, send a command from the dashboard to turn it on. After that you can set a delay function and then turn it of. After that you can try to update the state in the dashboard. I have not try this, but if you can try and start from somewhere, here in the community we can help you.

I can also try this but in the Weekend.

1 Like

Hi @jnj
I solved this problem by setting up a trigger turns off the relay immediately after it has been activated, give it a try.

Very good. Is it able to deliver the pulse that you need for the garage door ?

I will try on Monday. Thank!

Hallo Sir

I have could not figure out how the virtual pins work. Can you maybe help me?

Johann Joubert

Where are you stuck? Are you needing a momentary button and trying to do it with virtual writes?

I tried the trigger to shut the relay down as soon as it is activated but same times it takes a split second to long and the door will close again without opening completely

are you using MQTT or regular cayenne? Can you post your code?

I only use Cayenne programme and my Pi. I dont have any special code.
I am a beginner and have no experience in coding. I need a button in Cayenne on my dashboard with a timer on that will return to the open position after a set period in the close position.

Sorry, it’s not possible with the standard agent right now. You will have to use the MQTT API, REST API, or an Arduno. Here is an Arduino solution