-
-
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
[homewizard] DateTime format issue with OH3.1.0 #11639
Comments
I would think so too! |
Yeah I will pick it up, thanks for reporting it. |
Thanks for looking into this. Let me know if you need any additional info or testing. |
It's an easy fix and with the file you provided above I can test it. Updating my dev environment to the latest version and getting Eclipse to work again to test the fix however... ah well, it will be fine. |
This commit fixes a crash that happens when the smart meter does not provide gas values. The crash was caused by the empty timestamp. Signed-off-by: Daniël van Os <[email protected]>
This commit fixes a crash that happens when the smart meter does not provide gas values. The crash was caused by the empty timestamp. Signed-off-by: Daniël van Os <[email protected]>
This commit fixes a crash that happens when the smart meter does not provide gas values. The crash was caused by the empty timestamp. Signed-off-by: Daniël van Os <[email protected]>
Hi Daniel, I tested the fix #11666 and it works like a charm! Thanks for the fast turnaround. Jos |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/homewizard-binding-generating-date-format-java-error/127166/2 |
Thanks for the test and the feedback, glad to hear this fixes the issue! |
This commit fixes a crash that happens when the smart meter does not provide gas values. The crash was caused by the empty timestamp. Signed-off-by: Daniël van Os <[email protected]>
Imported the (now slightly different) exception and feeding the numbers directly to a ZonedDateTime Signed-off-by: Daniël van Os <[email protected]>
This commit fixes a crash that happens when the smart meter does not provide gas values. The crash was caused by the empty timestamp. Signed-off-by: Daniël van Os <[email protected]>
Imported the (now slightly different) exception and feeding the numbers directly to a ZonedDateTime Signed-off-by: Daniël van Os <[email protected]>
Homewizard P1 binding on OH3.1.0 windows 10 server with Zulu 11. The binding goes online, reads out the consumption numbers from the Homewizard P1 device once but then generates the following error in the openhab.log:
2021-10-03 18:10:47.117 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.IllegalArgumentException: 2000-00-00T00:00:00 is not in a valid format.
at org.openhab.core.library.types.DateTimeType.(DateTimeType.java:112) ~[?:?]
at org.openhab.core.library.types.DateTimeType.valueOf(DateTimeType.java:123) ~[?:?]
at org.openhab.binding.homewizard.internal.HomeWizardHandler.pollingCode(HomeWizardHandler.java:197) ~[?:?]
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:834) [?:?]
Caused by: java.time.format.DateTimeParseException: Text ‘2000-00-00T00:00:00T00:00:00’ could not be parsed, unparsed text found at index 19
at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2049) ~[?:?]
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1948) ~[?:?]
at java.time.LocalDateTime.parse(LocalDateTime.java:492) ~[?:?]
at org.openhab.core.library.types.DateTimeType.parse(DateTimeType.java:232) ~[?:?]
at org.openhab.core.library.types.DateTimeType.(DateTimeType.java:106) ~[?:?]
… 8 more
The thing stays online, but P1 polling does not happen anymore.
Here is an output of the API link on the homewizard:
{"smr_version":50,"meter_model":"Fluvius 253769484_A","wifi_ssid":"telenet-7822442","wifi_strength":56,"total_power_import_t1_kwh":2425.626,"total_power_import_t2_kwh":3829.128,"total_power_export_t1_kwh":2361.773,"total_power_export_t2_kwh":883.506,"active_power_w":1448,"active_power_l1_w":1478,"active_power_l2_w":0,"active_power_l3_w":-30,"total_gas_m3":null,"gas_timestamp":null}
As you can see the gas_timestamp and total_gas_m3 show null as I do not have a gas meter. Maybe this is causing the issue?
The text was updated successfully, but these errors were encountered: