Skip to content

Commit

Permalink
Improved resilience when creating devices which are powered off
Browse files Browse the repository at this point in the history
  • Loading branch information
ol-iver committed May 9, 2020
1 parent 5cafb63 commit 324671c
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 104 deletions.
125 changes: 101 additions & 24 deletions HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DATA
__title__ = 'denonavr'

VERSION
0.8.1
0.9.0

====================================================================================

Expand All @@ -47,10 +47,13 @@ CLASSES
DenonAVR
DenonAVRZones
builtins.tuple(builtins.object)
DescriptionType
ReceiverType
ReceiverURLs

class DenonAVR(builtins.object)
| DenonAVR(host, name=None, show_all_inputs=False, timeout=2.0, add_zones=None)
|
| Representing a Denon AVR Device.
|
| Methods defined here:
Expand Down Expand Up @@ -81,11 +84,17 @@ CLASSES
| create_zones(self, add_zones)
| Create instances of additional zones for the receiver.
|
| ensure_configuration(self)
| Ensure that configuration is loaded from receiver.
|
| exec_appcommand_post(self, attribute_list)
| Prepare and execute a HTTP POST call to AppCommand.xml end point.
|
| Returns XML ElementTree on success and None on fail.
|
| get_device_info(self)
| Get device information.
|
| get_status_xml(self, command, suppress_errors=False)
| Get status XML via HTTP and return it as XML ElementTree.
|
Expand All @@ -98,6 +107,12 @@ CLASSES
| next_track(self)
| Send next track command to receiver command via HTTP post.
|
| pause(self)
| Send pause command to receiver command via HTTP post.
|
| play(self)
| Send play command to receiver command via HTTP post.
|
| power_off(self)
| Turn off receiver via HTTP get command.
|
Expand Down Expand Up @@ -183,6 +198,12 @@ CLASSES
| input_func_list
| Return a list of available input sources as string.
|
| manufacturer
| Return the manufacturer of the device as string.
|
| model_name
| Return the model name of the device as string.
|
| muted
| Boolean if volume is currently muted.
|
Expand All @@ -208,12 +229,21 @@ CLASSES
|
| Possible values are: "ON", "STANDBY" and "OFF"
|
| receiver_port
| Return the receiver's port.
|
| receiver_type
| Return the receiver's type.
|
| serial_number
| Return the serial number of the device as string.
|
| show_all_inputs
| Indicate if all inputs are shown or just active one.
|
| sm_match_dict
| Return a dict to map each sound_mode_raw to matching sound_mode.
|
| support_sound_mode
| Return True if sound mode supported.
|
| sound_mode
| Return the matched current sound mode as a string.
|
Expand All @@ -236,6 +266,9 @@ CLASSES
| station
| Return current radio station as string.
|
| support_sound_mode
| Return True if sound mode supported.
|
| title
| Return title of current playing media as string.
|
Expand All @@ -252,6 +285,8 @@ CLASSES
| Return all Zone instances of the device.

class DenonAVRZones(DenonAVR)
| DenonAVRZones(parent_avr, zone, name)
|
| Representing an additional zone of a Denon AVR Device.
|
| Method resolution order:
Expand All @@ -273,8 +308,30 @@ CLASSES
| :param name: Device name, if None FriendlyName of device is used.
| :type name: str
|
| create_zones(self, add_zones)
| Only call this method from parent AVR (Main Zone).
| set_sound_mode(self, sound_mode)
| Set sound_mode of device.
|
| Valid values depend on the device and should be taken from
| "sound_mode_list".
| Return "True" on success and "False" on fail.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| sm_match_dict
| Return a dict to map each sound_mode_raw to matching sound_mode.
|
| sound_mode
| Return the matched current sound mode as a string.
|
| sound_mode_dict
| Return a dict of available sound modes with their mapping values.
|
| sound_mode_list
| Return a list of available sound modes as string.
|
| sound_mode_raw
| Return the current sound mode as string as received from the AVR.
|
| ----------------------------------------------------------------------
| Methods inherited from DenonAVR:
Expand All @@ -287,11 +344,20 @@ CLASSES
| The sound_mode_dict is uses externally to set this dictionary
| because that has a nicer syntax.
|
| create_zones(self, add_zones)
| Create instances of additional zones for the receiver.
|
| ensure_configuration(self)
| Ensure that configuration is loaded from receiver.
|
| exec_appcommand_post(self, attribute_list)
| Prepare and execute a HTTP POST call to AppCommand.xml end point.
|
| Returns XML ElementTree on success and None on fail.
|
| get_device_info(self)
| Get device information.
|
| get_status_xml(self, command, suppress_errors=False)
| Get status XML via HTTP and return it as XML ElementTree.
|
Expand All @@ -304,6 +370,12 @@ CLASSES
| next_track(self)
| Send next track command to receiver command via HTTP post.
|
| pause(self)
| Send pause command to receiver command via HTTP post.
|
| play(self)
| Send play command to receiver command via HTTP post.
|
| power_off(self)
| Turn off receiver via HTTP get command.
|
Expand All @@ -326,13 +398,6 @@ CLASSES
| "input_func_list".
| Return "True" on success and "False" on fail.
|
| set_sound_mode(self, sound_mode)
| Set sound_mode of device.
|
| Valid values depend on the device and should be taken from
| "sound_mode_list".
| Return "True" on success and "False" on fail.
|
| set_sound_mode_dict(self, sound_mode_dict)
| Set the matching dictionary used to match the raw sound mode.
|
Expand Down Expand Up @@ -389,6 +454,12 @@ CLASSES
| input_func_list
| Return a list of available input sources as string.
|
| manufacturer
| Return the manufacturer of the device as string.
|
| model_name
| Return the model name of the device as string.
|
| muted
| Boolean if volume is currently muted.
|
Expand All @@ -414,20 +485,17 @@ CLASSES
|
| Possible values are: "ON", "STANDBY" and "OFF"
|
| sm_match_dict
| Return a dict to map each sound_mode_raw to matching sound_mode.
| receiver_port
| Return the receiver's port.
|
| sound_mode
| Return the matched current sound mode as a string.
|
| sound_mode_dict
| Return a dict of available sound modes with their mapping values.
| receiver_type
| Return the receiver's type.
|
| sound_mode_list
| Return a list of available sound modes as string.
| serial_number
| Return the serial number of the device as string.
|
| sound_mode_raw
| Return the current sound mode as string as received from the AVR.
| show_all_inputs
| Indicate if all inputs are shown or just active one.
|
| state
| Return the state of the device.
Expand All @@ -439,6 +507,9 @@ CLASSES
| station
| Return current radio station as string.
|
| support_sound_mode
| Return True if sound mode supported.
|
| title
| Return title of current playing media as string.
|
Expand Down Expand Up @@ -472,6 +543,9 @@ FUNCTIONS
Returns dictionary with keys "host", "modelName", "friendlyName" and
"presentationURL" if a Denon AVR device was found and "False" if not.

get_local_ips()
Get IPs of local network adapters.

identify_denonavr_receivers()
Identify DenonAVR using SSDP and SCPD queries.

Expand All @@ -483,3 +557,6 @@ FUNCTIONS

Returns a list of dictionaries with "address" (IP, PORT) and "URL"
of SCPD XML for all discovered devices.

ssdp_request(ssdp_st, ssdp_mx=2)
Return request bytes for given st and mx.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# denonavr
[![Build Status](https://travis-ci.org/scarface-4711/denonavr.svg?branch=master)](https://travis-ci.org/scarface-4711/denonavr)

Automation Library for Denon AVR receivers - current version 0.8.1
Automation Library for Denon AVR receivers - current version 0.9.0

## Installation

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ denonavr

|Build Status|

Automation Library for Denon AVR receivers - current version 0.8.1
Automation Library for Denon AVR receivers - current version 0.9.0

Installation
------------
Expand Down
2 changes: 1 addition & 1 deletion denonavr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
logging.getLogger(__name__).addHandler(logging.NullHandler())

__title__ = "denonavr"
__version__ = "0.8.1"
__version__ = "0.9.0"


def discover():
Expand Down
Loading

0 comments on commit 324671c

Please sign in to comment.