jrule icon indicating copy to clipboard operation
jrule copied to clipboard

Feature request: Add support for all rule actions

Open seime opened this issue 3 years ago • 7 comments

Currently we have support for thing actions which is great.

But I'd also love to see support for other actions like the openhab cloud sendNotification action.

Could be generated code just like ThingActions today.

WDYT @querdenker2k ?

seime avatar Nov 06 '22 18:11 seime

Shouldn't this be already generated within JRuleActions?

querdenker2k avatar Nov 06 '22 18:11 querdenker2k

All my generated actions are ThingActions, but I am talking about the more generic "module" actions. They are at least not available in the generated code on my side.

seime avatar Nov 06 '22 19:11 seime

I never used this, thought these are actions from the myopenhab binding. From the current concept, should this be just added to JRule?

querdenker2k avatar Nov 06 '22 21:11 querdenker2k

I guess it boils down to which addons that a user has installed, so I believe we need to generate this as well.

seime avatar Nov 07 '22 15:11 seime

I think this is contained in the openhab "core", because it's documented here: https://www.openhab.org/docs/configuration/actions.html#cloud-notification-actions

querdenker2k avatar Nov 07 '22 16:11 querdenker2k

Pretty sure you need to install the openhabcloud addon to actually have it available. This is the impl; https://github.com/openhab/openhab-addons/blob/0154427c99e5f55dd201d74d079e98afe26fcaab/bundles/org.openhab.io.openhabcloud/src/main/java/org/openhab/io/openhabcloud/NotificationAction.java

This is the base Handler class for the various actions they provide; https://github.com/openhab/openhab-addons/blob/0154427c99e5f55dd201d74d079e98afe26fcaab/bundles/org.openhab.io.openhabcloud/src/main/java/org/openhab/io/openhabcloud/internal/actions/BaseNotificationActionHandler.java#L28

seime avatar Nov 07 '22 17:11 seime

Yes, you're right. So it makes sense to generate this as well.

querdenker2k avatar Nov 07 '22 21:11 querdenker2k