Marek, did a bit of digging and came up a few ideas.
The suggested MOSFET wiring in #6 post is not correct. From what you have described, it is most likely the lower set of four, upper left image of the P-Channel design you are after where the intercom is the load.
It could be as simple as setting the pin mode and providing digitalWrite() but after reviewing intercoms with a transformer coil (ref #6 post) implies a higher than required secondary and likely modulated or clipped AC.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Marek, did a bit of digging and came up a few ideas.
The suggested MOSFET wiring in #6 post is not correct. From what you have described, it is most likely the lower set of four, upper left image of the P-Channel design you are after where the intercom is the load.
It could be as simple as setting the pin mode and providing digitalWrite() but after reviewing intercoms with a transformer coil (ref #6 post) implies a higher than required secondary and likely modulated or clipped AC.
Referring again to p.151 of the spec, it will be discovered the GPIO pin cannot survive that voltage nor would it be able to drive enought current.
One of my favorite learning videos is the exploding LED, around 03:08
and likely what might happen to the MDBT42Q
Other ideas might be use of a relay or opto-isolator. Tutorials thre also.
Without the schematic of the intercom, we are just guessing and that most likely will lead to the unfortunate, unrecoverable 03:08
Any chance you could provide images of the exposed intercom wiring and how the shorting of pins is done?