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