[onkyo] issues with volumes states since OH2.1

After upgrading from OH2.0 to OH2.1 I got some strange issues with the onkyo binding.

I have some rules/scripts that change the volume to a default value when I activate a specifig InputSource or Zone.

Everything workes fine until the update.

So my first issue was that suddenly the thing configuration volumeLimit=50 worked.
I had this configured but did not see any effect.
I thought this meant that the binding would prevent me from sending a value greater than 50 to the device.

But since the update is looks like the volume scale gets recalculated.
So when I sendCommand(Volume, 60) the Volume of the device gets set to “30” (because 50 is 100%).

I can understand that and edited my rules accordingly.

But for my Zone2 I get another strange issue ralated to the volume scale.

When I sendCommand(Volume_Zone2, 60) the value “30” is sent to the device, like above.
But the items state gets also updated to “30”.

SO when my script tries to increase the volume in little steps from x to 60 I have an issue, because the state is reset to a far lower value than it should be.

Am I missing something?
What changed from 2.0 to 2.1?

Volume limit functionality is introduced to version 2.1, so that’s the reason why it “suddenly” started to work :wink: Some reason those changes are not included to release note @Kai

But, it seems that volume limit functionality for zone 2 and 3 is not handled correctly (I only use main zone my self) :frowning:

I tried to fix it, so could you try this version https://www.dropbox.com/s/8zjhl66fpibcfcu/org.openhab.binding.onkyo_2.2.0.201707011843.jar

Zone2 seems to work now, too.

But I think there might be another issue.

When switching from Zone2 to Zone1 the Volume of Z2 gets set to UNDEF.

This did not happen with the older version of the binding and it does not happen with Zone1.
In fact I can try to set Zone1 (while OFF) to 50 and it immediately refreshes/resets to the last state 60.

Great, pull request done.

Zone 2 and 3 volume level can’t be set when zones power state is off. When zone 2 or 3 power state is off, receiver send ‘N/A’ level for volume level queries or set responses. N/A is converted to undef state by the binding. Zone 1 (main zone) works even receiver is in stand by mode.

Great. Thanks for the quick fix and explanation.