Automate power on your PC using ESPHome or Tasmota, and integrated into Home Assistant.
Automate power on your PC using ESPHome or Tasmota, and integrated into Home Assistant.
STATUS
: This project is in ideation stage. Come back soon for progress.
LAST UPDATE
: 7 June 2024
Looking for a way to remotely start-up and shut-down a PC from Home Assistant. Also need operational status (sensors) to drive automations.
In a case of Multiple Discovery, it turns out that this idea already has commercial solutions for sale. I’ve found a few variants on AliExpress:
Computer Remote Switch,Wifi Smart PC Start Boot Card,Startup Card Work with Apple Homekit SIRI - This one I really like and have bought myself, as it’s written specifically for the Apple Homekit eco-system that I use.I also like that it uses the new ESPC2-12 module.
TISHRIC Wifi PC Power Switch Computer Remote Boot Startup Card Computer Restart Switch Timing Boot Device Work With Alexa Google - I really like the PCI bracket plate of this one. Depends on Tuya though :( .
eWeLink Computer Remote Boot Card Remote Control Wireless WIFI Switch Relay Module For Computer Work with Google Home and Alexa - I think this one is one of the first modules developed. Also relies on Tuya though :( .
However - none of the above are open source - so we don’t have the ability to modify the firmware … and to add to that, most rely on the Tuya eco-system - so not viable for off-line use, and adds the “cloud” factor to it’s use.
So I’m progressing with building … EE design is done, but I need to change focus to building the firmware.
// this one makes most sense
ajfriesen
- The pc-switch // great source for ESPHome YAML example
Erriez
@Github - ESPHomePCPowerControlHomeAssistant // ditto
&
SilverFire
@Github - esp8266-pc-power-control[June ‘24 update] - dropping the need for inputs. Only one is needed at this stage .. i.e. is the PC ON or not. Also removing the need for PSU monitoring, and it’s source of power. Turns out that PCIe bus supplies a 3.3V “Aux” line (a.k.a. “Standby” power), so we can just tap of the PCIe slot.
true
when +5V})false
when +5V } / PS-ON (Pwr Sply switch))true
when +5V}[June ‘24 Update] - Solid state / MOSFET relays are still in. Addon outputs are however dropped. But… I2C is exposed as a single QWICC connector in case one wants to extend.
“Sensor” should be isolated from circuit with an Op-amp Comparator](https://www.electronics-tutorials.ws/opamp/op-amp-comparator.html) or Level Shifter circuit. (Inputs will be 5V, whilst the ESPxx works on 3.3v.)
Do not use a transistor, nor a mechanical relay
Some PC’s have “Positive” switches, others have “Negative” switches. Accounting for this is too complex (i.e. prone to installer error), so would it be better to use a relay (e.g. Omron G6K [SMD @ ±$7], or Songle .SRD-3VDC-SL-C
/ Omrom G5LE [THD @ ±$0.36¢] )
The issue here is that the MLB (PC Motherboard) may be using a low-sensing circuit, or a high-sensing circuit - and this PCB must account for both!
All we get access to is the points that are the pins of the switch.
Solution looks to be a TIP3123 opto-MOSFET, thanks to Andy aka.
5.5s delay on ON, then back to OFF to simulate a “long press”.
3 possible ways to do this:
EE solution with caps and transistors - not really viable since because of its variable performance and unchangeable nature. (See here)
If Software solution (i.e. on ESPHome or Tasmota), then how do we create a “One-Shot” Normally-Open switch?
ESPHome, can do this with with a on_turn_on
trigger.
Tasmota, can do this with “Rules” on the device.
Home Assistant with an automation trigger using an “action
” > “sequence
”.
But, what if the user forgets to “modify” the default f/w or build the HA automation required? The device must handle the one-shot functionally itself.
⚠ Custom f/w (or fork of) must be built for timed “one-shot” / “delay off” functionality.
Usa a second MCU with a timing circuit - e.g. ATtiny85 or STM8S001J3 or STM32C0.
Cheaper, but needs external programmer (add headers for that).
[Update ‘24 Update] Both the ESP-07 and the newer ESPC2-12 modules have the same footprint and pinout, adding far more versatility.
Will allow for drilling holes for external antenna.
[June ‘24 Update] Build to PCIe V2 specification. To fit standard PCI Bracket plates: