| `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. |
String Yamaha_Surround "Surround [%s]" <video> { channel="yamahareceiver:zone:96a40ba9:Main_Zone:zone_channels#surroundProgram" }
String Yamaha_Scene "Scene []" <video> { channel="yamahareceiver:zone:96a40ba9:Main_Zone:zone_channels#scene" }
Switch Yamaha_Dialogue_Level "Dialogue Level [%d]" <soundvolume> { channel="yamahareceiver:zone:96a40ba9:Main_Zone:zone_channels#dialogueLevel" }
+Switch Yamaha_HDMI1_Output "HDMI1 Output [%s]" <switch> { channel="yamahareceiver:zone:96a40ba9:Main_Zone:zone_channels#hdmi1Out" }
+Switch Yamaha_HDMI2_Output "HDMI2 Output [%s]" <switch> { channel="yamahareceiver:zone:96a40ba9:Main_Zone:zone_channels#hdmi2Out" }
Switch Yamaha_PartyMode "Party mode [%s]" <switch> { channel="yamahareceiver:yamahaAV:96a40ba9:party_mode" }
Switch Yamaha_PartyModeMute "Party mode mute [%s]" <soundvolume_mute> { channel="yamahareceiver:yamahaAV:96a40ba9:party_mode_mute" }
Selection item=Yamaha_Surround mappings=["2ch Stereo"="2ch Stereo","5ch Stereo"="5ch Stereo","Chamber"="Chamber","Sci-Fi"="Sci-Fi","Adventure"="Adventure"]
Switch item=Yamaha_Scene mappings=["Scene 1"="Kodi","Scene 2"="TV","Scene 3"="NET","Scene 4"="Radio"]
Setpoint item=Yamaha_Dialogue_Level minValue=0 maxValue=2 step=1
+Switch item=Yamaha_HDMI1_Output
+Switch item=Yamaha_HDMI2_Output
Switch item=Yamaha_PartyMode
Switch item=Yamaha_PartyModeMute
public static final String CHANNEL_MUTE = "mute";
public static final String CHANNEL_SCENE = "scene";
public static final String CHANNEL_DIALOGUE_LEVEL = "dialogueLevel";
+ public static final String CHANNEL_HDMI1OUT = "hdmi1Out";
+ public static final String CHANNEL_HDMI2OUT = "hdmi2Out";
public static final String CHANNEL_PARTY_MODE = "party_mode";
public static final String CHANNEL_PARTY_MODE_MUTE = "party_mode_mute";
zoneControl.setDialogueLevel(((DecimalType) command).intValue());
break;
+ case CHANNEL_HDMI1OUT:
+ zoneControl.setHDMI1Out(((OnOffType) command) == OnOffType.ON);
+ break;
+
+ case CHANNEL_HDMI2OUT:
+ zoneControl.setHDMI2Out(((OnOffType) command) == OnOffType.ON);
+ break;
+
case CHANNEL_NAVIGATION_MENU:
if (inputWithNavigationControl == null) {
logger.warn("Channel {} not working with {} input!", id, zoneState.inputID);
// no state updates available
} else if (id.equals(grpZone(CHANNEL_DIALOGUE_LEVEL))) {
updateState(channelUID, new DecimalType(zoneState.dialogueLevel));
+ } else if (id.equals(grpZone(CHANNEL_HDMI1OUT))) {
+ updateState(channelUID, zoneState.hdmi1Out ? OnOffType.ON : OnOffType.OFF);
+ } else if (id.equals(grpZone(CHANNEL_HDMI2OUT))) {
+ updateState(channelUID, zoneState.hdmi2Out ? OnOffType.ON : OnOffType.OFF);
} else if (id.equals(grpPlayback(CHANNEL_PLAYBACK))) {
updateState(channelUID, new StringType(playInfoState.playbackMode));
updateState(grpZone(CHANNEL_VOLUME), new PercentType((int) zoneConfig.getVolumePercentage(zoneState.volumeDB)));
updateState(grpZone(CHANNEL_MUTE), zoneState.mute ? OnOffType.ON : OnOffType.OFF);
updateState(grpZone(CHANNEL_DIALOGUE_LEVEL), new DecimalType(zoneState.dialogueLevel));
+ updateState(grpZone(CHANNEL_HDMI1OUT), zoneState.hdmi1Out ? OnOffType.ON : OnOffType.OFF);
+ updateState(grpZone(CHANNEL_HDMI2OUT), zoneState.hdmi2Out ? OnOffType.ON : OnOffType.OFF);
// If the input changed
if (inputChanged) {
void setDialogueLevel(int level) throws IOException, ReceivedMessageParseException;
+ /**
+ * Switches the HDMI1 output on or off.
+ *
+ * @param on The new state
+ *
+ * @throws IOException
+ * @throws ReceivedMessageParseException
+ */
+ void setHDMI1Out(boolean on) throws IOException, ReceivedMessageParseException;
+
+ /**
+ * Switches the HDMI2 output on or off.
+ *
+ * @param on The new state
+ *
+ * @throws IOException
+ * @throws ReceivedMessageParseException
+ */
+ void setHDMI2Out(boolean on) throws IOException, ReceivedMessageParseException;
+
/**
* Sets the active scene for the zone.
*
protected CommandTemplate dialogueLevel = new CommandTemplate(
"<Sound_Video><Dialogue_Adjust><Dialogue_Lvl>%d</Dialogue_Lvl></Dialogue_Adjust></Sound_Video>",
"Sound_Video/Dialogue_Adjust/Dialogue_Lvl");
+ protected CommandTemplate hdmi1Out = new CommandTemplate(
+ "<System><Sound_Video><HDMI><Output><OUT_1>%s</OUT_1></Output></HDMI></Sound_Video></System>",
+ "Sound_Video/HDMI/Output/OUT_1");
+ protected CommandTemplate hdmi2Out = new CommandTemplate(
+ "<System><Sound_Video><HDMI><Output><OUT_2>%s</OUT_2></Output></HDMI></Sound_Video></System>",
+ "Sound_Video/HDMI/Output/OUT_2");
protected boolean dialogueLevelSupported = false;
+ protected boolean hdmi1OutSupported = false;
+ protected boolean hdmi2OutSupported = false;
public ZoneControlXML(AbstractConnection con, Zone zone, YamahaZoneConfig zoneSettings,
ZoneControlStateListener observer, DeviceInformationState deviceInformationState,
logger.debug("Zone {} - the {} channel is not supported on your model", getZone(), CHANNEL_DIALOGUE_LEVEL);
}
+ hdmi1OutSupported = zoneDescriptor.hasCommandEnding("Sound_Video,HDMI,Output,OUT_1", () -> logger
+ .debug("Zone {} - the {} channel is not supported on your model", getZone(), CHANNEL_HDMI1OUT));
+
+ hdmi2OutSupported = zoneDescriptor.hasCommandEnding("Sound_Video,HDMI,Output,OUT_2", () -> logger
+ .debug("Zone {} - the {} channel is not supported on your model", getZone(), CHANNEL_HDMI2OUT));
+
// Note: Detection for RX-V3900, which uses <Vol> instead of <Volume>
if (zoneDescriptor.hasCommandEnding("Vol,Lvl")) {
volume = volume.replace("Volume", "Vol");
comReference.get().send(XMLUtils.wrZone(zone, message));
}
+ protected void sendCommandWithoutZone(String message) throws IOException {
+ comReference.get().send(message);
+ }
+
/**
* Return the zone
*/
update();
}
+ @Override
+ public void setHDMI1Out(boolean on) throws IOException, ReceivedMessageParseException {
+ if (!hdmi1OutSupported) {
+ return;
+ }
+ sendCommandWithoutZone(hdmi1Out.apply(on ? ON : OFF));
+ update();
+ }
+
+ @Override
+ public void setHDMI2Out(boolean on) throws IOException, ReceivedMessageParseException {
+ if (!hdmi2OutSupported) {
+ return;
+ }
+ sendCommandWithoutZone(hdmi2Out.apply(on ? ON : OFF));
+ update();
+ }
+
@Override
public void setScene(String scene) throws IOException, ReceivedMessageParseException {
if (!sceneSelSupported) {
throw new ReceivedMessageParseException("Expected inputID. Failed to read Input/Input_Sel");
}
+ value = getNodeContentOrEmpty(statusNode, hdmi1Out.getPath());
+ state.hdmi1Out = ON.equalsIgnoreCase(value);
+
+ value = getNodeContentOrEmpty(statusNode, hdmi1Out.getPath());
+ state.hdmi2Out = ON.equalsIgnoreCase(value);
+
// Some receivers may use Src_Name instead?
value = getNodeContentOrEmpty(statusNode, inputSelNamePath);
state.inputName = value;
public float volumeDB = 0.0f; // volume in dB
public boolean mute = false;
public int dialogueLevel = 0;
+ public boolean hdmi1Out = false;
+ public boolean hdmi2Out = false;
}
<channel id="volume" typeId="volume"/>
<channel id="volumeDB" typeId="volumeDB"/>
<channel id="dialogueLevel" typeId="dialogueLevel"/>
+ <channel id="hdmi1Out" typeId="hdmi1Out"/>
+ <channel id="hdmi2Out" typeId="hdmi2Out"/>
<channel id="mute" typeId="mute"/>
<channel id="scene" typeId="scene"/>
</channels>
<state min="0" max="2" step="1" pattern="%d"/>
</channel-type>
+ <channel-type id="hdmi1Out">
+ <item-type>Switch</item-type>
+ <label>HDMI1 Output</label>
+ <description>Switch the HDMI1 Output ON/OFF</description>
+ <category>switch</category>
+ </channel-type>
+
+ <channel-type id="hdmi2Out">
+ <item-type>Switch</item-type>
+ <label>HDMI2 Output</label>
+ <description>Switch the HDMI2 Output ON/OFF</description>
+ <category>switch</category>
+ </channel-type>
+
<channel-type id="scene">
<item-type>String</item-type>
<label>Scene</label>