You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[openhabcloud] Support hiding notifications and tags (openhab#16979)
* Support hiding notifications
See openhab#16934
* Adds support for using tag over severity on extended actions
Signed-off-by: Dan Cunningham <[email protected]>
Copy file name to clipboardexpand all lines: bundles/org.openhab.io.openhabcloud/README.md
+30-14
Original file line number
Diff line number
Diff line change
@@ -108,17 +108,19 @@ The parameters for these actions have the following meaning:
108
108
-`emailAddress`: String containing the email address the target user is registered with in the cloud instance.
109
109
-`message`: String containing the notification message text.
110
110
-`icon`: String containing the icon name (as described in [Items: Icons]({{base}}/configuration/items.html#icons)).
111
-
-`severity`: String containing a description of the severity of the incident.
111
+
-`severity`: String containing a description of the severity (tag) of the incident.
112
112
113
113
`null` may be used to skip the `icon` or `severity` parameter.
114
114
115
-
### Title, Media Attachments & Actions
115
+
### Title, Tag, Reference Id, Media Attachments & Actions
116
116
117
-
The `sendNotification` and `sendBroadcastNotification` actions additionally support setting a title, media attachments and actions.
117
+
The `sendNotification` and `sendBroadcastNotification` actions additionally support setting a title, reference id, media attachments and actions.
118
118
119
-
The title is displayed as the notification title on the device and defaults to "openHAB" for the Android and iOS apps.
120
-
Media attachments are displayed together with the notification on the device and can be used to display images, e.g. a camera snapshot.
121
-
Actions allow the user to interact with the notification, e.g. to open a specific page in the app or to send a command to an Item.
119
+
- The tag is used for tagging messages for grouping when displaying in the app and to hide/remove groups of messages from a user's device. Tag was previously referred to as "severity".
120
+
- The title is displayed as the notification title on the device and defaults to "openHAB" for the Android and iOS apps.
121
+
- The reference id is a user supplied identifier that when set will replace messages with the same id on the user's device (so only the last version exists). It can be used to update or remove notifications.
122
+
- Media attachments are displayed together with the notification on the device and can be used to display images, e.g. a camera snapshot.
123
+
- Actions allow the user to interact with the notification, e.g. to open a specific page in the app or to send a command to an Item.
122
124
123
125
There are four different actions available:
124
126
@@ -127,14 +129,16 @@ There are four different actions available:
127
129
128
130
To specify media attachments and actions, there is another variant of the `sendNotification` and `sendBroadcastNotification` actions:
The additional parameter for these variants have the following meaning:
134
135
136
+
The additional parameter for these variants have the following meaning:
137
+
-`tag` : A user supplied tag to group messages for removing using the `hideNotificationByTag` action or grouping messages when displayed in the app. This renames the `severity` parameter, both are functionally identical.
135
138
-`title`: The title of the notification. Defaults to "openHAB" inside the Android and iOS apps.
139
+
-`referenceId`: A user supplied id to both replace existing messages when pushed, and later remove messages with the `hideNotificationByReferenceId` actions.
136
140
-`onClickAction`: The action to be performed when the user clicks on the notification. Specified using the [action syntax](#action-syntax).
137
-
-`mediaAttachmentUrl`: The URL of the media attachment to be displayed with the notification. This URL must be reachable by the push notification client.
141
+
-`mediaAttachmentUrl`: The URL of the media attachment to be displayed with the notification. This can either be a fully qualified URL, prefixed with `http://` or `https://` and reachable by the client device, or an image item with the format `item:MyImageItem`
138
142
-`actionButton1`: The action to be performed when the user clicks on the first action button. Specified as `Title=$action`, where `$action` follows the [action syntax](#action-syntax).
139
143
-`actionButton2`: The action to be performed when the user clicks on the second action button. Specified as `Title=$action`, where `$action` follows the [action syntax](#action-syntax).
140
144
-`actionButton3`: The action to be performed when the user clicks on the third action button. Specified as `Title=$action`, where `$action` follows the [action syntax](#action-syntax).
@@ -151,6 +155,7 @@ There are two types of actions available:
151
155
-`ui`: Controls the UI in two possible ways:
152
156
-`ui:$path` where `$path` is either `/basicui/app?...` for navigating sitemaps (using the native renderer) or `/some/absolute/path` for navigating (using the web view).
153
157
-`ui:$commandItemSyntax` where `$commandItemSyntax` is the same syntax as used for the [UI Command Item]({{base}}/mainui/about.html#ui-command-item).
158
+
-`http:` or `https:` : Opens the fully qualified URL in an embedded browser on the device
154
159
155
160
Examples:
156
161
@@ -160,6 +165,16 @@ Examples:
160
165
-`ui:/some/absolute/path`: Navigates to the absolut path `/some/absolute/path`.
161
166
-`ui:navigate:/page/my_floorplan_page`: Navigates Main UI to the page with the ID `my_floorplan_page`.
162
167
-`ui:popup:oh-clock-card`: Opens a popup with `oh-clock-card`.
168
+
-`https://openhab.org`: Opens an embedded browser to the site `https://openhab.org`
169
+
170
+
### Hide Notification Actions
171
+
172
+
There are also actions to hide existing notifications, either by `referenceId` or `tag` (formerly severity):
0 commit comments