eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
865 stars 782 forks source link

PaperUI rule engine #6275

Closed dk8pn closed 6 years ago

dk8pn commented 6 years ago

Hello, run the experimental rules for a while now. Actually use openHAB2.4.0 build #1346 on Windows10. This was the first build for me, where the rules have been running immediately after a restart of openHAB without any additional interaction.

Before i had to either disable/enable all rules or to start each rule in order to make them working. With the next snapshot build i have been back to the old Problem. Now i hesitate to update any more because my #1346 seems to be the best.

Is there a possibility to fix this issue for all builds or to describe which build should work and which not?

Thanks & best regards,

Willi

htreu commented 6 years ago

Thanks for the bug report @dk8pn. Please describe your problem in more detail: Give an example rule and a complete log output during startup, ideally with DEBUG log level on all org.eclipse.smarthome.automation packages. You enable DEBUG logging by issuing log:set DEBUG org.eclipse.smarthome.automation in the openHAB2 OSGi console.

htreu commented 6 years ago

@dk8pn please provide some feedback. It would also be nice if you could test again with the latest openHAB snapshot as we refactored some of the automation internals. Thanks.

dk8pn commented 6 years ago

Hello Henning,

i have installed the latest snapshot #1392 yesterday. The issue is the same as it was before. Try now to specify the problem in more detail:

  1. Rules have been setup using the PaperUI.
  2. After start of openHAB2.4.0 #1392, the enabled rules administrated within the file automation_rules.json appear as "Idle", but they are not really running.
  3. Disabled rules administrated within an extra JSON rules file automation_rules_disabled.json appear also as "Idle".
  4. In order to get the rules running, i need to "update" them by opening each rule and confirm it without any change.

Will look now if the log tells me someting. With snapshot #1346, the update procedure was not necessary and all rules are active immediately after a restart of the program. The disabled rules have been grey'd out. Hope that this helps you in some way?

Found this entry within the log but don't know if this has to do with the problem:

2018-10-21 12:18:47.022 [ERROR] [me.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.eclipse.smarthome.storage.json.internal.StorageEntry@73cefc'. Root cause is: Unable to invoke no-args constructor for interface org.eclipse.smarthome.automation.Rule. Register an InstanceCreator with Gson for this type may fix this problem. 2018-10-21 12:18:47.030 [ERROR] [me.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.eclipse.smarthome.storage.json.internal.StorageEntry@884f79'. Root cause is: Unable to invoke no-args constructor for interface org.eclipse.smarthome.automation.Rule. Register an InstanceCreator with Gson for this type may fix this problem.

Best regards,

Willi

htreu commented 6 years ago

Hi @dk8pn sorry for the very late reply.

2018-10-21 12:18:47.022 [ERROR] [me.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.eclipse.smarthome.storage.json.internal.StorageEntry@73cefc'. Root cause is: Unable to invoke no-args constructor for interface org.eclipse.smarthome.automation.Rule. Register an InstanceCreator with Gson for this type may fix this problem.

This looks a lot like you have some "older" rules which can not be loaded from storage anymore. We had an API breaking change a while ago which resulted in this issue, see https://github.com/eclipse/smarthome/issues/5884 for reference.

htreu commented 6 years ago

I'm closing this as a duplicate of https://github.com/eclipse/smarthome/issues/5884.

dk8pn commented 6 years ago

Hello Henning,

this is not right. I work with the latest versions of rules. And using actually build # build 1411 the rule execution works out again. It is the 1st time it works since #1346.

Best regards,

Willi

Von: Henning Treu [mailto:notifications@github.com] Gesendet: Dienstag, 6. November 2018 20:56 An: eclipse/smarthome Cc: dk8pn; Mention Betreff: Re: [eclipse/smarthome] PaperUI rule engine (#6275)

Closed #6275 https://github.com/eclipse/smarthome/issues/6275 .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eclipse/smarthome/issues/6275#event-1949949277 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYGM6s6aFHrTvrP4V-iD_noORcU_u2uMks5usekygaJpZM4W5ULr . https://github.com/notifications/beacon/AYGM6qJXueGvMvXIkoNJ2F_yjto3Y-oTks5usekygaJpZM4W5ULr.gif