Receiving SSDP:alive & byebye in SmartApp

Is this possible, I would like to build a LAN-Based switch to detect when my Smart TV is on or off.

I do this utilising my Wifi AP so it turns on a virtual switch in ST when the TV is connected to the wifi network. It works extremely well. Search for ASUSWrt in the forum if you also have a wrt based router. The specific tv app is on my smartthings repository.

Not quite what you are after but I figure I would throw it out there as an option