-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice-config-schema.coffee
88 lines (88 loc) · 3.31 KB
/
device-config-schema.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module.exports = {
title: "pimatic check alive device config schema"
CheckAliveSystem:
title: "CheckAliveSystem config"
type: "object"
extensions: ["xOnLabel", "xOffLabel"]
properties:
"check timeout":
description: "List of variables that must update periodically"
type: "array"
default: []
items:
description: "Define control properties"
type: "object"
required: ["timeout"]
properties:
name:
description: "Variable name (or several names separed by semicolon)"
type: "string"
description:
description: "Description of the variable"
type: "string"
default: ""
timeout:
description: """
Maximum update rate. Set alert state for a variable if no data was received in this time interval.
If the value is a number then it defines a timeout in milliseconds.
If this values has the 00:00:00.000 format then it defines Hours:Minutes:Seconds.Milliseconds
Hours and Milliseconds are optional.
"""
type: "string"
default: 10000
logHigh:
description: "Message when alert appears (LOW -> HIGH)"
type: "string"
default: ""
logLow:
description: "Message when alert disappears (HIGH -> LOW)"
type: "string"
default: ""
"state attribute":
description: "Create a separate state attribute with this name for this alert"
type: "string"
default: "<empty>"
"check range":
description: "List of numerical variables that must meet the specified conditions"
type: "array"
default: []
items:
description: "Define control properties"
type: "object"
properties:
name:
description: "Variable name (or several names separed by semicolon)"
type: "string"
description:
description: "Description of the variable"
type: "string"
default: ""
min:
description: "Minimum value. If this value is not defined then the device will not check this condition"
type: "number"
default: -100
max:
description: "Maximum value"
type: "number"
default: 100
timeout:
description: "Variable should meet the specified condition during this time (ms) before an alert state will be set"
type: "number"
default: 5000
logHigh:
description: "Message when alert appears (LOW -> HIGH)"
type: "string"
default: ""
logLow:
description: "Message when alert disappears (HIGH -> LOW)"
type: "string"
default: ""
"state attribute":
description: "Create a separate state attribute with this name for this alert"
type: "string"
default: "<empty>"
"custom switch color":
description: "Custom switch color in the alerted state"
type: "string"
default: ""
}