Skip to content

Commit

Permalink
Merge pull request #12 from mvdwetering/add_surround_decoder_presets
Browse files Browse the repository at this point in the history
Add surround decoder presets
  • Loading branch information
mvdwetering authored Oct 3, 2023
2 parents 0aaa0d7 + a56dc97 commit 913404b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 10 deletions.
12 changes: 10 additions & 2 deletions docs/PRACTICALITIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ See https://github.com/mvdwetering/yamaha_ynca/issues/19 for logs.
Currently known receivers that behave like this:
- RX-V475 1.34/2.06

Potential workaround would be to send the remote codes for SCENE1 etc...

## No Zone and Scene names

Some receivers respond with @UNDEFINED for ZONENAME and SCENENAME requests.
Expand Down Expand Up @@ -63,9 +65,15 @@ The older models have support for Dolby Prologic and DTS:Neo settings, while new

Values seen until now:
* "AURO-3D" Seen on RX-A6A
* "DTS Neural:X" Seen on RX-A1060
* "DTS Neural:X" Seen on RX-A1060 and RX-A3070

From a quick look at the product manuals those models do not support the older surround decoder values.
However the RX-A3070 does... it supports the DTS:NEO presets and Auto, Dolby Surround, Neural X.

AURO-3D does not seem to be available on RX-1060 and it is unknown how to detect AURO-3D support.

It is unfortunately unknown if it is possible to derive the 2CHDECODER options from other settings.

From a quick look at the product manuals those models do not support the older surround decoder values. AURO-3D does not seem to be available on RX-1060 and it is unknown how to detect AURO-3D support.

## SONG vs TRACK for songtitles

Expand Down
2 changes: 1 addition & 1 deletion tests/test_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def test_twochdecoder(connection, initialized_zone: ZoneBase):
assert initialized_zone.twochdecoder is TwoChDecoder.DtsNeo6Cinema

# Unknown value
connection.send_protocol_message(SUBUNIT, "2CHDECODER", "Auto")
connection.send_protocol_message(SUBUNIT, "2CHDECODER", "UnknownValue")
assert initialized_zone.twochdecoder is TwoChDecoder.UNKNOWN


Expand Down
4 changes: 2 additions & 2 deletions ynca/constants.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Misc constants"""
import logging
from enum import Enum
from enum import Enum, unique

logger = logging.getLogger(__name__)

MIN_VOLUME = -80.5 # Minimum volume value for receivers


@unique
class Subunit(str, Enum):
"""Known Subunits in YNCA"""

Expand Down
34 changes: 29 additions & 5 deletions ynca/enums.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""Enums used for mapping YNCA values"""

import logging
from enum import Enum
from enum import Enum, unique

logger = logging.getLogger(__name__)

UNKNOWN_STRING = "< UNKNOWN >"


@unique
class AdaptiveDrc(str, Enum):
OFF = "Off"
AUTO = "Auto"
Expand All @@ -21,6 +21,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Avail(str, Enum):
NOT_CONNECTED = "Not Connected"
NOT_READY = "Not Ready"
Expand All @@ -35,6 +36,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class BandDab(str, Enum):
DAB = "DAB"
FM = "FM"
Expand All @@ -48,6 +50,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class BandTun(str, Enum):
AM = "AM"
FM = "FM"
Expand All @@ -61,6 +64,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Enhancer(str, Enum):
ON = "On"
OFF = "Off"
Expand All @@ -74,6 +78,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class HdmiOut(str, Enum):
OFF = "Off"
OUT1 = "OUT1"
Expand All @@ -89,6 +94,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class HdmiOutOnOff(Enum):
ON = "On"
OFF = "Off"
Expand All @@ -102,6 +108,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class InitVolLvl(str, Enum):
MUTE = "Mute"
OFF = "Off"
Expand All @@ -116,6 +123,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class InitVolMode(str, Enum):
ON = "On"
OFF = "Off"
Expand All @@ -129,6 +137,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Input(Enum):
# Inputs with connectors on the receiver
AUDIO1 = "AUDIO1"
Expand Down Expand Up @@ -182,6 +191,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Mute(str, Enum):
ON = "On"
ATT_MINUS_20 = "Att -20 dB"
Expand All @@ -196,7 +206,7 @@ def _missing_(cls, value):
UNKNOWN = UNKNOWN_STRING
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Party(Enum):
ON = "On"
OFF = "Off"
Expand All @@ -210,6 +220,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class PartyMute(Enum):
ON = "On"
OFF = "Off"
Expand All @@ -223,6 +234,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Playback(str, Enum):
STOP = "Stop"
PAUSE = "Pause"
Expand All @@ -239,6 +251,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class PlaybackInfo(str, Enum):
STOP = "Stop"
PAUSE = "Pause"
Expand All @@ -253,6 +266,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class PureDirMode(Enum):
ON = "On"
OFF = "Off"
Expand All @@ -266,6 +280,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Pwr(Enum):
ON = "On"
STANDBY = "Standby"
Expand All @@ -279,6 +294,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Repeat(str, Enum):
OFF = "Off"
SINGLE = "Single"
Expand All @@ -293,6 +309,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Shuffle(str, Enum):
ON = "On"
OFF = "Off"
Expand All @@ -306,6 +323,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Sleep(str, Enum):
OFF = "Off"
THIRTY_MIN = "30 min"
Expand All @@ -322,6 +340,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class SoundPrg(str, Enum):
HALL_IN_MUNICH = "Hall in Munich"
HALL_IN_VIENNA = "Hall in Vienna"
Expand Down Expand Up @@ -362,6 +381,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class Straight(Enum):
ON = "On"
OFF = "Off"
Expand All @@ -375,6 +395,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class ThreeDeeCinema(str, Enum):
OFF = "Off"
AUTO = "Auto"
Expand All @@ -388,6 +409,7 @@ def _missing_(cls, value):
"""Unknown values in the enum are mapped to UNKNOWN"""


@unique
class TwoChDecoder(str, Enum):
# Older models support Dolby Prologic and DTS:Neo settings
DolbyPl = "Dolby PL"
Expand All @@ -401,9 +423,11 @@ class TwoChDecoder(str, Enum):
DtsNeo6Music = "DTS NEO:6 Music"

# Newer models seem to have diffent values
# These have been seen
# These have been seen (Note that RX-A3070 also supports the DTS NEO presets)
Auro3d = "AURO-3D" # Seen on RX-A6A
DtsNeuralX = "DTS Neural:X" # Seen on RX-A1060
Auto = "Auto" # SEen on RX-A3070
DolbySurround = "Dolby Surround" # Seen on RX-A3070
DtsNeuralX = "DTS Neural:X" # Seen on RX-A1060 and RX-A3070

@classmethod
def _missing_(cls, value):
Expand Down

0 comments on commit 913404b

Please sign in to comment.