Last Sunday I discovered that the Denon items were not updating in openHAB. When sending commands from HABPanel, the Denon was reacting to this command, but when I made changes manually on the receiver, then the new state was not reflected in openHAB items.
First, I thought that the Denon was somehow rejecting network connections from openHAB. Using a packet sniffer, I could confirm that there were no connection requests from openHAB to the Denon.
Then, I activated debug logging and restarted the binding. The binding connects to the AVR just once, downloads the 2 XMLs, throws the exception related to Zone 2 volume and then nothing happens any more. Thing remains in status “uninitialized”
Then I deleted all channel links via Habmin and restarted the binding:
2018-02-27 10:44:53.155 [TRACE] [ector.http.DenonMarantzHttpConnector] - Refreshing URL: http://10.0.2.11:80/goform/formZone2_Zone2XmlStatusLite.xml
2018-02-27 10:44:53.166 [TRACE] [ector.http.DenonMarantzHttpConnector] - result of getDocument for uri 'http://10.0.2.11:80/goform/formZone2_Zone2XmlStatusLite.xml':
<?xml version="1.0" encoding="utf-8" ?>
<item>
<Power><value>ON</value></Power>
<InputFuncSelect><value>CD</value></InputFuncSelect>
<VolumeDisplay><value>Absolute</value></VolumeDisplay>
<MasterVolume><value> 0</value></MasterVolume>
<Mute><value>off</value></Mute>
</item>
2018-02-27 10:44:53.204 [DEBUG] [nmarantz.handler.DenonMarantzHandler] - Received state ON for channelID zone2Power
2018-02-27 10:44:53.206 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.denonmarantz.handler.DenonMarantzHandler@1774476': null
java.lang.NullPointerException: null
at java.math.BigDecimal.compareTo(BigDecimal.java:2625) [?:?]
at org.eclipse.smarthome.core.library.types.PercentType.validateValue(PercentType.java:54) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.library.types.PercentType.<init>(PercentType.java:50) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.openhab.binding.denonmarantz.internal.DenonMarantzState.setZone2Volume(DenonMarantzState.java:200) [220:org.openhab.binding.denonmarantz:2.3.0.201802091334]
at org.openhab.binding.denonmarantz.internal.connector.http.DenonMarantzHttpConnector.updateSecondaryZones(DenonMarantzHttpConnector.java:256) [220:org.openhab.binding.denonmarantz:2.3.0.201802091334]
at org.openhab.binding.denonmarantz.internal.connector.http.DenonMarantzHttpConnector.refreshHttpProperties(DenonMarantzHttpConnector.java:311) [220:org.openhab.binding.denonmarantz:2.3.0.201802091334]
at org.openhab.binding.denonmarantz.internal.connector.http.DenonMarantzHttpConnector.refreshState(DenonMarantzHttpConnector.java:178) [220:org.openhab.binding.denonmarantz:2.3.0.201802091334]
at org.openhab.binding.denonmarantz.internal.connector.http.DenonMarantzHttpConnector.connect(DenonMarantzHttpConnector.java:112) [220:org.openhab.binding.denonmarantz:2.3.0.201802091334]
I then deleted all Denon items. No change, the binding just loads the XMLs once, throws the above exception and exits.
I then deleted the thing and re-added it via Paper UI. Thing is discovered, added and then the binding throws the exception.
I then lowered the Zone 2 volume on the receiver and restarted the binding. Binding started running, requesting status updates from the Denon every 5 seconds. As soon as I increase Zone2 volume above -10db/70%, the binding starts throwing exceptions (remember, no items created yet)
Finally, I deleted the thing again and re-added it using a totally different name to avoid any old channel information to influence. This didn’t help either.
My conclusion for now: the binding itself runs into trouble as soon as the Zone 2 volume exceeds a certain level, regardless whether items are created/linked or not.
Since you mentioned in an earlier post that the volume should not be created as a “dimmer” item, I had a look in the jsondb to see how channels are created by the binding. There I see that the channel is created as a dimmer:
{
"acceptedItemType": "Dimmer",
"kind": "STATE",
"uid": {
"segments": [
"denonmarantz",
"avr",
"0005cd3abf39",
"zone2Volume"
]
}, },
I stopped openHAB, changed the “Dimmer” into “Number” and restarted. This didn’t help: exception as soon as I exceed a certain volume on Zone2. I then compared the channel settings of main volume and Zone 2 volume and found no differences.
Finally, I raised the main volume beyond the 70% point, hoping that I would see the same exception happening there. This was not the case. So there seems to be a difference in the way the main volume channel is pulling its information from the XML.
I am out of inspiration for now. Is there anything else I can try to help you tracking down the issue that seems only to be happening in Zone2 (or probably non-main-zones)?