Wiki source code of 05 HTTP API
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | = **1 General** = |
2 | |||
3 | This documents introduces WECON V-BOX HTTP API. And this document also shows some examples. All example is tested from postman application. | ||
4 | |||
5 | **Transport protocol:** HTTP protocol | ||
6 | |||
7 | **Server address:** | ||
8 | |||
9 | China: | ||
10 | |||
11 | [[http:~~/~~/api.v-box.net>>url:http://api.v-box.net/]] | ||
12 | |||
13 | Asean: | ||
14 | |||
15 | [[http:~~/~~/api.asean.v-box.net>>url:http://api.v-box.net/]] | ||
16 | |||
17 | Europe: | ||
18 | |||
19 | [[http:~~/~~/api.eu.v-box.net>>url:http://api.v-box.net/]] | ||
20 | |||
21 | (% style="text-align:center" %) | ||
![]() |
5.1 | 22 | [[image:V-BOX HTTP manual_html_ceb1e13ef4c1fa5d.png||height="361" width="800" class="img-thumbnail"]] |
![]() |
1.1 | 23 | |
24 | For **ASEAN server** V-BOX, now can use http, the server address is api.asean.v-box.net. | ||
25 | |||
26 | The common KEY is: | ||
27 | |||
28 | **comid=2** | ||
29 | |||
30 | **comkey=589625dce895454dbff9782c299db156** | ||
31 | |||
32 | screctkey=f1cd9351930d4e589922edbcf3b09a7c | ||
33 | |||
34 | {{id name="_GoBack"/}} | ||
35 | |||
36 | For** EU server **V-BOX, now can use http, the server address is api.eu.v-box.net. | ||
37 | |||
38 | The common KEY is: | ||
39 | |||
40 | **comid=100** | ||
41 | |||
42 | **comkey=8919244ff15d441bae4b944b112a33ea** | ||
43 | |||
44 | screctkey=f1cd9351930d4e589922edbcf3b09a7c | ||
45 | |||
![]() |
5.1 | 46 | **✎Note:** If it is for Virtual Deployment, the comid and comkey would not be the same with values above. Try to get the actual value from HTTP access (V-NET~-~-Services~-~-HTTP access) |
![]() |
1.1 | 47 | |
![]() |
5.1 | 48 | == **1.1 Interface Parameter Description** == |
49 | |||
![]() |
1.1 | 50 | **Global parameters** |
51 | |||
52 | The following acturls need to have global parameters (The global parameter client is put into the JSON format and placed in the common parameters of the Headers) | ||
53 | |||
54 | (% style="text-align:center" %) | ||
![]() |
5.1 | 55 | [[image:企业微信截图_20210531172144.png||height="467" width="800" class="img-thumbnail"]] |
![]() |
1.1 | 56 | |
57 | **The returned result represented by Json and case sensitive:** | ||
58 | |||
59 | 1).Abnormal | ||
60 | |||
61 | {"code" : 403, "msg" : "SessionID (user session ID) invalid", "reqId": "1502074141465"} | ||
62 | |||
63 | 2).Normal | ||
64 | |||
65 | {"code" : 200 , "result": {}, "msg" : "ok", "reqId":"1502074141465"} | ||
66 | |||
![]() |
5.1 | 67 | **Status Code** |
![]() |
1.1 | 68 | |
69 | (% style="text-align:center" %) | ||
![]() |
5.1 | 70 | [[image:1.png||height="141" width="500" class="img-thumbnail"]] |
![]() |
1.1 | 71 | |
72 | == **1.2 Example key and value** == | ||
73 | |||
74 | 1).**comid**=2 | ||
75 | |||
76 | 2).**comkey**=589625dce895454dbff9782c299db156 | ||
77 | |||
78 | 3).**screctkey**=f1cd9351930d4e589922edbcf3b09a7c | ||
79 | |||
80 | 4).**ts**=1573897380 | ||
81 | |||
82 | ((( | ||
83 | = **2 Basic API** = | ||
84 | ))) | ||
85 | |||
86 | == **2.1 {{id name="_Toc24963726"/}}Login operation** == | ||
87 | |||
88 | ((( | ||
89 | **2.1.1 Parameters** | ||
90 | ))) | ||
91 | |||
![]() |
5.1 | 92 | (% class="table-bordered" style="width:888px" %) |
93 | |**Acturl**|(% colspan="2" style="width:731px" %)we-data/login | ||
94 | |**Function**|(% colspan="2" style="width:731px" %)Login with username, email, phone number | ||
95 | |(% colspan="1" rowspan="4" %)**Parameters**|Items|(% style="width:535px" %)Description | ||
96 | |alias|(% style="width:535px" %)Username, email, phone number | ||
97 | |password|(% style="width:535px" %)32bit password (MD5 encryption) | ||
98 | |domain(Optional)|(% style="width:535px" %)3rd party interface domain(Only available for Virtual Deployment) | ||
99 | |(% rowspan="3" %)**Return value**|Items|(% style="width:535px" %)Description | ||
100 | |utype|(% style="width:535px" %)User Type: 1-Manage Account, 2-Viewer Account | ||
101 | |sid|(% style="width:535px" %)User session ID | ||
![]() |
1.1 | 102 | |
103 | **2.1.2 Operating procedures** | ||
104 | |||
105 | **Setp1: ** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/login>>url:http://api.v-box.net/box-data/api/we-data/login]] | ||
106 | |||
107 | (% style="text-align:center" %) | ||
![]() |
3.1 | 108 | [[image:V-BOX HTTP manual_html_78fa6b0e5f03b2f2.png||height="63" width="800" class="img-thumbnail"]] |
![]() |
1.1 | 109 | |
110 | **Setp2: ** Set parameters on Params | ||
111 | |||
112 | alias: weconuser | ||
113 | |||
![]() |
4.1 | 114 | password: 599a3c736c04e196c58a29f43778f7ea(The md5 encryption result of Wecon159) |
![]() |
1.1 | 115 | |
116 | (% style="text-align:center" %) | ||
![]() |
3.1 | 117 | [[image:V-BOX HTTP manual_html_563261d83c8f3530.png||height="250" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 118 | |
119 | **Step3:** Get sign | ||
120 | |||
121 | alias=weconuser&comid=2&compvtkey=589625dce895454dbff9782c299db156&password=599a3c736c04e196c58a29f43778f7ea&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
122 | |||
![]() |
4.1 | 123 | Put the whole string above encrypted by MD5, so will get the value of "sign" |
![]() |
1.1 | 124 | |
![]() |
4.1 | 125 | "sign":"997513ff1320862f0cbb9ce19d0bd253" |
126 | |||
![]() |
5.1 | 127 | **✎Note: **For Virtual Deployment, the sign string should be append with domain, so the format would be like following: |
128 | |||
129 | alias=xxx&comid=xxx&compvtkey=xxx&domain=xxx&password=xxx&ts=1657682972386&key=f1cd9351930d4e589922edbcf3b09a7c | ||
130 | |||
![]() |
1.1 | 131 | **Step4: ** Set common of header |
132 | |||
133 | {"comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"997513ff1320862f0cbb9ce19d0bd253"} | ||
134 | |||
135 | (% style="text-align:center" %) | ||
![]() |
3.1 | 136 | [[image:V-BOX HTTP manual_html_cbfc9bbb7d0d4f84.png||height="230" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 137 | |
138 | ((( | ||
139 | **2.1.3 Result** | ||
140 | ))) | ||
141 | |||
142 | { | ||
143 | |||
144 | "code": 200, | ||
145 | |||
146 | "msg": "ok", | ||
147 | |||
148 | "reqId": "1573899119000", | ||
149 | |||
150 | "result": { | ||
151 | |||
152 | "utype": 1, | ||
153 | |||
154 | "ztRole": 1, | ||
155 | |||
156 | "sid": "2d7bfd344aa64d8ebc9beea0e4dad8ad" | ||
157 | |||
158 | } | ||
159 | |||
160 | } | ||
161 | |||
162 | (% style="text-align:center" %) | ||
![]() |
3.1 | 163 | [[image:V-BOX HTTP manual_html_b00e7e6a00828e27.png||height="291" width="500" class="img-thumbnail"]] |
![]() |
1.1 | 164 | |
165 | ((( | ||
166 | = **3 Service data APIs** = | ||
167 | ))) | ||
168 | |||
169 | == **3.1 V-Box list** == | ||
170 | |||
171 | **3.1.1 {{id name="_Toc24963732"/}}Parameters** | ||
172 | |||
173 | (% style="text-align:center" %) | ||
![]() |
5.1 | 174 | [[image:X.png||height="412" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 175 | |
176 | **3.1.2 {{id name="_Toc24963733"/}}Operating procedures** | ||
177 | |||
178 | **Step1:** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/boxs>>url:http://api.v-box.net/box-data/api/we-data/boxs]] | ||
179 | |||
180 | (% style="text-align:center" %) | ||
![]() |
5.1 | 181 | [[image:V-BOX HTTP manual_html_7555868f6d398292.png||height="48" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 182 | |
183 | **Step2:** Set parameters on Params | ||
184 | |||
185 | No parameters for this acturl, so no need to set. | ||
186 | |||
187 | **Step3: ** Get sign | ||
188 | |||
189 | comid=2&compvtkey=589625dce895454dbff9782c299db156&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
190 | |||
191 | MD5 value: 8fb4fbf99fcc1331c3274e708a403034 | ||
192 | |||
193 | **Step4:** Set common of header | ||
194 | |||
195 | {"sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"8fb4fbf99fcc1331c3274e708a403034"} | ||
196 | |||
197 | (% style="text-align:center" %) | ||
![]() |
5.1 | 198 | [[image:V-BOX HTTP manual_html_999832f3a31ac851.png||height="232" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 199 | |
200 | **3.1.3 Result** | ||
201 | |||
202 | { | ||
203 | |||
204 | "code": 200, | ||
205 | |||
206 | "msg": "ok", | ||
207 | |||
208 | "reqId": "1573900361203", | ||
209 | |||
210 | "result": { | ||
211 | |||
212 | "list": [ | ||
213 | |||
214 | { | ||
215 | |||
216 | "groupName": "", | ||
217 | |||
218 | "boxList": [ | ||
219 | |||
220 | { | ||
221 | |||
222 | "machineCode": "V01001171116005027a279eb001", | ||
223 | |||
224 | "devModel": "V-BOX S-00", | ||
225 | |||
226 | "isAlarm": 0, | ||
227 | |||
228 | "boxName": "Treatment Systems", | ||
229 | |||
230 | "remark": "", | ||
231 | |||
232 | "state": "1", | ||
233 | |||
234 | "map": "78.178613,9.177124", | ||
235 | |||
236 | "boxId": "913" | ||
237 | |||
238 | }, | ||
239 | |||
240 | ………… | ||
241 | |||
242 | { | ||
243 | |||
244 | "machineCode": "Vir001171116005027a27201908", | ||
245 | |||
246 | "devModel": "V-BOX S-00", | ||
247 | |||
248 | "isAlarm": 0, | ||
249 | |||
250 | "boxName": "(Smart farm)", | ||
251 | |||
252 | "remark": "", | ||
253 | |||
254 | "state": "1", | ||
255 | |||
256 | "map": "88.637476,50.415074", | ||
257 | |||
258 | "boxId": "973" | ||
259 | |||
260 | } | ||
261 | |||
262 | ] | ||
263 | |||
264 | }, | ||
265 | |||
266 | …………………… | ||
267 | |||
268 | { | ||
269 | |||
270 | "groupName": "(Manufacturing)", | ||
271 | |||
272 | "boxList": [ | ||
273 | |||
274 | { | ||
275 | |||
276 | "machineCode": "Vir001171116005027a27201904", | ||
277 | |||
278 | "devModel": "V-BOX S-00", | ||
279 | |||
280 | "isAlarm": 0, | ||
281 | |||
282 | "boxName": "(Adjustment)", | ||
283 | |||
284 | "remark": "", | ||
285 | |||
286 | "state": "1", | ||
287 | |||
288 | "map": "109.316038,33.749868", | ||
289 | |||
290 | "boxId": "957" | ||
291 | |||
292 | }, | ||
293 | |||
294 | ……………… | ||
295 | |||
296 | { | ||
297 | |||
298 | "machineCode": "Vir001171116005027a27201915", | ||
299 | |||
300 | "devModel": "V-BOX S-00", | ||
301 | |||
302 | "isAlarm": 0, | ||
303 | |||
304 | "boxName": "", | ||
305 | |||
306 | "remark": "", | ||
307 | |||
308 | "state": "1", | ||
309 | |||
310 | "map": "121.357068,24.312132", | ||
311 | |||
312 | "boxId": "975" | ||
313 | |||
314 | } | ||
315 | |||
316 | ] | ||
317 | |||
318 | } | ||
319 | |||
320 | ] | ||
321 | |||
322 | } | ||
323 | |||
324 | } | ||
325 | |||
326 | (% style="text-align:center" %) | ||
![]() |
5.1 | 327 | [[image:V-BOX HTTP manual_html_5999b14ed63e8065.png||height="348" width="600" class="img-thumbnail"]] |
![]() |
1.1 | 328 | |
329 | == **3.2 Real-time group list** == | ||
330 | |||
331 | **3.2.1{{id name="_Toc24963736"/}} Parameters** | ||
332 | |||
333 | (% class="table-bordered" %) | ||
334 | |**acturl**|(% colspan="3" %)we-data/realgroups | ||
335 | |**Functions**|(% colspan="3" %)Get V-BOX’s tags group list | ||
336 | |(% rowspan="2" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
337 | |boxId|(% colspan="2" %)VBoxID ("None" means custom grouping) | ||
338 | |(% rowspan="4" %)**Return value**|Field name|(% colspan="2" %)Description | ||
339 | |(% rowspan="3" %)list|(% colspan="2" %)Group list | ||
340 | |groupId|Group ID | ||
341 | |groupName|Group name | ||
342 | |||
343 | **3.2.2 Operating procedures** | ||
344 | |||
345 | **Step1: **Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/realgroups>>url:http://api.v-box.net/box-data/api/we-data/realgroups]] | ||
346 | |||
347 | (% style="text-align:center" %) | ||
![]() |
5.1 | 348 | [[image:V-BOX HTTP manual_html_abb2159981171c6.png||height="46" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 349 | |
350 | **Step2: **Set parameters on Params | ||
351 | |||
352 | "boxId": "973" | ||
353 | |||
354 | (% style="text-align:center" %) | ||
![]() |
5.1 | 355 | [[image:V-BOX HTTP manual_html_5c3ab35ebdab144e.png||height="151" width="800" class="img-thumbnail"]] |
![]() |
1.1 | 356 | |
357 | **Step3: **Get sign | ||
358 | |||
359 | boxId=973&comid=2&compvtkey=589625dce895454dbff9782c299db156&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
360 | |||
361 | MD5 value: 9b267b7549083167954b7ede30916ff5 | ||
362 | |||
363 | **Step4: **Set common of header | ||
364 | |||
365 | {"boxId":"973","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"9b267b7549083167954b7ede30916ff5"} | ||
366 | |||
367 | (% style="text-align:center" %) | ||
![]() |
5.1 | 368 | [[image:V-BOX HTTP manual_html_cc06cac462c1b77a.png||height="172" width="800" class="img-thumbnail"]] |
![]() |
1.1 | 369 | |
370 | **3.2.3 Result** | ||
371 | |||
372 | { | ||
373 | |||
374 | "code": 200, | ||
375 | |||
376 | "msg": "ok", | ||
377 | |||
378 | "reqId": "1573901906667", | ||
379 | |||
380 | "result": { | ||
381 | |||
382 | "list": [ | ||
383 | |||
384 | { | ||
385 | |||
386 | "groupName": "Temperature", | ||
387 | |||
388 | "groupId": 7325 | ||
389 | |||
390 | }, | ||
391 | |||
392 | { | ||
393 | |||
394 | "groupName": "Humidity", | ||
395 | |||
396 | "groupId": 7326 | ||
397 | |||
398 | }, | ||
399 | |||
400 | { | ||
401 | |||
402 | "groupName": "Button switch", | ||
403 | |||
404 | "groupId": 7327 | ||
405 | |||
406 | } | ||
407 | |||
408 | ] | ||
409 | |||
410 | } | ||
411 | |||
412 | } | ||
413 | |||
414 | [[image:V-BOX HTTP manual_html_2445c358293d621.png||height="531" width="532"]] | ||
415 | |||
416 | == **3.3 Real-time tags configuration list** == | ||
417 | |||
418 | **3.3.1 Parameters** | ||
419 | |||
420 | (% class="table-bordered" %) | ||
421 | |**acturl**|(% colspan="3" %)we-data/realcfgs | ||
422 | |**Functions**|(% colspan="3" %)Get the tags configuration information in the specified group in V-BOX. | ||
423 | |(% rowspan="5" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
424 | |boxId|(% colspan="2" %)VBoxID(“None” means custom tags grouping) | ||
425 | |groupId|(% colspan="2" %)Group ID (Required) | ||
426 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
427 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
428 | |(% rowspan="15" %)**Return value**|Field name|(% colspan="2" %)Description | ||
429 | |(% rowspan="11" %)cfgList|monitorId|Tags ID | ||
430 | |monitorName|Tags name | ||
431 | |updTime|Last update time | ||
432 | |dataId|((( | ||
433 | type of data | ||
434 | |||
435 | 100: 16-bit binary | ||
436 | |||
437 | 101: 16-digit octal | ||
438 | |||
439 | Refer to Appendix 1 | ||
440 | ))) | ||
441 | |addr|Address | ||
442 | |addrType|((( | ||
443 | 0: bit address | ||
444 | |||
445 | 1: byte address | ||
446 | |||
447 | 2: word address | ||
448 | |||
449 | 3: double word | ||
450 | ))) | ||
451 | |digitCount|Integer digits, decimal places | ||
452 | |digitBinary|Data type and integer digits, decimal places | ||
453 | |dataLimit|Data range | ||
454 | |rid|Address | ||
455 | |roleType|Permission: 1-read only, 2-write only, 3-read-write | ||
456 | |totalPage|(% colspan="2" %)Total pages | ||
457 | |totalRecord|(% colspan="2" %)Total record number | ||
458 | |currentPage|(% colspan="2" %)Current page number | ||
459 | |||
460 | **3.3.2 Operating procedures** | ||
461 | |||
462 | **Step1: **Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/realcfgs>>url:http://api.v-box.net/box-data/api/we-data/realcfgs]] | ||
463 | |||
464 | (% style="text-align:center" %) | ||
![]() |
5.1 | 465 | [[image:V-BOX HTTP manual_html_3fff373ae27e2e00.png||height="44" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 466 | |
467 | **Step2: **Set parameters on Params | ||
468 | |||
469 | "boxId":"973" | ||
470 | |||
471 | "groupId":"7325" | ||
472 | |||
473 | "pageSize":"5" | ||
474 | |||
475 | "pageIndex":"2" | ||
476 | |||
477 | (% style="text-align:center" %) | ||
![]() |
5.1 | 478 | [[image:V-BOX HTTP manual_html_52bf7d95165a3e3a.png||height="273" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 479 | |
480 | **Step3:** Get sign | ||
481 | |||
482 | boxId=973&comid=2&compvtkey=589625dce895454dbff9782c299db156&groupId=7325&pageIndex=2&pageSize=5&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
483 | |||
484 | MD5 sign: 0769228e66c945eed5431c41a96949f2 | ||
485 | |||
486 | **Step4:** Set common of header | ||
487 | |||
488 | {"boxId":"973","groupId":"7325","pageSize":"5","pageIndex":"2","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"0769228e66c945eed5431c41a96949f2"} | ||
489 | |||
490 | (% style="text-align:center" %) | ||
![]() |
5.1 | 491 | [[image:V-BOX HTTP manual_html_d284dfdd7b4844ee.png||height="288" width="800" class="img-thumbnail"]] |
![]() |
1.1 | 492 | |
493 | **3.3.3 Result** | ||
494 | |||
495 | { | ||
496 | |||
497 | "code": 200, | ||
498 | |||
499 | "msg": "ok", | ||
500 | |||
501 | "reqId": "1573903822419", | ||
502 | |||
503 | "result": { | ||
504 | |||
505 | "cfgList": [ | ||
506 | |||
507 | { | ||
508 | |||
509 | "monitorId": 91545, | ||
510 | |||
511 | "dataId": 105, | ||
512 | |||
513 | "monitorName": "Temp_9", | ||
514 | |||
515 | "updTime": 1571965761000, | ||
516 | |||
517 | "dataLimit": "0 7999", | ||
518 | |||
519 | "digitBinary": "十进制", | ||
520 | |||
521 | "addr": "9", | ||
522 | |||
523 | "rid": "D", | ||
524 | |||
525 | "roleType": 3, | ||
526 | |||
527 | "digitCount": "5,0", | ||
528 | |||
529 | "addrType": 2 | ||
530 | |||
531 | }, | ||
532 | |||
533 | …………… | ||
534 | |||
535 | { | ||
536 | |||
537 | "monitorId": 91541, | ||
538 | |||
539 | "dataId": 105, | ||
540 | |||
541 | "monitorName": "Temp_5", | ||
542 | |||
543 | "updTime": 1571965761000, | ||
544 | |||
545 | "dataLimit": "0 7999", | ||
546 | |||
547 | "digitBinary": "十进制", | ||
548 | |||
549 | "addr": "5", | ||
550 | |||
551 | "rid": "D", | ||
552 | |||
553 | "roleType": 3, | ||
554 | |||
555 | "digitCount": "5,0", | ||
556 | |||
557 | "addrType": 2 | ||
558 | |||
559 | } | ||
560 | |||
561 | ], | ||
562 | |||
563 | "totalPage": 3, | ||
564 | |||
565 | "totalRecord": 15, | ||
566 | |||
567 | "currentPage": 2 | ||
568 | |||
569 | } | ||
570 | |||
571 | } | ||
572 | |||
573 | (% style="text-align:center" %) | ||
![]() |
5.1 | 574 | [[image:V-BOX HTTP manual_html_e7271097b71941cc.png||height="644" width="800" class="img-thumbnail"]] |
![]() |
1.1 | 575 | |
576 | == (% id="cke_bm_1151S" style="display:none" %)** {{id name="_Toc24963743"/}}**(%%)**3.4 Tags data list** == | ||
577 | |||
578 | **3.4.1 {{id name="_Toc24963744"/}}Parameters** | ||
579 | |||
580 | (% class="table-bordered" %) | ||
581 | |**acturl**|(% colspan="3" %)we-data/realdata | ||
582 | |**Functions**|(% colspan="3" %)Get the tags data in the specified group in V-BOX. | ||
583 | |(% rowspan="5" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
584 | |boxId|(% colspan="2" %)VBoxID(“None” means custom tag grouping) | ||
585 | |groupId|(% colspan="2" %)Group ID (Required) | ||
586 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
587 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
588 | |(% rowspan="11" %)**Return value**|Field name|(% colspan="2" %)Description | ||
589 | |(% rowspan="7" %)List|(% colspan="2" %)Real-time data list | ||
590 | |com|Communication port ID | ||
591 | |monitorId|Tag ID | ||
592 | |monitorName|Tag name | ||
593 | |state|status | ||
594 | |value|Value | ||
595 | |groupId|Group ID | ||
596 | |totalPage|(% colspan="2" %)Total pages | ||
597 | |totalRecord|(% colspan="2" %)Total record | ||
598 | |currentPage|(% colspan="2" %)current page | ||
599 | |||
600 | **3.4.2 {{id name="_Toc24963745"/}}Operating procedures** | ||
601 | |||
602 | **Step1: **Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/realdata>>url:http://api.v-box.net/box-data/api/we-data/realdata]] | ||
603 | |||
604 | (% style="text-align:center" %) | ||
![]() |
5.1 | 605 | [[image:V-BOX HTTP manual_html_839fb0577dac88c1.png||height="45" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 606 | |
607 | **Step2: **Set parameters on Params | ||
608 | |||
609 | "boxId":"973" | ||
610 | |||
611 | "groupId":"7325" | ||
612 | |||
613 | "pageSize":"5" | ||
614 | |||
615 | "pageIndex":"2" | ||
616 | |||
617 | (% style="text-align:center" %) | ||
![]() |
5.1 | 618 | [[image:V-BOX HTTP manual_html_b860bab44ebbc128.png||height="272" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 619 | |
620 | **Step3:** Get sign | ||
621 | |||
622 | boxId=973&comid=2&compvtkey=589625dce895454dbff9782c299db156&groupId=7325&pageIndex=2&pageSize=5&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
623 | |||
624 | MD5 sign: 0769228e66c945eed5431c41a96949f2 | ||
625 | |||
626 | {"boxId":"973","groupId":"7325","pageSize":"5","pageIndex":"2","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"0769228e66c945eed5431c41a96949f2"} | ||
627 | |||
628 | **3.4.3 {{id name="_Toc24963746"/}}Result** | ||
629 | |||
630 | { | ||
631 | |||
632 | "code": 200, | ||
633 | |||
634 | "msg": "ok", | ||
635 | |||
636 | "reqId": "1573905679365", | ||
637 | |||
638 | "result": { | ||
639 | |||
640 | "totalPage": 3, | ||
641 | |||
642 | "list": [ | ||
643 | |||
644 | { | ||
645 | |||
646 | "com": 2939, | ||
647 | |||
648 | "monitorId": 91545, | ||
649 | |||
650 | "monitorName": "Temp_9", | ||
651 | |||
652 | "groupId": 0, | ||
653 | |||
654 | "state": "1", | ||
655 | |||
656 | "value": "90" | ||
657 | |||
658 | }, | ||
659 | |||
660 | ………… | ||
661 | |||
662 | }, | ||
663 | |||
664 | { | ||
665 | |||
666 | "com": 2939, | ||
667 | |||
668 | "monitorId": 91541, | ||
669 | |||
670 | "monitorName": "Temp_5", | ||
671 | |||
672 | "groupId": 0, | ||
673 | |||
674 | "state": "1", | ||
675 | |||
676 | "value": "87" | ||
677 | |||
678 | } | ||
679 | |||
680 | ], | ||
681 | |||
682 | "totalRecord": 15, | ||
683 | |||
684 | "currentPage": 2 | ||
685 | |||
686 | } | ||
687 | |||
688 | } | ||
689 | |||
690 | (% style="text-align:center" %) | ||
![]() |
5.1 | 691 | [[image:V-BOX HTTP manual_html_705682e81eae5ea7.png||height="651" width="800" class="img-thumbnail"]] |
![]() |
1.1 | 692 | |
693 | == **3.5 Modify tag data** == | ||
694 | |||
695 | ((( | ||
696 | **3.5.1 Parameters** | ||
697 | ))) | ||
698 | |||
699 | (% class="table-bordered" %) | ||
700 | |**acturl**|(% colspan="2" %)we-data/updrealdata | ||
701 | |**Functions**|(% colspan="2" %)Modify tag data | ||
702 | |(% rowspan="3" %)**Parameters**|Parameter|Description | ||
703 | |monitorId|Tag ID | ||
704 | |value|value | ||
705 | |**Return value**|(% colspan="2" %)None | ||
706 | |||
707 | **3.5.2 Operating procedures** | ||
708 | |||
709 | **Step1:** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/updrealdata>>url:http://api.v-box.net/box-data/api/we-data/updrealdata]] | ||
710 | |||
711 | (% style="text-align:center" %) | ||
![]() |
5.1 | 712 | [[image:1651915094120-525.png||height="45" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 713 | |
714 | **Step2:** Set parameters on Params | ||
715 | |||
716 | "monitorId":"91541" | ||
717 | |||
718 | "value":"60" | ||
719 | |||
720 | (% style="text-align:center" %) | ||
![]() |
5.1 | 721 | [[image:V-BOX HTTP manual_html_5a3153add75ca7b4.png||height="246" width="800" class="img-thumbnail"]] |
![]() |
1.1 | 722 | |
723 | **Step3:** Get sign | ||
724 | |||
725 | comid=2&compvtkey=589625dce895454dbff9782c299db156&monitorId=91541&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&value=60&key=f1cd9351930d4e589922edbcf3b09a7c | ||
726 | |||
727 | MD5 sign: 4119b1abc9176a187f781bece04a5296 | ||
728 | |||
729 | **Step4: **Set common of header | ||
730 | |||
731 | {"monitorId":"91541","value":"60","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"4119b1abc9176a187f781bece04a5296"} | ||
732 | |||
733 | (% style="text-align:center" %) | ||
![]() |
5.1 | 734 | [[image:V-BOX HTTP manual_html_59d54a5d886ef614.png||height="244" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 735 | |
736 | **3.5.3 Result** | ||
737 | |||
738 | { | ||
739 | |||
740 | "code": 200, | ||
741 | |||
742 | "msg": "ok", | ||
743 | |||
744 | "reqId": "1573907138803", | ||
745 | |||
746 | "result": {} | ||
747 | |||
748 | } | ||
749 | |||
750 | (% style="text-align:center" %) | ||
![]() |
5.1 | 751 | [[image:V-BOX HTTP manual_html_590c8dab9e80fd0f.png||height="425" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 752 | |
753 | == **3.6 {{id name="_Toc24963751"/}}Historical tags name list** == | ||
754 | |||
755 | **3.6.1 Parameters** | ||
756 | |||
757 | (% class="table-bordered" %) | ||
758 | |**acturl**|(% colspan="3" %)we-data/monitors | ||
759 | |**Functions**|(% colspan="3" %)Get a list of historical tags | ||
760 | |(% rowspan="2" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
761 | |boxId|(% colspan="2" %)VBoxID (Not required) | ||
762 | |(% rowspan="4" %)**Return value**|Field name|(% colspan="2" %)Description | ||
763 | |(% rowspan="3" %)list|(% colspan="2" %)Tag list | ||
764 | |monitorId|tag ID | ||
765 | |monitorName|tag name | ||
766 | |||
![]() |
5.1 | 767 | **3.6.2 Operating procedures** |
![]() |
1.1 | 768 | |
769 | **Step1: **Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/monitors>>url:http://api.v-box.net/box-data/api/we-data/monitors]] | ||
770 | |||
771 | (% style="text-align:center" %) | ||
![]() |
5.1 | 772 | [[image:V-BOX HTTP manual_html_456f00c6af3ea1b7.png||height="45" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 773 | |
774 | **Step2: **Set parameters on Params | ||
775 | |||
776 | "boxId":"973" | ||
777 | |||
778 | (% style="text-align:center" %) | ||
![]() |
5.1 | 779 | [[image:V-BOX HTTP manual_html_8bf7c3f9b3ce3897.png||height="185" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 780 | |
781 | **Step3:** Get sign | ||
782 | |||
783 | boxId=973&comid=2&compvtkey=589625dce895454dbff9782c299db156&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
784 | |||
785 | MD5 sign: 9b267b7549083167954b7ede30916ff5 | ||
786 | |||
787 | **Step4:** Set common of header | ||
788 | |||
789 | {"boxId":"973","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"9b267b7549083167954b7ede30916ff5"} | ||
790 | |||
791 | (% style="text-align:center" %) | ||
![]() |
5.1 | 792 | [[image:V-BOX HTTP manual_html_dba52ac718eeb66e.png||height="228" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 793 | |
794 | **3.6.3 Result** | ||
795 | |||
796 | { | ||
797 | |||
798 | "code": 200, | ||
799 | |||
800 | "msg": "ok", | ||
801 | |||
802 | "reqId": "1573907813693", | ||
803 | |||
804 | "result": { | ||
805 | |||
806 | "list": [ | ||
807 | |||
808 | { | ||
809 | |||
810 | "monitorId": 91576, | ||
811 | |||
812 | "monitorName": "Hum", | ||
813 | |||
814 | "groupId": 7328 | ||
815 | |||
816 | }, | ||
817 | |||
818 | { | ||
819 | |||
820 | "monitorId": 91577, | ||
821 | |||
822 | "monitorName": "Temp", | ||
823 | |||
824 | "groupId": 7328 | ||
825 | |||
826 | } | ||
827 | |||
828 | ] | ||
829 | |||
830 | } | ||
831 | |||
832 | } | ||
833 | |||
834 | (% style="text-align:center" %) | ||
![]() |
5.1 | 835 | [[image:V-BOX HTTP manual_html_2a739377a9fb10b2.png||height="400" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 836 | |
837 | == (% id="cke_bm_1218S" style="display:none" %)** **(%%)**3.7 {{id name="_Toc24963755"/}}Historical tag data list** == | ||
838 | |||
839 | **3.7.1 {{id name="_Toc24963756"/}}Parameters** | ||
840 | |||
841 | (% class="table-bordered" %) | ||
842 | |**acturl**|(% colspan="3" %)we-data/historydata | ||
843 | |**Functions**|(% colspan="3" %)Get historical data | ||
844 | |(% rowspan="6" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
845 | |monitorId|(% colspan="2" %)tag ID, (Required) | ||
846 | |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required) | ||
847 | |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required) | ||
848 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
849 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
850 | |(% rowspan="8" %)**Return value**|Field name|(% colspan="2" %)Description | ||
851 | |(% rowspan="4" %)list|(% colspan="2" %)Historical data list | ||
852 | |monitorName|tag name | ||
853 | |monitorTime|Monitoring time | ||
854 | |value|Value | ||
855 | |totalPage|(% colspan="2" %)Total pages | ||
856 | |totalRecord|(% colspan="2" %)Total records | ||
857 | |currentPage|(% colspan="2" %)Current page | ||
858 | |||
859 | **3.7.2 Operating procedures** | ||
860 | |||
861 | **Step:** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/historydata>>url:http://api.v-box.net/box-data/api/we-data/historydata]] | ||
862 | |||
863 | (% style="text-align:center" %) | ||
![]() |
5.1 | 864 | [[image:V-BOX HTTP manual_html_cd2fdea1493dc20e.png||height="47" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 865 | |
866 | **Step2:** Set parameters on Params | ||
867 | |||
868 | "monitorId": 91577 | ||
869 | |||
870 | "monitorBeginTime":"2019-11-16 10:45:44.000" | ||
871 | |||
872 | "monitorEndTime":"2019-11-16 20:45:44.000" | ||
873 | |||
874 | "pageSize":"10" | ||
875 | |||
876 | "pageIndex":"2" | ||
877 | |||
878 | (% style="text-align:center" %) | ||
![]() |
5.1 | 879 | [[image:V-BOX HTTP manual_html_f169ff87c20ce6c4.png||height="302" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 880 | |
881 | **Step3: **Get sign | ||
882 | |||
883 | comid=2&compvtkey=589625dce895454dbff9782c299db156&monitorBeginTime=2019-11-16 10:45:44.000&monitorEndTime=2019-11-16 20:45:44.000&monitorId=91577&pageIndex=2&pageSize=10&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
884 | |||
885 | MD5 sign: feeae8ddb4014951cfc2c02de4744bc4 | ||
886 | |||
887 | **Step4:** Set common of header | ||
888 | |||
889 | {"monitorId":"91577","monitorBeginTime":"2019-11-16 10:45:44.000","monitorEndTime":"2019-11-16 20:45:44.000","pageSize":"10","pageIndex":"2","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"feeae8ddb4014951cfc2c02de4744bc4"} | ||
890 | |||
891 | (% style="text-align:center" %) | ||
![]() |
5.1 | 892 | [[image:V-BOX HTTP manual_html_fac48b1179b555ee.png||height="291" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 893 | |
894 | **3.7.3 Result** | ||
895 | |||
896 | { | ||
897 | |||
898 | "code": 200, | ||
899 | |||
900 | "msg": "ok", | ||
901 | |||
902 | "reqId": "1573909705772", | ||
903 | |||
904 | "result": { | ||
905 | |||
906 | "totalPage": 12, | ||
907 | |||
908 | "list": [ | ||
909 | |||
910 | { | ||
911 | |||
912 | "monitorTime": 1573905337000, | ||
913 | |||
914 | "groupName": "His", | ||
915 | |||
916 | "monitorTime_show": "2019-11-16 19:55:37.000", | ||
917 | |||
918 | "monitorName": "Temp", | ||
919 | |||
920 | "groupId": 7328, | ||
921 | |||
922 | "value": "914" | ||
923 | |||
924 | }, | ||
925 | |||
926 | …………… | ||
927 | |||
928 | { | ||
929 | |||
930 | "monitorTime": 1573902637000, | ||
931 | |||
932 | "groupName": "His", | ||
933 | |||
934 | "monitorTime_show": "2019-11-16 19:10:37.000", | ||
935 | |||
936 | "monitorName": "Temp", | ||
937 | |||
938 | "groupId": 7328, | ||
939 | |||
940 | "value": "422" | ||
941 | |||
942 | } | ||
943 | |||
944 | ], | ||
945 | |||
946 | "totalRecord": 120, | ||
947 | |||
948 | "currentPage": 2 | ||
949 | |||
950 | } | ||
951 | |||
952 | } | ||
953 | |||
954 | (% style="text-align:center" %) | ||
![]() |
5.1 | 955 | [[image:V-BOX HTTP manual_html_f3b62eb69687a214.png||height="476" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 956 | |
957 | == **3.8 Alarm tags data list** == | ||
958 | |||
959 | **3.8.1 {{id name="_Toc24963760"/}}Parameters** | ||
960 | |||
961 | (% class="table-bordered" %) | ||
962 | |**acturl**|(% colspan="3" %)we-data/alarmdata | ||
963 | |**Function**|(% colspan="3" %)Get alarm data | ||
964 | |(% rowspan="9" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
965 | |boxId|(% colspan="2" %)VBoxID, (Required) | ||
966 | |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required) | ||
967 | |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required) | ||
968 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
969 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
970 | |state|(% colspan="2" %)Status 1-unconfirmed, 2-confirm | ||
971 | |alarmType|(% colspan="2" %)Alarm events: 1-trigger alarm, 0-disarm (Not necessary) | ||
972 | |alarmLevel|(% colspan="2" %)((( | ||
973 | Alarm level: 1 general alarm, | ||
974 | |||
975 | 2 serious alarm, | ||
976 | |||
977 | 3 particularly serious alarm | ||
978 | |||
979 | (Not necessary) | ||
980 | ))) | ||
981 | |(% rowspan="12" %)**Return value**|Field name|(% colspan="2" %)Description | ||
982 | |(% rowspan="8" %)List|(% colspan="2" %)Alarm data list | ||
983 | |monitorId|tag ID | ||
984 | |monitorName|tag name | ||
985 | |state|status | ||
986 | |value|Value | ||
987 | |monitorTime|Monitoring time | ||
988 | |alarmType|Alarm event | ||
989 | |alarmLevel|Alarm level | ||
990 | |totalPage|(% colspan="2" %)Total pages | ||
991 | |totalRecord|(% colspan="2" %)Total records | ||
992 | |currentPage|(% colspan="2" %)Current page | ||
993 | |||
994 | **3.8.2 {{id name="_Toc24963761"/}}Operating procedures** | ||
995 | |||
996 | **Step1:** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/alarmdata>>url:http://api.v-box.net/box-data/api/we-data/alarmdata]] | ||
997 | |||
998 | (% style="text-align:center" %) | ||
![]() |
5.1 | 999 | [[image:V-BOX HTTP manual_html_4ebee4d4fcf0097c.png||height="45" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 1000 | |
1001 | **Step2:** Set parameters on Params | ||
1002 | |||
1003 | "monitorId":"91931" | ||
1004 | |||
1005 | "monitorBeginTime":"2019-11-16 20:30:44.000" | ||
1006 | |||
1007 | "monitorEndTime":"2019-11-16 21:30:44.000" | ||
1008 | |||
1009 | "pageSize":"10" | ||
1010 | |||
1011 | "pageIndex":"1" | ||
1012 | |||
1013 | "state":"2" | ||
1014 | |||
1015 | (% style="text-align:center" %) | ||
![]() |
5.1 | 1016 | [[image:V-BOX HTTP manual_html_2361d0eaa7447a9c.png||height="327" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 1017 | |
1018 | **Step3:** Get sign | ||
1019 | |||
1020 | comid=2&compvtkey=589625dce895454dbff9782c299db156&monitorBeginTime=2019-11-16 20:30:44.000&monitorEndTime=2019-11-16 21:30:44.000&monitorId=91931&pageIndex=1&pageSize=10&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&state=2&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
1021 | |||
1022 | MD5 sign: 4056006bbc71bd80a3c632987626e15b | ||
1023 | |||
1024 | **Step4: **Set common of header | ||
1025 | |||
1026 | {"monitorId":"91931","monitorBeginTime":"2019-11-16 20:30:44.000","monitorEndTime":"2019-11-16 21:30:44.000","pageSize":"10","pageIndex":"1","state":"2","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"4056006bbc71bd80a3c632987626e15b"} | ||
1027 | |||
1028 | (% style="text-align:center" %) | ||
![]() |
5.1 | 1029 | [[image:V-BOX HTTP manual_html_cd9ce84648b86cb9.png||height="269" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 1030 | |
1031 | **3.8.3 Result** | ||
1032 | |||
1033 | { | ||
1034 | |||
1035 | "code": 200, | ||
1036 | |||
1037 | "msg": "ok", | ||
1038 | |||
1039 | "reqId": "1573911745258", | ||
1040 | |||
1041 | "result": { | ||
1042 | |||
1043 | "totalPage": 1, | ||
1044 | |||
1045 | "list": [ | ||
1046 | |||
1047 | { | ||
1048 | |||
1049 | "monitorTime": 1573910934000, | ||
1050 | |||
1051 | "alarmType": 0, | ||
1052 | |||
1053 | "monitorId": 4437, | ||
1054 | |||
1055 | "monitorTime_show": "2019-11-16 21:28:54", | ||
1056 | |||
1057 | "monitorName": "Temperature alarm", | ||
1058 | |||
1059 | "alarmLevel": 2, | ||
1060 | |||
1061 | "state": 2, | ||
1062 | |||
1063 | "text": "The temperature is too high", | ||
1064 | |||
1065 | "value": "1", | ||
1066 | |||
1067 | "alarm_role": 0 | ||
1068 | |||
1069 | }, | ||
1070 | |||
1071 | ………… | ||
1072 | |||
1073 | { | ||
1074 | |||
1075 | "monitorTime": 1573910855000, | ||
1076 | |||
1077 | "alarmType": 1, | ||
1078 | |||
1079 | "monitorId": 4437, | ||
1080 | |||
1081 | "monitorTime_show": "2019-11-16 21:27:35", | ||
1082 | |||
1083 | "monitorName": "Temperature alarm", | ||
1084 | |||
1085 | "alarmLevel": 2, | ||
1086 | |||
1087 | "state": 2, | ||
1088 | |||
1089 | "text": "The temperature is too high", | ||
1090 | |||
1091 | "value": "18", | ||
1092 | |||
1093 | "alarm_role": 0 | ||
1094 | |||
1095 | } | ||
1096 | |||
1097 | ], | ||
1098 | |||
1099 | "totalRecord": 6, | ||
1100 | |||
1101 | "currentPage": 1 | ||
1102 | |||
1103 | } | ||
1104 | |||
1105 | } | ||
1106 | |||
1107 | (% style="text-align:center" %) | ||
![]() |
5.1 | 1108 | [[image:V-BOX HTTP manual_html_d4a3e0114c402c27.png||height="475" width="700" class="img-thumbnail"]] |
![]() |
1.1 | 1109 | |
1110 | == **3.9 Get device state** == | ||
1111 | |||
1112 | **3.9.1 {{id name="_Toc24963760"/}}Parameters** | ||
1113 | |||
1114 | (% class="table-bordered" %) | ||
1115 | |**acturl**|(% colspan="3" %)we-data/getDeviceState | ||
1116 | |**Function**|(% colspan="3" %)Get vbox state based on machine code | ||
1117 | |(% colspan="1" rowspan="2" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
1118 | |machineCode|(% colspan="2" %)machineCode(required) | ||
1119 | |(% rowspan="2" %)**Return value**|Field name|(% colspan="2" %)Description | ||
1120 | |state|(% colspan="2" %)vbox state: 1-online, 0-offline | ||
1121 | |||
1122 | == **3.10 Send switch to device** == | ||
1123 | |||
1124 | **3.10.1 {{id name="_Toc24963760"/}}Parameters** | ||
1125 | |||
1126 | (% class="table-bordered" %) | ||
1127 | |(% style="width:102px" %)**acturl**|(% colspan="3" style="width:1059px" %)we-data/sendSwitchToDevice | ||
1128 | |(% style="width:102px" %)**Function**|(% colspan="3" style="width:1059px" %)Enable vbox reports real-time data, because now the vbox has added a real-time data switch function, only in the real-time data page vbox will report real-time data, otherwise it will not be reported. So if you need to keep to get real-time data, you need to call this interface first, and call it every 20 seconds, so that the vbox will continue to report real-time data. | ||
1129 | |(% colspan="1" rowspan="2" style="width:102px" %)**Parameters**|(% style="width:450px" %)Parameter|(% colspan="2" %)Description | ||
1130 | |(% style="width:450px" %)boxId|(% colspan="2" %)boxId(required) | ||
1131 | |(% rowspan="1" style="width:102px" %)**Return value**|(% style="width:450px" %)Field name|(% colspan="2" %)Description | ||
1132 | |||
1133 | = **4 Appendix** = | ||
1134 | |||
1135 | == (% style="color:inherit; font-family:inherit; font-size:26px" %)**4.1 Data type**(%%) == | ||
1136 | |||
1137 | 100: 16-bit binary | ||
1138 | |||
1139 | 101: 16-bit octal | ||
1140 | |||
1141 | 102: 16-bit hexadecimal | ||
1142 | |||
1143 | 103: 16-bit BCD code | ||
1144 | |||
1145 | 104: 16-bit signed decimal | ||
1146 | |||
1147 | 105: 16-bit unsigned decimal | ||
1148 | |||
1149 | 200: 32-bit binary | ||
1150 | |||
1151 | 201: 32-bit octal | ||
1152 | |||
1153 | 202: 32-bit hexadecimal | ||
1154 | |||
1155 | 203: 32-bit BCD | ||
1156 | |||
1157 | 204: 32-bit signed decimal | ||
1158 | |||
1159 | 205: 32-bit unsigned decimal | ||
1160 | |||
1161 | 206: 32-bit floating | ||
1162 | |||
1163 | 400: 64-bit binary | ||
1164 | |||
1165 | 401: 64-bit octal | ||
1166 | |||
1167 | 402: 64-bit hexadecimal | ||
1168 | |||
1169 | 403: 64-bit BCD | ||
1170 | |||
1171 | 404: 64-bit signed decimal | ||
1172 | |||
1173 | 405: 64-bit unsigned decimal | ||
1174 | |||
1175 | 406: 64-bit floating | ||
1176 | |||
1177 | 1000: string | ||
1178 | |||
1179 | |||
1180 | |||
1181 | |||
1182 | |||
1183 | |||
1184 | |||
1185 | |||
1186 | |||
1187 | Version: V1.1.0 | ||
1188 | |||
1189 | Date: Nov 2019 |