I'm getting really into home automation as a side project of mine and one of the next things I would love to automate is my doorbell.
Short question: If I have a switch (momentary button in the form of an intercom buzzer) of an unknown voltage/current etc. how would I go about allowing the NodeMCU to read whether or not the buzzer has been pressed without risking frying the NodeMCU?
Long question: I plan to hook up my NodeMCU in some way to my intercom system so that when someone buzzes the door, it will send an http request to my Homebridge server which is running homebridge-http-motion-sensor, therefore allowing me to be notified as to when someone is at the door. I am capable of almost everything else including programming the NodeMCU etc. but can't seem to find anything online which tells you how you can get a NodeMCU to detect a switch closure on something not being run off the 3.3V out (i.e. something like this wouldn't work). Is there any sort of hardware out there like a reverse relay sort of thing which would allow me to do this?
If you would like a clearer picture of what I'm talking about; here is a rather poorly made diagram of mine which should allow you to get an idea of what I'm talking about:
I would really appreciate it if someone could give me some guidance on how to best do this.
Thank you in advance for any help,
Kind regards, John