Skip to content

User Guide: Websocket Agent

Wouter Born edited this page Jun 24, 2024 · 6 revisions

Note

This wiki page has been migrated to the following documentation page:

https://docs.openremote.io/docs/user-guide/agents-protocols/websocket-agent

Please update your bookmarks.

Connect to a Websocket (ws/wss) Server.

Agent configuration

The following describes the supported agent configuration attributes:

Attribute Description Value type Required
connectURL Websocket connection URL (ws/wss); this is used as the base URL for all requests that go through this agent HTTP URL Y
connectHeaders Headers to be added to the initial connection request Multivalued Text Map N
connectSubscriptions List of subscriptions that should be made when the protocol connects to the websocket server Websocket Subscription[] N

Websocket Subscriptions

The subscription attribute allows a set of subscriptions to be made when the connection is first established, these subscriptions are executed in the order they appear in the list/array. A subscription can be a Websocket subscription or a HTTP subscription (a simple HTTP request), this covers most real world websocket server use cases, as this is a publish-subscribe protocol you quite often need to specify what you want to subscribe to when you connect.

Agent link

For attributes linked to this agent, the following describes the supported agent link fields which are in addition to the standard Agent Link fields:

Field Description Value type Required
type Agent type Text (Must be WebsocketAgentLink) Y
websocketSubscriptions List of subscriptions that should be made when this attribute is linked to the agent Websocket Subscription[] N

Clone this wiki locally