@nebulahome/integration-sdk 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,285 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "$schema": {
6
+ "type": "string",
7
+ "description": "The JSON Schema an editor checks the file with."
8
+ },
9
+ "name": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "maxLength": 64
13
+ },
14
+ "device": {
15
+ "default": "",
16
+ "type": "string",
17
+ "maxLength": 128
18
+ },
19
+ "port": {
20
+ "default": 502,
21
+ "type": "integer",
22
+ "minimum": 1,
23
+ "maximum": 65535
24
+ },
25
+ "unitId": {
26
+ "default": 1,
27
+ "type": "integer",
28
+ "minimum": 1,
29
+ "maximum": 247
30
+ },
31
+ "wordOrder": {
32
+ "default": "high",
33
+ "type": "string",
34
+ "enum": [
35
+ "high",
36
+ "low"
37
+ ]
38
+ },
39
+ "pollSeconds": {
40
+ "default": 10,
41
+ "type": "integer",
42
+ "minimum": 1,
43
+ "maximum": 3600
44
+ },
45
+ "entities": {
46
+ "minItems": 1,
47
+ "maxItems": 256,
48
+ "type": "array",
49
+ "items": {
50
+ "type": "object",
51
+ "properties": {
52
+ "id": {
53
+ "type": "string",
54
+ "pattern": "^[a-z0-9][a-z0-9_]{0,39}$"
55
+ },
56
+ "name": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 64
60
+ },
61
+ "domain": {
62
+ "type": "string",
63
+ "enum": [
64
+ "sensor",
65
+ "binary_sensor",
66
+ "switch",
67
+ "light",
68
+ "number",
69
+ "select",
70
+ "button"
71
+ ]
72
+ },
73
+ "capabilities": {
74
+ "type": "object",
75
+ "propertyNames": {
76
+ "type": "string",
77
+ "enum": [
78
+ "sensor_numeric",
79
+ "sensor_text",
80
+ "sensor_binary",
81
+ "on_off",
82
+ "level",
83
+ "number",
84
+ "select",
85
+ "button"
86
+ ]
87
+ },
88
+ "additionalProperties": {
89
+ "type": "object",
90
+ "properties": {
91
+ "read": {
92
+ "type": "object",
93
+ "properties": {
94
+ "function": {
95
+ "anyOf": [
96
+ {
97
+ "type": "number",
98
+ "const": 1
99
+ },
100
+ {
101
+ "type": "number",
102
+ "const": 2
103
+ },
104
+ {
105
+ "type": "number",
106
+ "const": 3
107
+ },
108
+ {
109
+ "type": "number",
110
+ "const": 4
111
+ }
112
+ ]
113
+ },
114
+ "address": {
115
+ "anyOf": [
116
+ {
117
+ "type": "integer",
118
+ "minimum": 0,
119
+ "maximum": 65535
120
+ },
121
+ {
122
+ "type": "string",
123
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
124
+ }
125
+ ]
126
+ },
127
+ "type": {
128
+ "type": "string",
129
+ "enum": [
130
+ "u16",
131
+ "s16",
132
+ "u32",
133
+ "s32",
134
+ "f32",
135
+ "string"
136
+ ]
137
+ },
138
+ "count": {
139
+ "type": "integer",
140
+ "minimum": 1,
141
+ "maximum": 64
142
+ },
143
+ "bit": {
144
+ "type": "integer",
145
+ "minimum": 0,
146
+ "maximum": 15
147
+ },
148
+ "scale": {
149
+ "type": "number"
150
+ },
151
+ "unit": {
152
+ "type": "string",
153
+ "maxLength": 16
154
+ },
155
+ "options": {
156
+ "type": "object",
157
+ "propertyNames": {
158
+ "type": "string",
159
+ "pattern": "^-?\\d{1,10}$"
160
+ },
161
+ "additionalProperties": {
162
+ "type": "string",
163
+ "minLength": 1,
164
+ "maxLength": 64
165
+ }
166
+ }
167
+ },
168
+ "required": [
169
+ "function",
170
+ "address"
171
+ ],
172
+ "additionalProperties": false
173
+ },
174
+ "write": {
175
+ "type": "object",
176
+ "properties": {
177
+ "function": {
178
+ "anyOf": [
179
+ {
180
+ "type": "number",
181
+ "const": 5
182
+ },
183
+ {
184
+ "type": "number",
185
+ "const": 6
186
+ },
187
+ {
188
+ "type": "number",
189
+ "const": 15
190
+ },
191
+ {
192
+ "type": "number",
193
+ "const": 16
194
+ }
195
+ ]
196
+ },
197
+ "address": {
198
+ "anyOf": [
199
+ {
200
+ "type": "integer",
201
+ "minimum": 0,
202
+ "maximum": 65535
203
+ },
204
+ {
205
+ "type": "string",
206
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
207
+ }
208
+ ]
209
+ },
210
+ "on": {
211
+ "anyOf": [
212
+ {
213
+ "type": "integer",
214
+ "minimum": 0,
215
+ "maximum": 65535
216
+ },
217
+ {
218
+ "type": "string",
219
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
220
+ }
221
+ ]
222
+ },
223
+ "off": {
224
+ "anyOf": [
225
+ {
226
+ "type": "integer",
227
+ "minimum": 0,
228
+ "maximum": 65535
229
+ },
230
+ {
231
+ "type": "string",
232
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
233
+ }
234
+ ]
235
+ },
236
+ "min": {
237
+ "type": "number"
238
+ },
239
+ "max": {
240
+ "type": "number"
241
+ },
242
+ "step": {
243
+ "type": "number",
244
+ "exclusiveMinimum": 0
245
+ },
246
+ "value": {
247
+ "anyOf": [
248
+ {
249
+ "type": "integer",
250
+ "minimum": 0,
251
+ "maximum": 65535
252
+ },
253
+ {
254
+ "type": "string",
255
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
256
+ }
257
+ ]
258
+ }
259
+ },
260
+ "required": [
261
+ "function"
262
+ ],
263
+ "additionalProperties": false
264
+ }
265
+ },
266
+ "additionalProperties": false
267
+ }
268
+ }
269
+ },
270
+ "required": [
271
+ "name",
272
+ "domain",
273
+ "capabilities"
274
+ ],
275
+ "additionalProperties": false
276
+ }
277
+ }
278
+ },
279
+ "required": [
280
+ "name",
281
+ "entities"
282
+ ],
283
+ "additionalProperties": false,
284
+ "title": "NebulaHome integration: modbus-template.json"
285
+ }