From 882374fbccca234c8c57eac4c641ff3d9ad135c8 Mon Sep 17 00:00:00 2001 From: fragger42 <58386643+fragger42@users.noreply.github.com> Date: Sat, 31 Jul 2021 11:52:45 +0200 Subject: [PATCH] [yamahareceiver] Add possiblity to switch HDMI outputs on and off on Yamaha receivers (openhab#6327) (#11063) * Add possiblity to switch HDMI outputs on and off on Yamaha receivers (openhab#6327) Signed-off-by: Bernhard Gruber --- .../README.md | 6 +++ .../YamahaReceiverBindingConstants.java | 2 + .../handler/YamahaZoneThingHandler.java | 14 +++++++ .../internal/protocol/ZoneControl.java | 20 +++++++++ .../internal/protocol/xml/ZoneControlXML.java | 42 +++++++++++++++++++ .../internal/state/ZoneControlState.java | 2 + .../resources/OH-INF/thing/thing-types.xml | 16 +++++++ 7 files changed, 102 insertions(+) diff --git a/bundles/org.openhab.binding.yamahareceiver/README.md b/bundles/org.openhab.binding.yamahareceiver/README.md index d72e9834e..b4656f832 100644 --- a/bundles/org.openhab.binding.yamahareceiver/README.md +++ b/bundles/org.openhab.binding.yamahareceiver/README.md @@ -79,6 +79,8 @@ Zone control channels are: | `zone_channels#surroundProgram` | `String` | Sets the surround mode. Examples: `2ch Stereo`, `7ch Stereo`, `Hall in Munic`, `Straight`, `Surround Decoder`. | | `zone_channels#scene` | `String` | Sets the scene. Examples: `Scene 1`, `Scene 2`, `Scene 3`, `Scene 4`. Write only (state updates are not available). May not be supported on all models (e.g. RX-V3900). | | `zone_channels#dialogueLevel` | `Number` | Sets the receivers dialogue level. May not be supported on all models. | +| `zone_channels#hdmi1Out` | `Number` | Switches the HDMI1 Output ON or OFF (channel in desc.xml is placed in Main_Zone but in fact it is more some kind of system parameter). May not be supported on all models. | +| `zone_channels#hdmi2Out` | `Number` | Switches the HDMI2 Output ON or OFF (channel is desc.xml is placed in Main_Zone but in fact it is more some kind of system parameter). May not be supported on all models. | | `playback_channels#preset` | `Number` | Set a preset. Not supported by `Spotify` input. For `NET RADIO` input there is no way to get current preset (tested on RX-S601D, RX-V3900), so the preset is write only. For RX-V3900 the presets are alphanumeric `A1`,`A2`,`B1`,`B2` thus you need to use numbers grater than 100 that represent these presets as follows: 101, 102, 201, 202. | | `playback_channels#playback` | `String` | Set a play mode or get the current play mode. Values supported: `Previous`, `Play`, `Pause`, `Stop`, `Next`. Applies for inputs which support playback (`Spotify`, `SERVER`, `NET RADIO`, `Bluetooth`). Note that some values may not be supported on certain input type and AVR model combination. For `Spotify` and `Bluetooth` all values work, but for `NET RADIO` input only `Play` and `Stop` are supported (tested on RX-S601D). | | `playback_channels#playback_station` | `String` | Get the current played station (radio). Applies to `TUNER` and `NET RADIO` inputs only. | @@ -134,6 +136,8 @@ String Yamaha_Input "Input [%s]"