I'm planning to add a WiFi-enabled relay (Shelly 1) to my coffee maker for some fun home automation. In this case, the coffee maker has a tactile switch labeled "brew now". I understand the approach of using a transistor to connect a relay to the switch, such that the relay can emulate pressing the button.
However, I would like to send the signal from the switch to the relay, so that it works like a momentary switch, with different functionality based upon how many times / how long it's pressed. The basic functions would be:
- Single, short press = trigger automation for delayed brewing
- Single, long press = initiate brewing now
So in this case, I do need the relay to send the signal to the machine, but I also need to intercept the signal from the switch and send it to the relay. This is where I'm stuck. Images included below.
Any suggestions?