Skip to content

MessageTypes

Oddbjørn Bakke edited this page May 8, 2021 · 1 revision

Commands

Commands are methods you can call from your plugin, to invoke certain things in TouchPortal.

Connect

pair

Tells TouchPortal that the Plugin is ready to communicate.
Normally the first thing you do after connection, and is therefor a part of the connection procedure in this plugin.
What differences this SDK from some others, is that the connection waits for the info message to arrive before continuing code execution.

SettingUpdate

settingUpdate

Updates a setting in the TP UI. Might only work if the setting is readOnly.

CreateState

createState

Creates a new custom state. Will not be persistent between reboots.

RemoveState

  • removeState

Removes a custom state.

StateUpdate

stateUpdate

Updates a custom state.

ChoiceUpdate

choiceUpdate

This updates the dropdown lists in the action editor.
Without a instanceId, it will update all actions.
With a instanceId (normally as a reaction on OnListChangedEvent), updates only that single action being edited.

UpdateActionData

updateActionData

Changes the constraints of a input field in the action editor.

Events

TouchPortal Term: Dynamic Action structure
Events are messages you receive from TouchPortal, indication that something has happened that the plugin can react on.
You can read more about events in the API Documentation.

OnInfoEvent

info

On a successful pair, this event will be triggered.
Includes information about TouchPortal, and the initial Settings.

OnListChangedEvent

listChange

When user has the action editor in the TouchPortal UI open, and change a value in a dropdown.
Could be used with the instaceId to populate another dropdown with new data. See ChoiceUpdate.

OnBroadcastEvent

broadcast

OnSettingsEvent

settings

User have changed a setting of your plugin in the TouchPortal UI.

OnActionEvent

down up action

Indicates a action (button press) from the device.
You can use the Type to se if it's a hold or tap.
action is tap, down is pressing down, and up is releasing.
Action is configured in the On Pressed of the TP UI, and down/up from the On Hold. If both are configured, then action and up will be triggered.

OnClosedEvent

closePlugin

When the plugin is stopped from TouchPortal, might or might not be triggered.

Clone this wiki locally