summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog13
-rw-r--r--debian/compat1
-rw-r--r--debian/control4
-rw-r--r--netdisco/discoverables/digitalstrom.py12
-rw-r--r--netdisco/discoverables/enigma2.py10
-rw-r--r--netdisco/discoverables/hass_mobile_app.py9
-rw-r--r--netdisco/discoverables/heos.py10
-rw-r--r--netdisco/discoverables/hikvision.py13
-rw-r--r--netdisco/discoverables/openhome.py3
-rw-r--r--netdisco/discoverables/sercomm.py15
-rw-r--r--netdisco/discoverables/songpal.py21
-rw-r--r--setup.py2
-rw-r--r--tox.ini2
13 files changed, 102 insertions, 13 deletions
diff --git a/debian/changelog b/debian/changelog
index c23f361..305f300 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+python-netdisco (2.6.0-1) unstable; urgency=medium
+
+ [ Ondřej Nový ]
+ * Use debhelper-compat instead of debian/compat.
+
+ [ Ruben Undheim ]
+ * New upstream release
+ * debian/control:
+ - New standards version 4.4.0 - no changes
+ - DH level 12
+
+ -- Ruben Undheim <ruben.undheim@gmail.com> Fri, 18 Oct 2019 22:44:36 +0200
+
python-netdisco (2.3.0-1) unstable; urgency=medium
* New upstream release
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index b4de394..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-11
diff --git a/debian/control b/debian/control
index 903360f..4b76700 100644
--- a/debian/control
+++ b/debian/control
@@ -3,11 +3,11 @@ Section: python
Priority: optional
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Uploaders: Ruben Undheim <ruben.undheim@gmail.com>
-Build-Depends: debhelper (>= 11),
+Build-Depends: debhelper-compat (= 12),
dh-python,
python3-all,
python3-setuptools
-Standards-Version: 4.2.1
+Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/python-team/modules/python-netdisco
Vcs-Git: https://salsa.debian.org/python-team/modules/python-netdisco.git
Homepage: https://github.com/home-assistant/netdisco
diff --git a/netdisco/discoverables/digitalstrom.py b/netdisco/discoverables/digitalstrom.py
new file mode 100644
index 0000000..ef1973a
--- /dev/null
+++ b/netdisco/discoverables/digitalstrom.py
@@ -0,0 +1,12 @@
+"""Discover digitalSTROM server IP (dss-ip) devices."""
+from . import MDNSDiscoverable
+
+
+class Discoverable(MDNSDiscoverable):
+ """Add support for discovering digitalSTROM server IP (dss-ip) devices."""
+
+ def __init__(self, nd):
+ super(Discoverable, self).__init__(nd, '_http._tcp.local.')
+
+ def get_entries(self):
+ return self.find_by_device_name('dss-ip')
diff --git a/netdisco/discoverables/enigma2.py b/netdisco/discoverables/enigma2.py
new file mode 100644
index 0000000..17ee34a
--- /dev/null
+++ b/netdisco/discoverables/enigma2.py
@@ -0,0 +1,10 @@
+"""Discover Enigma2 servers."""
+from . import MDNSDiscoverable
+
+
+class Discoverable(MDNSDiscoverable):
+ """Add support for discovering Enigma2 boxes."""
+
+ def __init__(self, nd):
+ """Initialize the Enigma2 discovery."""
+ super(Discoverable, self).__init__(nd, '_e2stream._tcp.local.')
diff --git a/netdisco/discoverables/hass_mobile_app.py b/netdisco/discoverables/hass_mobile_app.py
new file mode 100644
index 0000000..9d2c7cf
--- /dev/null
+++ b/netdisco/discoverables/hass_mobile_app.py
@@ -0,0 +1,9 @@
+"""Discover Home Assistant servers."""
+from . import MDNSDiscoverable
+
+
+class Discoverable(MDNSDiscoverable):
+ """Add support for discovering mobile apps that support Home Assistant."""
+
+ def __init__(self, nd):
+ super(Discoverable, self).__init__(nd, '_hass-mobile-app._tcp.local.')
diff --git a/netdisco/discoverables/heos.py b/netdisco/discoverables/heos.py
new file mode 100644
index 0000000..5b6aa14
--- /dev/null
+++ b/netdisco/discoverables/heos.py
@@ -0,0 +1,10 @@
+"""Discover Heos devices."""
+from . import SSDPDiscoverable
+
+
+class Discoverable(SSDPDiscoverable):
+ """Add support for discovering DLNA services."""
+
+ def get_entries(self):
+ """Get all the HEOS devices."""
+ return self.find_by_st("urn:schemas-denon-com:device:ACT-Denon:1")
diff --git a/netdisco/discoverables/hikvision.py b/netdisco/discoverables/hikvision.py
new file mode 100644
index 0000000..cf9372e
--- /dev/null
+++ b/netdisco/discoverables/hikvision.py
@@ -0,0 +1,13 @@
+"""Discover Hikvision cameras."""
+from . import MDNSDiscoverable
+
+
+class Discoverable(MDNSDiscoverable):
+ """Add support for discovering Hikvision cameras."""
+
+ def __init__(self, nd):
+ """Initialize Hikvision camera discovery."""
+ super(Discoverable, self).__init__(nd, '_http._tcp.local.')
+
+ def get_entries(self):
+ return self.find_by_device_name('HIKVISION')
diff --git a/netdisco/discoverables/openhome.py b/netdisco/discoverables/openhome.py
index 7adca6f..5374964 100644
--- a/netdisco/discoverables/openhome.py
+++ b/netdisco/discoverables/openhome.py
@@ -7,5 +7,6 @@ class Discoverable(SSDPDiscoverable):
def get_entries(self):
"""Get all the Openhome compliant device uPnP entries."""
- return self.find_by_st("urn:av-openhome-org:service:Product:2") + \
+ return self.find_by_st("urn:av-openhome-org:service:Product:1") + \
+ self.find_by_st("urn:av-openhome-org:service:Product:2") + \
self.find_by_st("urn:av-openhome-org:service:Product:3")
diff --git a/netdisco/discoverables/sercomm.py b/netdisco/discoverables/sercomm.py
new file mode 100644
index 0000000..870e34a
--- /dev/null
+++ b/netdisco/discoverables/sercomm.py
@@ -0,0 +1,15 @@
+"""
+Discover Sercomm network cameras.
+These are rebranded as iControl and many others, and are usually
+distributed as part of an ADT or Comcast/Xfinity monitoring package.
+https://github.com/edent/Sercomm-API
+"""
+from . import SSDPDiscoverable
+
+
+class Discoverable(SSDPDiscoverable):
+ """Add support for discovering camera services."""
+
+ def get_entries(self):
+ """Get all Sercomm iControl devices."""
+ return self.find_by_device_description({'manufacturer': 'iControl'})
diff --git a/netdisco/discoverables/songpal.py b/netdisco/discoverables/songpal.py
index 94d09d6..5eafe32 100644
--- a/netdisco/discoverables/songpal.py
+++ b/netdisco/discoverables/songpal.py
@@ -13,17 +13,24 @@ class Discoverable(SSDPDiscoverable):
devs = self.find_by_st(
"urn:schemas-sony-com:service:ScalarWebAPI:1")
- # At least some Bravia televisions use this API for communication.
- # Based on some examples they always seem to lack modelNumber,
- # so we use it here to keep them undiscovered for now.
- non_bravias = []
+ # At least some Bravia televisions use the same API for communication,
+ # but are handled by another platforms, so we filter them out here.
+ supported = []
for dev in devs:
if 'device' in dev.description:
device = dev.description['device']
- if 'modelNumber' in device:
- non_bravias.append(dev)
+ scalarweb_info = device.get("X_ScalarWebAPI_DeviceInfo", None)
- return non_bravias
+ if scalarweb_info:
+ services = scalarweb_info["X_ScalarWebAPI_ServiceList"]
+ service_types = services["X_ScalarWebAPI_ServiceType"]
+ # Sony Bravias offer videoScreen service, soundbars do not
+ if 'videoScreen' in service_types:
+ continue
+
+ supported.append(dev)
+
+ return supported
def info_from_entry(self, entry):
"""Get information for a device.."""
diff --git a/setup.py b/setup.py
index 7fe1e70..a7f4364 100644
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ with open(os.path.join(here, 'README.md'), encoding='utf-8') as readme_file:
setup(
name='netdisco',
- version='2.3.0',
+ version='2.6.0',
description='Discover devices on your local network',
long_description=long_description,
long_description_content_type='text/markdown',
diff --git a/tox.ini b/tox.ini
index 714a850..eb5c507 100644
--- a/tox.ini
+++ b/tox.ini
@@ -21,6 +21,6 @@ commands =
[testenv:typing]
deps =
- mypy>=0.650
+ mypy==0.650
commands =
mypy netdisco tests setup.py example_service.py