A bit confused with sending the enhanced notifications via the cloud connector.
I am using OH4.3M2. iOS device is iPhone 13 on iOS 18.0.1. App version is 3.0.5(11). Using text-based JS rules.
Here is my command which does get sent to the phone:
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");
A few things I am struggling with:
I cannot seem to execute a rule using the action buttons (triggering items works fine).
In the above, the second action button "CoolTheHouse=rule:NotificationTest:prop1=OFF" doesn’t do anything. I can confirm this because my logging statement never appears. In trying to troubleshoot this, I even used NotificationTest for the name, description and id of the rule just in case I was getting mixed up. I also tried with and without the prop1. The rule is a text-based rule, however I also tried with a UI created rule as well. Have I mucked up the syntax for this?
Navigating to a specific sitemap page eg ui:/basicui/app?w=0000&sitemap=Crib" only really works if the iOS app has been previously opened and I have previously navigated to the sitemap (in Basic Ui). If the iOS app hasn’t already been accessed, then I just get the Overview page of Main UI. It doesn’t reliably open the Basic UI as requested. I think I read something about this in the docs, but is this right?
Not so important - the icon argument never displays an icon. Is that right for iOS? I changed it to a few different options, eg motion and switch but it has never displayed anything obvious. I’m not worried about it, but it’s just confusing why I couldn’t get it to work.
Yes, this is correct for iOS. Only Android does display that icon.
BTW, I would recommend you to use the notification builder instead of the raw notification actions so you don‘t have to remember the signature with those thousand method arguments: JavaScript Scripting - Automation | openHAB
Does Hide option in NotificationBuilder works for IOS?
I run a test and sent a notification using a special ReferenceID. However I failed to hide this message later again.
Did I misunderstand the feature, or isn’t it working for IOS?
Would the issues described above, namely being unable to navigate to a sitemap menu and triggering a command be fixable for OH4 or would that be a OH 5 thing? (or maybe not fixable at all?)
many thanks - hide() is working now on IOS devices as well
Maybe you can give me a hint for .withIcon() parameter.
Is the syntax wrong I’m using? my iPhone doesn’t display the Icon defined in withIcon() parameter.
Unfortunately the icon option is not supported on IOS, just android, i’m not sure if it worked at one point way, way long ago in the past, but Apple does not allow icons on messages.