Skip to main content
Version: 1.0

Button

The virtual Button component is used to store a list of components keys. It uses Button as RPC namespace and has the following methods:

Methods

Button.SetConfig

PropertyTypeDescription

id

number

Id of the component instance Required

config

object

Configuration that the method takes Required

Find more about the config properties in config section

Button.GetConfig

Properties:

PropertyTypeDescription

id

number

Id of the component instance Required

Find the Button.GetConfig response properties in config section

Button.Trigger

Properties:

PropertyTypeDescription

id

number

Id of the component instance Required

event

string

Event name. Range of values: single_push, double_push, triple_push, long_push Required

Configuration

The configuration of the Button component contains properties of how it will be rendered in the UI. To Get/Set the configuration of the Button component its id must be specified.

Properties:

PropertyTypeDescription

id

number

Id of the component instance

name

string or null

Name of the component instance

meta

object

Object for storing meta data

ui

object

Properties of how the component will be rendered in the UI

Status

The status of the Button component is empty.

Webhook Events

Currently, these are the events related to the Button component that can trigger webhooks:

  • button.single_push
  • button.double_push
  • button.triple_push
  • button.long_push

Examples

Button.SetConfig example

http://192.168.33.1/rpc/Button.SetConfig?id=200&config={"name":"Button 1"}

Response

{
"restart_required": false
}

Button.GetConfig example

http://192.168.33.1/rpc/Button.GetConfig?id=200

Response

{
"id": 200,
"name": "Button 1",
"meta": null
}

Button.Trigger example

http://192.168.33.1/rpc/Button.Trigger?id=200&event="single_push"

Response

null