You have provided very little information with which to work with. You will probably need a circuit to interface the output of cp2 to the input of the CPU and you will need a separate circuit to interface the CPU through the relay to the appliance.
Since appliance switching involves working with lines voltages which are dangerous for the novice, I recommend that you use an off-the-shelf appliance control module between the CPU and the appliance.
What is the nature of the interface available from cp2? What kind of CPU are you using?