zlacker

Show HN: TinyPilot – Build a KVM over IP using a Raspberry Pi

submitted by mtlync+(OP) on 2020-07-23 13:56:16 | 756 points 279 comments
[view article] [source] [go to bottom]

NOTE: showing posts with links only show all posts
20. grossw+mc[view] [source] 2020-07-23 15:10:46
>>mtlync+(OP)
I just finished building a Pi KVM about a month ago using project https://github.com/pikvm. Has been great so far.
22. x87678+Hc[view] [source] 2020-07-23 15:12:53
>>mtlync+(OP)
This looks awesome. I was looking for a solution like this last year. I budgeted a few hundred bucks but couldn't find anything. Ideally would have a way to handle a few different boxes.

I did see something called Intel AMT, part of Intel vPro. https://www.howtogeek.com/56538/how-to-remotely-control-your... Does anyone have experience with this? (I have AMD box so doesn't help me) - actually looks like AMD has similar https://developer.amd.com/tools-for-dmtf-dash/

◧◩◪
24. vidana+Yc[view] [source] [discussion] 2020-07-23 15:14:17
>>detaro+6c
https://mtlynch.io/tinypilot/raritan-kvm.png
◧◩◪
26. mtlync+hd[view] [source] [discussion] 2020-07-23 15:15:58
>>ghaber+Eb
Thanks for reading!

>Would a Pi Zero W work for this, or do you need a full-size Pi 4?

I tested Key Mime Pi (the keyboard-only version) on the Pi Zero W and it worked great. I haven't tested TinyPilot on the Pi Zero W, but I think it will work. The video encoding is happening in the HDMI dongle, so it doesn't hammer resources much. I don't have a USB to microUSB adaptor on hand, but I'll order one now and see if it works.

>be able to package everything into a tiny 3D printed case.

Yeah, that would be neat! One of the biggest issues I have with TinyPilot's setup right now is that it looks kind of like a bunch of random hobbyist parts stuck together. A 3D printed case would be good and wouldn't have the heat issues that Pi 4 has.[0]

[0] https://www.jeffgeerling.com/blog/2019/best-way-keep-your-co...

◧◩
29. EvanAn+yd[view] [source] [discussion] 2020-07-23 15:17:34
>>ape4+Uc
You're not going to find a decent one sub $500. Used devices can be had for less, but most of the older ones I've seen use terrible Java-based clients that are a major pain to get running on modern browsers. For multi-device KVMs you usually have to figure in the prices for the individual interface module dongles that plug into each computer, too.

StarTech makes a USB-to-KVM that looked promising to me, but it's still >$400: https://www.startech.com/Server-Management/KVM-Switches/Port...

◧◩
39. mtlync+ag[view] [source] [discussion] 2020-07-23 15:30:37
>>NietTi+8f
Thanks for reading! Yeah, my understanding is that these capture cards are fairly recent. I think my timing was pretty lucky because a lot of earlier projects had to do HDMI->S-Video and S-Video->USB[0] to keep costs down because there weren't any inexpensive HDMI->USB options at the time.

[0] https://github.com/Fmstrat/diy-ipmi#setting-up-the-hardware

◧◩
40. lukevp+lg[view] [source] [discussion] 2020-07-23 15:31:44
>>C1sc0c+0f
You could probably do this with the loopback features of a podcast style interface and not need a second computer. The one I use is the MOTU M4, the M2 is a little cheaper.

https://m.youtube.com/watch?v=IKjKymjc_R8

◧◩
42. diabee+tg[view] [source] [discussion] 2020-07-23 15:32:21
>>EvanAn+je
Could always add another dongle with something like this: https://www.amazon.com/dp/B07BKYBKGP maybe?
◧◩
55. Haemm0+Cj[view] [source] [discussion] 2020-07-23 15:49:03
>>x87678+Hc
It works, however you need a non-free special client called VNC Viewer Plus [1]. Afaik it is Windows only. You can enable regular VNC protocol capabilities for AMT[2], but then you can't use the interesting stuff anymore.

[1] https://www.realvnc.com/en/products/viewerplus/ [2] https://blog.michael.kuron-germany.de/2011/10/using-intel-am...

//edit: link [2] added.

◧◩
59. mtlync+mk[view] [source] [discussion] 2020-07-23 15:52:14
>>yetant+Pj
Thanks for reading!

I got the idea from danman, but his setup is much cooler than mine:

https://blog.danman.eu/new-version-of-lenkeng-hdmi-over-ip-e...

62. superk+Vl[view] [source] 2020-07-23 15:59:46
>>mtlync+(OP)
The hardest part of this seems to be the V in the KVM and the solution of the author's is pretty neat. But I think things could still be improved by dropping his keyboard/mouse setup and just switching to the standard: barrier/synergy, https://github.com/debauchee/barrier
◧◩◪
65. tyingq+hm[view] [source] [discussion] 2020-07-23 16:01:26
>>Haemm0+Cj
This seems to show a reasonable option from Linux: https://www.cyberciti.biz/faq/remotely-access-intel-amt-kvm-...
◧◩◪◨
85. stamps+Js[view] [source] [discussion] 2020-07-23 16:36:46
>>btgeek+tj
I have this one[0] that works great.

Wendell at Level1Techs does good work and there's even newer ones that can do 8k30.

[0] https://store.level1techs.com/products/kvm-switch-dual-monit...

◧◩◪◨
87. hedora+ht[view] [source] [discussion] 2020-07-23 16:40:16
>>zyx321+Io
This isn’t a bad choice:

https://wiki.52pi.com/index.php/DockerPi_4_Channel_Relay_SKU...

It’s $17 for four relays, expandable to 16. If you wire it “normal closed” then the relays will only draw power while it’s resetting the other machine.

However, the relays are only rated for 3 amps. (360W at 120V). Also, the board is labeled backwards so, the NO port is normal closed, and NC is normal open.

Has anyone found something that’s similarly plug and play with a higher amperage rating?

Edit: this would work as a switched AC outlet (to replace a four outlet PDU) or for hot wiring the power / reset buttons. You could do both buttons and the AC line and have a relay left over.

I’d feel funny running AC that close to the lower button wires though (if cross those wires, it will certainly let the magic smoke out of your motherboard).

◧◩◪◨
88. crical+jt[view] [source] [discussion] 2020-07-23 16:40:31
>>mtlync+hd
You might also be able to use the "standard" radio kit metal boxes - tap some standoffs, carefully drill some holes for wires etc. Dunno which works out better for the world - ordering a pre-fab metal box that you have to do some work on (or perhaps use https://www.frontpanelexpress.com/ to get a customised enclosure), or printing something from plastic. Might depend on production volume, metal used etc.
◧◩
91. Nextgr+8u[view] [source] [discussion] 2020-07-23 16:45:31
>>EvanAn+je
Not sure if they are still easily available but look into https://blog.benjojo.co.uk/post/userspace-usb-drivers.
◧◩
96. cr3ati+qv[view] [source] [discussion] 2020-07-23 16:51:58
>>x87678+Hc
AMT is great. I use it with https://www.meshcommander.com/ - though learning how to provision the machine correctly in Admin Mode so it doesn't pop up a pin-entry screen on the remote end is "fun"!
101. Jaruze+Cw[view] [source] 2020-07-23 16:58:29
>>mtlync+(OP)
I have a similar solution in place. For reasons ... I have a machine that is 100% locked down by the client. I cannot install software on it, nor does it have any sort of remote access tools installed on it. To keep my work space clear, and negate the need for second monitor (as I need to be able to see the screen of this machine AND my main machine at the same time), I use an Elgato CamLink HDMI dongle[1] to capture the video output of the machine, and I use VLC to display it in a window on my main desktop. I use a bluetooth keyboard and mouse combo to control it. The latency on the video capture is very low (it doesn't feel any more laggy than a normal remote sesson), and as an added bonus I can screen capture the video stream, which is really useful for documentation. The CamLink is locked at 1080p, so as long as the machines desktop resolution matches that, I get a very crisp picture. I've been using this setup for almost two years now, on a daily basis with no issues.

--

[1] https://www.elgato.com

104. twicet+Ay[view] [source] 2020-07-23 17:06:40
>>mtlync+(OP)
There was another approach to the same problem posted on HN just yesterday[0], which took a very different route! Very interesting to compare/contrast the two appraches. That one doesn't do video, just gets you a terminal. (Not sure if it would let you mess with the BIOS or install a new OS like this one does? Not familiar enough with serial ports to assess.)

But anyway, TinyPilot is super cool! I'd love to get it set up one day. And the "life story" as to how it came to be was really neat, and made me feel like I understood the whole solution. Great article!

[0] https://news.ycombinator.com/item?id=23915777

◧◩◪◨⬒
105. rob-ol+My[view] [source] [discussion] 2020-07-23 17:07:51
>>AaronF+ir
Google Cloud also provides read/write serial ports over SSH: https://cloud.google.com/compute/docs/instances/interacting-... -- but I think AWS still doesn't.

One thing I've ran into was root not having a password since the cloud images are typically SSH key auth only. That was annoying when trying to fix something simple like iptables or entering maintenance mode for a disk check.

◧◩
107. Sparky+Uy[view] [source] [discussion] 2020-07-23 17:08:28
>>mudkip+1m
Have you tried out https://github.com/moonlight-stream/moonlight-qt ?

If all your host machines are Windows 8+, then Parsec is fantastic and has clients for every major OS other than iOS.

◧◩◪◨
108. bombit+Wy[view] [source] [discussion] 2020-07-23 17:08:38
>>btgeek+tj
I have been using this at 4k60 (but 1 monitor) flawlessly for 8 months.

https://www.startech.com/Server-Management/KVM-Switches/2-po...

◧◩
109. dsr_+1z[view] [source] [discussion] 2020-07-23 17:08:59
>>dannyw+Tt
For years and years, many motherboards did have graphics sets integrated in. These days, you'll still see that on a lot of server-class motherboards.

e.g. https://www.supermicro.com/en/products/motherboard/M11SDV-4C... -- the line about AST2500 BMC graphics? That runs a VGA port.

◧◩◪
122. Jeremy+TD[view] [source] [discussion] 2020-07-23 17:32:20
>>_1qd4+og
> I did this for a while, the problem is that there's really no such thing as a high-quality USB switch. They are all garbage and mess with USB devices in some way (at least at the consumer level).

A lot of these things seem to "help" by inserting their own USB host device that acts as a proxy for attached USB peripherals. This allows them to do (ostensibly) useful useful things such as intercepting keypresses and responding to them (e.g. by switching to another input).

Don't get one of those, get a physical switch that just connects the leads to the correct port when pressed. I got this USB 2.0 switch (all you need for input devices) for $12 [0]. I'm sure there are others available with more ports, but this is all I needed.

[0] https://www.amazon.com/gp/product/B01HV1N674

◧◩
135. jwatzm+mR[view] [source] [discussion] 2020-07-23 18:39:21
>>NietTi+8f
If you're looking to buy the card in the article, I just got one of these https://www.aliexpress.com/item/4000958505670.html which looks to be exactly the same card, and doesn't require scouring eBay. I haven't done much with it yet, but can confirm that it arrived to me in the UK with no issues, and seems to work from a quick test.
◧◩◪◨⬒
138. mtlync+PW[view] [source] [discussion] 2020-07-23 19:06:30
>>trm42+0H
The video capture part should work, but I don't believe they support USB OTG, so they wouldn't be able to impersonate the keyboard.

The official documentation[0] says all Pi devices have USB OTG, but I'm not sure if there's something else about the Pi 4 and Pi Zero W that allows USB gadget mode because I've never found anyone talking about using it before recent generations of Pi. This StackExchange answer says the A and the A+ had it, but that the 2 doesn't.[1]

[0] https://www.raspberrypi.org/documentation/hardware/raspberry... [1] https://raspberrypi.stackexchange.com/questions/71613/how-to...

◧◩◪
145. close0+7Z[view] [source] [discussion] 2020-07-23 19:18:48
>>R0b0t1+pr
Here are some AMD tools, docs are thin on the ground. [0]

I have a boatload of Intel vPro machines spread throughout multiple countries (or the basement) and connect to them both via internet (mutual TLS authentication) and VPN. Never had any reliability issues at provisioning or operating. I had an old AMT v2.1 machine that was a bit unreliable, needed to be manually powered on once in a while or the remote connection wouldn't work.

I wholeheartedly recommend Meshcommander [1] for this.

[0] https://developer.amd.com/tools-for-dmtf-dash/

[1] https://www.meshcommander.com/meshcommander

◧◩◪
152. FatalE+q51[view] [source] [discussion] 2020-07-23 19:54:41
>>wojcii+Kb
If the motherboard of the PC being controlled supports Wake-on-Lan that may be a viable option to send a packet from the local subnet to boot up the computer. https://en.wikipedia.org/wiki/Wake-on-LAN
◧◩
158. mtlync+M81[view] [source] [discussion] 2020-07-23 20:16:22
>>dannyw+Tt
Thanks for reading and for the note! I didn't realize that about display not being available on motherboards generally.

I just built a new homelab server and ended up buying a separate GPU again. My new mobo is the SuperMicro MBD-X10DAL[0], which has no onboard display.

[0] https://www.supermicro.com/en/products/motherboard/X10DAL-i

◧◩◪
163. mtlync+6b1[view] [source] [discussion] 2020-07-23 20:31:46
>>tlampo+xu
Wow, thank YOU for making Proxmox! I'm switching over after three years of Kimchi[0], and Proxmox does everything so much better.

[0] https://github.com/kimchi-project/kimchi

◧◩◪
164. mtlync+mb1[view] [source] [discussion] 2020-07-23 20:33:09
>>silver+xq
I believe it should work with a VGA to HDMI adaptor, as another commenter suggested[0], though I haven't tested this personally.

[0] https://news.ycombinator.com/item?id=23928401

◧◩◪
171. mtlync+Pd1[view] [source] [discussion] 2020-07-23 20:48:11
>>da39a3+SX
Thanks for reading!

>I still don't know what KVM stands for!

Oh, keyboard, video, mouse. The article does define it, but it's a little buried.

>From a quick skim of your site it looks like you've worked at large companies and now are doing some independent projects. Do you think you'll go back to working for a company (perhaps a smaller one?), or do you see yourself working independently for many years?

I'd love to continue working for myself forever. My ideal would be if I could find a business sustainable enough that I can hire 2-5 developers and other teammates to work with me. If I did have to go back to being an employee, I'd probably lean toward something smaller.

It's very much about your temperament, what type of work you enjoy, and how much you value flexibility and autonomy. A good way to test the waters is by building a side business and see if you enjoy it more than your job. You can also read/hear more about the lifestyle in places like Indie Hackers[0], Starter Story[1], and WIP[2].

But I agree with you that you pass up certain kinds of growth by working on your own. I'm happy that I had ~10 years of experience with big companies before doing my own thing. I learn a lot on my own, but I don't think I could have learned a lot of my software "craftsmanship" kind of skills (e.g., designing for maintainability, creating repeatable, well-documented processes) had I not worked for Google and Microsoft.

[0] https://indiehackers.com

[1] https://starterstory.com

[2] https://wip.chat

◧◩◪
175. mtlync+cf1[view] [source] [discussion] 2020-07-23 20:56:38
>>tootie+Ub1
>If this just requires USB and HDMI, it should theoretically work identically a for Mac Mini or even something like a Fire TV, yes?

I believe so, but with the caveat that I haven't tested it. Does Fire TV take USB keyboard input?

I have successfully captured video from a Roku Premiere[0], even though it's HDCP protected. The LKV373A couldn't capture anything out of it, but the $11 dongle did just fine. But that was just video capture. I didn't have a way of sending input to the Roku.

>Is there an upper limit on resolution and frame rate for the dongle?

Yes, the limit is 1280x720px @ 30FPS.

[0] https://twitter.com/tinypilotkvm/status/1277994838210875392

◧◩
177. wolfhu+Mf1[view] [source] [discussion] 2020-07-23 21:00:59
>>x87678+Hc
If a machine/server doesn't have built in IPMI, I am using an Adderlink Digital ipeps and control it that way 1). Apart from the built in RealVNC server, it also has HDMI video, USB and virtual media support among other things. I have no relationship with Adderlink, but I am a happy user of this product. Not cheap, but worth the price IMHO.

1) https://www.adder.com/en/kvm-solutions/adderlink-digital-ipe...

◧◩
184. tfolbr+Ej1[view] [source] [discussion] 2020-07-23 21:25:37
>>devwas+Ah1
Check out Apache Guacamole! "clientless remote desktop gateway" basically VNC/RDP through a browser

https://guacamole.apache.org/

◧◩
187. mtlync+7m1[view] [source] [discussion] 2020-07-23 21:39:28
>>rglove+7S
Thanks for reading!

Honestly, the overhead from TinyPilot is so small that it's just a question of how powerful you want the device for other activities.

Here's a screenshot I took earlier today on a Pi 4 with 2 GB of RAM. TinyPilot is streaming video over WiFi, and top shows that it's only using ~4% of CPU and ~2% of RAM:

https://imgur.com/GadzDOr

◧◩◪◨
189. parlia+Tm1[view] [source] [discussion] 2020-07-23 21:43:27
>>fulafe+3W
The problem is BMC has an astounding array of features[1] that are worth the operational complexity. This isn't just KVM like in OP's post... being able to remote mount images is a godsend when you're provisioning a server or diagnosing hardware issues or doing a BIOS update on the other side of the globe (with your other alternative being shipping a flash drive[2], then paying $200/hr for DC remote hands to plug it in for you).

[1] https://www.supermicro.com/en/solutions/management-software/...

[2] don't even try to talk about PXE booting if you've never tried to get DHCP+BOOTP to work over a WAN

◧◩
196. mtlync+hp1[view] [source] [discussion] 2020-07-23 21:54:23
>>iron2d+zY
Thanks for reading!

I don't think there's a way to get the Pi to capture video or impersonate keyboards for more than one computer at a time.

A neat idea a friend proposed to me was to buy a "dumb" KVM that supports switching through keyboard hotkeys and use that to scale it to multiple machines. See my comment here: https://news.ycombinator.com/item?id=23928251

209. Severi+3D1[view] [source] 2020-07-23 22:53:32
>>mtlync+(OP)
You could also probably add power/reset functionality by hacking something like this:

https://www.amazon.com/SilverStone-Technology-Wireless-Compu...

Or possibly just wiring up a transistor to the power button pin (not sure if it sources or sinks) between motherboard and the Pi, and just hold it high until it boots.

◧◩◪◨
219. rjeli+EK1[view] [source] [discussion] 2020-07-23 23:51:38
>>bronco+OI1
https://github.com/FD-/RPiPlay
◧◩◪◨⬒
220. mtlync+9L1[view] [source] [discussion] 2020-07-23 23:56:22
>>parlia+Tm1
The Pi is capable of remote mounting images.[0] I haven't implemented support for it in TinyPilot yet, but it should be possible.

[0] http://www.isticktoit.net/?p=1383

226. vmurth+4X1[view] [source] 2020-07-24 01:56:15
>>mtlync+(OP)
If you want to support the author and purchase the whole kit, here it is https://tinypilotkvm.com/

(Edit: No affiliation. Just happy to see something like this for hacking :) )

◧◩◪◨⬒⬓⬔⧯▣
230. mtlync+tZ1[view] [source] [discussion] 2020-07-24 02:23:03
>>Scaevo+lN1
The Pi Zero's power port is actually a USB OTG port. I used it in my precursor project to forward keystrokes:

https://mtlynch.io/key-mime-pi/

◧◩
235. msbroa+dd2[view] [source] [discussion] 2020-07-24 04:58:13
>>mtlync+v2
I was wondering if you could try my usb-ip software for the hdmi dongle. https://www.virtualhere.com (ill give you a license key) i think this is quite useful for my customers and its something i was looking for. Can you pass the dongle directly through to your pc (no need for intermediate software) and see what the performance is like.
◧◩◪◨
244. tlampo+Rz2[view] [source] [discussion] 2020-07-24 08:58:14
>>mtlync+6b1
Glad to hear that you like it!

For (integrated) mouse support you could take a look at a project from a good friend and colleague: https://github.com/Blub/netevent

Allows passing along arbitrary input events over the network and more.

246. walrus+1B2[view] [source] 2020-07-24 09:07:41
>>mtlync+(OP)
as a side note for things that use the 'uvc' webcam video driver, there's $20-25 microscopes now that are standard usb webcams. Cheap things with plastic lenses. If you had a need to set up a fixed mounted microscope taking 30fps imagery of things on a production line (perhaps for a non critical quality control test?), you could totally do it with a rpi and one of these.

https://trendowner.com/products/1000x-zoom-usb-microscope-ca...

◧◩◪◨⬒⬓
249. Gordon+fK2[view] [source] [discussion] 2020-07-24 10:51:43
>>Tactic+ck
One I use is a brand called "Plugable". I don't think they still make the model I have, but they have a newer version of the same: https://plugable.com/products/usb3-switch2

I've used it with Windows 10, MacOS and an RPi, with no issues.

252. Chris2+jT2[view] [source] 2020-07-24 12:06:52
>>mtlync+(OP)
also featured here: https://hackaday.com/2020/07/24/tinypilot-provides-kvm-over-...
◧◩◪◨⬒
258. yencab+Oe4[view] [source] [discussion] 2020-07-24 19:45:58
>>DrPhis+7K1
> -Remotely mounting images (ISO/FS/IMG/etc) on the host for bare-metal installs or any other purpose

For what it's worth, that stuff has always been incredibly unreliable for me. Enough so that old school PXE booting was the only way to maintain a server pool, couldn't get them to consistently reimage through the proprietary stuff.

The remote power control is very nice, and I didn't see anything on this page about that. (Though now I'm just imagining the "useless PC" [1] that just tells a smart power plug to turn itself off.)

[1] https://en.wikipedia.org/wiki/Useless_machine

◧◩◪
263. swuech+aR4[view] [source] [discussion] 2020-07-25 01:09:40
>>PaulKe+X91
you might want to upgrade your bios to get headless support. https://www.msi.com/blog/with-upcoming-amd-processors-and-co...

if you are kind enough to report back whether it works with the newest bios, that will be helpful to others

◧◩◪◨
276. mtlync+bJ6[view] [source] [discussion] 2020-07-25 23:44:24
>>erikig+3w
Oh, they all kind of do that. "Life story" is an exaggeration, but most recipe authors provide a lot of fluff backstory to a recipe before sharing the instructions because Google seems to favor longer content in search results. Here's a not so egregious example on a blog I follow, but it's ~8 paragraphs of fluff before they explain the recipe:

https://www.ketoconnect.net/protein-waffle-recipe/

[go to top]