List of functions

The event property has functions. Each function describes a specific type of event and has a number of acceptable values, which are events of the specified type that the sensor can transmit.

Function

Description

vibration

Displaying events of physical interaction: vibrating, falling, tilting.

open

Displaying events for opening/closing doors, windows, and so on.

button

Displaying button click events.

motion

Displaying events relating to movement detection in the sensor range.

smoke

Displaying smoke detection events in the room.

gas

Displaying gas detection events in the room.

battery_level

Displaying battery charge events.

food_level

Displaying events related to the pet food level.

water_level

Displaying events relating to the water level.

water_leak

Displaying water leak events.

vibration

Displaying events of physical interaction: vibrating, falling, tilting.

Below is a description of the vibration object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: vibration.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • tilt — Tilting.
  • fall — Falling.
  • vibration — Vibrating.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
  ...
  "parameters": {
    "instance": "vibration",
    "events": [{
        "value": "tilt"
      },
      {
        "value": "fall"
      }
    ]
  }
  ...
}

Examples of devices with the vibration function

  1. devices.types.sensor.vibration

open

Displaying events for opening/closing doors, windows, and so on.

Below is a description of the open object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: open.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • opened — Open.
  • closed — Closed.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
  ...
  "parameters": {
    "instance": "open",
    "events": [{
        "value": "opened"
      },
      {
        "value": "closed"
      }
    ]
  }
  ...
}

Examples of devices with the open function

  1. devices.types.sensor.open
  2. devices.types.openable
  3. devices.types.openable.curtain

button

Displaying button click events.

Below is a description of the button object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: button.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • click — Single press.
  • double_click — Double press.
  • long_press — Long press.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
  ...
  "parameters": {
    "instance": "button",
    "events": [{
        "value": "click"
      },
      {
        "value": "double_click"
      }
    ]
  }
  ...
}

Examples of devices with the button function

  1. devices.types.sensor.button

motion

Displaying events relating to movement detection in the sensor range.

Below is a description of the motion object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: motion.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • detected — Detected.
  • not_detected — Not detected.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
  ...
  "parameters": {
    "instance": "motion",
    "events": [{
        "value": "detected"
      },
      {
        "value": "not_detected"
      }
    ]
  }
  ...
}

Examples of devices with the motion function

  1. devices.types.sensor.motion

smoke

Displaying smoke detection events in the room.

Below is a description of the smoke object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: smoke.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • detected — Detected.
  • not_detected — Not detected.
  • high — High level.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
    ...
    "parameters": {
        "instance": "smoke",
        "events": [{
            "value": "detected"
        },
        {
            "value": "not_detected"
        }]
    }
    ...
}

Examples of devices with the smoke function

  1. devices.types.sensor.smoke

gas

Displaying gas detection events in the room.

Below is a description of the gas object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: gas.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • detected — Detected.
  • not_detected — Not detected.
  • high — High level.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
  ...
  "parameters": {
    "instance": "gas",
    "events": [{
        "value": "detected"
      },
      {
        "value": "not_detected"
      }
    ]
  }
  ...
}

Examples of devices with the gas function

  1. devices.types.sensor.gas

battery_level

Displaying battery charge events.

Below is a description of the battery_level object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: battery_level.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • low — Low.
  • normal — Normal.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
  ...
  "parameters": {
    "instance": "battery_level",
    "events": [{
        "value": "low"
      },
      {
        "value": "normal"
      }
    ]
  }
  ...
}

Examples of devices with the battery_level function

  1. devices.types.sensor

  2. devices.types.vacuum_cleaner

food_level

Displaying events related to the pet food level.

Below is a description of the food_level object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: food_level.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • empty — Empty.
  • low — Low.
  • normal — Normal.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
  ...
  "parameters": {
    "instance": "food_level",
    "events": [{
        "value": "empty"
      },
      {
        "value": "low"
      },
      {
        "value": "normal"
      }
    ]
  }
  ...
}

Examples of devices with the food_level function

  1. devices.types.pet_feeder

water_level

Displaying events relating to the water level.

Below is a description of the water_level object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: water_level.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • empty — Empty.
  • low — Low.
  • normal — Normal.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
  ...
  "parameters": {
    "instance": "water_level",
    "events": [{
        "value": "empty"
      },
      {
        "value": "low"
      },
      {
        "value": "normal"
      }
    ]
  }
  ...
}

Examples of devices with the water_level function

  1. devices.types.sensor
  2. devices.types.cooking.coffee_maker
  3. devices.types.cooking.kettle
  4. devices.types.pet_drinking_fountain
  5. devices.types.humidifier
  6. devices.types.vacuum_cleaner

water_leak

Displaying water leak events.

Below is a description of the water_leak object from the Property description section.

parameters object

Parameter

Type

Description

instance

String

Function name for the property. Acceptable values: water_leak.

events

Array of event objects

Array of event objects that describe events supported by the property. Minimum number of events in the array: 1.

The event object that is a part of the events array

Parameter

Type

Description

value

String

Function name for the property. Acceptable values:

  • dry — There's no leak.
  • leak — There's a leak.

Use this function to describe the features of various devices:

Example of the parameters object

See the full example in Example of use.

{
  ...
  "parameters": {
    "instance": "water_leak",
    "events": [{
        "value": "dry"
      },
      {
        "value": "leak"
      }
    ]
  }
  ...
}

Examples of devices with the water_leak function

  1. devices.types.sensor.water_leak

String enclosed in quotation marks, for example: "Hello, world".

An array of elements separated by a comma. As array items, you can use standard JSON elements: a string, number, true, false, object, or array. Arrays are enclosed in square brackets []:

"cities": ["Moscow", "Tokyo", "New York"]