I am a complete beginner so please forgive everything!
I have an old GE lighting system which uses an RR7 mechanically latching relay activated by half wave rectified 24VAC.
One button turns on and one button turns off - this produces a momentary pulse and then the relay latches itself to on or off so the current is not flowing continuously. I would like to detect these 24VAC pulses into my ESP32. I used two octo couplers but I think there is a loop back via the common such that both couplers activate when either switch is pressed. I have put some latching software logic on the ESP side to toggle state only when either U1 or U2 is active but if both then do nothing. But it is quite unreliable as I get spurious signals all the time.
I have experimented with all kind of diode setups but I cannot seem to get it such that when SW1 is pressed only U1 activates and similarly for SW2 and U2.
The part to the left is the fixed setup in the house that I don't want to mess with and the part to the right of the relay (which I have put as L1 and L2 as I couldn't find symbol for center tapped solenoid relay) is where I want to tap the ESP32 on to.
I would like to tap in very non-intrusively such that when SW1 is pressed little to no current is induced in L2 and vice versa so that the relay behavior is as it would be if not tapped into MCU.
Thanks in advance for any suggestions!

I have an old GE lighting system which uses an RR7 mechanically latching relay activated by half wave rectified 24VAC.
One button turns on and one button turns off - this produces a momentary pulse and then the relay latches itself to on or off so the current is not flowing continuously. I would like to detect these 24VAC pulses into my ESP32. I used two octo couplers but I think there is a loop back via the common such that both couplers activate when either switch is pressed. I have put some latching software logic on the ESP side to toggle state only when either U1 or U2 is active but if both then do nothing. But it is quite unreliable as I get spurious signals all the time.
I have experimented with all kind of diode setups but I cannot seem to get it such that when SW1 is pressed only U1 activates and similarly for SW2 and U2.
The part to the left is the fixed setup in the house that I don't want to mess with and the part to the right of the relay (which I have put as L1 and L2 as I couldn't find symbol for center tapped solenoid relay) is where I want to tap the ESP32 on to.
I would like to tap in very non-intrusively such that when SW1 is pressed little to no current is induced in L2 and vice versa so that the relay behavior is as it would be if not tapped into MCU.
Thanks in advance for any suggestions!
