diff --git a/HELP.md b/HELP.md index 7d0b2a1..eb7c0ca 100644 --- a/HELP.md +++ b/HELP.md @@ -29,7 +29,7 @@ DATA __title__ = 'denonavr' VERSION - 0.9.9 + 0.9.10 ==================================================================================== diff --git a/README.md b/README.md index af01674..3476411 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # denonavr -[![Version](https://img.shields.io/badge/version-v0.9.9-orange.svg)](https://github.com/scarface-4711/denonavr) +[![Version](https://img.shields.io/badge/version-v0.9.10-orange.svg)](https://github.com/scarface-4711/denonavr) [![Build Status](https://travis-ci.com/scarface-4711/denonavr.svg?branch=master)](https://travis-ci.com/scarface-4711/denonavr) [![PyPi](https://img.shields.io/pypi/v/denonavr.svg)](https://pypi.org/project/denonavr) [![License](https://img.shields.io/github/license/scarface-4711/denonavr.svg)](LICENSE) -Automation Library for Denon AVR receivers - current version 0.9.9 +Automation Library for Denon AVR receivers - current version 0.9.10 ## Installation diff --git a/README.rst b/README.rst index c4c7a40..f6f02da 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ denonavr .. |Build Status| .. image:: https://travis-ci.com/scarface-4711/denonavr.svg?branch=master :target: https://travis-ci.com/scarface-4711/denonavr -Automation Library for Denon AVR receivers - current version 0.9.9 +Automation Library for Denon AVR receivers - current version 0.9.10 Installation ------------ diff --git a/denonavr/__init__.py b/denonavr/__init__.py index a68349d..bfac109 100644 --- a/denonavr/__init__.py +++ b/denonavr/__init__.py @@ -17,7 +17,7 @@ logging.getLogger(__name__).addHandler(logging.NullHandler()) __title__ = "denonavr" -__version__ = "0.9.9" +__version__ = "0.9.10" def discover(): diff --git a/denonavr/denonavr.py b/denonavr/denonavr.py index 1f7b8d8..ec23b0a 100644 --- a/denonavr/denonavr.py +++ b/denonavr/denonavr.py @@ -32,7 +32,7 @@ r"(.*AV(C|R)-(X|S).*|.*SR500[6-9]|.*SR60(07|08|09|10|11|12|13)|." r"*SR70(07|08|09|10|11|12|13)|.*SR501[3-4]|.*NR1604|.*NR1710)") -DEVICEINFO_COMMAPI_PATTERN = re.compile(r"(0210|0300|0301)") +DEVICEINFO_COMMAPI_PATTERN = re.compile(r"(0210|0220|0250|0300|0301)") ReceiverType = namedtuple('ReceiverType', ["type", "port"]) AVR = ReceiverType(type="avr", port=80) @@ -920,7 +920,8 @@ def _update_tone_control(self, root=None): return False try: - self._tone_control_status = bool(int(root[0].find('status').text)) + self._tone_control_status = bool( + int(root.find('./cmd/status').text)) except (AttributeError, IndexError, TypeError): return False @@ -935,11 +936,12 @@ def _update_tone_control(self, root=None): return False try: - self._tone_control_adjust = bool(int(root[0].find('adjust').text)) - self._bass = int(root[0].find('bassvalue').text) - self._bass_level = root[0].find('basslevel').text - self._treble = int(root[0].find('treblevalue').text) - self._treble_level = root[0].find('treblelevel').text + self._tone_control_adjust = bool( + int(root.find('./cmd/adjust').text)) + self._bass = int(root.find('./cmd/bassvalue').text) + self._bass_level = root.find('./cmd/basslevel').text + self._treble = int(root.find('./cmd/treblevalue').text) + self._treble_level = root.find('./cmd/treblelevel').text except (AttributeError, IndexError, TypeError): _LOGGER.error("Incomplete/no information found for tone control") return False diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6b54136 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +requests +netifaces \ No newline at end of file diff --git a/setup.py b/setup.py index ad70592..d12b180 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import find_packages, setup setup(name='denonavr', - version='0.9.9', + version='0.9.10', description='Automation Library for Denon AVR receivers', long_description='Automation Library for Denon AVR receivers', url='https://github.com/scarface-4711/denonavr',