Get a PC state and turn it on or off
Posted: Wed Jul 31, 2024 1:32 am
Hi, there! Newbie, here.
I have a server at home which I want to know if it's turned on or off and, if necessary, turn it on or off. All by the internet.
This could be accomplished by a feature called Wake-on-LAN (WoL) by broadcasting a magic packet with a MAC Address label on it. This works from LAN, but routers do not forward that from WAN requests anymore.
So, here's my plan: to use an ESP32 to "read" the Power LED connector from the motherboard to check if the PC is turned on; and to use the motherboard's on/off connectors to turn the PC on.
I believe I can feed the ESP32 from the motherboard's aways-on 5V or some USB connector - which would also link the ESP32 ground to the motherboard's ground.
This way I could connect only the Power LED connector to one pin and check if it is HIGH. And use and opto-coupler to briefly short connect the Power ON conectors to turn the PC on.
My question: am I right? Could you please help me by correcting my mistakes, here?
I have a server at home which I want to know if it's turned on or off and, if necessary, turn it on or off. All by the internet.
This could be accomplished by a feature called Wake-on-LAN (WoL) by broadcasting a magic packet with a MAC Address label on it. This works from LAN, but routers do not forward that from WAN requests anymore.
So, here's my plan: to use an ESP32 to "read" the Power LED connector from the motherboard to check if the PC is turned on; and to use the motherboard's on/off connectors to turn the PC on.
I believe I can feed the ESP32 from the motherboard's aways-on 5V or some USB connector - which would also link the ESP32 ground to the motherboard's ground.
This way I could connect only the Power LED connector to one pin and check if it is HIGH. And use and opto-coupler to briefly short connect the Power ON conectors to turn the PC on.
My question: am I right? Could you please help me by correcting my mistakes, here?