So valve had an open source SDK for the original steam link hardware box here: https://github.com/ValveSoftware/steamlink-sdk
I've not poked around it, but I'd try going through the source to see if you can figure out how the discovery protocol works. I'd guess it's a bonjour-like mDNS or UPnP based system, so you'd be looking to write a piece of listener software for whatever its discovery protocol is and then have it do what you like when it detects the discovery requests.
If you want to do it with wake on LAN too, run the application on a raspberry pi or something to then WOL your main PC.