Jump to content

Show: Start pc via HomeAssistant

30cl

Hey all,

I was working on a small DIY project to turn on/off my PC over the network with Home Assistant. My game PC is upstairs and I'm using a RPi4 with moonlight to play in the living room.

In My pool leaked and killed my computer Linus said he is still not able to turn on/off his PC's for the game room. So I decided to share the project her. Maybe it can help someone:

 

https://github.com/30cl/remote-pc-power-on

 

I used a WeMos D1 clone (a ESP-8266 based micro controller), connected to the WiFi and the motherboard. It can detect if the PC is on, and toggle the power/reset buttons. The badly soldered first working prototype and the Home Assistant panel look like this:
 

result.jpg.63262510dfa2ed749c0a45473f97d3f8.jpgha.png.273eb88b4315a1edd747b5e1ed230982.png

 

Hope this helps anyone.

 

Link to comment
Share on other sites

Link to post
Share on other sites

that's a lot of transistors, but probably a very safe design and it's probably not worth the engineering cost to slice the BOM down.

 

i might get myself involved with this one and make something that can address multiple systems, so you dont need to stick a device on your wifi per computer.

Link to comment
Share on other sites

Link to post
Share on other sites

Its 2 per button, I did try with a single one, and did not get it to work.

If you only care to toggle the power, 2 transistors and a single resister would be enough.

 

If you place it outside the case, and some modification it could easy handle multiple system.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, 30cl said:

Its 2 per button, I did try with a single one, and did not get it to work.

If you only care to toggle the power, 2 transistors and a single resister would be enough.

 

If you place it outside the case, and some modification it could easy handle multiple system.

driving them with 10k resistance from 3v3 might be a bit too optimistic. with 1k you might not need two.

 

and for talking to multiple systems i'm pondering either dedicated inputs (there's plenty of pins), a multiplexer, or a 4-bit IO expander and just have i2c to each "sub-module" per system.

 

oh - and just my preference on things, i'd probably ditch the transistors outright and go for optocouplers.

 

PS; stretch goals to implement temp sensors so homeassistant can warn about coolant / heat sink temperatures?

Link to comment
Share on other sites

Link to post
Share on other sites

How does this differ from using a Wifi outlet to turn power on and off to a PC what has Boot On Power?

 

 

"Do what makes the experience better" - in regards to PCs and Life itself.

 

Onyx AMD Ryzen 7 7800x3d / MSI 6900xt Gaming X Trio / Gigabyte B650 AORUS Pro AX / G. Skill Flare X5 6000CL36 32GB / Samsung 980 1TB x3 / Super Flower Leadex V Platinum Pro 850 / EK-AIO 360 Basic / Fractal Design North XL (black mesh) / AOC AGON 35" 3440x1440 100Hz / Mackie CR5BT / Corsair Virtuoso SE / Cherry MX Board 3.0 / Logitech G502

 

7800X3D - PBO -30 all cores, 4.90GHz all core, 5.05GHz single core, 18286 C23 multi, 1779 C23 single

 

Emma : i9 9900K @5.1Ghz - Gigabyte AORUS 1080Ti - Gigabyte AORUS Z370 Gaming 5 - G. Skill Ripjaws V 32GB 3200CL16 - 750 EVO 512GB + 2x 860 EVO 1TB (RAID0) - EVGA SuperNova 650 P2 - Thermaltake Water 3.0 Ultimate 360mm - Fractal Design Define R6 - TP-Link AC1900 PCIe Wifi

 

Raven: AMD Ryzen 5 5600x3d - ASRock B550M Pro4 - G. Skill Ripjaws V 16GB 3200Mhz - XFX Radeon RX6650XT - Samsung 980 1TB + Crucial MX500 1TB - TP-Link AC600 USB Wifi - Gigabyte GP-P450B PSU -  Cooler Master MasterBox Q300L -  Samsung 27" 1080p

 

Plex : AMD Ryzen 5 5600 - Gigabyte B550M AORUS Elite AX - G. Skill Ripjaws V 16GB 2400Mhz - MSI 1050Ti 4GB - Crucial P3 Plus 500GB + WD Red NAS 4TBx2 - TP-Link AC1200 PCIe Wifi - EVGA SuperNova 650 P2 - ASUS Prime AP201 - Spectre 24" 1080p

 

Steam Deck 512GB OLED

 

OnePlus: 

OnePlus 11 5G - 16GB RAM, 256GB NAND, Eternal Green

OnePlus Buds Pro 2 - Eternal Green

 

Other Tech:

- 2021 Volvo S60 Recharge T8 Polestar Engineered - 415hp/495tq 2.0L 4cyl. turbocharged, supercharged and electrified.

Lenovo 720S Touch 15.6" - i7 7700HQ, 16GB RAM 2400MHz, 512GB NVMe SSD, 1050Ti, 4K touchscreen

MSI GF62 15.6" - i7 7700HQ, 16GB RAM 2400 MHz, 256GB NVMe SSD + 1TB 7200rpm HDD, 1050Ti

- Ubiquiti Amplifi HD mesh wifi

 

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Dedayog said:

How does this differ from using a Wifi outlet to turn power on and off to a PC what has Boot On Power?

 

 

because

- wifi outlets are actually quite costly and bulky

- power on boot is annoying

- wifi outlets dont allow you to do other interactions (hold power button, short press to initiate shutdown, wake from sleep, ..)

- wifi outlets dont give you feedback on the computer's state

- if not doing my hair-brained "run the entire rack with one ESP32" idea, you can actually just integrate this into the front panel and forget it's there.

 

if my server didnt have IPMI i'd probably be implementing this as we speak...

 

EDIT: oh, and with some more logic, you could actually send "manual power button pressed" commands to homeassistant.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, manikyath said:

because

- wifi outlets are actually quite costly and bulky

- power on boot is annoying

- wifi outlets dont allow you to do other interactions (hold power button, short press to initiate shutdown, wake from sleep, ..)

- wifi outlets dont give you feedback on the computer's state

- if not doing my hair-brained "run the entire rack with one ESP32" idea, you can actually just integrate this into the front panel and forget it's there.

 

if my server didnt have IPMI i'd probably be implementing this as we speak...

 

EDIT: oh, and with some more logic, you could actually send "manual power button pressed" commands to homeassistant.

First 2 points are moot for most but the rest I get.

 

Don't need anything that complicated, but very interesting way of doing it.  Kudos.

"Do what makes the experience better" - in regards to PCs and Life itself.

 

Onyx AMD Ryzen 7 7800x3d / MSI 6900xt Gaming X Trio / Gigabyte B650 AORUS Pro AX / G. Skill Flare X5 6000CL36 32GB / Samsung 980 1TB x3 / Super Flower Leadex V Platinum Pro 850 / EK-AIO 360 Basic / Fractal Design North XL (black mesh) / AOC AGON 35" 3440x1440 100Hz / Mackie CR5BT / Corsair Virtuoso SE / Cherry MX Board 3.0 / Logitech G502

 

7800X3D - PBO -30 all cores, 4.90GHz all core, 5.05GHz single core, 18286 C23 multi, 1779 C23 single

 

Emma : i9 9900K @5.1Ghz - Gigabyte AORUS 1080Ti - Gigabyte AORUS Z370 Gaming 5 - G. Skill Ripjaws V 32GB 3200CL16 - 750 EVO 512GB + 2x 860 EVO 1TB (RAID0) - EVGA SuperNova 650 P2 - Thermaltake Water 3.0 Ultimate 360mm - Fractal Design Define R6 - TP-Link AC1900 PCIe Wifi

 

Raven: AMD Ryzen 5 5600x3d - ASRock B550M Pro4 - G. Skill Ripjaws V 16GB 3200Mhz - XFX Radeon RX6650XT - Samsung 980 1TB + Crucial MX500 1TB - TP-Link AC600 USB Wifi - Gigabyte GP-P450B PSU -  Cooler Master MasterBox Q300L -  Samsung 27" 1080p

 

Plex : AMD Ryzen 5 5600 - Gigabyte B550M AORUS Elite AX - G. Skill Ripjaws V 16GB 2400Mhz - MSI 1050Ti 4GB - Crucial P3 Plus 500GB + WD Red NAS 4TBx2 - TP-Link AC1200 PCIe Wifi - EVGA SuperNova 650 P2 - ASUS Prime AP201 - Spectre 24" 1080p

 

Steam Deck 512GB OLED

 

OnePlus: 

OnePlus 11 5G - 16GB RAM, 256GB NAND, Eternal Green

OnePlus Buds Pro 2 - Eternal Green

 

Other Tech:

- 2021 Volvo S60 Recharge T8 Polestar Engineered - 415hp/495tq 2.0L 4cyl. turbocharged, supercharged and electrified.

Lenovo 720S Touch 15.6" - i7 7700HQ, 16GB RAM 2400MHz, 512GB NVMe SSD, 1050Ti, 4K touchscreen

MSI GF62 15.6" - i7 7700HQ, 16GB RAM 2400 MHz, 256GB NVMe SSD + 1TB 7200rpm HDD, 1050Ti

- Ubiquiti Amplifi HD mesh wifi

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Dedayog said:

First 2 points are moot for most but the rest I get.

it's a matter of preference.

Link to comment
Share on other sites

Link to post
Share on other sites

On 11/2/2023 at 8:20 PM, manikyath said:

driving them with 10k resistance from 3v3 might be a bit too optimistic. with 1k you might not need two.

 

and for talking to multiple systems i'm pondering either dedicated inputs (there's plenty of pins), a multiplexer, or a 4-bit IO expander and just have i2c to each "sub-module" per system.

 

oh - and just my preference on things, i'd probably ditch the transistors outright and go for optocouplers.

 

PS; stretch goals to implement temp sensors so homeassistant can warn about coolant / heat sink temperatures?

The optocouplers looks cool, did not have that in my very very limited inventory.

For multiple system a i2c sub-modules sounds like an awesome idea. Just connect them via a simple jack or something. That way its easy to scale up/down and only have to care about 1 device to connect to your network.

Link to comment
Share on other sites

Link to post
Share on other sites

Sounds like this could much more easily be accomplished by a wifi dc relay connected to the power button circuit..... Then do the same for the reset button except set it up in windows to shut down nicely when you use that button. 

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, corrado33 said:

Sounds like this could much more easily be accomplished by a wifi dc relay connected to the power button circuit..... Then do the same for the reset button except set it up in windows to shut down nicely when you use that button. 

If you have those laying around, you can sure use those. Just toggle the relays with a short (0.1 seconds) or longer (4 seconds) delay

 

If you are looking for something cheaper and willing to tinker, the Wemos D1 is half the price.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×