Momentary Action Relay - I'm stuck (Closed or Open!)

I an new to this and really hoping to catch the eye of @ogiewon ! I have got the ST_Anything_Relays sketch up and running - it seems to be working perfectly. However for my use case I would like to re-purpose some of the 16 relay outputs. There are 16 in the sketch, I would like to use 10 of them exactly as they are…press the physical momentary contact on the Arduino (or on the tile in the app) and the relay closes on press one and closes on press two. Thats working fine right now - great.
Now, I would like three of the relays/pins to act as a momentary closure relay. lets say these three pins:
#define PIN_BUTTON11 48
#define PIN_BUTTON12 49
#define PIN_BUTTON13 50
These will have the effect of closing the relay for 1000 milliseconds, then opening it again (with a single press on the physical button or on the tile in the app.

And just to be greedy I would like the remaining three pins /relay to have the same action as they already do - but with a delayed response of 30 seconds - yes, you guessed right - an entry/exit delay!

It goes without saying that I am extremely grateful for Team Ogiewon’s work on all this - it has made this code accessible to a beginner like me - I have tried applying my minimal skills to modifying the code using groovy wait states (or was that sleep) to achieve the code by sending a relay off command back to the Arduino - but I think there is a disconnect between how I think this works and how it really does work!

If any body can offer some direction I would be really grateful…


I believe much of what you want is already available via my example sketches. You’ve obviously found my “Relays” example. Have you looked at my “TimeDelayRelays” example sketch as well? By combining these two, I think you’ll have most of what you want.

On the road right now, so no access to my development system.


Thanks Dan,
You are right - it was under my nose…Ill check it out.