[solved] Issue wit PowerSwitch for YamahaReceiver

Hello openHAB community,

I am fairly new to openHAB. Last winter, I set up a Raspberry 4 with Debian Linux and configured a few devices, mainly Shelly plugs. I am nowhere near realizing the full potential of openHAB, but I am already very happy with the existing configuration! I updated Debian from Bookworm to Trixie and opebHAB from version 4.x to 5.0.1, and everything survived.

This winter, I want to take the next steps. I have a few Shelly radiator thermostats that I want to use to automate the heating.

But first, I would like to fix a small problem that is bothering me:
One of the configured devices is a Yamaha HTR-4065 receiver, which is defined as a thing with the YamahaReceiverBinding. I only use a SwitchPoint as an item to turn the device on and off. And this is where there is a small problem:
When I press the switch, the receiver turns on, but the icon only briefly shows the on status, then shortly afterwards shows the off status again. Only a second click causes the icon to show ‘on’.

Unfortunately, I have no idea where to look for this minor issue. Could you please help me with this? What information should I provide to address this issue?

Thanks and regards,

Boris

Another recommendation is to disable autouodate on that Switch Item. Go to the Item in MainUI and click add metadata. it will be in the list.

when autouodate is enabled it predicts what state the item will become in response to the command and automatically updates the item accordingly, independent from what ever the device is doing.

If the device is slow to respond or the prediction is wrong, the item will quickly change back and forth.

It sounds like autouodate is predicting on but then the receiver says “nope, still off”.

Autouodate is enabled by default. When turned off, the Item won’t change until the device reports a new state.

Hej Zimi,

thank you very much for offering help!

I tried to dive a little deeper into that….:

Checking the version of the binding is the first challenge. In the adminUI, I found version 1.23/1.04 at the Item YamahaBridge but I didn’t find a way to check if there could exist e newer version….

Feeling quite secure on the bash, I tried to find things and items files, but it seems I only found a jsondb containing those definitions? /etc/openhab/things is empty. The DB’s files exists in /var/lib/openhab/jsondb . That might be the so-called system-DB? In org.openhab.core.thing.Thing.json I found stuff like that:

    "host": "nl-yamaha-htr",
    "inputMapping": "",
    "port": 80,
    "refreshInterval": 60
  },
  "properties": {
    "assigned_name": "HTR-4065",
    "version": "1.23/1.04"
  },
  "UID": "yamahareceiver:yamahaAV:Yamaha-Bridge",
  "thingTypeUID": "yamahareceiver:yamahaAV"
}

},
“yamahareceiver:zone:Yamaha-Bridge:Main_Zone”: {
“class”: “org.openhab.core.thing.internal.ThingStorageEntity”,
“value”: {
“isBridge”: false,
“channels”: [
{
“uid”: “yamahareceiver:zone:Yamaha-Bridge:Main_Zone:zone_channels#power”,
“id”: “zone_channels#power”,
“channelTypeUID”: “yamahareceiver:power”,
“itemType”: “Switch”,
“kind”: “STATE”,
“label”: “Power”,
“description”: “Power the AVR or zone ON/OFF”,
“defaultTags”: ,
“properties”: {},
“configuration”: {}
},

But I think it’s not a good idea to write into that DB file for doing experiments!? :wink:

Funny I newly realized a behaviour: Clicking the switch it instantly falls back to off, but if I am patient (typically I am not), the on-state appears. The event log shows that:

2025-10-07 08:01:52.590 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘YamahaReceiver_Power’ received command ON
2025-10-07 08:01:52.592 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘YamahaReceiver_Power’ predicted to become ON
2025-10-07 08:01:52.598 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘YamahaReceiver_Power’ changed from OFF to ON
2025-10-07 08:01:52.733 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘YamahaReceiver_Power’ changed from ON to OFF
2025-10-07 08:02:40.405 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘YamahaReceiver_Power’ changed from OFF to ON

Those are my experiences so far….

Boris

Hej Rich,

thank you for your idea as well!
If I understand it right, auto-update enabled shows makes the icon show the real state while auto-update disabled shows the last action done with the icon. That might be a workaround but it seems to be the better way to have a solution with auto-update enabled. I think of the possibility to power-on the Yamaha by simply touching the knob at the Receiver itself. The Receiver would be enpowered, but openHAB would not show it.

But yes, it seems to be a timing issue between the openHAB and the Yamaha receiver…..

Thanks,

Boris

It’s way more than that.

You can really see the difference in the logs.

Autoupdate enabled:

  1. command sent to Item
  2. autoupdate predicts the new state of the Item
  3. autoupdate post that predicted state to the Item
  4. the Item changes state to that new state (if it’s different)
  5. the device gets the command
  6. the device responds to the command
  7. the device reports it’s new state
  8. the binding sends an update to the Item
  9. if all went well the Item updated but did not change because autoupdate predicted the new state correctly.

Autoupdate disabled:

  1. command sent to Item
  2. the device gets the command
  3. the device responds to the command
  4. the device reports it’s new state
  5. the binding sends an update to the Item
  6. the Item’s state changes to reflect the current state of the device.

When it’s enabled, the Item changes state in response to the command immediately with a predicted state. When it’s disabled, the Item does not change state until the device actually reports that it’s changed state.

Why not? Does the receiver or the binding not report manual operations like that?

But autoupdate wouldn’t come into play here because you’ve not issued the command from OH. Therefore there is no future state for autoupdate to predict. OH is just told “the receiver is on now”.

Hello Rich,

sorry for my delay….

I disabled autoupdate for the Switch item and now the Icon instantly shows the on- or off-state. That’s what I need to get my girlfriend to accept the system :wink:

Furthermore I’ll check the logs and follow up on your explanation.

Thank you very much!

Let’s mark this topic as solved!

Boris