diff --git a/addons/binding/org.openhab.binding.onkyo/ESH-INF/thing/thing-types.xml b/addons/binding/org.openhab.binding.onkyo/ESH-INF/thing/thing-types.xml
index d09d4c467e254..dde7b08d53758 100644
--- a/addons/binding/org.openhab.binding.onkyo/ESH-INF/thing/thing-types.xml
+++ b/addons/binding/org.openhab.binding.onkyo/ESH-INF/thing/thing-types.xml
@@ -106,13 +106,15 @@
Select the input source of the AVR
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -125,10 +127,12 @@
+
+
@@ -156,23 +160,27 @@
Listen mode
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
-
+
-
+
+
diff --git a/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/handler/OnkyoHandler.java b/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/handler/OnkyoHandler.java
index 6717ba1d4b7ae..fa1926833f08e 100644
--- a/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/handler/OnkyoHandler.java
+++ b/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/handler/OnkyoHandler.java
@@ -287,9 +287,11 @@ public void statusUpdateReceived(EventObject event, String ip, String data) {
updateState(CHANNEL_VOLUME, volume);
break;
case SOURCE_SET:
- int input = Integer.parseInt(data.substring(3, 5), 16);
- updateState(CHANNEL_INPUT, new DecimalType(input));
- onInputChanged(input);
+ if (!data.substring(3, 5).contentEquals("N/")) {
+ int input = Integer.parseInt(data.substring(3, 5), 16);
+ updateState(CHANNEL_INPUT, new DecimalType(input));
+ onInputChanged(input);
+ }
break;
case NETUSB_SONG_ARTIST_QUERY:
updateState(CHANNEL_ARTIST, new StringType(data.substring(3, data.length())));
@@ -309,7 +311,7 @@ public void statusUpdateReceived(EventObject event, String ip, String data) {
case LISTEN_MODE_SET:
String listenModeStr = data.substring(3, 5);
// update only when listen mode is supported
- if (listenModeStr != "N/") {
+ if (!listenModeStr.equals("N/")) {
int listenMode = Integer.parseInt(listenModeStr, 16);
updateState(CHANNEL_LISTENMODE, new DecimalType(listenMode));
}
@@ -330,8 +332,10 @@ public void statusUpdateReceived(EventObject event, String ip, String data) {
updateState(CHANNEL_VOLUMEZONE2, new PercentType(Integer.parseInt(data.substring(3, 5), 16)));
break;
case ZONE2_SOURCE_SET:
- int inputZone2 = Integer.parseInt(data.substring(3, 5), 16);
- updateState(CHANNEL_INPUTZONE2, new DecimalType(inputZone2));
+ if (!data.substring(3, 5).contentEquals("N/")) {
+ int inputZone2 = Integer.parseInt(data.substring(3, 5), 16);
+ updateState(CHANNEL_INPUTZONE2, new DecimalType(inputZone2));
+ }
break;
default:
logger.debug("Received unhandled status update from Onkyo Receiver @{}: data={}",
diff --git a/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java b/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java
index 84dd3e03189c0..51fc31fa737d3 100644
--- a/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java
+++ b/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java
@@ -14,6 +14,7 @@
* @author Thomas.Eichstaedt-Engelen
* @author Pauli Anttila
* @author Paul Frank
+ * @author Marcel Verpaalen
* @since 1.3.0
*/
public enum EiscpCommand {
@@ -133,8 +134,9 @@ public enum EiscpCommand {
ZONE2_VOLUME_QUERY("ZVLQSTN", EiscpCommandRef.ZONE2_VOLUME_QUERY),
ZONE2_VOLUME_SET("ZVL%02X", EiscpCommandRef.ZONE2_VOLUME_SET),
ZONE2_SET_VOLUME("ZVL%02X", EiscpCommandRef.ZONE2_VOLUME_SET),
- ZONE2_VOLUME("ZVL%02X", EiscpCommandRef.ZONE2_VOLUME_SET),
+ ZONE2_VOLUME("ZVL", EiscpCommandRef.ZONE2_VOLUME_SET),
+ /* Removed as this prevents lookup of the right source. All sources are captured with "SLZ%02X"
ZONE2_SOURCE_DVR("SLZ00", EiscpCommandRef.ZONE2_SOURCE_DVR),
ZONE2_SOURCE_VCR("SLZ00", EiscpCommandRef.ZONE2_SOURCE_DVR),
ZONE2_SOURCE_SATELLITE("SLZ01", EiscpCommandRef.ZONE2_SOURCE_SATELLITE),
@@ -159,15 +161,18 @@ public enum EiscpCommand {
ZONE2_SOURCE_INTERNETRADIO("SLZ28", EiscpCommandRef.ZONE2_SOURCE_INTERNETRADIO),
ZONE2_SOURCE_USB("SLZ29", EiscpCommandRef.ZONE2_SOURCE_USB),
ZONE2_SOURCE_USB_BACK("SLZ2A", EiscpCommandRef.ZONE2_SOURCE_USB_BACK),
- ZONE2_SOURCE_NETWORK("SLZ2C", EiscpCommandRef.ZONE2_SOURCE_NETWORK),
+ ZONE2_SOURCE_NETWORK("SLZ2B", EiscpCommandRef.ZONE2_SOURCE_NETWORK),
+ ZONE2_SOURCE_USB_T("SLZ2C", EiscpCommandRef.ZONE2_SOURCE_USB_T),
ZONE2_SOURCE_MULTICH("SLZ30", EiscpCommandRef.ZONE2_SOURCE_MULTICH),
ZONE2_SOURCE_SIRIUS("SLZ32", EiscpCommandRef.ZONE2_SOURCE_SIRIUS),
+ ZONE2_SOURCE_SOURCE("SLZ80", EiscpCommandRef.ZONE2_SOURCE_SOURCE),
+ */
ZONE2_SOURCE_UP("SLZUP", EiscpCommandRef.ZONE2_SOURCE_UP),
ZONE2_SOURCE_DOWN("SLZDOWN", EiscpCommandRef.ZONE2_SOURCE_DOWN),
ZONE2_SOURCE_QUERY("SLZQSTN", EiscpCommandRef.ZONE2_SOURCE_QUERY),
ZONE2_SOURCE_SET("SLZ%02X", EiscpCommandRef.ZONE2_SOURCE_SET),
ZONE2_SET_SOURCE("SLZ%02X", EiscpCommandRef.ZONE2_SOURCE_SET),
- ZONE2_SOURCE("SLZ%02X", EiscpCommandRef.ZONE2_SOURCE_SET),
+ ZONE2_SOURCE("SLZ", EiscpCommandRef.ZONE2_SOURCE_SET),
/*
* Zone 3
diff --git a/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommandRef.java b/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommandRef.java
index 679a0d438c6c5..e616cda20bc90 100644
--- a/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommandRef.java
+++ b/addons/binding/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommandRef.java
@@ -192,8 +192,7 @@ public enum EiscpCommandRef {
SOURCE_SET(162),
ZONE2_SOURCE_SET(163),
- ZONE3_SOURCE_SET(163),
- SOURCE_GAME2(164),
+ ZONE3_SOURCE_SET(164),
/**
* NET/USB Play Status QUERY (3 letters - PRS).