←back to thread

756 points mtlynch | 7 comments | | HN request time: 0.619s | source | bottom
Show context
mtlynch ◴[] No.23927535[source]
Author here. Happy to answer any questions or take any feedback about this post.
replies(13): >>23928048 #>>23928079 #>>23928102 #>>23928108 #>>23928824 #>>23929025 #>>23929273 #>>23931092 #>>23931871 #>>23931962 #>>23932019 #>>23932032 #>>23935887 #
wojciii ◴[] No.23928108[source]
Cool project, but what about power management? What happens if the PC being controlled crashes and does not let you reboot it using keyboard shortcut?

I'm might be damaged by testing and working with embedded development.

replies(5): >>23928235 #>>23928413 #>>23928441 #>>23928912 #>>23931560 #
1. mtlynch ◴[] No.23928441[source]
Thanks for reading!

>Cool project, but what about power management? What happens if the PC being controlled crashes and does not let you reboot it using keyboard shortcut?

Yeah, that's one of the limitations. TinyPilot can't control power for the target computer.

I don't know of any way to manage power without connecting the Pi to the target machine's motherboard, but that increases complexity significantly. I'm using this for a homelab, so it's easy for me to walk over and cycle power if that ever comes up, but for this to support more remote scenarios, I'd need to address this.

replies(6): >>23929351 #>>23929756 #>>23930250 #>>23931740 #>>23932602 #>>23934536 #
2. baq ◴[] No.23929351[source]
hook up a gpio pin to a reset switch jumper somehow?
3. wojciii ◴[] No.23929756[source]
APC produces (or rebranded) power control modules you can control over Ethernet. They are probably expensive.

There are most likely cheaper products which would work. You should probably implement some kind of power control interface that could be used. Calling a shell script would be enough and some example implementations provided by your users. :) It doesn't need to be complicated.

4. oakwhiz ◴[] No.23930250[source]
Perhaps a fake USB device that issues power or sleep button requests could work. I had limited success with this on Linux using an HID keyboard emulator. However this won't work on a machine that's too far gone to respond to USB, and that's also an issue with the physical power button as well. Perhaps an AC latching relay would work to cut power.
5. davidzweig ◴[] No.23931740[source]
Wake-on-Lan can handle powering on. It should be possible to directly connect a RPi GPIO pin directly to the 0.1" headers on the motherboard.. the power and reset buttons are just closing a circuit to pull high/pull low an input pin. Use a 1k resistor between the Rpi and motherboard headers for protection.
6. Nexxxeh ◴[] No.23932602[source]
A horrible way would be to set the target to power on after power loss. Plug the target into a WiFi-controlled smart plug, like the Belkin Wemo. In the event of catastrophic hard lock, power cycle it at the wall.

A better way would be a relay and microcontroller, which you could also potentially use for the USB HID stuff too.

In theory, you could have a HDMI switch, a single Pi and HDMI grabber, and just a microcontroller board for each target machine that could have power button control, keyboard emulation etc built in.

7. voltagex_ ◴[] No.23934536[source]
Can highly recommend the TP-Link HS100 for this - it's "just" a wifi power switch. Change your motherboard settings to "power on after power loss" and you've got your remote reboot.