WLWebview Kiosk
SettingsMQTT

Connection

Specify how to connect to the broker server

The settings below are modeled after HiveMQ client library's documentation for client configurations and mqtt operations -> connect.

1. Server Host

The hostname or IP address of the MQTT broker the app should connect to.

For example,

  • 192.168.1.190
  • broker.hivemq.com
  • broker.emqx.io

Default: 127.0.0.1

2. Server Port

The port of the MQTT broker the app should connect to.

Typically,

  • 1883: MQTT (TCP)
  • 8883: MQTTS (TCP with SSL/TLS)
  • 80: WS (WebSocket, same port as HTTP)
  • 443: WSS (WebSocket Secure, same port as HTTPS)

Default: 1883

3. Use TLS

When enabled, the client will connect securely to the broker using TLS. Ensure the broker supports TLS on the configured port.

Default: false

4. Username

The username used to authenticate with the MQTT broker.

Default: (blank)

5. Password

The password used to authenticate with the MQTT broker.

Default: (blank)

6. Client ID

A unique identifier for this client when connecting to the MQTT broker.

Leave this field blank if you want the broker server to generate a client ID for Webview Kiosk.

Global variables are supported.

Default: (blank)

7. Clean Start

When enabled, the MQTT client will start a new session on connect, discarding any previous session state stored by the broker.

When disabled, the client will resume the previous session (subscriptions, in-flight messages, etc.) if it exists.

Default: true

8. Keep Alive

The time interval (in seconds) in which the client sends a ping to the broker if no other MQTT packets are sent during this period of time.

It is used to determine if the connection is still up.

Default: 60

9. Connect Timeout (seconds)

The timeout between sending the Connect and receiving the ConnAck message.

Use 0 to disable the timeout.

Default: 30

10. Socket Connect Timeout (seconds)

The timeout for connecting the socket to the server.

Use 0 to disable the timeout.

Default: 5

11. Automatic Reconnect

When enabled, attempt to automatically reconnect to the MQTT broker after an unexpected disconnect.

In Webview Kiosk, this is implemented linearly at a fixed 3-second interval.

Default: true

12. Use WebSocket

When enabled, the client will connect securely to the broker using TLS. Ensure the broker supports TLS on the configured port, e.g.

  • 80: WS (WebSocket, same port as HTTP)
  • 443: WSS (WebSocket Secure, same port as HTTPS)

You should only enable WebSocket when strictly necessary, as it will consume more resources. A valid use case would be when you are connected to a network with a firewall that blocks non-standard ports like 8883.

Default: false

12. WebSocket Server Path

The path the MQTT broker WebSocket server listens on.

Must start with a /.

Default: /mqtt

On this page