[PORT] LG Smart TV Discovery 2012+

@yototogblo

Thoughts:

  1. I haven't looked into the discovery app at all, so I'm not sure what's going on over there at all.
  2. Worst case: You don't need the discovery app, so you can remove it. You can add the TV as a "virtual device" and then set the IP address by hand and it'll start working once it finds the TV being on.
  3. This looks like upnp spam. Some device is perhaps being noisy and the hub is just reporting all the upnp broadcast traffic it's seeing. upnp == universal plug & pray. I don't know all the details, but for discovery I believe devices broadcast enough info that others can look up what they are. This is how the app discovers the TV.
  4. Presumably once discovery is done the app doesn't need to keep subscribing to UPNP events. Not sure if the app has enough info to actually know this though. But the app flow could be changed to allow for this by using a page just for discovery and a timeout.

Most of this is conjecture though. Once I'm happy with the driver I'll have to start digging into the app side.

Updated the code to account for on/off web socket sync issues, merged the importURL PR, and channelName and friends go to [off] Careful with channelDesc it still needs to be fixed, and I'm not sure what to do with channelNumber. Meh.