Challenges detecting intercom buzz (Particle Photon)
24V is huge compared to the 3.3V supply voltage of your photon. You really need to be dividing this voltage by 7 to get an appropriate input signal (which means that 'signal noise' that's ~8dB below the 24V signal could still show 'full-scale' to your photon)
It's generally best to use a capacitor to 'smooth' the DC output from a diode-rectified pulsed-DC (labeled AC in my diagram) signal.


Without reading through all of your datasheets for 'perfect' specs, I think something like this circuit should work for you:



If the 24V signal is 24Vrms AC, then your actual (peak-to-peak) rectified voltage would be 24 x sqrt(2), or ~34V. In which case, change the resistances to a 9:1 ratio, rather than the 6:1 in my schematic.