Hi everybody!
I stumbled upon a problem with the FritzBox Binding (avmfritz) for OpenHab2 (Snapshot) - which started right after the update to the new deb-format (openhab2 instead of openhab2-offline). However, I frankly do not understand what happens:
Since the update, all my AHA things are not updated anymore, with the following exception thrown:
2017-01-11 14:52:49.968 [ERROR] [.binding.avmfritz.handler.BoxHandler] -
java.lang.NullPointerException
at org.openhab.binding.avmfritz.handler.BoxHandler.updateThingFromDevice(BoxHandler.java:165)[219:org.openhab.binding.avmfritz:2.0.0.201701091302]
at org.openhab.binding.avmfritz.handler.BoxHandler.addDeviceList(BoxHandler.java:129)[219:org.openhab.binding.avmfritz:2.0.0.201701091302]
at org.openhab.binding.avmfritz.internal.hardware.callbacks.FritzAhaUpdateXmlCallback.execute(FritzAhaUpdateXmlCallback.java:70)[219:org.openhab.binding.avmfritz:2.0.0.201701091302]
at org.openhab.binding.avmfritz.internal.hardware.FritzahaContentExchange.onComplete(FritzahaContentExchange.java:71)[219:org.openhab.binding.avmfritz:2.0.0.201701091302]
at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)[69:org.eclipse.jetty.client:9.2.19.v20160908]
Looking into the code and increase the loglevel, I found no immediate problems. The response from the fritzbox, which is being converted, is:
<devicelist version="1">
<device identifier="xxx" id="17" functionbitmask="896" fwversion="03.59" manufacturer="AVM" productname="FRITZ!DECT 200">
<present>1</present>
<name>AV Geräte</name>
<switch><state>1</state><mode>manuell</mode><lock>1</lock></switch>
<powermeter><power>29680</power><energy>1514500</energy></powermeter>
<temperature><celsius>205</celsius><offset>0</offset></temperature>
</device>
...
However, the resulting DeviceModel
instance is:
org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@1c33f7d[ain=xxx,bitmask=896,isDectRepeater=false,isPowermeter=true,isTempSensor=true,isSwitchableOutlet=true,id=17,manufacturer=AVM,productname=FRITZ!DECT 200,fwversion=03.59,present=1,name=AV Geräte,org.openhab.binding.avmfritz.internal.ahamodel.SwitchModel@dd851c[state=1,mode=manuell,lock=1],<null>,org.openhab.binding.avmfritz.internal.ahamodel.TemperatureModel@f130a5[celsius=20.5,offset=0.0]]
The import part here is the <null>
for powermeter. But the instance is created by Jaxb, and nothing has changed here.
Before I open a new issue in GitHub: Does anybody has an idea?
Cheers,
Stephan