I want to be able to shut down my computer remotely. I can start it via Wake On LAN with an ESP8266 (WeMos Di1 mini board).
My priority is to protect my computer. For this reason, I decided to use an optocoupler (Vishay SFH610A-1 DIP-4) to protect it. Additionally, I will use an external USB power supply and not the computer’s power supply.
I want to use the attached circuit to shut down my computer. I did not choose the optocoupler based on anything. It was the only one available at the local store. Is it appropriate? I want to be able to use the power button as well. I selected the resistor based on the following values for the LED: Voltage: 1.25V, current: 20mA and the voltage for the ESP8266: 3.3V. I used the formula R = (3.3V-1.25V)/0.02A = 102,5 Ohm.
But I don’t know it the values are correct because I do not understand the datasheet completely. What is the difference between “Switching Saturated” and “Switching Non-saturated”. I added a link  to the datasheet at the end. The datasheet shows a circuit on page 5 which contains a resistor before the collector pin. What is the reason for this?
Another problem is that the manual of my motherboard does not specify which pin of the connector is + and which is -. Can I break something if I try it both ways? Is it possible to damage the motherboard with this circuit?
Additionally, but less important:
The ESP8266 cannot connect to the WIFI if the case is closed. Could you recommend me an Arduino with ethernet? I did consider a pure software solution, but it is not possible to shut down the computer via software if it is stuck and Intel decided that my CPU does not need vPro.