2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.yamahareceiver.internal.protocol;
15 import java.io.IOException;
17 import org.openhab.binding.yamahareceiver.internal.state.ZoneControlState;
20 * The zone control protocol interface
22 * @author David Graeff - Initial contribution
24 public interface ZoneControl extends IStateUpdatable {
26 * Switches the zone on/off (off equals network standby here).
28 * @param on The new power state
31 * @throws ReceivedMessageParseException
33 void setPower(boolean on) throws IOException, ReceivedMessageParseException;
36 * Sets the absolute volume in decibel.
38 * @param volume Absolute value in decibel ([-80,+12]).
41 void setVolumeDB(float volume) throws IOException, ReceivedMessageParseException;
44 * Sets the volume in percent
49 void setVolume(float volume) throws IOException, ReceivedMessageParseException;
52 * Increase or decrease the volume by the given percentage.
57 void setVolumeRelative(ZoneControlState state, float percent) throws IOException, ReceivedMessageParseException;
59 void setMute(boolean mute) throws IOException, ReceivedMessageParseException;
61 void setInput(String name) throws IOException, ReceivedMessageParseException;
63 void setSurroundProgram(String name) throws IOException, ReceivedMessageParseException;
65 void setDialogueLevel(int level) throws IOException, ReceivedMessageParseException;
68 * Switches the HDMI1 output on or off.
70 * @param on The new state
73 * @throws ReceivedMessageParseException
75 void setHDMI1Out(boolean on) throws IOException, ReceivedMessageParseException;
78 * Switches the HDMI2 output on or off.
80 * @param on The new state
83 * @throws ReceivedMessageParseException
85 void setHDMI2Out(boolean on) throws IOException, ReceivedMessageParseException;
88 * Sets the active scene for the zone.
92 * @throws ReceivedMessageParseException
94 void setScene(String scene) throws IOException, ReceivedMessageParseException;