openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[dscalarm] Creation of event failed, because one of the registered event factories has thrown an exception #10728

Open richardbergen opened 3 years ago

richardbergen commented 3 years ago

In OH3, the DSC Alarm binding throws the following warning on startup:

Creation of event failed, because one of the registered event factories has thrown an exception: Error invoking #valueOf(String) on class 'org.openhab.core.library.types.DateTimeType' with value '2-01-01T00:00:00.000-0700'.

As Gary pointed out at the following link https://community.openhab.org/t/oh3-dscalarm-binding-error/112615, the issue appears to start in the binding org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/internal/handler/PanelThingHandler.java at line 95 updateState(channelUID, new DateTimeType(systemTime)); since the variable systemTime seems to contain ‘2-01-01T00:00:00.000-0700

Would @Hilbrand or @wborn be able to have a look? Thank you so much!

dsc_errors.txt

openhab-bot commented 3 years ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/oh3-dscalarm-binding-error/112615/3

garyn87048 commented 3 years ago

Watching this one too!

lsiepel commented 4 months ago

Can you confirm this is still an issue with the latest openHAB 4.2 milestone?

ve3sjk commented 4 months ago

Can you confirm this is still an issue with the latest openHAB 4.2 milestone?

I am running OpenHab 4.1.3 release version and can confirm that is still an active error in the logs, and that the dsc binding has a NULL for system time.

lsiepel commented 2 months ago

Unfortunately i cannot reproduce (have no dscalarm) and clearly see a possible cause. I added some logging to the binding that would enable me te reproduce. Could you try this:

  1. upgrade to openHAB 4.2.x (if not already)
  2. uninstall dscalarm (all channels and links will remain intact
  3. drop this jar: https://1drv.ms/u/s!AnMcxmvEeupwj4Uc635-u3nEeX4e-Q?e=V9BPwZ in your addon folder
  4. send me the log it should have something like: updateChannel was called to create date based on description:
lsiepel commented 1 month ago

Gentle ping @ve3sjk or @garyn87048

garyn87048 commented 1 month ago

Gentle ping @ve3sjk or @garyn87048

Thank you for looking into this! The issue was logged three years ago. I had given up on ever seeing this get fixed and I have ditched openhab - every single upgrade something new seemed to brake. Rooting for your success!

lsiepel commented 1 month ago

Sorry to hear, thanks for the reply though! Feel free to come back whenever you want ;-)