Parameters to Handler

Parameters used to send a configuration to handlers.
Based on the the given configuration(via parameter) handler reacts

Form View

parameters to handler

Parameter has two fields,

  • to add new parameter click + icon
  • to remove a parameter click - icon
  • Name of the field should be unique. There is no special meaning for the name. use it as your reference.
  • Value - value can be one of the type mentioned here. To update a value click on edit icon
YAML View

In YAML view, the data is encoded with base64 format to avoid syntax issues.

handlerParameters:
  run_backup: >-
    {"type":"backup","disabled":"","data":"cHJvdmlkZXJUeXBlOiBkaXNrCnNwZWM6CiAgc3RvcmFnZUV4cG9ydFR5cGU6IHlhbWwKICByZXRlbnRpb25Db3VudDogNQogIHRhcmdldERpcmVjdG9yeTogJycKICBwcmVmaXg6ICcnCg=="}    
  turn_on_light: >-
    {"type":"resource_by_quick_id","disabled":"","data":"cmVzb3VyY2VUeXBlOiBmaWVsZApxdWlja0lkOiB0YXNtb3RhLnRhc21vdGFfODg3NDIxLkNvbnRyb2wuUE9XRVIKcGF5bG9hZDogJ29uJwpwcmVEZWxheTogMTBzCg=="}    

Parameter Types

Parameter types are based on the supported handlers.

Disabled is a common field across all type of parameters.

  • a parameter can be enabled or disabled dynamically.
  • can be disabled by setting this field as true
  • default value for this field is false

Resource By Quick ID

Resource can be selected by their QuickID.

Form View

resource by quick id

  • Select a Resource Type
  • enter the id of the resource, you will get a list of matching resources. Select a resource.
  • on the payload update the action or value you want to set to the selected resource
  • Pre Delay is used to wait some time and perform the action. 10s - Resource handler waits 10 seconds and sets this value.
YAML View
disabled: ''
type: resource_by_quick_id
data:
  resourceType: field
  quickId: tasmota.tasmota_887421.Control.POWER
  payload: 'on'
  preDelay: 10s

Resource By Labels

  • This is exactly same as Resource By Quick ID.
  • The only different is, selecting resources by Labels
  • When filtering with labels it possible to get more than on resource.
  • Particular action will be applied to all the resources filter by labels.
Form View

resource by labels

YAML View
disabled: ''
type: resource_by_labels
data:
  resourceType: field
  labels:
    group: lights
  payload: 'on'
  preDelay: 0s

Webhook

TBD

Email

  • All the fields in email parameter is optional.
  • If non of the fields entered here, taking all the fields from the Email Handler
  • The field enter here is taken, for empty values updates from the Email Handler
Form View

resource by quick id

YAML View
disabled: ''
type: email
data:
  from: example@example.com
  to:
    - example1@example.com
    - example2@example.com
  subject: 'Alert: Overheat detected on CPU'
  body: |-
    Alert: Overheat detected on CPU.
    Check the status of the CPU Fan.    

Telegram

  • other than the Text all the fields are optional
  • empty values are taken from Telegram Handler
  • telegram supports different Text parse modes, Text, Markdown, Markdown V2, HTML.
Form View

resource by quick id

YAML View
disabled: ''
type: telegram
data:
  chatIds:
    - '20000000'
    - '-4000000'
  parseMode: Text
  text: |-
    Alert: Overheat detected on CPU.
    Check the status of the CPU Fan.    

Backup

Backup parameter used to execute a backup via a schedule or from a task.

  • Other than the Provider and Retention Count, all other inputs are optional
  • empty values are taken from the Backup Handler
  • If you enter Retention Count as 0, the value will be taken from the Backup Handler
Form View

resource by quick id

YAML View
disabled: ''
type: backup
data:
  providerType: disk
  spec:
    storageExportType: yaml
    targetDirectory: /mc_home/backups
    prefix: scheduled
    retentionCount: 10
Last modified May 13, 2021: add new pages (f8016b7)