(ASK) LED over local network

has stuff which may help you.

A lot of it can be skipped over, if you don't want to go outside your LAN.