Parameters to Handler
3 minute read
Parameters used to send a configuration to handlers.
Based on the the given configuration(via parameter) handler reacts
Form View

Parameter has two fields,
- to add new parameter click
+icon - to remove a parameter click
-icon Nameof 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
Note
All the parameter values supports template.With template we can update the value or part of the value dynamically.
Template Guide
Resource By Quick ID
Resource can be selected by their QuickID.
Form View

- Select a
Resource Type - enter the
idof 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 Delayis used to wait some time and perform the action.10s- Resource handler waits 10 seconds and sets this value.
Note
Pre delay parameters will be lost on the intermediate restart of the MyController server.
Example:
- You passed a resource parameter with pre delay as 1 hour.
- The parameter passed to resource handler service and this handler can perform the resource action exactly after 1 hour.
- This data is in resource handler service memory.
- If you restart your MyController service, that particular action will be lost and will not be executed.
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

YAML View
disabled: ''
type: resource_by_labels
data:
resourceType: field
labels:
group: lights
payload: 'on'
preDelay: 0s
Webhook
TBD
- 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

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
Textall the fields are optional - empty values are taken from Telegram Handler
- telegram supports different
Textparse modes,Text,Markdown,Markdown V2,HTML.
Important
All the syntax are supported fromMarkdown, Markdown V2, HTML.Refer Telegram API Guide for the detailed format options.
Form View

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
ProviderandRetention Count, all other inputs are optional - empty values are taken from the Backup Handler
- If you enter
Retention Countas0, the value will be taken from the Backup Handler
Restore
To restore a backup follow the Restore GuideForm View

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)