This the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

User Interface

TBD

1 - Toolbar

Toolbar component contains various elements like filters, Action Buttons, Quick Buttons.
Toolbar will be placed on top of all the list resources page.
toolbar

Filters

filter1

  • By clicking the Filters button you can see the list of available filter options
  • Each filter is a field on the resource
  • Selecting more than one filter applies AND logic
  • By selecting a filter you can see one of the following filter
    • Text input filter
    • Selection filter
    • Labels filter

Text input filter

This filter works in two different modes

  • Regex
    • In this mode performs case insensitive and is the value contains search
  • Is In
    • When supplying same option filter more than once, filter mode for that field switch to Is In
    • Verifies that particular field has one of the input filter2

Selection filter

This filter works same as Text input filter

Labels filter

Label filter is a special filter used to filter a resource by labels.
You can supply label in the format of key=value

Examples:

  • location=external
  • zone=south
  • version=2.0.2

Action Buttons

  • By selection one or more number of row, the action buttons drop down will be enabled
  • Selecting an action on the dropdown apply to all the selected resources
    action_buttons

Quick Buttons

  • Couple of quick buttons will be on the toolbar
    • refresh button - Refresh button, reloads the resources from the server
    • add button - Add button, takes to add resource page

2 - Resources

resources

Resources are the key components in MyController.

Gateway

Gateway is the entry and exit point in MyController. It connects your network and MyController.

Node

Node is a kind of end point in the sensor world.

Source

Source is a single or group of fields

Field

Field is a final measurement point

Example

  • Take a couple ESP8266 boards
  • Those ESP8266 boards can be operated via MQTT protocol
  • Each board has sensors like, temperature, humidity, relay, push button, etc.,
  • Now relate with MyController resources
    • All the boards can be connected via MQTT to MyController - is called gateway
    • A board is a endpoint - is called node
    • temperature, humidity, etc., measurements are called field
    • group of fields or a single field goes under a source

2.1 - Gateway

MyController supports different type of providers network.
Each network can be connected to MyController via a gateway.
Gateway can be added/updated/deleted from the Resources >> Gateway page

Supported Providers list

Common Configurations

  • Form View gateway-settings

  • YAML View

    id: mysensor # (1)
    description: MySensors gateway # (2)
    enabled: true # (3)
    reconnectDelay: 15s # (4)
    labels: # (5)
      location: core # (6)
    
    1. id of the gateway. You cannot modify this field later
    2. description of the gateway
    3. enabled - You can enable or disable to disconnect from provider network.
    4. reconnectDelay - if the gateway disconnected from the provider network for some reason, will be reconnected automatically after this delay
    5. labels - labels are a key value pair used across the system
    6. labels.location this is a kind of filter used to restrict to run this gateway to a specific location(s)

Power of the labels

We can restrict to load a gateway to the specific host.

For example you are running gateway service on multiple hosts and all the gateway service connected to MyController via message bus. you have connected a serial port on Host B. When you add a gateway configuration on MyController, it sends the configuration details to all the gateway listener services. So all the gateway listeners are try to look that serial port on their hosts. expect from Host B all other gateway reports failed to load. To avoid these kind of situation, we have introduced labels. When we start a gateway service on a host, include label based filter. That gateway service listens only it is own configuration.

gateway setup

In the above setup, if we include labels as location=gw2 on the configuration, It loads on the Host C gateway service. Other gateways from the different hosts will ignore this configuration.

Provider Configurations

Message Logger Configurations

Message logger is recording received and transmitted messages.

Type of Message Logger

  • None - disable message logging system
  • File Logger - records the messages into a file (disk)
  • Form View gateway-settings

  • YAML View

     messageLogger:
      type: file_logger # (1)
      flushInterval: 5s # (2)
      logRotateInterval: 6h # (3)
      maxSize: 1MiB # (4)
      maxAge: 24h # (5)
      maxBackup: 3 # (6)
    
    1. messageLogger.type message logger type. support file_logger and none
    2. messageLogger.flushInterval how long once received message to be dumped to disk from memory
    3. messageLogger.logRotateInterval creates new file after this interval
    4. messageLogger.maxSize if the size reaches the maxSize, creates new file
    5. messageLogger.maxAge if the age reaches the maxAge, creates new file
    6. messageLogger.maxBackup retention files count

2.2 - MySensors

MySensors is an open source hardware and software community focusing on do-it-yourself home automation and Internet of Things. To know more about MySensors network follow this link

Provider Specific key points

  • In a network MySensors can have maximum of 254 nodes
  • node id 0 is always a gateway node
  • node id 1 to 254 can be allocatable to any node
  • Supported features in MyController
    • OTAfeatures / Firmware update
    • reboot a node
    • reset a node
    • get a node info
    • discover nodes
    • Heartbeat request
    • Response to internal message like I_TIME, I_CONFIG, I_ID_REQUEST
    • Assigns NodeId if nodeId set as AUTO on a node

Not implemented / supported features (that is supported on MyController 1.x)

  • Handle sleeping nodes
  • There is no node alive check

Common Configuration

  • Form view gateway-mysensors-provider

  • YAML View

    provider:
      type: mysensors_v2 # (1)
      enableInternalMessageAck: true # (2)
      enableStreamMessageAck: false # (3)
      retryCount: 3 # (4)
      timeout: 1s # (5)
    
    1. type should be selected as mysensors_v2
    2. enableInternalMessageAck enable acknowledgement for internal messages
    3. enableStreamMessageAck enable acknowledgement for streaming messages. ie: OTA/firmware messages
    4. retryCount - if do not receive the acknowledgement on the specified timeout, keeps resend the message till it reaches the retryCount
    5. timeout - wait for the acknowledgement till this timeout

Protocols

MySensors gateway supports the following protocols

Protocol Configuration - MQTT

  • Form view gateway-mysensors

  • YAML View

    provider:
      protocol:
        type: mqtt # (1)
        transmitPreDelay: 15ms # (2)
        broker: tcp://192.168.1.21:1883 # (3)
        insecureSkipVerify: false # (4)
        username: '' # (5)
        password: '' # (6)
        subscribe: out_rfm69/# # (7)
        publish: in_rfm69 # (8)
        qos: 0 # (9)
    
    1. type type of the protocol. here it should be mqtt
    2. transmitPreDelay - wait till this time to avoid collision and sends the data to provider network
    3. broker mqtt broker url
    4. insecureSkipVerify if you want to skip the insecure ssl, enable this option
    5. username username of the mqtt broker. if it is anonymous leave it as a blank
    6. password if username supplied, password should be supplied. otherwise leave it as a blank
    7. subscribe topic to be subscribed to get messages from MySensors gateway
    8. publish topic to be used to post data from MyController to MySensors network
    9. qos MQTT qos

Protocol Configuration - Serial

  • Form view gateway-mysensors-serial

  • YAML View

    provider:
      protocol:
        type: serial # (1)
        transmitPreDelay: 15ms # (2)
        portname: /dev/ttyUSB0 # (3)
        baudrate: 115200 # (4)
    
    1. type of the protocol. here it should be serial
    2. transmitPreDelay - wait till this time to avoid collision and sends the data to provider network
    3. portname name of the serial port
    4. baudrate baud rate of the serial port

Protocol Configuration - Ethernet

  • Form view gateway-mysensors-serial

  • YAML View

    provider:
      protocol:
        type: ethernet # (1)
        transmitPreDelay: 15ms # (2)
        server: tcp://192.168.1.42:5000 # (3)
        insecureSkipVerify: false # (4)
    
    1. type of the protocol. here it should be ethernet
    2. transmitPreDelay - wait till this time to avoid collision and sends the data to provider network
    3. server ethernet server address with port
    4. insecureSkipVerify if you want to skip the insecure ssl, enable this option

2.3 - Tasmota

Tasmota is an Open source firmware for ESP8266 devices

Common Configuration

  • Form view gateway-provider-tasmota

  • YAML View

    provider:
      type: tasmota # (1)
    
    1. type should be selected as tasmota

Protocols

Tasmota gateway supports the following protocols

Protocol Configuration - MQTT

  • Form view gateway-tasmota-mqtt

  • YAML View

    provider:
      protocol:
        type: mqtt # (1)
        transmitPreDelay: 15ms # (2)
        broker: tcp://192.168.1.21:1883 # (3)
        insecureSkipVerify: false # (4)
        username: '' # (5)
        password: '' # (6)
        subscribe: jktasmota/# # (7)
        publish: jktasmota # (8)
        qos: 0 # (9)
    
    1. type type of the protocol. here it should be mqtt
    2. transmitPreDelay - wait till this time to avoid collision and sends the data to provider network
    3. broker mqtt broker url
    4. insecureSkipVerify if you want to skip the insecure ssl, enable this option
    5. username username of the mqtt broker. if it is anonymous leave it as a blank
    6. password if username supplied, password should be supplied. otherwise leave it as a blank
    7. subscribe topic to be subscribed to get messages from MySensors gateway
    8. publish topic to be used to post data from MyController to MySensors network
    9. qos MQTT qos

MQTT configuration on the Tasmota node

tasmota-node

The following changes needs to be updated on the Tasmota node MQTT settings to connect with MyController

  • Topic - should be updated as tasmota_%06X
  • Full Topic - should be updated as jktasmota/%prefix%/%topic%/
    • here jktasmota can be any name, should be in lowercase and special characters are not allowed

To know more about MQTT settings on Tasmota follow this guide

2.4 - PhilipsHue

PhilipsHue is smart home lighting.
To know more about PhilipsHue developer API follow this link

Configuration

  • Form view gateway-philipshue

  • YAML View

    provider:
      type: philips_hue # (1)
      host: http://192.168.1.34:80 # (2)
      username: myhueuser # (3)
      syncInterval: 10m # (4)
      bridgeSyncInterval: 10m # (5)
    
    1. type should be selected as philips_hue
    2. host - PhilipsHue bridge address to communicate
    3. username of the PhilipsHue bridge
    4. syncInterval - polls the connected devices status from the PhilipsHue bridge
    5. bridgeSyncInterval - gets the PhilipsHue bridge configurations on this interval

2.5 - System Monitoring

System Monitoring is an internal plugin developed and maintained by MyController

Configuration

  • Form view gateway-system-monitoring
  • YAML View
    provider:
      type: system_monitoring # (1)
      hostIdMap: {} # (2)
      hostConfigMap: {} # (3)
    
    1. type should be selected as system_monitoring
    2. hostIdMap - is a group of key value map
    3. hostConfigMap configurations of monitoring resources

Host ID Map Configuration

Host ID Map (hostIdMap) is used to map the real host id with a friendly name

Samples:

be0164ad-6f25-4448-b691-567946392b47: rpi_1
a574ac8d-4c9f-40d6-b0ce-bbc7d98cd87d: rpi_2

Here be0164ad-6f25-4448-b691-567946392b47 is the actual id of the host and it is mapped with rpi_1. If data received from this node, The node name will be as rpi_1

Host Config Map Configuration

Host Config Map (hostConfigMap) is used to configure a specific node(s)

rpi_1: # (1)
  disabled: false # (2)
  cpu: # (3)
    interval: 1m
    cpuDisabled: false
    perCpuDisabled: false
  disk: # (4)
    interval: 1h
    disabled: false
    data:
      disk_root:
        disabled: false
        name: "Root"
        path: /root
        unit: MiB
      disk_storage:
        disabled: false
        name: "Storage"
        path: /storage
        unit: MiB
  memory: # (5)
    interval: 1m
    memoryDisabled: false
    swapMemoryDisabled: false
    unit: MiB
  process: # (6)
    interval: 1m
    disabled: false
    data:
      influxd:
        disabled: false
        name: "InfluxDB"
        unit: MiB
        filter:
          cmdline: influxd
      adguard:
        disabled: false
        name: "AdGuard"
        unit: MiB
        filter:
          cmdline: >-
            /opt/adguardhome/AdGuardHome --no-check-update -c
            /opt/adguardhome/conf/AdGuardHome.yaml -h 0.0.0.0 -w
            /opt/adguardhome/work            
      mycontroller:
        disabled: false
        name: "MyController"
        unit: MiB
        filter:
          cmdline: /app/mycontroller-all-in-one -config /app/mycontroller.yaml
      natsio:
        disabled: false
        name: "NatsIO"
        unit: MiB
        filter:
          cmdline: nats-server --config /etc/nats/nats-server.conf
      proc_gw:
        disabled: false
        name: "MYC GW"
        unit: MiB
        filter:
          cmdline: ./mycontroller-gateway -config gateway.yaml
  temperature: # (7)
    disabledAll: false
    interval: 30s
    enabled: []
rpi_2: # (1)
  cpu:
    # ...
  1. node_id - id of the node or host
  2. disabled - set true to disable data from this node. default value: false
  3. cpu configurations
  4. disk configurations
  5. memory configurations
  6. process configurations
  7. temperature configurations

CPU Configurations

cpu:
  interval: 1m # (1)
  cpuDisabled: false # (2)
  perCpuDisabled: false # (3)
  1. interval - metric measurement interval
  2. cpuDisabled - disable overall CPU metrics data
  3. perCpuDisabled - disable individual CPU(s) metrics data

Disk Configurations

disk:
  interval: 1h # (1)
  disabled: false # (2)
  data: # (3)
    disk_root: # (4)
      disabled: false # (5)
      name: "Root" # (6)
      path: /root # (7)
      unit: MiB # (8)
    disk_storage:
      disabled: false
      name: "Storage"
      path: /storage
  1. interval - metric measurement interval
  2. disabled - disable the all the disk metrics
  3. data - is a map of disk configurations
  4. This id will be used as fieldId in MyController, use lowercase, no special characters, _ allowed
  5. disabled - disable this particular disk metrics
  6. name - will be used as field name
  7. path - disk path used to measure the usage details
  8. unit - units guide

Memory Configurations

memory:
  interval: 1m # (1)
  memoryDisabled: false # (2)
  swapMemoryDisabled: false # (3)
  unit: MiB # (4)
  1. interval - metric measurement interval
  2. memoryDisabled - enable/disable memory measurement
  3. swapMemoryDisabled - enable/disable swap measurement
  4. unit - units guide

Process Configurations

process:
  interval: 1m # (1)
  disabled: false # (2)
  data: # (3)
    influxd: # (4)
      disabled: false # (5)
      name: "InfluxDB" # (6)
      unit: MiB # (7)
      filter: # (8)
        cmdline: influxd # (9)
    mycontroller:
      disabled: false
      name: "MyController"
      filter:
        cmdline: /app/mycontroller-all-in-one -config /app/mycontroller.yaml
  1. interval - metric measurement interval
  2. disabled - disable the all the process metrics
  3. data - is a map of process configurations
  4. This id will be used as fieldId in MyController, use lowercase, no special characters, _ allowed
  5. disabled - disable this particular process metrics
  6. name - will be used as field name
  7. unit - units guide
  8. filter - used to get a specific filter
  9. cmdline - one of the key used to filter a process

Supported keys in the filter

  • pid - Process ID
  • cmdline -
  • cwd - client’s Current Working Directory
  • exe -
  • name -
  • nice - nice value of the process
  • ppid - Parent Process ID
  • username -

Measurement Units

Bye default all the values reported in bytes. We have an option to convert the bytes to more readable values.
Update unit on the supported resources.
If you want the values in bytes leave the unit field as blank or remove it completely

Supported units: KiB, MiB, GiB, TiB, PiB, EiB

  • KiB - Kibibytes (10241 bytes)
  • MiB - Mibibytes (10242 bytes)
  • GiB - Gibibytes (10243 bytes)
  • TiB - Tebibytes (10244 bytes)
  • PiB - Pebibytes (10245 bytes)
  • EiB - Exbibytes (10246 bytes)

3 - Dashboard

TBD

4 - Operations

TBD

4.1 - Tasks

TBD

4.2 - Schedules

Holds a collection of schedules. Schedules are executed by a scheduler service.
Schedule can bse used for different use cases.
The most famous one is turn ON a light at specific time and turn OFF a light at a specific time.
But in MyController it is not limited to lights. You can control variety of resources.

Schedule has a different sections. All the sections are explained here.

Identity

Form View

id and description

YAML View
id: my_first_schedule # (1)
description: This is my first schedule # (2)
enabled: true # (3)
  1. id - should be a unique identifier
  2. description - add description about this schedule
  3. enabled - enable/disable this schedule

Labels

You can add any number of labels. Labels can be used to filter a group of schedule.
Labels can be used to perform an action on a group schedules.

Form View

labels

YAML View
labels:
  group: essential

Validity

Validity is a special feature. You can control when this schedule should be effective.
All the fields are optional. By omitting a field gives different meanings

To get activate this feature validity should be enabled

Date and Time

Based on the given fields, validity reacts as follows,

  • If non of the fields entered - valid for all the time.

  • date.from - schedule will be valid from the given from date.
    There is no from time entered here, but from date is available. Hence from.time will be calculated as 00:00:00
    Example: 2021-09-16 becomes 2021-09-16 00:00:00

  • date.to - schedule will be valid till the given to date.
    There is no to time entered here, but to date is available. Hence to.time will be calculated as 23:59:59
    Example: 2021-09-24 becomes 2021-09-24 23:59:59

  • date.from, time.from - schedule will be valid from the given from date and from time.

  • date.to, time.to - schedule will be valid till the given to date and to time.

  • date.from, date.to, time.from, time.to - schedule can be valid between the from date/time ~ to date/time.

  • validateTimeEveryday => Disabled - valid exactly from date/time ~ to date/time.
    Example: 2021-09-16 11:15:00 to 2021-09-24 19:00:00

  • validateTimeEveryday => Enabled - between these date and the time valid for every day.
    Example: between2021-09-16 to 2021-09-24 - time is valid for every day between 11:15:00 to 19:00:00

Form View

validity

YAML View
validity:
  enabled: true
  date:
    from: '2021-05-14'
    to: '2021-06-21'
  time:
    from: '00:00'
    to: '23:59'
  validateTimeEveryday: false

Schedule Type

Schedule supports different types.

Repeat

Repeat is a super simple schedule.

  • Executes the schedule on the specified interval till it reaches the repeat count.
  • Set repeat count to 0 to keep on repeating.

Cron

Cron is a time-based job scheduler in Unix-like computer operating systems.
In MyController in addition to that, it supports seconds field.
Refer Cron wikipedia page to know more about cron.

┌───────────── second (0 - 59)
| ┌───────────── minute (0 - 59)
│ | ┌───────────── hour (0 - 23)
│ | │ ┌───────────── day of the month (1 - 31)
│ | │ │ ┌───────────── month (1 - 12)
│ | │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday;7 is also Sunday on some systems)
│ | │ │ │ │                                   
│ | │ │ │ │
│ | │ │ │ │
* * * * * *

The first field second is optional, you can omit it.
Also supports @yearly, @monthly, @weekly, @daily (or @midnight), @hourly

Simple

Simple is a friendly schedule type.
It supports different type of frequencies.

Schedule executes on the specified time, if the day meets the specified frequency.
Time can be specified in the format of hh:mm:ss. hours should be in 24 hours format
Examples:

  • 05:00:00 - 5 AM
  • 12:30:20 - 12:30:20 PM
  • 17:15:00 - 5:15 PM

Frequency - Daily

In this mode you can restrict the schedule to the selected week days.

  • Possible select multiple days of a week.
  • Schedule executes on the selected days of the week.

Frequency - Weekly

In this mode you can restrict the schedule to particular week day.

  • Select a day in week.
  • Schedule executes on the selected day of the week.
  • In simple words, only once in a week.

Frequency - Monthly

In this mode you can restrict the schedule to particular day of month.

  • Select a date in a month
  • Schedule executes on the selected date of the month
  • In simple words, only once in a month

Frequency - On Date

In this mode you can restrict the schedule to particular date and time.

  • This schedule executes only once in a life time.

Sunrise

Sunrise works similar to Simple schedule, expect the time part.
Here explained only about the time part. refer Simple schedule for other options.

Based on the GEO Location configured for the system, Sunrise time will be calculated. This calculation happens every day at midnight of the system timezone.

Offset

Offset used to calculate the exact time to execute the schedule.
Offset is a time duration. Refer duration guide for the detailed information.

Examples:

  • 10m - executes 10 minutes after the sunrise time
  • -10m - executes 10 minutes before the sunrise time
  • 1h20m - executes 1 hour and 20 minutes after the sunrise time
  • -1h20m - executes 1 hour and 20 minutes before the sunrise time

Sunset

Sunset works similar to Simple schedule, expect the time part.
Here explained only about the time part. refer Simple schedule for other options.

Based on the GEO Location configured for the system, Sunset time will be calculated. This calculation happens every day at midnight of the system timezone.

Offset

Offset used to calculate the exact time to execute the schedule.
Offset is a time duration. Refer duration guide for the detailed information.

Examples:

  • 10m - executes 10 minutes after the sunset time
  • -10m - executes 10 minutes before the sunset time
  • 1h20m - executes 1 hour and 20 minutes after the sunset time
  • -1h20m - executes 1 hour and 20 minutes before the sunset time

Load variables

Load variables is an optional configuration.
Follow Load Variables Guide for the detailed configuration.

Use variables when you want to,

Load Custom Variables

Sometimes you may want to do some calculations or based on a value you want to set something, In those cases Load Custom Variables will be used.

Types

  • None
  • Javascript
  • Webhook

None

Whe you do not want to use Load Custom Variables feature, use None option.

Javascript

Follow Javascript Guide for the details.

Webhook

Follow Webhook Guide for the details.

Parameters to Handler

Follow Parameters to Handlers Guide for the detailed configuration.

Notify Handlers

Follow Notify Handlers Guide for the detailed configuration.

4.3 - Handlers

Handlers are performing an action based on the input parameters.
Different type of handlers supported by MyController.
Handler is a plugin component.

Type of Handlers

Noop Handler

Noop is a No Operation handler. It does nothing.
The idea behind Noop handler is, in the future plan to introduce hidden handlers externally.
Right now, there is no use.

Resource Handler

Resource handler sends payload to the nodes, performs an actions on resource, operation, etc.,

Email Handler

Sends email to the recipients. Supports smtp server.

Form View

email handler

YAML View
type: email # (1)
spec:
  host: smtp.example.com # (2)
  port: 465 # (3)
  insecureSkipVerify: true # (4)
  username: username@example.com # (5)
  password: mypassword # (6)
  fromEmail: from@example.com # (7)
  toEmails: to1@example.com,to2@example.com # (8)
  1. type should be selected as email
  2. host - email server host
  3. port - email server port
  4. insecureSkipVerify - enables/disables insecure
  5. username of the account
  6. password of the account
  7. fromEmail from email address
  8. toEmails to emails list comma separated

Telegram Handler

Sends telegram message to persons and/or groups.
Follow this guide to get the telegram token, chat_id and group_id

Form View

telegram handler

YAML View
type: telegram # (1)
spec:
  token: 500000000:AAHKsdsdckwendlwwqNKJBmbjknm9jA # (2)
  chatIds: # (3)
    - '200000000'
    - '300000000'
  1. type should be selected as telegram
  2. token of the telegram account
  3. chatIds - list of chat ids or group ids

Backup Handler

Backup handler performs backup operation and keeps the backup archives at the specified target location

Form View

backup handler

YAML View
type: backup # (1)
spec:
  providerType: disk # (2)
  spec:
    storageExportType: yaml # (3)
    targetDirectory: /mc_home/backups/ # (4)
    prefix: primary # (5)
    retentionCount: 10 # (6)
  1. type should be selected as backup
  2. providerType should be selected as disk. Only this provider supported now
  3. storageExportType - storage database data will be exported in this format. options: yaml, json
  4. targetDirectory - location to keep the backup archives
  5. prefix of the backup file
  6. retentionCount - If the number of backup archives goes beyond this count,older files will be deleted permanently.

4.4 - Forward Payload

Forward Payload sends the payload from a source field to destination field.
Supports only for the Field resource.

  • Navigate to Operations >> Forward Payload
  • Click on Add button
Form View
  • On the Source Field and Destination Field type Field ID, displays matching ids as a dropdown. forward payload
YAML View
id: forward_water_level # (1)
description: Sends tank water level to display node # (2)
enabled: true # (3)
srcFieldId: field:mysensor.1.1.V_VOLUME # (4)
dstFieldId: field:mysensor.13.1.V_VOLUME # (5)
  1. id - should be unique across forward payload
  2. description of the entity
  3. enable - enable/disable this entry
  4. srcFieldId - source field id
  5. dstFieldId - destination field id

4.5 - Load Variables

Load Variables is a sub configuration in a Task or in a Schedule.
You can load any number of variables for the further operations.

Form View

load variables

  • Variable Name is used a internal reference for further operations. should be unique.
  • Add new variable click + icon
  • To delete a variable click - icon
  • By clicking edit icon of a value, can offer to select different data types.
YAML View

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

variables:
  water_level: >-
        {"type":"resource_by_quick_id","disabled":"","data":"cmVzb3VyY2VUeXBlOiBmaWVsZApxdWlja0lkOiBteXNlbnNvci4xLjEuVl9WT0xVTUUKc2VsZWN0b3I6IGN1cnJlbnQudmFsdWUK"}
  motor_status: >-
        {"type":"resource_by_quick_id","disabled":"","data":"cmVzb3VyY2VUeXBlOiBmaWVsZApxdWlja0lkOiBteXNlbnNvci4xMy4xLlZfU1RBVFVTCnNlbGVjdG9yOiBjdXJyZW50LnZhbHVlCg=="}

Data Types

Following data types are supported in Load Variables.

String

String is static type. It assigns the given value to that variable.

Resource By QuickID

Resource can be selected by their QuickID.

Form View

load variable 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 Selector field enter the exact path to get value. See Selector Guide
YAML View
type: resource_by_quick_id
data:
  resourceType: field
  quickId: tasmota.tasmota_0B8E60.Control.POWER
  selector: current.value

Resource By Labels

Resource can be selected by their Labels.

Form View

load variable by quick id

  • Select a Resource Type
  • enter key value of a label. enter as many labels you want.
  • On the Selector field enter the exact path to get value. See Selector Guide
YAML View
type: resource_by_labels
data:
  resourceType: field
  labels:
    location: hall
  selector: current.value

Selector

Selector is dot(.) separated path used to select a value on the given resource.
If the path not found returns empty value.
To make the path, you should know the supported keys on a resource.

To know more about supported keys of a resource,

  • go to that particular resource details page
  • click on edit
  • select the YAML View.

Some of the references

Resource - Field

  • current.value - current value
  • current.timestamp - current value received timestamp
  • noChangeSince - There is no change on the received value from this time
  • previous.value - previous value
  • previous.timestamp - previous value received timestamp

Resource - Gateway

  • state.status - status of the gateway. can be up, down, error, etc.,
  • enabled - enabled or disabled

4.6 - 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

4.7 - Notify Handlers

Handlers should be created prior to this section. Follow Handlers Guide to create a handler.

Notify handlers holds a list of handler ids. Sends all the parameters to the specified handler services.
Based on the Parameters type a particular Handler service can filters supported type(s) and executes it.

Form View

notify handlers

  • Click + icon to add new handler id
  • Click - icon to delete a handler id
YAML View
handlers:
  - telegram_home_group
  - resource_handler

4.8 - Javascript

TBD

4.9 - Webhook

TBD

4.10 - Template

TBD

5 - Settings

TBD

5.1 - System

The system settings has the following configurations

GEO Location

GEO Location address the current location of the server or ask to follow the given location as server location and operate dependent services.
This detail used to calculate Sunrise and Sunset times in Schedule

Form View

geo location

  • Auto Update - Enabling this field can take the server location based on the WAN IP address.
    If you want to give the value manually, disable this field.
  • Location Name - Name of the location
  • Latitude of the location
  • Longitude of the location
YAML View
geoLocation:
  autoUpdate: false
  locationName: Namakkal
  latitude: 11.2189165
  longitude: 78.1586027

Login Page Message

You can enter a message to display on the login page of the console.
The message supports HTML tags.

Form View

login page message

YAML View
login:
  message: |-
    This is a private MyController instance. Running in a local Raspberry PI
    <br>Default username and password: admin / admin    

5.2 - Backup and Restore

Backup

Restore