AmpSwitch using two GPIO pins with different delay?

Hi all,
I am new to this forum and seeking for a sollution to set AmpSwitch to use two GPIO pins with different delay.
The first GPIO pin could be the default number 14 with default delay at 720 msec.
This GPIO pin is used to switch my amplifier on and off (works fine)

I would like to use a second GPIO to switch the fan that cools the amplifier and this can switch on at the same time an switch off with a delay of 60000 msec (and so switch the fan about 10 minutes after the amplifier stops).

Is this possible ?
eventually with changing the script manually
so any suggestions are welcome.

Will

Everything is possible :wink: but given that this is somewhat of a niche case, I don’t think @Fightclub would add it to the plugin and GUI.

That being said, it is only a few lines of code you would have to add around here

cheers!

As spyking mentioned, it’s a corner case that I think except for you, no one needs, so I will not implement this functionality in AmpSwitch. However, feel free to fork AmpSwitch and modify the index.js (it’s the else if block starting in line 169 that you’re looking for). You might also consider a hard-wired control for your fan that is more error-prone. I don’t know the english term right now, but just think of a bathroom fan that runs for a few minutes after the light has been turned off, google will be your friend. Hard-wiring such a control to the input of your amp will prevent overheating due to software hiccups. In my eyes a preferable solution :slight_smile:

Thanks for replying Spyking and Fightclub,
Sure, there are more solutions possible, even hardware or electronic delay-mechanism. As a part of my project I will try to alter the script with the option of a second GPIO pin that has a different delay .
I am very happy with your advise which saves me a lot of seeking.
I will let you know about the result of my project.

Will