diff --git a/bundles/org.openhab.binding.onkyo/README.md b/bundles/org.openhab.binding.onkyo/README.md index 041f1e353eb..fa4aa6cd925 100644 --- a/bundles/org.openhab.binding.onkyo/README.md +++ b/bundles/org.openhab.binding.onkyo/README.md @@ -28,7 +28,7 @@ At the moment only the following models are supported: - TX-NR555 - TX-NR575 - TX-NR575E - TX-NR609 +- TX-NR609 - TX-NR616 - TX-NR626 - TX-NR636 @@ -65,9 +65,9 @@ Moreover, if the openHAB auto-discovery is disabled, the Onkyo AVR auto-discover The binding has the following configuration options, which can be set for "binding:onkyo": -| Parameter | Name | Description | Required | -|-------------|--------------|--------------------------------------------------------------------------|----------| -| callbackUrl | Callback URL | URL to use for playing notification sounds, e.g. | no | +| Parameter | Name | Description | Required | +| ----------- | ------------ | ----------------------------------------------------------------------------------------------- | -------- | +| callbackUrl | Callback URL | URL to use for playing notification sounds, e.g.[http://192.168.0.2:8080](http://192.168.0.2:8080) | no | When an Onkyo receiver is used as an audio sink, the receiver connects to openHAB to get the audio stream. By default, the binding sends the URL for getting the audio stream based on the Primary Address (Network Settings configuration) and the openHAB HTTP port. @@ -114,12 +114,12 @@ This can be necessary if your receiver uses a different scaling system than 0-10 You can specify a decimal number that acts as the coefficient for scaling. See below for a few examples: -| Value | Description | Value for 100% | -|--------|------------------------------------------------------|------------------| -| 1 | Default, don't scale | 100 | -| 2 | For receivers that support 0.5 increments in volume | 200 | -| 0.8 | For receivers that go from 0-80 | 80 | -| 0.5 | For receivers that go from 0-50 | 50 | +| Value | Description | Value for 100% | +| ----- | --------------------------------------------------- | -------------- | +| 1 | Default, don't scale | 100 | +| 2 | For receivers that support 0.5 increments in volume | 200 | +| 0.8 | For receivers that go from 0-80 | 80 | +| 0.5 | For receivers that go from 0-50 | 50 | Note that this is applied after the volume limiting took place. @@ -134,7 +134,7 @@ The binding will send value 200 for maximum volume to the receiver. The Onkyo AVR supports the following channels (some channels are model specific): | Channel Type ID | Item Type | Description | -|---------------------------|-----------|-----------------------------------------------------------------------------------------------------------------| +| ------------------------- | --------- | --------------------------------------------------------------------------------------------------------------- | | zone1#power | Switch | Power on/off your device | | zone1#mute | Switch | Mute/unmute zone 1 | | zone1#input | Number | The input for zone 1 | @@ -153,6 +153,7 @@ The Onkyo AVR supports the following channels (some channels are model specific) | player#artist | String | Artist name of the current song (available if playing from Network or USB) | | player#currentPlayingTime | String | Current playing time of the current song (available if playing from Network or USB) | | player#listenmode | Number | Current listening mode e.g. Stereo, 5.1ch Surround, ... | +| player#audysseyeq | Number | Current Audyseey EQ mode (e.g. OFF, Movie, Music) | | player#audioinfo | String | Current audio info (Refresh timer must be configured for updates) | | player#playuri | String | Plays the URI provided to the channel | | player#albumArt | Image | Image of the current album art of the current song | @@ -245,6 +246,7 @@ String avrLrPlayer_Album "Album [%s]" { String avrLrPlayer_Artist "Artist [%s]" { channel="onkyo:onkyoAVR:avr-livingroom:player#artist" } String avrLrPlayer_CurrentPlayingTime "CurrentPlayingTime [%s]" { channel="onkyo:onkyoAVR:avr-livingroom:player#currentPlayingTime" } Number avrLrPlayer_Listenmode "Listenmode [%d]" { channel="onkyo:onkyoAVR:avr-livingroom:player#listenmode" } +Number avrLrPlayer_AudysseyEQ "AudysseeyEQ [%d]" { channel="onkyo:onkyoAVR:avr-livingroom:player#audysseyeq" } String avrLrPlayer_PlayURI "PlayURI [%s]" { channel="onkyo:onkyoAVR:avr-livingroom:player#playuri" } Image avrLrPlayer_AlbumArt "AlbumArt [%s]" { channel="onkyo:onkyoAVR:avr-livingroom:player#albumArt" } String avrLrPlayer_AlbumArtUrl "AlbumArtURL [%s]" { channel="onkyo:onkyoAVR:avr-livingroom:player#albumArtUrl" } @@ -297,7 +299,9 @@ sitemap demo label="Onkyo AVR" Text item=avrLrPlayer_Artist Text item=avrLrPlayer_CurrentPlayingTime Selection item=avrLrPlayer_Listenmode mappings=[0=Stereo, 1=Direct, 2=Surround, 15=Mono, 31="Whole House", 66="THX Cinema"] + Selection item=avrLrPlayer_AudysseyEQ mappings=[0=Off, 1=Movie, 2=Music] } + Frame label="NetMenu" { Text item=avrLrNet_Title Selection item=avrLrNet_Control mappings=[ Up='Up', Down='Down', Select='Select', Back='Back', PageUp='PageUp', PageDown='PageDow', Select0='Select0', Select1='Select1', Select2='Select2', Select3='Select3', Select4='Select4', Select5='Select5', Select6='Select6', Select7='Select7', Select8='Select8', Select9='Select9' ] diff --git a/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/OnkyoBindingConstants.java b/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/OnkyoBindingConstants.java index 63cfc0c59d6..e47b80d88d1 100644 --- a/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/OnkyoBindingConstants.java +++ b/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/OnkyoBindingConstants.java @@ -75,6 +75,7 @@ public class OnkyoBindingConstants { public static final String CHANNEL_LISTENMODE = "player#listenmode"; public static final String CHANNEL_AUDIOINFO = "player#audioinfo"; public static final String CHANNEL_PLAY_URI = "player#playuri"; + public static final String CHANNEL_AUDYSSEYEQ = "player#audysseyeq"; public static final String CHANNEL_NET_MENU_TITLE = "netmenu#title"; public static final String CHANNEL_NET_MENU_CONTROL = "netmenu#control"; diff --git a/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java b/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java index 6f9eb647387..4884c911f62 100644 --- a/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java +++ b/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/eiscp/EiscpCommand.java @@ -55,6 +55,10 @@ public enum EiscpCommand { LISTEN_MODE_SET("LMD", "%02X"), LISTEN_MODE("LMD", ""), + AUDYSSEYEQ_QUERY("ADY", "QSTN"), + AUDYSSEYEQ_SET("ADY", "%02X"), + AUDYSSEYEQ("ADY", ""), + INFO_QUERY("NRI", "QSTN"), INFO("NRI", ""), diff --git a/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/handler/OnkyoHandler.java b/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/handler/OnkyoHandler.java index 19e075657d9..e54784a1af5 100644 --- a/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/handler/OnkyoHandler.java +++ b/bundles/org.openhab.binding.onkyo/src/main/java/org/openhab/binding/onkyo/internal/handler/OnkyoHandler.java @@ -191,6 +191,13 @@ public class OnkyoHandler extends OnkyoUpnpHandler implements OnkyoEventListener sendCommand(EiscpCommand.LISTEN_MODE_QUERY); } break; + case CHANNEL_AUDYSSEYEQ: + if (command instanceof DecimalType) { + sendCommand(EiscpCommand.AUDYSSEYEQ_SET, command); + } else if (command.equals(RefreshType.REFRESH)) { + sendCommand(EiscpCommand.AUDYSSEYEQ_QUERY); + } + break; /* * ZONE 2 @@ -419,6 +426,10 @@ public class OnkyoHandler extends OnkyoUpnpHandler implements OnkyoEventListener updateState(CHANNEL_LISTENMODE, convertDeviceValueToOpenHabState(data.getValue(), DecimalType.class)); break; + case AUDYSSEYEQ: + updateState(CHANNEL_AUDYSSEYEQ, + convertDeviceValueToOpenHabState(data.getValue(), DecimalType.class)); + break; /* * ZONE 2 @@ -826,6 +837,7 @@ public class OnkyoHandler extends OnkyoUpnpHandler implements OnkyoEventListener sendCommand(EiscpCommand.INFO_QUERY); sendCommand(EiscpCommand.AUDIOINFO_QUERY); sendCommand(EiscpCommand.VIDEOINFO_QUERY); + sendCommand(EiscpCommand.AUDYSSEYEQ_QUERY); if (isChannelAvailable(CHANNEL_POWERZONE2)) { sendCommand(EiscpCommand.ZONE2_POWER_QUERY); diff --git a/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/i18n/onkyo.properties b/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/i18n/onkyo.properties index 0a2a4d55447..24323ce7de6 100644 --- a/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/i18n/onkyo.properties +++ b/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/i18n/onkyo.properties @@ -143,6 +143,11 @@ channel-type.onkyo.audioOut.label = Audio Output Info channel-type.onkyo.audioOut.description = Audio Output Stream Information channel-type.onkyo.audioinfo.label = Audio Info channel-type.onkyo.audioinfo.description = Detailed audio info +channel-type.onkyo.audysseyeq.label = Audyssey EQ Mode +channel-type.onkyo.audysseyeq.description = Choose between Audyssey 2EQ/MultiEQ Equalizer curves +channel-type.onkyo.audysseyeq.state.option.0 = Audyssey EQ Off +channel-type.onkyo.audysseyeq.state.option.1 = Audyssey EQ Movie +channel-type.onkyo.audysseyeq.state.option.2 = Audyssey EQ Music channel-type.onkyo.control.label = Control channel-type.onkyo.control.description = Control the Zone Player, e.g. start/stop/next/previous/ffward/rewind channel-type.onkyo.currentPlayingTime.label = Playing Time diff --git a/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/thing/channel-groups.xml b/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/thing/channel-groups.xml index 919636d9e0a..5f4fe5e8c27 100644 --- a/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/thing/channel-groups.xml +++ b/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/thing/channel-groups.xml @@ -49,6 +49,7 @@ + diff --git a/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/thing/channels.xml b/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/thing/channels.xml index d3d2d490f78..ffad34b7f41 100644 --- a/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/thing/channels.xml +++ b/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/thing/channels.xml @@ -103,6 +103,18 @@ + + Number + + Choose between Audyssey 2EQ/MultiEQ Equalizer curves + + + + + + + + String diff --git a/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/update/instructions.xml b/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/update/instructions.xml new file mode 100644 index 00000000000..f304f14c739 --- /dev/null +++ b/bundles/org.openhab.binding.onkyo/src/main/resources/OH-INF/update/instructions.xml @@ -0,0 +1,252 @@ + + + + + + + onkyo:audysseyeq + + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + + + + + onkyo:audysseyeq + + + +