How to control house climate system
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Opto-isolated RPi control. Pull GPIO "low" to activate. Figure 2. Same circuit with less load on GPIO pins. Pull GPIO "high" to activate.

The circuit you have shown would probably work fine. Just pull each of the lines (0), (2) and (3) to ground with a transistor. The problem is that we don't know for sure whether the ground in the controller is at the same ground as your RPi. If it isn't then we could have smoke.

To solve this you can use opto-isolators.


Figure 1 shows the simple version. R2, 4 and 6 limit the current to the opto-LED to about 5 mA so check the datasheet for your opto-isolators to confirm that this is high enough.
Figure 2 does the same thing but with less loading on the GPIO pins.
The opto isolators ensure complete electrical isolation between the RPi and the controller.