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
Copy file name to clipboardexpand all lines: configuration/websocket.md
+38
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,43 @@ A new filter message always overrides the settings before.
119
119
The default setting is no filter, i.e. all events from all sources.
120
120
It is recommended to at least set a source filter for the client itself to prevent event reflection.
121
121
122
+
#### Filter by topic (`openhab/websocket/filter/topic`)
123
+
124
+
Topic filters can be used to include and/or exclude events of a specific topic from the event stream.
125
+
They can be applied both inclusive and exclusive, and provide API compatibility with the existing topic filter functionality of the SSE event stream.
126
+
127
+
Topics usually start with `openhab` and are split into several segments separated by an `/`, e.g. `openhab/items/MyItem/command` to listen to commands to `MyItem`.
128
+
You may use `*` as a wildcard for a topic segment.
129
+
To exclude a topic, start it with a `!`.
130
+
131
+
When sending only exclude topics, all events except those excluded are sent.
132
+
In other cases, only events of the selected topics are sent, whereas exclude topics can be used to filter out a subset of the selected events.
133
+
134
+
The payload of the event contains a list of string with the topics:
0 commit comments