Yamahareceiver Binding - Wrong Power State

I am running OH2 Snapshot 2.2.0 (Build #1071). I successfully installed the Yamahareceiver binding via PaperUI. I now have two things, namely ‘Yamaha Receiver’ and Yamaha Receiver Main Zone’. Both do have a power channel.

When I link my item to any one of these power channels via item file, I experience some strange behavior. When turning the switch ON on my sitemap, the receiver actually turns on. However, directly after this, the receiver will be turned off again, but only in the logs, while the real status of my receiver stays ON.

Here’s my item configuration:

// Yamaha Receiver RX-V577
Switch eg_wz_aYamahaPower “Receiver [%s]” [“Switchable”] {channel=“yamahareceiver:zone:5f9ec1b3_ed59_1900_4530_00a0deb518f7:Main_Zone:zone_channels#power”}

Here’s the log output:

2017-10-29 17:13:18.519 [vent.ItemStateChangedEvent] - eg_wz_aYamahaPower changed from OFF to ON
2017-10-29 17:13:18.733 [ome.event.ItemCommandEvent] - Item ‘eg_wz_aYamahaPower’ received command ON
2017-10-29 17:13:18.738 [vent.ItemStateChangedEvent] - eg_wz_aYamahaPower changed from ON to OFF

The problem then is that the switch status will be shown as OFF on my sitemap when in reality the receiver is ON.

11:39:29.386 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'YY_Power' received command ON
11:39:29.386 [INFO ] [smarthome.event.ItemStateChangedEvent] - YY_Power changed from OFF to ON
11:39:29.587 [INFO ] [smarthome.event.ItemStateChangedEvent] - YY_Power changed from ON to OFF
11:40:08.753 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'yamahareceiver:zone:wozi:MainZone' has been updated.
11:40:08.761 [INFO ] [smarthome.event.ItemStateChangedEvent] - YY_Power changed from OFF to ON
11:41:08.832 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'yamahareceiver:zone:wozi:MainZone' has been updated.

I see one Switch to ON (manually from UI) and a switch to OFF, but after a couple of seconds the state is updated to the correct ON state. I think this is due to the fact, that the receiver needs some time to “boot up”. The binding does the update with a refresh interval or 60 seconds, this may result in an inappropriate state for some time.

Udo, this makes sense. I got it :wink:

However, I noticed a difference when using my Android app. Here, there’s no inappropriate state. The state will be shown correctly from the very beginning, no matter if I turn the receiver ON/OFF using the app, or, let’s say, Alexa. I am wondering why the sitemap in a browser behaves differently?

Since I still experience the problem mentioned above, I am wondering whether someone else has the same and found a solution:

  • Switching the receiver (in my case: Yamaha YSP-2700) on/off via openHAB (via the “Power”-item): Works with almost 0 latency.
  • Switching the receiver on/off via the IR-remote: Time it takes for the openHAB item “Power” to update the state: > never?

Any possibility to decrease the refresh-trigger-rate?

Have you tried to change the value for the refreshInterval ?
It is described in the docs: Yamaha Receiver - Bindings | openHAB

Thanks, I did indeed not know this (am also a bit embarrassed I did not check the doc).

Though I’m not sure if I fully understand how the binding works:

  • Even if I include / define the refreshInterval to e.g. 20 (sec), I get an almost instant update (e.g. of the volume) in < 1 sec. in openHAB
  • If I again remove refreshInterval, I still get an almost instant update (< 1 sec.)

On second thought, I just remember that, also without the refreshInterval defined, I got instant updates some weeks ago when I first set up the Yamaha Receiver. But this stopped working afterwards.

Is it possible that I’m looking at a bug of the binding (“instant update working without refreshInterval being defined, but somehow stopping to work later on”)?