Basically you install the xPL Interface plugin in LMS. This broadcasts events like power on, power off, etc… for the different players. The script listens for these events for the specified player name and sends an IR code using lirc to the stereo to turn it on and off.