Web, WebSocket, AMX, MQTT, KNX, and DoorBird
Use a connector for the connection settings, an action for an outgoing command, and a variable or datasource for incoming data. Start with Connector setup for the creation workflow and connection fields. This guide explains how the consumers use those connectors.
The workflows below cover AVstudio Editor NG 27.0.29. Configure the connector and its consumers, then test requests, commands, and incoming data against your service or device.
Choose the integration
| Integration | Connector file | Outgoing control | Incoming data |
|---|---|---|---|
| Web / HTTP | .web | HTTP method, URL, and payload | Web datasource |
| WebSocket | .websocket | Message payload | WebSocket datasource |
| AMX | .amx | Variable read/write not yet implemented | Live connection/status |
| MQTT | .mqtt | Topic, payload, and Retain | Topic-bound variable or MQTT datasource |
| KNX | .knx | BAOS datapoint, format, and value | Datapoint-bound variable |
| DoorBird | .doorbird | Device-specific control through the consuming control | Device/media features supported by the target runtime |
All connector references use the full project-root path, such as connectors/docs-broker.mqtt. Creating the connector alone does not attach it to an action or datasource.
Open an integration action in VS Code
- Select the intended element on the canvas.
- Open Element Properties → Actions → Create Action.
- Enter a descriptive Name and choose Behaviour, such as On Press for a button or On Change for a value control.
- Select the protocol tab and complete its available fields.
- Verify that the selected connector matches the protocol, then use Save action & close and save the page.
- Test in Live Preview or the deployed runtime, where interactions execute. Clicking the design canvas selects an element.
In the inspected build, switching from MQTT to KNX retained the previous MQTT connector path in the draft. Clear an incompatible selection and choose the correct connector before saving. If a searchable dropdown shows No data, clear its search text before concluding that no connector exists.
See Actions for events, timing, and editing existing actions.
Web / HTTP
Connection settings
Create a Web connector and configure Host and Headers. Each header has a key and value; for example, Accept: application/json requests JSON from an API that supports it. Use the headers required by your service.
The screenshot uses https://api.example.invalid, a placeholder rather than a working endpoint. Replace it with the service used by your project.
Configure an HTTP action
In the action editor, choose Web and configure the request:
- Select Web and GET, POST, PUT, DELETE, or PATCH.
- Select the required web Connector (
connectorUid, such asconnectors/docs-api.web). - Enter an optional URL postfix (
requestUrl), such as/api/rooms. The runtime appends it to the connector Host; leave it empty to call the Host itself. - For POST, PUT, or PATCH, enter Request body (
value). GET and DELETE send no body. - Save and test against your API. Inspect the request, response status, and receiving service.
For example, Host https://api.example.invalid plus postfix /rooms/1 targets https://api.example.invalid/rooms/1. Replace the placeholder with a real service. Action fields support dynamic tokens within their host scope; see Send values.
Migration from older actions: move a full base address out of requestUrl into the .web connector Host, select that connector, and retain only the postfix.
onResponseOk and onResponseError store action UUID arrays, but the 27.0.29 runtime does not execute these response chains. HTTP requests execute and log status; do not use an arbitrary delay as a response check.
Read data for the interface
For API data displayed by an element, create a datasource and choose its Web remote source. Configure the connector and URL postfix there. Its project fields include remoteFetchType: "web" and webConnectorUid.
Inspect the returned JSON before attaching display fields. Check whether it is an object, an array, or an object containing an array; that determines the filter and field paths. See Datasources for the VS Code setup, filtering, and attachment workflow.
WebSocket
Since 27.0.2, .websocket connectors run in Live Preview and production builds. The design canvas does not open the connection.
Configure the connection
Create a WebSocket connector, then set Host, optional Port, Path, Secure connection, and Reconnect Timeout (milliseconds; default 5000). A bare host uses ws:// or wss:// according to the secure flag; a missing leading slash on Path is added. The driver reconnects after abnormal closure; normal close code 1000 does not trigger automatic reconnect. Authentication headers and subprotocol fields are not part of this connector schema.
Receive JSON
Incoming messages must be valid JSON. Set a root-relative path such as payload.temperature or items[0].name; the form displays root. as a prefix, but the stored path does not include that prefix. An empty path selects the whole message. A missing path leaves that consumer unchanged.
| Consumer | Configuration |
|---|---|
| Datasource | Websocket source, selected connector (wsConnectorUid), and message path (wsMessagePath). remoteFetchType is websocket; messages push updates without polling. |
| Global variable or page parameter | External value setter for the WebSocket connector; externalBinding.kind: "websocket", connectorName, and path. Point to a scalar matching the variable type; objects/arrays are ignored for variables. |
For {"payload":{"temperature":22,"rooms":[{"name":"Boardroom"}]}}, use payload.temperature for a numeric variable and payload.rooms for a datasource driving a Subpage List. Consumers share messages on the same connector; there is no per-consumer topic/type discriminator. Separate streams using distinct paths or separate connectors.
Send a message
In an element action, select WebSocket, choose ws Connector, and enter Message. Save the action/page and test in Live Preview. Stored fields are type: "ws", connectorUid, and value.
The transport sends the resulting Message string as its body. Action-field tokens resolve according to the action host's scope before sending; JSON mode supports element context markers such as @context:pressedButton@ for Dpad. See JSON action bodies. If the socket is disconnected, the send is skipped and logged rather than queued. Inspect receipt on the server and test receive, send, and reconnection separately.
The generated avstudio-guide includes WebSocket connector, datasource, variable/parameter binding, and sending examples. Use the action host scope described in Actions when inserting dynamic message fields.
AMX
Create an AMX connector and configure its Host, optional Port, Room, Key, Username, Password, security, and timeouts. Since 27.0.3 the runtime opens an authenticated WebSocket connection, reconnects after unexpected closure, and sends keepalive messages. Inspect its live state in the Connectors tab. Creation and connection support do not imply complete AMX control: variable get/set is not wired up in 27.0.5. See AMX connector fields.
MQTT
Configure the broker
Create an MQTT connector and fill in the broker's host, port, path, credentials, and secure-connection settings. Use the broker transport supported by the deployed web runtime; a plain TCP listener is not automatically usable by a browser.
The connector's Reconnect value is in milliseconds, while MQTT Keepalive is in seconds. The generated defaults are 5000 ms and 60 seconds respectively. See Connector setup for the field-by-field reference.
Publish from a button
- Open the button's action form and select MQTT.
- Choose the MQTT Connector. Create new opens the connector creation workflow if needed.
- Enter the exact Topic, for example
demo/room/light/set. - Enter the Value expected by the subscriber, for example
ON. - Choose Retain deliberately, then save the action and page.
The sample connector is a configuration template, not a connected broker. The draft shown above has no action name yet; name the action before saving your real configuration.
| Field | What it controls |
|---|---|
| Connector | Which broker configuration the action uses. |
| Topic | Destination topic; it is separate from the broker host and path. |
| Value | Published payload. ON, true, and 1 are different payload conventions; use the subscriber's contract. |
| Retain | Requests retained-message behaviour. Consider what a new subscriber should receive before retaining a command. |
For a Slider, use the appropriate change event and event-value behaviour instead of a fixed payload when the outgoing value should follow the thumb. See Actions.
Receive state
Open global.variables, choose the MQTT connector in the variable's External value setter, and configure the feedback topic. Alternatively, use an MQTT datasource with mqttConnectorUid and mqttTopic when the message contains structured display data.
A useful design is to publish a request to demo/room/light/set and subscribe to the device's reported state at demo/room/light/state. These are example names, not a required convention. Confirm the actual topic names and payload types with the device or service.
Check both directions independently: observe the outgoing payload at a subscriber, then publish a known state message and verify the interface updates. Also test what appears after reconnecting, including retained messages.
KNX
Gateway and datapoints
The documented NG connector uses BAOS (connectionType: "baos") for a BAOS 777 gateway. Configure the gateway endpoint and credentials in the connector. Obtain the datapoint IDs and types from the gateway/project configuration.
An action addresses a BAOS Datapoint ID. Do not enter a KNX group-address string in this numeric field or assume its number is interchangeable with a datapoint ID.
Configure a write action
- Open Element Properties → Actions → Create Action and select KNX.
- Select the KNX Connector, or use Create new to create one.
- Enter Datapoint ID.
- Select Format to match that datapoint.
- Configure Value, then save and test against the gateway.
This screenshot deliberately shows an incomplete draft: Please select a KNX connector is a validation message, and the datapoint still needs an ID. With DPT1 – 1-bit binary selected, the form exposes True, False, and Toggle.
| Format offered by NG | Value category |
|---|---|
DPT1 | 1-bit boolean |
DPT5.001 | 8-bit percentage (0–100) |
DPT5.010 | 8-bit unscaled counter (0–255) |
DPT7, DPT8, DPT9, DPT12, DPT13, DPT14 | Numeric formats; match the gateway's specific type, units, and range. |
DPT16 | String |
The saved action fields are connectorUid, knxDatapointId, knxFormat, and value. For feedback, variable bindings use the connector, datapoint ID, and format too. Attach that variable to the display or mode selector so the interface can follow externally changed state.
Verify writes and feedback separately. A successful write does not by itself configure the display binding, and an incorrect format can produce an unexpected value even when the gateway is reachable.
DoorBird
Configure one connector per station
- Create a DoorBird connector with a descriptive device name.
- Enter the station host and DoorBird application credentials required by that device.
- Configure security and port. An empty port selects the protocol default: 80 for HTTP or 443 for HTTPS.
- Save the connector and reference that station from the supported consuming control.
For two stations, create two .doorbird files. Keep the device selection separate from the relay selection. The connector stores the connection; the consuming button/widget selects the relay rather than using a custom top-level relay field in the connector.
Configure station operations through a supported consuming control. Selecting a DoorBird connector alone does not configure relay commands or video playback; verify both workflows on the intended runtime.
Check control and media separately
Confirm station reachability and credentials first. Then verify the selected relay/control path and, separately, live-view permissions and media support on the intended device. A successful control request does not prove that a video stream can play in a normal browser. See the Video guide.
If the station reports authentication or busy errors, inspect the credentials and request frequency before retrying. Test each configured station individually so that similarly named connector files do not direct commands to the wrong device.
Verify and troubleshoot
Before testing, save the connector and its consuming document, then run Run Project Health Check to catch invalid references. Use a real target or test service you control to verify communication.
| Symptom | What to inspect |
|---|---|
| Connector absent from a picker | File extension/type, project-root location, matching protocol tab, and any text filtering the picker. |
| Wrong connector shown after changing tabs | Clear the previous selection and choose a connector for the new protocol. |
| Web action only shows method buttons | Check the installed version; 27.0.3+ exposes connector, URL postfix, and method-specific body fields. |
| WebSocket message has no effect | Check connector status, Message, server receipt, and the action host's dynamic scope. |
| Interface shows a default but never updates | Incoming binding/topic/datapoint and payload type; a default is not received feedback. |
| MQTT command not received | Broker transport, topic spelling, authentication, payload, and subscriber configuration. |
| KNX writes an unexpected value | Datapoint ID, format, units, range, and event value versus fixed Value. |
| Data arrives but nothing displays | Datasource result shape, filters, attached datasource, and field paths. |
| Works locally but fails on the target | Target reachability, transport/security, credentials, and media/runtime support. |
Action payloads do not automatically substitute display tokens such as $variable$ or %parameter%. Use the supported change-value mechanism for interaction values, and inspect the actual transmitted payload during integration testing.




