Initial Configuration Push

This commit is contained in:
CCOSTAN
2016-10-11 16:42:06 +00:00
parent b83eeadfcb
commit 5127bc2109
2145 changed files with 298464 additions and 0 deletions

16
deps/netdisco/discoverables/sonos.py vendored Normal file
View File

@@ -0,0 +1,16 @@
"""Discover Sonos devices."""
from netdisco.util import urlparse
from . import SSDPDiscoverable
# pylint: disable=too-few-public-methods
class Discoverable(SSDPDiscoverable):
"""Add support for discovering Sonos devices."""
def info_from_entry(self, entry):
"""Return the most important info from a uPnP entry."""
return urlparse(entry.values['location']).hostname
def get_entries(self):
"""Get all the Sonos device uPnP entries."""
return self.find_by_st("urn:schemas-upnp-org:device:ZonePlayer:1")