Relays for dummies

Morning guys,
You have no idea how MUCH I appreciate all your input!! The wife was surprised that I finally started at least a discussion on the forum about her garage port request. So I assume she won't divorce from me yet. Perhaps next week, when I don't manage to put your knowledge into practice :rofl:

@dceejay: Ok I understand that, but do you have any proposal to protect the pcb of my garage port opener. Those are pretty expensive devices, and it won't be appreciated if that is somehow damaged, e.g. by short circuit of the wiring …

@markost: that is indeed a good proposal, but I think I need to give you some more history ... Initially (more than a year ago …) I bought some similar stuff on Aliexpress. But I asked here for my birthday an official electricity closet and a whole box of din-rail relays:
image

And I even have CAT6 cables installed from my garage port openers to this closet. So that is the reason I really want those din rail relays working… In my local store there are other Finder relay modules that fit into the blue sockets, but not sure which one I would have to buy. For example:

image

I figured out that I can determine the port status, by measuring the voltage levels of both pins:

image

So if I could read pins 5 and 6 via GPIO into Node-RED, then I know enough ...

@dynamicdave: Ah I didn't know that yet :rofl:
Indeed that is also something I have been thinking about. Working distributed certainly has a lot of advantages, but I would really like to have all the relays in the (meanwhile famous) central closet. That is one of my many brain aberrations…

@Paul-Reed: do you have any idea whether this is available (e.g. on Ali) as a module, or do I have to start soldering? Perhaps a board with N of these modules somehow… Would be a bit disappointed in my closet became filled with self-soldered stuff.
Thanks for the circuit diagram!

Hmm I don't have a shielded cat cable… But some time ago, a network guy was doing a lot of cabling work in our office, and then I asked him how he would do the wiring (to avoid interference). He proposed to solder together both wires of a twisted pair, to connect them both to the same pin. So I did it like he told me:

image

And nobody mentions 'fuses'. Isn't that required when using optocouplers perhaps? What happens when somebody accidentally cuts to the wires some day?