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?