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 |
Displaying events of physical interaction: vibrating, falling, tilting. |
|
Displaying events for opening/closing doors, windows, and so on. |
|
Displaying button click events. |
|
Displaying events relating to movement detection in the sensor range. |
|
Displaying smoke detection events in the room. |
|
Displaying gas detection events in the room. |
|
Displaying battery charge events. |
|
Displaying events related to the pet food level. |
|
Displaying events relating to the water level. |
|
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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: |
events |
Array of event objects |
Array of |
The event
object that is a part of the events
array
Parameter |
Type |
Description |
value |
String |
Function name for the property. Acceptable values:
|
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
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"]