I recently started implementing and configuring the yamaha binding to use my receiver as well for home automation, e.g. switch the plug for the record player if the input PHONO is set.
Anyway, I ran into one issue according to the returning messages.
If I use the channel TUNER, I am able to produce the following exception:
java.lang.NumberFormatException: For input string: “o Preset”
The log messages (with binding trace enabled) according to this exception shows the following:
2021-10-28 16:41:15.372 [DEBUG] [.internal.protocol.xml.XMLConnection] - Making POST to http://xxx.xxx.xxx.xxx:80/YamahaRemoteControl/ctrl with payload: <?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="GET"><Tuner><Play_Control><Preset><Preset_Sel_Item>GetParam</Preset_Sel_Item></Preset></Play_Control></Tuner></YAMAHA_AV>
2021-10-28 16:41:15.403 [TRACE] [.internal.protocol.xml.XMLConnection] - The charset UTF-8 will be used to parse the response
2021-10-28 16:41:15.429 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NumberFormatException: For input string: "o Preset"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:652) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:770) ~[?:?]
at org.openhab.binding.yamahareceiver.internal.protocol.xml.InputWithPresetControlXML.convertToPresetNumber(InputWithPresetControlXML.java:157) ~[?:?]
at org.openhab.binding.yamahareceiver.internal.protocol.xml.InputWithPresetControlXML.update(InputWithPresetControlXML.java:123) ~[?:?]
at org.openhab.binding.yamahareceiver.internal.handler.YamahaZoneThingHandler.lambda$2(YamahaZoneThingHandler.java:725) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Getting the TUNER params means that the Yamaha Receiver responds with the preset list of programmed stations.
In my case, the Yamaha Receiver (RX-A1030) returns the following (sniffed with Wireshark):
ah yes, you’re right.
It’s definitely the same issue! I didn’t find such a topic while searching yesterday.
Thank you for keeping it together, I also noted, that the openhab-bot linked my post there.