-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[avmfritz] DECT Thermostat Handler crashes after being changed by external call (calendar event in my case) causing the state to be lost #9771
Comments
Thanks for reporting this issue. Looks similar to this community post. Do you send a command using the temperature unit (e.g. 21 °C) or a plain number? |
That was fast- thanks for the reply. I am sending without °C, this might be the cause for this - I will check. |
Indeed this fixed it: A bit weird though as there seems to be a breaking API-change since 2.5. A fall-back to a default unit together with a warning or error message should be included IMHO. Thanks for the help - nevertheless I will have a look into the code. |
I did a quick analysis. The root cause is the following constellation of implementations in both bindings (avmfritz and icalendar). Lines 48 to 50 in b6eea71
icalendar binding: The given command line in the calendar events will be parsed according to the above ordered list. Meaning Lines 369 to 372 in b6eea71
avmfritz binding: We now receive a |
Fixes #9820 Related to #9771 Signed-off-by: Christian Bandowski <[email protected]>
…#9849) Fixes openhab#9820 Related to openhab#9771 Signed-off-by: Christian Bandowski <[email protected]> Signed-off-by: John Marshall <[email protected]>
…#9849) Fixes openhab#9820 Related to openhab#9771 Signed-off-by: Christian Bandowski <[email protected]>
…#9849) Fixes openhab#9820 Related to openhab#9771 Signed-off-by: Christian Bandowski <[email protected]>
After migration to OH3 I am experiencing a NULL poniter exception in ThingHandler.handleCommand() after the set value is changed by an external rule/event (icalendar in my case). Using The UI changing the set value for the DECT thermostat works without any issues.
Part of the log showing the behavior:
2021-01-10 16:45:43.239 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Thermostat_OG_Bad' received command 21
2021-01-10 16:45:43.260 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Thermostat_OG_Bad' predicted to become 21
2021-01-10 16:45:43.282 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Thermostat_OG_Bad' changed from 20.0 to 21
2021-01-10 16:45:43.305 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.avmfritz.internal.handler.AVMFritzHeatingDeviceHandler@cc08da': null
2021-01-10 16:45:43.905 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Thermostat_OG_Bad' changed from 21 to 20.0
Full Stacktrace:
[ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.avmfritz.internal.handler.AVMFritzHeatingDeviceHandler@cc08da': null
java.lang.NullPointerException: null
at org.openhab.binding.avmfritz.internal.handler.AVMFritzBaseThingHandler.handleCommand(AVMFritzBaseThingHandler.java:348) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
at com.sun.proxy.$Proxy299.handleCommand(Unknown Source) [?:?]
at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]
at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
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:834) [?:?]
Expected Behavior
New set point (21°C in my case) should be set until changed manually or by an external trigger.
Current Behavior
Current state of the set point is lost and previous state is restored .
Possible Solution
Not yet - have to track the NULL pointer...
Steps to Reproduce (for Bugs)
Context
see initial description. Heating-Set-Points based on iCalendar.
Your Environment
The text was updated successfully, but these errors were encountered: