I want to know the state of an external Relay connected to my Raspberry-Pi. Basically if there is current flow or not in A-B. A-B should be connected to R-Pi.

I am not sure how to proceed even though I found many similar topics (example: [Detect if current is flowing](https://raspberrypi.stackexchange.com/questions/11817/detect-if-current-is-flowing)). I don't know if they are compatible with my problem as I don't want to fry my devices ^^"

So the questions are:

* How to connect the relay properly to R-Pi
* What extra components are needed
* How to detect the relay status ON/OFF

[![enter image description here](https://i.stack.imgur.com/qu0yM.png)](https://i.stack.imgur.com/qu0yM.png)

**Edit.1:**

I have 2 Honeywell wireless thermostat with their corresponding relay boxes which are meant to be used in stand alone mode as follows, but only 1 can be connected to the boiler:

[![enter image description here](https://i.stack.imgur.com/eLOqE.png)](https://i.stack.imgur.com/eLOqE.png)

In the new setup, the goal is to use a Raspberry-PI to coordinate between the two and control the boiler using my [own relay](https://rads.stackoverflow.com/amzn/click/com/B01HEQF5HU) and logic (example: only turn-off when both Relays are off, ...) -please excuse the crude diagram-

[![enter image description here](https://i.stack.imgur.com/EXxJN.png)](https://i.stack.imgur.com/EXxJN.png)

All components are within 1 meter distance.

**Edit.2:**

I tried to avoid overwhelming you with extra details. But it seems inevitable to have the right answer. Anyhow, the scheme below shows and overview of the overall installation:

* We have 2 floors each with similar components: relay (controlled remotely), 3-way valve and a pump
* the relays trigger the heat request
* the RPI is coordinating how the different components behave based on that trigger (logic yet to implement but that part should be ok)

[![enter image description here](https://i.stack.imgur.com/Kg0HO.png)](https://i.stack.imgur.com/Kg0HO.png)