Request
Subscribe to requests for information
Tip
Webview Kiosk also utilises the request-response pattern for manual query
of device information states.
This pattern is explained in:
1. Settings
1.1. Topic Name
All global variables are supported. For example,
wk/${USERNAME}/${APP_INSTANCE_ID}/requestDefault:
wk/request1.2. Quality of Service (QoS)
Quality of Service (QoS) ensures different message delivery guarantees in case of connection failures.
Default: At Most Once (0)
1.3. Retain Handling
Control whether Webview Kiosk should receive existing retained messages when subscribing.
Default: Do Not Send (2)
1.4. Retain as Published
Controls whether retained messages from the broker keep their original retained flag when delivered to the subscriber.
Default: false
2. Payload
In addition to the Shared Subscribe Payload Properties, the following properties can be provided for all requests:
| Property | Type | Description |
|---|---|---|
responseTopic | string (optional) | Topic the server should publish responses to. Global variables are supported. If empty, the response will be published to the configured response
topic name in settings
(default: This is provided as a fallback, and will be overridden by MQTT's V5 metadata (3.1.3.2.6. Response Topic) if both are provided. |
correlationData | string (optional) | Data to correlate the response with the request. In Webview Kiosk This is provided as a fallback, and will be overridden by MQTT V5 metadata (3.1.3.2.7. Correlation Data) if both are provided. In Webview Kiosk, the correlation data must be a |
2.1. Get Status
Retrieves device and app states.
Example payload:
{
"requestType": "get_status"
}2.2. Get Settings
Retrieves configured user settings of your choosing by providing an array of setting keys inside the payload data. This array could look like:
[
"device.rotation",
"appearance.theme"
]The values for the following settings will not be returned for security reasons:
device.custom_auth_passwordmqtt.connection.password
If no setting keys are provided, all valid settings will be returned.
2.2.1. Parse as Array
For the the following setting keys, which are stored as strings and delimited
by a new line (\n):
web_content.website_blacklistweb_content.website_whitelistweb_content.website_bookmarks
You can optionally use the object notation below with the parseAsArray property:
[
// Before
"web_content.website_blacklist",
// After
{
"key": "web_content.website_blacklist",
"parseAsArray": true
}
]which will return them as an array of strings split by new lines.
2.2.2. Evaluate Variables
For the following setting keys:
mqtt.connection.client_idmqtt.publish.event.topicmqtt.publish.response.topicmqtt.subscribe.command.topicmqtt.subscribe.settings.topicmqtt.will.topicmqtt.will.payload
You can optionally use the object notation below with the evaluateVariables property:
[
// Before
"mqtt.connection.client_id",
// After
{
"key": "mqtt.connection.client_id",
"evaluateVariables": true
}
]which will interpolates global variables with static values such as APP_INSTANCE_ID or USERNAME.
2.2.3. Example payload
{
"requestType": "get_settings"
}2.3. Get System Info
Retrieves device and app system information.
Example payload:
{
"requestType": "get_system_info"
}