WebSocket data service
The WebSocket data service lets other applications (SCADA, dashboards, MES, historians, scripts) read live tag values from WiConnector, and optionally write them. It runs on its own port, separate from the web UI, and is off until you turn it on.

Set it up on the Services page: services are listed on the left (WebSocket, MQTT publishers; an OPC UA server is planned), and WebSocket opens its settings on the right. Developers of client applications should read the WebSocket API reference.
Turn it on
- Open Services and choose WebSocket in the list on the left.
- In Listener, choose the protocol, address, port and path (below), switch it on and press Save and apply.
- The page shows the address clients connect to, for example
ws://plant-pc:5090/data, or the error if it could not start (for example when the port is in use).
| Setting | Default | Meaning |
|---|---|---|
| Protocol | HTTP (ws://) | HTTPS gives an encrypted wss:// connection |
| Listen on | All networks (0.0.0.0) | 127.0.0.1 allows only programs on this computer; or pick one IP address |
| Port | 5090 | Must differ from the web UI port (5080). Allow it through the firewall for other computers |
| Path | /data | Part of the address after the port |
| Publish interval | 250 ms | How often changes are sent; only the latest value of each tag is sent |
| Max clients | 50 | Connections beyond this are refused |
HTTPS certificates
With HTTPS, give the path and password of a .pfx certificate file. Browse… picks the file on your own
computer and uploads it to WiConnector (data/certificates), or you can type a path on the WiConnector computer. If you leave the path empty, WiConnector
creates a self-signed certificate in data/gateway/. Clients must then be told to trust it (or to skip
certificate checks), so use a real certificate in production.
API keys
Each application gets its own key, so you can control what it sees and switch it off without affecting others.
- In API keys, choose New key.
- Enter a name (e.g.
scada), tick the groups and tags it may read in the tag tree, and set Can write if it may write. - Copy the key that is shown. It is shown only once; WiConnector stores only a fingerprint of it. If it is lost, delete the key and create a new one.
You can edit a key's name, patterns and write permission, disable it, or delete it at any time. Clients using a key that is disabled or deleted are disconnected at once. The list shows when each key was last used.
Tag patterns

One pattern per line; capital letters do not matter:
| Pattern | Matches |
|---|---|
Plant/Line1/Pump1/Speed | That one tag |
Plant/Line1/*/Speed | Speed of every item directly in Line1 |
Plant/** | Everything under Plant |
** | Every tag |
!**/Setpoint | Excludes every Setpoint tag (exclusions win) |
The tag tree writes these patterns for you: a ticked group becomes Group/**, so tags added to it later are included
too, and a ticked tag becomes its full path. A group shows a dash when only some of its tags are selected; All and
None select everything or nothing, and the search box finds groups and tags. For wildcards such as
Plant/*/Speed or exclusions, click Edit as patterns and type them. The tree then shows which tags they match.
The page shows how many tags the patterns match as you type.
Writing needs three things: the key's Can write option, a pattern that matches the tag, and the tag's access set to Read and write.
Access without a key
Optional. When Access without a key is on, clients that send no key can read the tags matching its patterns (never write). Use it only on trusted networks.
Allowed browser origins
If web pages on other sites connect from a browser, you can list the sites allowed to do so, e.g.
https://dashboard.example.com. Leave empty to allow any.
Connected clients
Connected clients lists who is connected now, from where, with which key, and how many messages they have been sent. Connections, refusals and writes are also logged under Logs → Communication, source WebSocket.
Testing the connection
The quickest check is a WebSocket test tool such as a browser extension or wscat.
With a WebSocket test tool, connect to the address shown on the page with the key added:
ws://127.0.0.1:5090/data?key=wic_your_full_key
On success you receive a welcome message. Then send
{"type": "subscribe", "tags": ["**"]}
to get every tag's current value at once, followed by a data message whenever values change (every publish
interval at most). The optional id in requests is only copied into the reply, so programs can match replies to
requests; it can be left out or reused. If the connection is refused, the first message says why (for example "An API key is required"); see
Troubleshooting.