You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hit the following error on my openhab / Knx installation.
2025-02-03 10:01:03.846 [DEBUG] [.internal.handler.DeviceThingHandler] - onGroupWrite Thing 'knx:device:bridge:generic' received a GroupValueWrite telegram from '1.0.248' for destination '10/4/3'
2025-02-03 10:01:03.846 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.IllegalArgumentException: Number cannot be parsed
at tech.units.indriya.format.NumberDelimiterQuantityFormat.parse(NumberDelimiterQuantityFormat.java:315) ~[?:?]
at org.openhab.core.library.types.QuantityType.(QuantityType.java:160) ~[?:?]
at org.openhab.core.library.types.QuantityType.(QuantityType.java:123) ~[?:?]
at org.openhab.binding.knx.internal.dpt.ValueDecoder.handleNumericDpt(ValueDecoder.java:505) ~[?:?]
at org.openhab.binding.knx.internal.dpt.ValueDecoder.decode(ValueDecoder.java:230) ~[?:?]
at org.openhab.binding.knx.internal.handler.DeviceThingHandler.processDataReceived(DeviceThingHandler.java:397) ~[?:?]
at org.openhab.binding.knx.internal.handler.DeviceThingHandler.onGroupWrite(DeviceThingHandler.java:385) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient$1.lambda$0(AbstractKNXClient.java:129) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.lambda$8(AbstractKNXClient.java:348) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) [?:?]
After investigating a little bit, I find that the error is triggered because one of the participant push a Not a Number (Nan) on this group 10/4/3.
Expected Behavior
What I expected in this case is to have a clae error in the exception telling me what group / participant / value make things goes wrong.
But I've only get the generic exception bellow.
After analysis the code, what is happenning is that:
The method public static @nullable Type decode(String dptId, byte[] data, Class<? extends Type> preferredType) of ValueDecoder is called to convert the raw value.
We hit in the case the handleNumericDpt(...) at the end of the swictch / case.
This method throw an IllegalArgumentException parsing the NaN.
But the catch clause in the decode function only catch NumberFormatException, not IllegalArgumentException.
So the Logger.info just bellow is never it in this case.
So I think we have to changed:
``
} catch (NumberFormatException | KNXFormatException | KNXIllegalArgumentException | ParseException e) {
by
} catch (IllegalArgumentException | KNXFormatException | KNXIllegalArgumentException | ParseException e) {
``
that will cauth IllegalArgumentException as well as NumberFormatException
Your Environment
Openhab 5.x nightly, running on Fedora / Linux
The text was updated successfully, but these errors were encountered:
lo92fr
added
the
bug
An unexpected problem or unintended behavior of an add-on
label
Feb 3, 2025
Hello,
I hit the following error on my openhab / Knx installation.
2025-02-03 10:01:03.846 [DEBUG] [.internal.handler.DeviceThingHandler] - onGroupWrite Thing 'knx:device:bridge:generic' received a GroupValueWrite telegram from '1.0.248' for destination '10/4/3'
2025-02-03 10:01:03.846 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.IllegalArgumentException: Number cannot be parsed
at tech.units.indriya.format.NumberDelimiterQuantityFormat.parse(NumberDelimiterQuantityFormat.java:315) ~[?:?]
at org.openhab.core.library.types.QuantityType.(QuantityType.java:160) ~[?:?]
at org.openhab.core.library.types.QuantityType.(QuantityType.java:123) ~[?:?]
at org.openhab.binding.knx.internal.dpt.ValueDecoder.handleNumericDpt(ValueDecoder.java:505) ~[?:?]
at org.openhab.binding.knx.internal.dpt.ValueDecoder.decode(ValueDecoder.java:230) ~[?:?]
at org.openhab.binding.knx.internal.handler.DeviceThingHandler.processDataReceived(DeviceThingHandler.java:397) ~[?:?]
at org.openhab.binding.knx.internal.handler.DeviceThingHandler.onGroupWrite(DeviceThingHandler.java:385) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient$1.lambda$0(AbstractKNXClient.java:129) ~[?:?]
at org.openhab.binding.knx.internal.client.AbstractKNXClient.lambda$8(AbstractKNXClient.java:348) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) [?:?]
After investigating a little bit, I find that the error is triggered because one of the participant push a Not a Number (Nan) on this group 10/4/3.
Expected Behavior
What I expected in this case is to have a clae error in the exception telling me what group / participant / value make things goes wrong.
But I've only get the generic exception bellow.
After analysis the code, what is happenning is that:
The method public static @nullable Type decode(String dptId, byte[] data, Class<? extends Type> preferredType) of ValueDecoder is called to convert the raw value.
We hit in the case the handleNumericDpt(...) at the end of the swictch / case.
This method throw an IllegalArgumentException parsing the NaN.
But the catch clause in the decode function only catch NumberFormatException, not IllegalArgumentException.
So the Logger.info just bellow is never it in this case.
So I think we have to changed:
``
} catch (NumberFormatException | KNXFormatException | KNXIllegalArgumentException | ParseException e) {
by
} catch (IllegalArgumentException | KNXFormatException | KNXIllegalArgumentException | ParseException e) {
``
that will cauth IllegalArgumentException as well as NumberFormatException
Your Environment
Openhab 5.x nightly, running on Fedora / Linux
The text was updated successfully, but these errors were encountered: