Skip to content

Releases: crowbarz/aiopioneer

0.8.2rc1

23 Jan 21:13
Compare
Choose a tag to compare
0.8.2rc1 Pre-release
Pre-release

What's Changed

  • Exception handling has been overhauled:
    • More granular exception classes have been added as subclasses of PioneerError class
    • AVR errors for connection and update methods raise PioneerError subclasses when an AVR error is encountered.
    • mute_on, mute_off, set_volume_level now raises PioneerError subclasses for AVR errors, previously errors were only logged
    • update raises an ExceptionGroup when multiple exceptions are encountered during a full refresh
    • update raises AVRUnavailableError is raised when the AVR disconnects during a full refresh
    • send_command always raises AVRUnavailableError on AVR disconnect, even when ignore_error is set
    • Error text interpolation is moved into the PioneerError class
  • The responder task has been removed and its functionality merged into the listener task. The responder debug parameter has also been removed
  • AVR properties are reset to unknown on AVR disconnect. A full update after reconnection will repopulate AVR properties

All Changes

  • Run full update on AVR on reconnect 1f9150b
  • Reset AVR properties on disconnect 52c236c
  • Drop listening modes message to debug e58c5a0
  • Read responses directly in listener task instead of responder task 28e5d44
  • Remove responder task handling 28e5d44
  • Remove responder debug 28e5d44
  • Add failed command to timeout exception 688a34e
  • Show debug for command queue start and complete 0f29d52
  • Add AVRConnectError exception for connect errors 28445c9
  • Demote AVR not connected on disconnect message to debug be2f5c6
  • Log error on send_raw_command write exception be2f5c6
  • Always re-raise AVRUnavailableError on send_command f869cfd
  • Defer exception handling to caller in _refresh_zones ccd196e
  • Handle command queue task cancellation and AVR unavailable exceptions 1d4a9b2
  • Re-raise command queue exceptions on command queue wait 2b54ffe
  • Pass through exceptions on set_volume_level command failure a4792e8
  • Raise AVRCommandError on volume step errors a4792e8
  • Pass through exceptions for mute_off and mute_on 0a0f53d
  • Revert to asyncio.wait_for to wait for response 9596d8f
  • Move error message interpolation to .exceptions 45ce64c
  • Raise PioneerError child exceptions for detected AVR errors 45ce64c
  • Add more granular errors with keyed message text and exception argument parsing 45ce64c
  • Handle command queue task cancellation in _command_queue_wait 45ce64c
  • Don't raise ExceptionGroup if only one exception occurred executing command queue 45ce64c
  • Fix single zone refresh in update 8f58d2f
  • Fix response queue typing 5ed1ef4
  • Move AVRCommandError zone argument to end to match kwargs ef62487

Full Changelog: 0.8.1...0.8.2rc1

0.8.1

05 Jan 20:48
Compare
Choose a tag to compare

What's Changed

The query_device_model method now returns True if a device model was returned by the AVR, False if the AVR returned an error code, and None if the AVR command timed out. This return value can be used to more reliably determine if the device speaks the Pioneer AVR API, even when the device model query command is not supported.

All Changes

  • Handle error response when querying device model dbb7d8f
  • Check zone arguments are of type Zone c20a82d
  • Update test_api for API 0.8.0 be49dac
  • Use isinstance instead of type 97513c6

Full Changelog: 0.8.0...0.8.1

0.8.0

03 Jan 20:01
Compare
Choose a tag to compare

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 the params and properties attributes of the PioneerAVR 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 details
    • PioneerAVRProperties contains the cache of AVR properties collected from its responses
    • PioneerAVRConnection contains the connection related methods, although PioneerAVR inherits from the new class so the connection methods are still accessible via the PioneerAVR 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 renamed Zone for improved consistency
  • The param module has been renamed params 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 renamed source_id, and an additional source_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, the query_device_info queried all device information including the device model regardless of whether the AVR main zone was powered on. Clients that previously called query_device_info at module startup should now call query_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 and query_video_information commands have been renamed query_basic_audio_information and query_basic_video_information. These basic query commands, in addition to query_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 to query_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 the PioneerAVR object with the new zones
  • The PioneerAVR.initial_update property has moved to run-time param PARAM_ZONES_INITIAL_REFRESH and is now a set of Zone. The PioneerAVRParams.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 typing set[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 and display to end
    • Refresh zone before querying device info
    • Don't queue basic query after each update
  • 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) b55210f701cb10e52...
Read more

0.7.1

02 Dec 20:39
Compare
Choose a tag to compare

What's Changed

  • Correct select_listening_mode and select_source method type hints 0de88ba
  • Add reference to 2015 Pioneer command list 953de75
  • Fix UnboundLocalError by @webmeister in #37
  • Added VIDEO and GAME source IDs to source list by @dondonini in #38
  • Updated deprecated asyncio.TimeoutError 6d2fbbc
  • Fix minor typos db7219d
  • Migrate setup.py to pyproject.toml f1544bf
  • Explicitly pass command_name to local_command 554bde2
  • Renamed zone update to refresh 7c12d70
  • Track initial refresh for individual zones 7c12d70
  • Support update of specific zone 7c12d70
  • Always start updater task c58cf91
  • Simplify zone discovery e2760f5
  • Add AV information query command a079d4e
  • Change update terminology to refresh a079d4e
  • Add command queue debug to default debug level a079d4e
  • Simplify update_zone logic by @webmeister in #39

New Contributors

Full Changelog: 0.7.0...0.7.1

0.7.0

09 Jul 20:07
Compare
Choose a tag to compare

What's Changed

  • select_listening_mode now accepts arguments mode_name or mode_id (requires one argument)
  • select_source now accepts arguments source or source_id (requires one argument)

Breaking Changes

  • The listening_mode argument of select _listening_mode has been renamed to mode_name
  • Most PioneerAVR methods now raise exceptions derived from PioneerError when an error is encountered, rather than returning false, None or similar error value. Some instances that currently raise ValueError or SystemError will also raise PioneerError subclasses in the near future
  • send_raw_request no longer accepts an argument ignore_error and will always raise exceptions on error. Use ignore_error with send_command to have exceptions handled for you
  • asyncio yields have been optimised and minimised, which may cause certain sequences of operations to happen in a different order

All Changes

  • Update class methods to throw exceptions on error ef2c580
  • Rationalise asyncio.sleep(0) calls ac872ff
  • Fix frequency step error, fixes crowbarz/ha-pioneer_async#43 758cde0
  • Raise PioneerError subclasses instead of returning None/False to flag errors in send_raw_request and _wait_for_response a6a29d4
  • Remove ignore_error argument in send_raw_request and _wait_for_response a6a29d4
  • Handle ignore_error in send_command by catching exceptions a6a29d4
  • Refactor send_raw_request to use send_command a6a29d4
  • Raise RuntimeError instead of SystemError 940a8cb
  • Rename Pioneer exception classes to *Error a84d5bf
  • Fix AVRCommandError class rename 06986f8
  • Perform initial update only on Zone 1 power on 0b6b536
  • Fix enum comparisons 80c8248
  • Fix zone enum inequality comparisons de0d008

0.6.0

26 May 11:42
Compare
Choose a tag to compare

What's Changed

Warning

Please check out the Breaking Changes below if you use the Python API.

Tuner

Status polling

Response parsing

  • Restructured parsers functions and classes 8c657cd 8c657cd 32470bd
  • Changed tuner response parser default zone to match commands dcf5a15
  • Remove tabs and newlines from display 0f74481
  • Include last character of display information 92ec860
  • Decode correct bytes for signal_input_resolution 92ec860
  • Fix video signal_input_resolution property parsing 575ad90

Miscellaneous

  • Update Main Zone terminology to Zone 1 368b7d6
  • Return command response for turn_on, turn_off and set_source_name methods
    dd31842
  • Abort on any command failure for set_*_settings dd31842
  • Reorder task cancellation on disconnect to avoid stale tasks af75081
  • Refactor set_tone_settings method 5edfb6b
  • Add SOURCE_TUNER constant for detecting tuner source 797a2bf
  • Return immutable dict in get_source_dict b66c732
  • Use copy.deepcopy to return dict copy instead of merge a6b17ee
  • Use StrEnum for enums 9a785fb
  • Update test_api.py for recent aiopioneer changes 6f77c26
  • Disable power on volume bounce and video queries for VSX-930 by default 80431d9 85d0161
  • Simplify zone checking for set_video_settings and set_dsp_settings 80c73c7
  • Misc comment updates 80c73c7
  • Fix zone argument type for _update_zone and set_volume_level 0f75e4b
  • Ensure send_command optional arguments not specified positionally 7f64441
  • Clarified method docstrings 7f64441
  • Add function prototype for init and use DEFAULT_TIMEOUT and DEFAULT_SCAN_INTERVAL db32e5e
  • get_param returns None for non-existent parameters edfdbd9

⚠️ Breaking Changes

  • Python requirement bumped to 3.11 for StrEnum d986f2f
  • Zones enum now used on all methods accepting zone arguments (except in params) f6131b4 dd31842
  • Zone argument removed from tuner methods as tuner is independent of zone dcf5a15
  • TunerBand enum now used to specify a tuner band dcf5a15
  • update now waits for the update to finish by default 156c4b7 ddc39a9
  • set_tuner_preset renamed to select_tuner_preset 012e571
  • Response codes marked --- now return None 81d5869
  • Dimmer mode, tone mode and dB strings have been updated 5edfb6b bdc590a
  • Reordered send_command suffix argument 7f64441
  • Rename get_zone_listening_modes -> get_listening_modes 80c73c7
  • Remove zone from tuner_*, get_listening_modes, set_panel_lock, set_remote_lock and set_dimmer methods c45055b
  • Rename set_listening_mode -> select_listening_mode 4c7626b

0.6.0rc1

21 Apr 17:06
Compare
Choose a tag to compare
0.6.0rc1 Pre-release
Pre-release

⚠️ Release Candidate 1

aiopioneer 0.6.0 will be a major upgrade that complements the upcoming release of the pioneer_async Home Assistant integration. This release candidate enables the pioneer_async release candidate to be installed on Home Assistant.

Please check out the Breaking Changes below if you use the Python API.

What's Changed

Tuner

Status polling

Response parsing

  • Restructured parsers functions and classes 8c657cd 8c657cd 32470bd
  • Changed tuner response parser default zone to match commands dcf5a15
  • Remove tabs and newlines from display 0f74481
  • Include last character of display information 92ec860
  • Decode correct bytes for signal_input_resolution 92ec860
  • Fix video signal_input_resolution property parsing 575ad90

Miscellaneous

  • Update Main Zone terminology to Zone 1 368b7d6
  • Return command response for turn_on, turn_off and set_source_name methods
    dd31842
  • Abort on any command failure for set_*_settings dd31842
  • Reorder task cancellation on disconnect to avoid stale tasks af75081
  • Refactor set_tone_settings method 5edfb6b
  • Add SOURCE_TUNER constant for detecting tuner source 797a2bf
  • Return immutable dict in get_source_dict b66c732
  • Use copy.deepcopy to return dict copy instead of merge a6b17ee
  • Use StrEnum for enums 9a785fb
  • Update test_api.py for recent aiopioneer changes 6f77c26
  • Disable power on volume bounce and video queries for VSX-930 by default 80431d9 85d0161
  • Simplify zone checking for set_video_settings and set_dsp_settings 80c73c7
  • Misc comment updates 80c73c7
  • Fix zone argument type for _update_zone and set_volume_level 0f75e4b
  • Ensure send_command optional arguments not specified positionally 7f64441
  • Clarified method docstrings 7f64441
  • Add function prototype for init and use DEFAULT_TIMEOUT and DEFAULT_SCAN_INTERVAL db32e5e
  • get_param returns None for non-existent parameters edfdbd9

⚠️ Breaking Changes

  • Python requirement bumped to 3.11 for StrEnum d986f2f
  • Zones enum now used on all methods accepting zone arguments (except in params) f6131b4 dd31842
  • Zone argument removed from tuner methods as tuner is independent of zone dcf5a15
  • TunerBand enum now used to specify a tuner band dcf5a15
  • update now waits for the update to finish by default 156c4b7 ddc39a9
  • set_tuner_preset renamed to select_tuner_preset 012e571
  • Response codes marked --- now return None 81d5869
  • Dimmer mode, tone mode and dB strings have been updated 5edfb6b bdc590a
  • Reordered send_command suffix argument 7f64441
  • Rename get_zone_listening_modes -> get_listening_modes 80c73c7
  • Remove zone from tuner_*, get_listening_modes, set_panel_lock, set_remote_lock and set_dimmer methods c45055b
  • Rename set_listening_mode -> select_listening_mode 4c7626b

0.5.0

06 Mar 12:17
Compare
Choose a tag to compare

What's Changed

  • Add extra_amplifier_listening_modes to allow specifying set of listening modes supported by an AVR or AVR model dfc07f8
  • Update available listening mode defaults for VS-930 b48142a
  • Cache listening_mode_raw ID and expose as attribute dfc07f8
  • Make listening mode names unique aa54e96
  • Consolidate common PARAM_DISABLED_LISTENING_MODES and PARAM_SPEAKER_SYSTEM_MODES configurations 4b666ce
  • Remove flags byte from amp display attribute 521cced
  • Query display information on power or input change 79df438
  • Call all zone callbacks on update to Zones.ALL 95133d5
  • Always override calculated PARAM_TUNER_AM_FREQ_STEP if specified by user be32935

Breaking Changes

  • Rename get_sound_modes to get_zone_listening_modes to reflect AVR terminology. dfc07f8
  • Rename disable_autoquery to disable_auto_query d2b3c41
  • amplifier_speaker_system_modes and disabled_amplifier_listening_modes were shortened to amp_speaker_system_modes and disabled_amp_listening_modes respectively. d2b3c41

Full Changelog: 0.4.3...0.5.0

0.4.3

26 May 08:19
Compare
Choose a tag to compare
  • Start queueing responses before sending command request. Fixes issue of command responses being occasionally missed by the responder due to a race condition 4a31041
  • Implement set_tuner_band for setting the frequency band only 7d9ac4a
  • Refactor set_tuner_frequency and _calculate_am_frequency_step 7d9ac4a
  • Move PARAM_TUNER_AM_FREQ_STEP to system param to avoid its removal on param update 7d9ac4a
  • Implement _command_queue_wait to wait until command queue has finished executing. Wait for queue to be flushed before building source dict, and also after setting tuner band as this may trigger _calculate_am_frequency_step 7d9ac4a

Full Changelog: 0.4.2...0.4.3

0.4.2

08 May 19:41
Compare
Choose a tag to compare

What's Changed

  • Rename set_input_name command to set_source_name ac4a9d5
  • Support callback function for property update functions ff7a189
  • Accept Zones in callback functions db86c6d
  • Store PARAM_QUERY_SOURCES and pass to parsers 180b03c 79edcb6 1453918
  • Add Zones.ALL by @11harveyj in #25
  • Support suffix when sending commands via CLI ae12375

Full Changelog: 0.4.1...0.4.2