It is recommended to place the ESP outside the computer case when the WiFi connection is unstable or distance too low. However, the computer case is metal shielded, so the WiFi distance to the base station reduces. There is sufficient space in an ATX computer case to mount the ESP board. DownloadsĪ DIY breakout PCB can be mounted at the system panel header to connect power button SW1 and reset button SW2. Warning: All ATX and ESP pins must be operating at 3V3. Transistor Q1 is used for secure isolation between ESP8266 and motherboard. Pin D2 is used to pull the power button low to generate a short or long press. Resistor R1 is used to minimize current when the IO pin is accidentally set to output. Pin D1 is used to read the power status from the reset pin: High is on, Low is off. Used to read power status via the reset button pin:. Short press: Turn PC on or generate graceful shutdown.Header J2 contains the power, reset and GND pins: The ESP8266 or ESP32 is powered via an on-board 3V3 regulator. Header J1 pin 1 constant +5V power on pin 1, even when the PC is power-off and is used to power the NodeMCU. My NAS is based on an Intel Core I7 ASRock Z97 ATX motherboard and contains standard 2.5mm 2x5 male headers: A second pin reads the motherboard power status.One pin controls the power button by generating a long or short press.Theoretically any ESP8266 or ESP32 board can be used for this project. In my case I used an ESP8266 NodeMCU board. The hardware consists of an ESP8266 or ESP32 and two IO pins, mounted on a PCI metal plate (see picture below). This is currently not included in Homeassistant documentation. It requires an external Docker container as bridge to forward magic packages and is beyond the scope of Homeassistant. Running Homeassistant Wake-On-Lan in a Docker container cannot forward broadcast magic packets with a bridged network configuration.The reason is that WOL is disabled on most computers at first power on and requires activation by a running operating system before the PC responds on a magic packet to wake the computer. Wake-On-Lan magic packets are ignored when connecting main power the first time to the power supply, even when WOL is activated in the BIOS.To put a Linux machine in sleep state, a SSH connection to the remote PC can be made for example by executing pm-suspend command (Install via sudo apt install pm-utils), reference Ubuntu pm-action documentation.There is no shutdown/suspend functionality. Wake-On-Lan (WOL) can only wake a PC from suspend or power-off state.The ESP is password protected via Homeassistant. Any device on the same LAN can wake a PC by sending a magic packet. Wake-On-Lan (WOL) has no authorization! The WOL protocol has no functionality to provide a password or allow a specific computer to wake from.This has several known limitations which are not applicable with this ESP project: Wake-On-Lan (WOL) is intended to turn computer power on remotely via Ethernet by sending a so called magic packet. Use with any (micro/mini)-ATX computer motherboard.Äifferences Wake-On-Lan (WOL) magic packet.Power/reset buttons front panel remains full functional.Read PC power on/off status from motherboard.Force power-off (Behavior long press power-button).Graceful shutdown/suspend/hybernate of the operating system (Behavior short press power button).Turn PC power on from any power state such as power-off/suspended/hybernate (Behavior short press power button).Control physical PC power button (front panel) connected to the motherboard:.I use this project to power my PC based NAS remotely on and off via Home Assistant as alternative to Wake-On-Lan (WOL) which has known limitations. This project contains remote PC power control via HomeAssistant and ESPHome ESP8266/ESP32 boards. ESPHome PC Power Control via Home Assistant
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |