@nebulahome/integration-sdk 1.2.0 → 1.5.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,288 @@
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
+ "icon": {
62
+ "type": "string",
63
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
64
+ },
65
+ "domain": {
66
+ "type": "string",
67
+ "enum": [
68
+ "sensor",
69
+ "binary_sensor",
70
+ "switch",
71
+ "light",
72
+ "number",
73
+ "select",
74
+ "button"
75
+ ]
76
+ },
77
+ "capabilities": {
78
+ "type": "object",
79
+ "propertyNames": {
80
+ "type": "string",
81
+ "enum": [
82
+ "sensor_numeric",
83
+ "sensor_text",
84
+ "sensor_binary",
85
+ "on_off",
86
+ "level",
87
+ "number",
88
+ "select",
89
+ "button"
90
+ ]
91
+ },
92
+ "additionalProperties": {
93
+ "type": "object",
94
+ "properties": {
95
+ "read": {
96
+ "type": "object",
97
+ "properties": {
98
+ "function": {
99
+ "anyOf": [
100
+ {
101
+ "type": "number",
102
+ "const": 1
103
+ },
104
+ {
105
+ "type": "number",
106
+ "const": 2
107
+ },
108
+ {
109
+ "type": "number",
110
+ "const": 3
111
+ },
112
+ {
113
+ "type": "number",
114
+ "const": 4
115
+ }
116
+ ]
117
+ },
118
+ "address": {
119
+ "anyOf": [
120
+ {
121
+ "type": "integer",
122
+ "minimum": 0,
123
+ "maximum": 65535
124
+ },
125
+ {
126
+ "type": "string",
127
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
128
+ }
129
+ ]
130
+ },
131
+ "type": {
132
+ "type": "string",
133
+ "enum": [
134
+ "u16",
135
+ "s16",
136
+ "u32",
137
+ "s32",
138
+ "f32",
139
+ "string"
140
+ ]
141
+ },
142
+ "count": {
143
+ "type": "integer",
144
+ "minimum": 1,
145
+ "maximum": 64
146
+ },
147
+ "bit": {
148
+ "type": "integer",
149
+ "minimum": 0,
150
+ "maximum": 15
151
+ },
152
+ "scale": {
153
+ "type": "number"
154
+ },
155
+ "unit": {
156
+ "type": "string"
157
+ },
158
+ "options": {
159
+ "type": "object",
160
+ "propertyNames": {
161
+ "type": "string",
162
+ "pattern": "^-?\\d{1,10}$"
163
+ },
164
+ "additionalProperties": {
165
+ "type": "string",
166
+ "minLength": 1,
167
+ "maxLength": 64
168
+ }
169
+ }
170
+ },
171
+ "required": [
172
+ "function",
173
+ "address"
174
+ ],
175
+ "additionalProperties": false
176
+ },
177
+ "write": {
178
+ "type": "object",
179
+ "properties": {
180
+ "function": {
181
+ "anyOf": [
182
+ {
183
+ "type": "number",
184
+ "const": 5
185
+ },
186
+ {
187
+ "type": "number",
188
+ "const": 6
189
+ },
190
+ {
191
+ "type": "number",
192
+ "const": 15
193
+ },
194
+ {
195
+ "type": "number",
196
+ "const": 16
197
+ }
198
+ ]
199
+ },
200
+ "address": {
201
+ "anyOf": [
202
+ {
203
+ "type": "integer",
204
+ "minimum": 0,
205
+ "maximum": 65535
206
+ },
207
+ {
208
+ "type": "string",
209
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
210
+ }
211
+ ]
212
+ },
213
+ "on": {
214
+ "anyOf": [
215
+ {
216
+ "type": "integer",
217
+ "minimum": 0,
218
+ "maximum": 65535
219
+ },
220
+ {
221
+ "type": "string",
222
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
223
+ }
224
+ ]
225
+ },
226
+ "off": {
227
+ "anyOf": [
228
+ {
229
+ "type": "integer",
230
+ "minimum": 0,
231
+ "maximum": 65535
232
+ },
233
+ {
234
+ "type": "string",
235
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
236
+ }
237
+ ]
238
+ },
239
+ "min": {
240
+ "type": "number"
241
+ },
242
+ "max": {
243
+ "type": "number"
244
+ },
245
+ "step": {
246
+ "type": "number",
247
+ "exclusiveMinimum": 0
248
+ },
249
+ "value": {
250
+ "anyOf": [
251
+ {
252
+ "type": "integer",
253
+ "minimum": 0,
254
+ "maximum": 65535
255
+ },
256
+ {
257
+ "type": "string",
258
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
259
+ }
260
+ ]
261
+ }
262
+ },
263
+ "required": [
264
+ "function"
265
+ ],
266
+ "additionalProperties": false
267
+ }
268
+ },
269
+ "additionalProperties": false
270
+ }
271
+ }
272
+ },
273
+ "required": [
274
+ "name",
275
+ "domain",
276
+ "capabilities"
277
+ ],
278
+ "additionalProperties": false
279
+ }
280
+ }
281
+ },
282
+ "required": [
283
+ "name",
284
+ "entities"
285
+ ],
286
+ "additionalProperties": false,
287
+ "title": "NebulaHome integration: modbus-template.json"
288
+ }