openhab-core: GenericCronTriggerHandler does not give back context information

I am referring to the closed issue in JSR223/Jython: Class Decoration - CronTrigger - inputs map is empty

I am not familiar with the code, but it would be enough if just the information which is put out in the log output would somehow be packed into the map:

re.logger.debug("The trigger '{}' of rule '{}' is triggered.", trigger.getId(), ruleUID);

In the module GenericCronTriggerHandler.java nothing is passed back.

If I have multiple Cron triggers inside one rule, it would be good to know which particular trigger was fired. Today this is not possible as no context information is passed.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

The problem with the GenericCronTrigger (and other time-related triggers) is that no event exists that could be passed. The reason is that those triggers directly trigger the rule instead if creating an event and triggering the rule over the event bus.

I do see the benefit of getting that information, though. @openhab/core-maintainers Do you think we should create a sort of “virtual event” for these triggers?

Type: org.openhab.core.automation.GenericCronTriggerEvent Topic: openhab/cron/triggered Payload: { "cronExpression" : "..." }