Goal: Use transistor as a switch to control an intercepted signal
I have a system for which the schematics/information are not available. I refer to it as a Blackbox (also labeled as such on my diagram). I've cut the wire between the "Blackbox controlling all peripherals" and "Blackbox controlling solenoid". I would like to join them together but with a transistor in the middle so I can use my RPi to either allow communication or block communication on this wire. For example enabling HIGH on RPi CTRL pin on diagram.
The dotted lines on diagram represent where I would make wired connections however I do not know what type of transistor or what a correct schematic for this purpose would look like?
I would like help mocking up a schematic that would accomplish my goal.