WebThingsIO / lg-tv-adapter

LG webOS TV adapter for WebThings Gateway
Mozilla Public License 2.0
7 stars 6 forks source link

Fiter SSDP Service Type before adding LG TV device #11

Closed dickydoouk closed 4 years ago

dickydoouk commented 4 years ago

It was noticed on my home network that the number of devices returned by the SSDP client included those that didn't match the service type being filtered. This resulted in the lg-tv-adapter probing my Philips hue device on port 3000 unnecessarily.

This PR caters for this by filtering devices that do not have the relevant LG TV service type. Thereby reducing false positives.

It maybe that the code this.ssdpClient.search(SSDP_SERVICE); is ineffective.