openhab-addons: [tacmi] Error parsing API Scheme: Non-terminating decimal expansion; no exact representable decimal result
Error:
I am receiving the following error when parsing my Schema API page, if:
- the parameter being parsed has a unit of “l/h” from the CMI – and –
- the value is !=0 The value causing the error and all subsequent values are not updated
Item Definition
The item definition is as follows: Number:VolumetricFlowRate D_V_ST “Solarthermie durchfluss” {channel=“tacmi:cmiSchema:ratiotherm:dV_ST”} I also tried: Number:Volume D_V_ST “Solarthermie durchfluss” {channel=“tacmi:cmiSchema:ratiotherm:dV_ST”} –and– Number D_V_ST “Solarthermie durchfluss” {channel=“tacmi:cmiSchema:ratiotherm:dV_ST”} without change of behaviour
Trace
Trace is the following (with one working parameter showing before the actual error):
2022-03-08 08:54:23.067 [TRACE] [.tacmi.internal.schema.ApiPageParser] - Found parameter pos25:78:8 [READ_ONLY] : temp_ST_RL "Solarthermie Ruecklauf" = 24.9 °C
2022-03-08 08:54:23.070 [TRACE] [.tacmi.internal.schema.ApiPageParser] - Found parameter pos26:81:8 [READ_ONLY] : dV_ST "Solarthermie Durchfluss" = 466 l/h
2022-03-08 08:54:23.071 [DEBUG] [i.internal.schema.TACmiSchemaHandler] - Error parsing API Scheme: Non-terminating decimal expansion; no exact representable decima
l result.
org.attoparser.ParseException: Non-terminating decimal expansion; no exact representable decimal result.
at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:393) ~[?:?]
at org.attoparser.MarkupParser.parse(MarkupParser.java:257) ~[?:?]
at org.attoparser.MarkupParser.parse(MarkupParser.java:175) ~[?:?]
at org.attoparser.simple.SimpleMarkupParser.parse(SimpleMarkupParser.java:132) ~[?:?]
at org.openhab.binding.tacmi.internal.schema.TACmiSchemaHandler.parsePage(TACmiSchemaHandler.java:160) ~[?:?]
at org.openhab.binding.tacmi.internal.schema.TACmiSchemaHandler.refreshData(TACmiSchemaHandler.java:170) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
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:829) [?:?]
Caused by: java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
at java.math.BigDecimal.divide(BigDecimal.java:1722) ~[?:?]
at org.openhab.binding.tacmi.internal.schema.ApiPageParser.getApiPageEntry(ApiPageParser.java:388) ~[?:?]
at org.openhab.binding.tacmi.internal.schema.ApiPageParser.handleCloseElement(ApiPageParser.java:210) ~[?:?]
at org.attoparser.simple.SimplifierMarkupHandler.handleCloseElementEnd(SimplifierMarkupHandler.java:341) ~[?:?]
at org.attoparser.MarkupEventProcessorHandler.handleCloseElementEnd(MarkupEventProcessorHandler.java:473) ~[?:?]
at org.attoparser.ParsingElementMarkupUtil.parseCloseElement(ParsingElementMarkupUtil.java:201) ~[?:?]
at org.attoparser.MarkupParser.parseBuffer(MarkupParser.java:725) ~[?:?]
at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:301) ~[?:?]
... 11 more
Environment
- Openhab 3.2 release with corresponding TACMI binding on Debian Buster
- openjdk 11.0.13 2021-10-19 LTS
Thanks a lot for your support here @marvkis, would be amazing if you could take a look, happy to help with further debugging or testing in my setup.
thanks and best regards, /Michael
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 36 (19 by maintainers)
Hi Chris,
did some more testing on duplicate entries in mariadb. Result so far:
Don´t know what comes between 2) and 3) - could debug if I would know 😃
Sometimes I get up to 8 updates for one value with timestamp differences of a couple of milliseconds.
regards Reinhold