openhab / openhab-ios

The repository of the iOS client
Eclipse Public License 2.0
190 stars 128 forks source link

Unable to trigger rule from enhanced notification #841

Open lukiep opened 1 week ago

lukiep commented 1 week ago

New bug checklist

Describe the bug As per https://community.openhab.org/t/ios-notifications-with-openhab-cloud-connector/159490 Selecting the action button which is configured to run a rule does not trigger the rule as expected

To Reproduce Steps to reproduce the behavior: Notification definition: actions.NotificationAction.sendNotification("me@me.com", "ALERT: This is a test.", "motion", "HVAC", "Im Really Hot!!!", "msg-alert-its_hot", "ui:/basicui/app?w=0000&sitemap=Crib", null, "OpenHAB=ui:/basicui/app?sitemap=Crib", "CoolTheHouse=rule:NotificationTest:prop1=OFF", "Cool The House=command:Test_Switch_1:ON");

This action button CoolTheHouse=rule:NotificationTest:prop1=OFF is meant to trigger rule with ID "NotificationTest" but does not. The rule is a simple rule which for testing purposes contains a line of logging to indicate when it is triggered:

rules.JSRule({ name: "NotificationTest", description: "NotificationTest", tags: ["TEST1", "TEST2"], id: "NotificationTest", triggers: [triggers.ItemCommandTrigger("Test_Switch_1")], execute: (event) => { console.log ("**** NotificationTest successful"); } });

Expected behavior Trigger rule as specified in the docs

Screenshots If applicable, add screenshots to help explain your problem.

App (please complete the following information):

Smartphone (please complete the following information):

openHAB (please complete the following information):

Additional context Add any other context about the problem here.

florian-h05 commented 1 week ago

I can confirm that this does not work with the latest TestFlight build 3.0.6 (22).