openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.58k forks source link

[yamahareceiver] Yamaha Receiver RX-V4A: HANDLER_INITIALIZING_ERROR #10838

Closed MiHechtel closed 1 year ago

MiHechtel commented 3 years ago

I tried to connect my Yamaha RX-V4A Receiver to openHAB via the Yamaha Binding. I used the autodetection function (same behavior when the thing is added manually in things file), which is why there should be no configuration errors here. But nevertheless I get the HANDLER_INITIALIZING_ERROR you can see in the picture. This issue occured in openHAB 2 and also after the upgrade in openHAB 3.

If anyone else got the same problem I would suggest that there could be a bug in the Yamaha Binding?

image

Expected Behavior

The Receiver Thing should successfully connect to my Yamaha RX-V4A

Current Behavior

When I try to add the auto-detected Thing it goes directly into the HANDLER_INITIALIZING_ERROR state (same behavior when the thing is added manually in things file)

Steps to Reproduce (for Bugs)

Install Yamaha Binding Add Auto-Detect Receiver Thing -> Thing goes into HANDLER_INITIALIZING_ERROR state

Your Environment

Openhab 3.0.2 Yamaha Binding 3.0.2

florian-h05 commented 1 year ago

Does the problem still exist?

MiHechtel commented 1 year ago

Unfortunately yes, it is still the same issue. Please tell me if you need some logs or other information.

florian-h05 commented 1 year ago

I think I can take a look at this in the next days/weeks. Can you please provide me some logs as well as your thing configuration? Probably trace logs, you can set the log level to TRACE by running log:set TRACE org.openhab.binding.yamahareceiver in the openHAB console.

MiHechtel commented 1 year ago

Here is my current thing config

UID: yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_ccd42ebd444a
label: Yamaha Receiver RX-V4A
thingTypeUID: yamahareceiver:yamahaAV
configuration:
  host: 192.168.178.76
  albumUrl: data:image/jpeg;base64
  inputMapping: ""
  port: 80
  refreshInterval: 60

and the log statements:

2022-12-07 17:40:52.572 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.yamahareceiver.internal.handler.YamahaBridgeHandler@1e10639': null
    at org.openhab.binding.yamahareceiver.internal.protocol.xml.DeviceDescriptorXML.load(DeviceDescriptorXML.java:162) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.protocol.xml.DeviceInformationXML.update(DeviceInformationXML.java:100) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.handler.YamahaBridgeHandler.ensureConnectionInitialized(YamahaBridgeHandler.java:384) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.handler.YamahaBridgeHandler.onConnectionCreated(YamahaBridgeHandler.java:363) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.protocol.xml.XMLProtocolFactory.createConnection(XMLProtocolFactory.java:50) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.handler.YamahaBridgeHandler.initialize(YamahaBridgeHandler.java:352) ~[?:?]
2022-12-07 17:40:52.582 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_ccd42ebd444a': null
    at org.openhab.binding.yamahareceiver.internal.protocol.xml.DeviceDescriptorXML.load(DeviceDescriptorXML.java:162) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.protocol.xml.DeviceInformationXML.update(DeviceInformationXML.java:100) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.handler.YamahaBridgeHandler.ensureConnectionInitialized(YamahaBridgeHandler.java:384) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.handler.YamahaBridgeHandler.onConnectionCreated(YamahaBridgeHandler.java:363) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.protocol.xml.XMLProtocolFactory.createConnection(XMLProtocolFactory.java:50) ~[?:?]
    at org.openhab.binding.yamahareceiver.internal.handler.YamahaBridgeHandler.initialize(YamahaBridgeHandler.java:352) ~[?:?]
2022-12-07 17:40:52.409 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_ccd42ebd444a' changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR) to UNINITIALIZED (HANDLER_MISSING_ERROR)
2022-12-07 17:40:52.418 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_ccd42ebd444a' changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR) to INITIALIZING
2022-12-07 17:40:52.431 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_ccd42ebd444a' changed from INITIALIZING to OFFLINE (CONFIGURATION_PENDING): Waiting for connection with Yamaha device
2022-12-07 17:40:52.583 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_ccd42ebd444a' changed from OFFLINE (CONFIGURATION_PENDING): Waiting for connection with Yamaha device to UNINITIALIZED (HANDLER_INITIALIZING_ERROR)

Do you need anything else from my side?

florian-h05 commented 1 year ago

I've just had a closer look at this, seems like the binding expects some information from the API that is not returned.

I think that Yamaha changed their API on newer models (your RX-V4A is from 2021, right?) and the Yamaha Receiver binding says:

This binding connects openHAB with Yamaha Receivers of product line CX-A5000, RX-A860, RX-A30xx, RX-A20xx, RX-A10xx, RX-Vxxx, RX-Z7, DSP-Z7, RX-S600, RX-S601D, HTR-xxxx.

Your receiver is not on the compatibility list, so we can not expect the binding to work with it.

Since your issue is from mid 2021, back then you only had the option to use the Yamaha Receiver binding, but meanwhile the Yamaha MusicCast binding was released.

Can you please try out the MusicCast binding?

The MusicCast binding has several advantages over the Yamaha Receiver binding, such as UDP event listening, which means that input, volume changes etc. on your receiver are much faster recognized by openHAB than with the Yamaha Receiver binding.

MiHechtel commented 1 year ago

Thank you for your answer. Actually I bought the receiver in 2020, but nevertheless it supports MusicCast and it is working with the new Binding. So thank you for your help!

florian-h05 commented 1 year ago

Glad that I was able to help!