[PioneerAVR] Zone2 and Zone3 ERROR: java.lang.ArrayIndexOutOfBoundsException: -1

Could anybody confirm that PioneerAVR binding is running with Zone2 or Zone3?

Zone1 (Mainzone) is running fine!

I tried to use Zone2: power ON/OFF, but I got the following error:

12:35:42.859 [INFO ] [marthome.event.ItemStateChangedEvent] - PowerSwitchZ2 changed from OFF to ON
12:35:42.857 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while calling handler: java.lang.ArrayIndexOutOfBoundsException: -1
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: -1

same errors with Mute, Input Source, Volume, VolumedB.

All the same with Zone3.

java.lang.ArrayIndexOutOfBoundsException: -1

Did anybody have the same error?

Thanx

Did anybody use Zone2 or Zone3 at all? Is it running?

@Stratehm Maybe you could help me? Thank you very much!

@Tim2016 @gersilex @SpaceMaster85 @Spilota @tobo @mjptec @gmoneyman @mstormi @GENETX @mgbowman

You are also using pioneeravr binding? Do you also use Zone2 or Zone3? Is it running?

Thanks for a short feedback!

I use it, but no zones. It’s crashing every now and then, but it’s not impacting me enough to have me go after the reason.

I am using it too, but also here no Zone2 or Zone3 usage from my side.

@mstormi @GENETX Thanks for feedback! :slight_smile:

Maybe you could do an easy test for me? Only to see, if you get the same error?

Goto PaperUI -->Configuration–>Things–>“your AVR” --> link channel “Zone2 power”. Goto PaperUI --> control --> Switch “Zone2 power”: ON.
Look into Karaf console (log:tail) or error log, if you get the same error: “java.lang.ArrayIndexOutOfBoundsException: -1”

Thank you very much! :slight_smile:

No I dont use OH2

Hi Alex,

Are you using an officially supported device or does it get found as “Pioneer AVR over IP (unsupported)”?

I started looking in to this as mine is unsupported (SC-LX77). It seems the binding was written very much to target specific devices (or devices of a particular generation) rather than being generic.
For example, the secion below contains the information for matching responses from the device.

  public enum ResponseType implements AvrResponse.RepsonseType {
        POWER_STATE("[0-2]", "PWR", "APR", "BPR"),
        VOLUME_LEVEL("[0-9]{3}", "VOL", "ZV", "YV"),
        MUTE_STATE("[0-1]", "MUT", "Z2MUT", "Z3MUT"),
        INPUT_SOURCE_CHANNEL("[0-9]{2}", "FN", "Z2F", "Z3F"),
        DISPLAY_INFORMATION("[0-9a-fA-F]{30}", "FL");

In my case the amp returns e.g. VOL089 for zone1, so gets matched (VOL + 3 digits). However it returns ZV89 for zone2 (ZV + 2 digits) so doesn’t get matched.

I don’t know how to fix this and don’t have time to learn java properly at the moment, but it is on my todo list if it doesn’t get done in the meantime.

Mike.

@mjptec I have a SC-LX72. --> Zone1 (=Mainzone) is running.
I tried both: “Pioneer AVR over IP” and “Pioneer AVR over IP (unsupported)”. No difference!

Nearly ALL commands/responses are matching, see here:

Command
POWER_ON("PO", "APO", "BPO"),				commands matching exactly to my model!
POWER_OFF("PF", "APF", "BPF"),				commands matching exactly to my model!
POWER_QUERY("?P", "?AP", "?BP"),			commands matching exactly to my model!
VOLUME_UP("VU", "ZU", "YU"),				commands matching exactly to my model!
VOLUME_DOWN("VD", "ZD", "YD"),				commands matching exactly to my model!
VOLUME_QUERY("?V", "?ZV", "?YV"),			commands matching exactly to my model!
MUTE_ON("MO", "Z2MO", "Z3MO"),				commands matching exactly to my model!
MUTE_OFF("MF", "Z2MF", "Z3MF"),				commands matching exactly to my model!
MUTE_QUERY("?M", "?Z2M", "?Z3M"),			commands matching exactly to my model!
INPUT_CHANGE_CYCLIC("FU"),				    command matching exactly to my model!
INPUT_CHANGE_REVERSE("FD"),				    not available!
INPUT_QUERY("?F", "?ZS", "?ZT");			commands matching exactly to my model!

VOLUME_SET("[0-9]{3}", "VL", "ZV", "YV"),		 ONLY "VL" is matching (3 digit) ZV and YV only 2 digit
INPUT_CHANNEL_SET("[0-9]{2}", "FN", "ZS", "ZT"); commands matching exactly to my model!


Response
POWER_STATE("[0-2]", "PWR", "APR", "BPR"),		       response matching exactly to my model!
VOLUME_LEVEL("[0-9]{3}", "VOL", "ZV", "YV"),		   ONLY "VOL" is matching (3 digit) ZV and YV only 2 digit
MUTE_STATE("[0-1]", "MUT", "Z2MUT", "Z3MUT"),		   response matching exactly to my model!
INPUT_SOURCE_CHANNEL("[0-9]{2}", "FN", "Z2F", "Z3F"),  response matching exactly to my model!
DISPLAY_INFORMATION("[0-9a-fA-F]{30}", "FL");		   not available, but I don't use this channel!

Am I right?: Zone2, is running with your SC-LX77 ??

Additional Information:

I compared the VOLUME commands of the following “official supported” models:

See also here : http://www.pioneerelectronics.com/PUSA/Support/Home-Entertainment-Custom-Install/RS-232+&+IP+Codes/A+V+Receivers

Here are my results:

ALL of the following models have Zone1: ***VL --> 3 digit --> 000 to 185, (1step = 0.5dB)

SC-55: Zone2 + Zone3: **ZV and **YV --> 2 digit -->00 to 81, (1step=1dB)
SC-57: Zone2 + Zone3: **ZV and **YV --> 2 digit -->00 to 81, (1step=1dB)
VSX-50: only Zone2: **ZV --> 2 digit -->00 to 81, (1step=1dB)
VSX-51: only Zone2: **ZV --> 2 digit -->00 to 81, (1step=1dB)
VSX-52: only Zone2: **ZV --> 2 digit -->00 to 81, (1step=1dB)
VSX-53: Zone2 + Zone3: **ZV and **YV --> 2 digit -->00 to 81, (1step=1dB)
VSX-1021: only Zone2: **ZV --> 2 digit -->00 to 81, (1step=1dB)
VSX-1121: only Zone2: **ZV --> 2 digit -->00 to 81, (1step=1dB)

and mine:
SC-25 = SC-LX72: Zone1: ***VL --> 3 digit --> 000 to 185, (1step = 0.5dB)
Zone2 + Zone3: **ZV and **YV --> 2 digit -->00 to 81, (1step=1dB)

@mjptec The same as yours!

Compared to OH2 binding:
VOLUME_SET("[0-9]{3}", “VL”, “ZV”, “YV”), <— this could NOT run in Zone2/3!
VOLUME_LEVEL("[0-9]{3}", “VOL”, “ZV”, “YV”) <— this could NOT run in Zone2/3!

@Celaeno1, this is interesting. Thanks for doing the research, I had just assumed the ‘supported’ devices would be different. It appears this is in fact a bug rather than an unsupported feature. Would you be able to file a bug report? I’m a bit tied up at the moment.

If I remember correctly the only other thing that doesn’t work for me was turning zone2/3 on or off, but I couldn’t see why as the command is correct. The power state response does work as expected for all zones.

Edit: Actually, just re-read OP, I’m not sure if input select was working for z2/3 either

@mjptec I can provide a bug error report this evening.

I’ve seen this in github:

Maybe this will be solved when they all will be closed…

Maybe this works:

or this?

I tried both snapshots (2016-12-13 SNAPSHOT) and (2016-12-22 SNAPSHOT), but none of them are running !
Zone1,Zone2 and Zone3 are ALL NOT running, when I select “Generic Pioneer AVR”. So I switched back to “official binding”! Now Zone1 is running again, but Zone2 and Zone3 not.

Thanks for finding these @Celaeno1. I just tried the newest snapshot and it seems to be working for me after a bit of fiddling with the configuration - including full zone2 control. Though it does fill the log with error dumps if the avr power is off, so not perfect.

What problem did you have?

I’m using an OH 2.1 snapshot from a couple of weeks ago btw, but that shouldn’t make any difference.

@mjptec My problem is still the same, no matter which binding I use. Zone2 and Zone3, “Power ON/OFF” is not running!

errors:

12:35:42.859 [INFO ] [marthome.event.ItemStateChangedEvent] - PowerSwitchZ2 changed from OFF to ON
12:35:42.857 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while calling handler: java.lang.ArrayIndexOutOfBoundsException: -1
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: -1

When I use e.g. putty.exe I can contol zone2 and zone3, using the following commands:

Command: Zone2 , Zone3
POWER_ON: “APO”, "BPO"
POWER_OFF: “APF”, “BPF”
POWER_QUERY: “?AP”, “?BP”
VOLUME_UP: “ZU”, “YU”
VOLUME_DOWN: “ZD”, "YD"
VOLUME_QUERY: “?ZV”, "?YV"
MUTE_ON: “Z2MO”, "Z3MO"
MUTE_OFF: “Z2MF”, "Z3MF"
MUTE_QUERY: “?Z2M”, "?Z3M"
INPUT_QUERY: “?ZS”, “?ZT”

But with openhab2 it is not running! Only Zone1 (Mainzone) is running!

@Celaeno1, was it definitely using the new binding without the old one getting in the way? I had to remove the old with the Karaf console, restart OH and powercycle the amp before I could get them to work together.

@mjptec It was a complete new installation with snapshot build #850 from here: https://openhab.ci.cloudbees.com/job/openHAB-Distribution/

I tried with 2 different PCs, both the same error!

Before that, I was on build #789. Same error!

Then that is odd, I gather from your above comments that your AVR should respond the same as mine.

Just to check… You download the AVR binding from Stratehm’s git snapshot and added it to the /etc/addons/ directory (or wherever it is configured on yours), rather than installing it through paperUI?