[avmfritz] NullPointerException in ThingHandler.handleCommand()
See original GitHub issueBinding version: 2.2.0 OpenHAB Package version: 2.2.0-1 FritzOS version: 06.50
Expected behaviour
Power outlet is switched on OpenHAB command.
Actual behaviour
Upon switching the switch (Basic UI or HABPanel) nothing happens and the following Error is logged:
[ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.avmfritz.handler.DeviceHandler@113317': null
java.lang.NullPointerException: null
at org.openhab.binding.avmfritz.handler.DeviceHandler.handleCommand(DeviceHandler.java:162) [250:org.openhab.binding.avmfritz:2.2.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [109:org.eclipse.smarthome.core:0.10.0.b1]
at com.sun.proxy.$Proxy163.handleCommand(Unknown Source) [250:org.openhab.binding.avmfritz:2.2.0]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:72) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
at java.lang.Thread.run(Thread.java:745) [?:?]
According to Paper UI the FRITZ!Powerline 546E-Thing is correctly configured and the Switch Item is linked to its power outlet channel via text based configuration.
Here are some debug log entries from the avmfritz binding, which, as far as I can tell, show that the Thing is correctly cconfigured:
2018-01-19 13:06:06.712 [DEBUG] [nding.avmfritz.handler.DeviceHandler] - polling FRITZ!Box avmfritz:FRITZ_Powerline_546E_Solo:192_168_2_103
2018-01-19 13:06:06.760 [DEBUG] [ternal.hardware.FritzahaWebInterface] - GETting URL http://192.168.2.103:80/webservices/homeautoswitch.lua?switchcmd=getdevicelistinfos&sid=381e2190d275d1c1
2018-01-19 13:06:06.955 [DEBUG] [nal.hardware.FritzahaContentExchange] - HTTP response 200
2018-01-19 13:06:06.981 [DEBUG] [nal.hardware.FritzahaContentExchange] - HTTP response 200
2018-01-19 13:06:07.002 [DEBUG] [nal.hardware.FritzahaContentExchange] - response complete: <devicelist version="1"><device identifier="*:*:*:*:*:*" id="1000" functionbitmask="640" fwversion="06.50" manufacturer="AVM" productname="FRITZ!Powerline 546E"><present>1</present><name>FRITZ!Powerline 546E</name><switch><state>0</state><mode>auto</mode><lock>0</lock></switch><powermeter><power>0</power><energy>42139</energy></powermeter></device></devicelist>
2018-01-19 13:06:07.108 [DEBUG] [nding.avmfritz.handler.DeviceHandler] - set device model: org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@a26bdb[ain=*:*:*:*:*:*,bitmask=640,isDectRepeater=false,isPowermeter=true,isTempSensor=false,isSwitchableOutlet=true,isHeatingThermostat=false,id=1000,manufacturer=AVM,productname=FRITZ!Powerline 546E,fwversion=06.50,present=1,name=FRITZ!Powerline 546E,org.openhab.binding.avmfritz.internal.ahamodel.SwitchModel@809f41[state=0,mode=AUTOMATIC,lock=0,devicelock=<null>],org.openhab.binding.avmfritz.internal.ahamodel.PowerMeterModel@180bc0d[power=0.000,energy=42.139],<null>,<null>]
Completely removing Item, Thing and Binding and re-adding them did not change anything.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Error at Systemstart: "An error occurred while calling method ...
AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.avmfritz.internal.
Read more >[avmfritz] DECT Thermostat Handler crashes after being ...
After migration to OH3 I am experiencing a NULL poniter exception in ThingHandler.handleCommand() after the set value is changed by an external ...
Read more >ZoneMinderServerBridgeHandler.java example - Javatips.net
This class describes the usage of ZoneMinderServerBridgeHandler.java.
Read more >The openhab-addons from openhab - GithubHelp
NullPointerException : null at org.openhab.binding.sonos.handler.ZonePlayerHandler. ... I'm struggling with getting the item configuration via getConfigAs().
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @cweitkamp , thank you for this quick response. Maybe I was a bit too eager in in posting. I stuggled a bit around with my Fritz! configuration with the result that all is working now. I had to change the access method to “Powerline bridge” to include the adapter into my Fritz!Home setup.
@thucke I am glad you got it working.