# Circuit to replace a relay

I want to make a simple ladder circuit to control the on and off of a light bulb using 2 switches, but I am going to manipulate one of the switches by means of a microcontroller, and also I don't want to use a relay because they wear out with time. I am trying with this circuit with optocouplers, a pnp transistor and triacs, as seen in the image, but it does not work well, also when I am simulating it in proteus 8.9 after a certain time it throws me these errors: