0.8.0
TL;DR
Access to params and properties have changed in this release due to the main class being split up. All AVR updates are now scheduled via the command queue. The order of queries sent during AVR zone refresh have changed order. Some unused methods have been removed. The Zones
enum and the param
module have been renamed to Zone
and params
respectively.
Breaking Changes
- To enable params to be accessible from AVR response parsers and also to reduce the size of the main class, the
PioneerAVR
class has been split out to the classes listed below. References to parameter and properties methods and attributes will need to be updated to be accessed via theparams
andproperties
attributes of thePioneerAVR
object. All other public attributes have moved to the new classes.PioneerAVRParams
contains the user and run-time parameter get/set methods. Some method names have changed, please consult the updated documentation for detailsPioneerAVRProperties
contains the cache of AVR properties collected from its responsesPioneerAVRConnection
contains the connection related methods, althoughPioneerAVR
inherits from the new class so the connection methods are still accessible via thePioneerAVR
class
- Commands that are sent to the AVR to perform full updates are now executed via the command queue. This eliminates the previous interaction between the updater and command queue threads, as the updater now simply schedules updates via the command queue
- The order of queries during a full update has been modified so that amp, DSP and tone queries are executed before video queries
- The
Zones
enum has been renamedZone
for improved consistency - The
param
module has been renamedparams
for improved consistency - Exception handling within the AVR interface methods has been made more robust. The AVR listener and responders will now only trigger disconnection from the AVR (and reconnection if requested) if the AVR connection drops. Notably, parser exceptions and timeouts to power, volume and mute queries will no longer cause the AVR connection to disconnect and reconnect. This should fully resolve issues such as crowbarz/ha-pioneer_async#54
- Not detecting Zone 1 on the AVR on module startup has been demoted from an error to a warning and Zone 1 is assumed to exist. Despite this change, most AVR commands will still not work when the AVR is in this state. It is now up to the client to check that Zone 1 has been discovered and handle the case when it is not
- The
source
AVR zone property has been renamedsource_id
, and an additionalsource_name
property has been introduced that contains the mapped name for the source for each zone - The
query_device_model
method has been introduced to query the device model and set default model parameters. Previously, thequery_device_info
queried all device information including the device model regardless of whether the AVR main zone was powered on. Clients that previously calledquery_device_info
at module startup should now callquery_device_model
.query_device_info
will be automatically called when the main zone is powered on for the first time after connecting, and no longer needs to be called by the client - If Zone 1 is not powered on at integration startup, queries for AVR device info is deferred until Zone 1 is first powered on.
- The
query_audio_information
andquery_video_information
commands have been renamedquery_basic_audio_information
andquery_basic_video_information
. These basic query commands, in addition toquery_listening_mode
, are executed with a delay after all zone power and source operations whenever any zone is powered on - The
system_query_source_name
has been renamed toquery_source_name
to avoid being sent during AVR device info queries - The
query_sources
method has been removed.PioneerAVRParams.get_runtime_param(PARAM_QUERY_SOURCES)
should be used instead - The
update_zones
method has been removed. Change the AVR zones by recreating thePioneerAVR
object with the new zones - The
PioneerAVR.initial_update
property has moved to run-time paramPARAM_ZONES_INITIAL_REFRESH
and is now a set ofZone
. ThePioneerAVRParams.zones_initial_refresh
property is provided as a convenience to access this run-time parameter - System parameters have been re-termed as run-time parameters to better reflect their function
- The
PioneerAVRProperties.zones
property now has typingset[Zone]
Major Changes
- Split connection, params and properties into separate classes by @crowbarz in #42
- Rename command system_query_source_name to query_source_name by @crowbarz in #43
- Simplify device info query by @crowbarz in #44
- Optimise AVR query command order by @crowbarz in #45
- Separate params and AVR properties into separate instantiated classes by @crowbarz in #46
- Update via command queue by @crowbarz in #47
- Rename zones class by @crowbarz in #48
- Rename module param to params by @crowbarz in #49
All Changes
- Update Makefile to use modern packaging 4f06af0
- Split connection, params and properties into separate classes #42
- Split out connection, properties, param classes
- Complete docstring
- Black
- Yield to cancelled tasks on disconnect
- Add more debug logs to _connection_listener
- Rename command system_query_source_name to query_source_name 67a99b0 #43
- Correct CLI module path in pyproject.toml 872352f
- Simplify device info query #44
- Separate initial AVR model query to query_device_model method
- Update CLI to use query_device_model on initial connect
- Always execute query_device_info on initial zone refresh
- Consolidate AVR methods fb6c529
- set_channel_levels optimisations 2bd26b9
- Consolidate param operations in param module 2c7bc3f
- Convert param retrieval functions to property 2c7bc3f
- Catch exceptions in command queue 0bf50c3
- Defer updates after command queue flushed 0bf50c3
- Optimise AVR query command order #45
- Group audio/video information queries to new function
basic
(audio
is now empty) - Modify query order to proritise audio over video, and move
tuner
,system
anddisplay
to end - Refresh zone before querying device info
- Don't queue basic query after each update
- Group audio/video information queries to new function
- Add names to asyncio tasks 191edaf
- Check for exceptions whenever checking that a task is done 266e040
- Move model property to PioneerAVRProperties 981f55b
- Break up long string f02e247
- Separate params and AVR properties into separate instantiated classes #46
- Update via command queue #47
- Execute zone refreshes via command queue b69bdcb
- Refactor update method and updater task to queue full refresh via command queue b69bdcb
- Schedule command queue task when queueing commands b69bdcb
- Query device info from refresh_zones after initial update, instead of queuing local command in parse_response b69bdcb
- Don't refresh zones after querying zones b69bdcb
- Rely on task.result() to re-raise exceptions in safe_wait_for b69bdcb
- Removed unused update_zones b69bdcb
- Add command queue debug param b69bdcb
- Overhauled and simplified debug b69bdcb
- Use repr to show exception name and details b69bdcb
- Fix source name/ID property mapping ddb8265
- Fix IP control port base property name 4e7c0c4
- Document IP control port base property 98bac5c
- Fix set_system_param proto b400b5c
- Move response parsing to parsers module b55210f
- Migrate response overrides for initial full refresh, query basic and volume bounce to parsers and local commands b55210f
- Pass full PioneerAVRParams object to parsers (allows setting of parameters) b55210f
- Move command_queue command parameters to list b55210f
- Rename "_query_basic_information" local command (and corresponding "_delayed_query_basic_information") to "_query_basic" b55210f
- Add _oob pseudo command to conditionally queue commands when not updating (response is out of band) b55210f
- Add return value typing for parser functions b55210f
- Move ip_control_port to base_property system 5326c0d
- Convert get_ipod_control_commands and get_tuner_control_commands to properties 012fbe5
- Fix _delayed_query_basic command ed83c5d
- Implement base_property command _clear_source_id to replace lambda function to call parent object method becef88
- Query basic on zone power off 65541cc
- Correct prototype for parse_response 034ad86
- Move initial_refresh public property to system param PARAM_ZONES_INITIAL_REFRESH 0747afc
- Move zones_initial_refresh property to PioneerAVRParams 24ca451
- Simplify _read_response exception handling, defer to _connection_listener 7273b5c
- Terminate listener only if cancelled or EOF detected 7273b5c
- Suppress exception error logging on disconnect 5455753
- Fix command queue exception logging 205bc13
- Yield to start command queue before waiting fd2231e
- Add param PARAM_ALWAYS_POLL to ignore out of band responses as state refresh and instead always poll AVR state 493b105)
- Add debug_command_queue documentation 3d5d3de
- Fix missing await ae016c0
- Cache source_name in PioneerAVRProperties dd6bade
- Get task name directly from task in cancel_task a7326d8
- Make reconnect_avr method private edd57aa
- Return after warning if disconnect called when already disconnected edd57aa
- Show delay as float in connect retry message edd57aa
- Rename PioneerAVRProperties.source -> source_id ed283f0
- Fix source_id base_property in source parser ce62cba
- Cancel reconnect task on shutdown during reconnect c736082
- Rename zones class #48
- Rename Zones class to Zone
- Add Zone.full_name staticmethod
- Rename module param to params #49
- Fix set_system_param docstring 64085e1
- Make command_queue_schedule method private 1a23f17
- Correct debug method argument order 10b7df8
- Tighten typing for AVR property groups 37e1800
- Disconnect and raise AVRUnavailableError if reader or writer return failure beba91a
- Update typing for scan_interval to float 8d49075
- Rename (get|set)_system_param to (get|set)_runtime_param 05e45f1
- Documentation update for 0.8 56c9afe
- Change Zone.full_name to property f937d12
- Update errors to use Zone.full_name f937d12
- Change PioneerAVRProperties.zones to set[Zone] f937d12
- Change default for PARAM_IGNORE_VOLUME_CHECK to True for all AVRs #50
- Further documentation updates f1cb42f
- Update typing d69b252
Full Changelog: 0.7.1...0.8.0