Wiki source code of HTTPS API
Version 7.1 by Devin Chen on 2026/01/22 17:07
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{warning}} | ||
| 2 | Important Notice: | ||
| 3 | |||
| 4 | |||
| 5 | This standard defines Wecon's proprietary access protocol. Third-party API integration requires explicit authorization through our V-net V2.0 platform, with all API access strictly monitored and regulated. Wecon reserves all rights to interpret and modify these specifications without prior notice. | ||
| 6 | \\To prevent API abuse,this feature will not be enabled by default for all users. **Access requires submitting an application**, with a monthly free quota of 10,000 times.**(This limitation is only for Wecon API motioned by in this manual)** | ||
| 7 | {{/warning}} | ||
| 8 | |||
| 9 | = 1.Third-party account = | ||
| 10 | |||
| 11 | On the V-NET 2.0 platform, API functions require integration with third-party accounts. | ||
| 12 | |||
| 13 | == 1.1 Create a third-party account == | ||
| 14 | |||
| 15 | (% style="text-align:center" %) | ||
| 16 | [[image:hj18xtdG0np.png||height="498" width="1200"]] | ||
| 17 | |||
| 18 | (% style="text-align:center" %) | ||
| 19 | [[image:PixPin_2025-07-09_11-27-51.png]] | ||
| 20 | |||
| 21 | {{info}} | ||
| 22 | Noted: | ||
| 23 | |||
| 24 | ~1. After clicking "OK", the third-party account password will no longer be visible. Please back it up promptly. | ||
| 25 | |||
| 26 | 2.** An admin account only allows to create one third-party account.** | ||
| 27 | {{/info}} | ||
| 28 | |||
| 29 | == 1.2 Assign device to third-party account == | ||
| 30 | |||
| 31 | 1.choose the third-party account | ||
| 32 | |||
| 33 | (% style="text-align:center" %) | ||
| 34 | [[image:bu3lT1iyiV.png||height="601" width="1200"]] | ||
| 35 | |||
| 36 | 2.select a device to bind | ||
| 37 | |||
| 38 | (% style="text-align:center" %) | ||
| 39 | [[image:v1U3oIZDMH.png||height="880" width="1200"]] | ||
| 40 | |||
| 41 | 3.Binded successfully | ||
| 42 | |||
| 43 | (% style="text-align:center" %) | ||
| 44 | [[image:1752032411880-592.png||height="820" width="1200"]] | ||
| 45 | |||
| 46 | = 2.Operational process = | ||
| 47 | |||
| 48 | == 2.1 Basic information == | ||
| 49 | |||
| 50 | * ((( | ||
| 51 | **Request url**: | ||
| 52 | Asean: https:~/~/api.asean.v-iec.com/m16/{acturl} | ||
| 53 | |||
| 54 | EU: https:~/~/api.eu.v-box.net/m16/{acturl} | ||
| 55 | ))) | ||
| 56 | * ((( | ||
| 57 | **Protocol: **https | ||
| 58 | ))) | ||
| 59 | * ((( | ||
| 60 | **Interface Parameter Description:** | ||
| 61 | ))) | ||
| 62 | |||
| 63 | Global Parameters (HTTP Headers) | ||
| 64 | |||
| 65 | 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) | ||
| 66 | |||
| 67 | |=**Parameter**|=**Description** | ||
| 68 | |sid|session ID (Obtained after login, and is used for all acturls after login) | ||
| 69 | |ts|Millisecond-level timestamp;( e.g. ,1750818494344) | ||
| 70 | |sign|((( | ||
| 71 | How to get sign: | ||
| 72 | |||
| 73 | Concatenate all parameters, including the header parameters above and the individual business parameters of each interface, in the format **key=value**, separated by & symbols. For example, for the login interface, the concatenated result would be: | ||
| 74 | **alias=test&cuid=123456789&password=dc6e6a331dc2b23420d99c53a0d4962e&pid=1&sv=1.0&mt=255&ts=1595381946008&lan=zh&sign=sign** | ||
| 75 | |||
| 76 | Here, alias and password are the business parameters specific to the login interface, while the others are header parameters (**Note**: The sid parameter is excluded for the login interface but must be included for other interfaces). | ||
| 77 | |||
| 78 | 1. **Sort all parameters alphabetically**: | ||
| 79 | 1*. Order by the first letter; if the first letters are identical, proceed to the second letter, and so on. | ||
| 80 | 1. **Append the fixed parameter key=5cee621329f24e5cbdc43daa959ce9a1 at the end**: | ||
| 81 | 1*. This parameter is mandatory for all interfaces and must always be placed last. | ||
| 82 | |||
| 83 | Finally, calculate the MD5 hash of the concatenated string to generate the sign | ||
| 84 | ))) | ||
| 85 | |||
| 86 | The final header parameters are as follows (Note: The login interface does not require 'sid', while other interfaces must include 'sid'. The value of 'ts' must be identical to the 'ts' used in the above sign calculation): | ||
| 87 | |||
| 88 | wcommon:{"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"XXX","pid":"1","ts":1742612007058} | ||
| 89 | |||
| 90 | **Return the result in JSON format, case-sensitive, for example:** | ||
| 91 | |||
| 92 | 1) Client error responses | ||
| 93 | |||
| 94 | {{code language="none"}} | ||
| 95 | {"code" : 403, "msg" : "session timeout", "reqId":"1502074141465", "result":{}} | ||
| 96 | {{/code}} | ||
| 97 | |||
| 98 | 2) Successful responses | ||
| 99 | |||
| 100 | {{code language="none"}} | ||
| 101 | {"code" : 200 , "result": {}, "msg" : "ok", "reqId":"1502074141465"} | ||
| 102 | {{/code}} | ||
| 103 | |||
| 104 | **HTTP response status codes** | ||
| 105 | |||
| 106 | |=**Status codes**|=**Description** | ||
| 107 | |(% style="text-align:center" %)200|(% style="text-align:center" %)The request succeeded | ||
| 108 | |(% style="text-align:center" %)400|(% style="text-align:center" %)Bad Request | ||
| 109 | |(% style="text-align:center" %)403|(% style="text-align:center" %)Forbidden (invalid Session ID) | ||
| 110 | |(% style="text-align:center" %)503|(% style="text-align:center" %)Bad Request | ||
| 111 | |||
| 112 | == 2.2 Recommended tools == | ||
| 113 | |||
| 114 | 1) [[Current Millis>>https://currentmillis.com/]] - Provides the current time in milliseconds elapsed since the UNIX epoch (Jan 1, 1970) as well as in other common formats including local / UTC time | ||
| 115 | |||
| 116 | (% style="text-align:center" %) | ||
| 117 | [[image:1750850646536-560.png]] | ||
| 118 | |||
| 119 | 2) [[MD5 Encryption>>https://10015.io/tools/md5-encrypt-decrypt]] - Online tool for generating MD5 hashes from strings | ||
| 120 | |||
| 121 | (% style="text-align:center" %) | ||
| 122 | [[image:1750850693417-516.png]] | ||
| 123 | |||
| 124 | = 3.Third-party API invocation Method = | ||
| 125 | |||
| 126 | **Example parameter and value** | ||
| 127 | |||
| 128 | alias:3af2a002690b4becbd3d4fbced0d2df3 | ||
| 129 | |||
| 130 | password:87845c1edaa92c4b24b64b65bb5fd2bb | ||
| 131 | |||
| 132 | ts:1750818494344 | ||
| 133 | |||
| 134 | == 3.1 Login operation == | ||
| 135 | |||
| 136 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 137 | |**acturl**|(% colspan="2" rowspan="1" %)we-data/sign/login | ||
| 138 | |**Function**|(% colspan="2" rowspan="1" %)Use username to login | ||
| 139 | |(% colspan="1" rowspan="4" %)**Parameters**|**Items**|**Description** | ||
| 140 | |alias|Username | ||
| 141 | |password|32-bit password (MD5 encryption) | ||
| 142 | |isRemember|0(Optional) | ||
| 143 | |(% colspan="1" rowspan="5" %)**Return value**|**Items**|**Description** | ||
| 144 | |utype|User Type: | ||
| 145 | |sid|User session ID (Only available for 12 hours) | ||
| 146 | |ztRole|((( | ||
| 147 | Cloud SCADA permissions: | ||
| 148 | |||
| 149 | 1 - Has permission, 0 - No permission | ||
| 150 | ))) | ||
| 151 | |userName|user name | ||
| 152 | |**Example**|(% colspan="2" rowspan="1" %)((( | ||
| 153 | { | ||
| 154 | |||
| 155 | "utype":5, | ||
| 156 | |||
| 157 | "ztRole":1, | ||
| 158 | |||
| 159 | "userName":"0edc4188a48f4bdcb7e89d35c6e7986f", | ||
| 160 | |||
| 161 | "sid":"c253a6a9635646a98bb46fba22411568" | ||
| 162 | |||
| 163 | } | ||
| 164 | ))) | ||
| 165 | |||
| 166 | **Operating procedures** | ||
| 167 | |||
| 168 | **Setp1: ** Set URL: https:~/~/api.asean.v-iec.com/m16/we-data/sign/login | ||
| 169 | |||
| 170 | **Setp2: ** Set parameters on Params | ||
| 171 | |||
| 172 | alias: 3af2a002690b4becbd3d4fbced0d2df3 | ||
| 173 | |||
| 174 | password: 9fa4250f6d70b341199f6dace528120f(The md5 encryption result of 87845c1edaa92c4b24b64b65bb5fd2bb) | ||
| 175 | |||
| 176 | (% style="text-align:center" %) | ||
| 177 | [[image:1750852260814-901.png]] | ||
| 178 | |||
| 179 | **Step3:** Get sign | ||
| 180 | |||
| 181 | alias=3af2a002690b4becbd3d4fbced0d2df3&cuid=123456789&lan=zh&mt=255&password=9fa4250f6d70b341199f6dace528120f&pid=1&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 182 | |||
| 183 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 184 | |||
| 185 | "sign":"d3071131ae5c7ab032fca3c623101e89" | ||
| 186 | |||
| 187 | **Step4: ** Set wcommon of header | ||
| 188 | |||
| 189 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"d3071131ae5c7ab032fca3c623101e89","pid":"1","ts":1750818494344} | ||
| 190 | |||
| 191 | (% style="text-align:center" %) | ||
| 192 | [[image:1750852478079-903.png]] | ||
| 193 | |||
| 194 | **Result** | ||
| 195 | |||
| 196 | (% style="text-align:center" %) | ||
| 197 | [[image:1750852594291-467.png]] | ||
| 198 | |||
| 199 | Now, we got the sid for other API invocation | ||
| 200 | |||
| 201 | == 3.2 Get the device list == | ||
| 202 | |||
| 203 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 204 | |**acturl**|(% colspan="2" %)we-data/device/getList | ||
| 205 | |**Function**|(% colspan="2" rowspan="1" %)Get the device list | ||
| 206 | |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|**Description** | ||
| 207 | | | | ||
| 208 | |(% colspan="1" rowspan="3" %)**Return value**|**Item**|**Description** | ||
| 209 | |boxList|Devices supporting WVPN | ||
| 210 | |list|Device List | ||
| 211 | |**Example**|(% colspan="2" rowspan="1" %){ | ||
| 212 | "reqId": "1667285652454", | ||
| 213 | "code": 200, | ||
| 214 | "msg": "ok", | ||
| 215 | "result": { | ||
| 216 | "boxList": [ | ||
| 217 | { | ||
| 218 | "code": "U370H1220307220W0001c75b693b2955", | ||
| 219 | "lev_name": "Group", | ||
| 220 | "name": "name1", | ||
| 221 | "f_name": " Group ", | ||
| 222 | "model": "PI3070ig", | ||
| 223 | "boxType": 1, | ||
| 224 | "id": 444860, | ||
| 225 | "state": 1, | ||
| 226 | "f_id": 226038, | ||
| 227 | "type": "1", | ||
| 228 | "lev_id": "226038", | ||
| 229 | "create_date": 1653985793000 | ||
| 230 | }, | ||
| 231 | { | ||
| 232 | "code": "V02001211222999a2d12c52a355", | ||
| 233 | "lev_name": "Default group", | ||
| 234 | "name": " V-BOX ", | ||
| 235 | "f_name": "Default group", | ||
| 236 | "model": "V-BOX S-4G", | ||
| 237 | "boxType": 0, | ||
| 238 | "id": 444848, | ||
| 239 | "state": 0, | ||
| 240 | "f_id": 225922, | ||
| 241 | "type": "1", | ||
| 242 | "lev_id": "225922", | ||
| 243 | "create_date": 1652378606000 | ||
| 244 | } | ||
| 245 | ], | ||
| 246 | "list": [ | ||
| 247 | { | ||
| 248 | "all": 3, | ||
| 249 | "offline": 0, | ||
| 250 | "lev_name": " group", | ||
| 251 | "children": [ | ||
| 252 | { | ||
| 253 | "all": 0, | ||
| 254 | "offline": 0, | ||
| 255 | "lev_name": " group 1, group ", | ||
| 256 | "children": [], | ||
| 257 | "name": " group 1", | ||
| 258 | "f_name": " group ", | ||
| 259 | "online": 0, | ||
| 260 | "id": 225986, | ||
| 261 | "f_id": 226038, | ||
| 262 | "type": "0", | ||
| 263 | "lev_id": "225986,226038", | ||
| 264 | "create_date": 1657010779000 | ||
| 265 | }, | ||
| 266 | { | ||
| 267 | "code": "U370H1220307220W0001c75b693b2955", | ||
| 268 | "lev_name": "group", | ||
| 269 | "name": "aaaaa", | ||
| 270 | "f_name": " group ", | ||
| 271 | "model": "PI3070ig", | ||
| 272 | "boxType": 1, | ||
| 273 | "id": 444860, | ||
| 274 | "state": 1, | ||
| 275 | "f_id": 226038, | ||
| 276 | "type": "1", | ||
| 277 | "lev_id": "226038", | ||
| 278 | "create_date": 1653985793000 | ||
| 279 | } | ||
| 280 | ], | ||
| 281 | "name": "Group", | ||
| 282 | "online": 3, | ||
| 283 | "id": 226038, | ||
| 284 | "f_id": 0, | ||
| 285 | "type": "0", | ||
| 286 | "lev_id": "226038", | ||
| 287 | "create_date": 1659618529000 | ||
| 288 | }, | ||
| 289 | { | ||
| 290 | "all": 1, | ||
| 291 | "offline": 1, | ||
| 292 | "lev_name": "Default group", | ||
| 293 | "children": [ | ||
| 294 | { | ||
| 295 | "all": 0, | ||
| 296 | "offline": 0, | ||
| 297 | "lev_name": "Test 2,Default group", | ||
| 298 | "children": [], | ||
| 299 | "name": " Test 2", | ||
| 300 | "f_name": "Default group", | ||
| 301 | "online": 0, | ||
| 302 | "id": 225987, | ||
| 303 | "f_id": 225922, | ||
| 304 | "type": "0", | ||
| 305 | "lev_id": "225987,225922", | ||
| 306 | "create_date": 1657010789000 | ||
| 307 | }, | ||
| 308 | { | ||
| 309 | "code": "V02001211222999a2d12c52a355", | ||
| 310 | "lev_name": "Default group", | ||
| 311 | "name": "V-BOX", | ||
| 312 | "f_name": "Default group", | ||
| 313 | "model": "V-BOX S-4G", | ||
| 314 | "boxType": 0, | ||
| 315 | "id": 444848, | ||
| 316 | "state": 0, | ||
| 317 | "f_id": 225922, | ||
| 318 | "type": "1", | ||
| 319 | "lev_id": "225922", | ||
| 320 | "create_date": 1652378606000 | ||
| 321 | } | ||
| 322 | ], | ||
| 323 | "name": "Default group", | ||
| 324 | "online": 0, | ||
| 325 | "id": 225922, | ||
| 326 | "f_id": 0, | ||
| 327 | "type": "0", | ||
| 328 | "lev_id": "225922", | ||
| 329 | "create_date": 1653984617000 | ||
| 330 | } | ||
| 331 | ] | ||
| 332 | } | ||
| 333 | } | ||
| 334 | |||
| 335 | **Operating procedures(Dome)** | ||
| 336 | |||
| 337 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/device/getList | ||
| 338 | |||
| 339 | **Step2:** Get sign (Using the sid obtained from calling the login API;demonstrated here as "e95ae840f7f147718d2b7650abe6c05f") | ||
| 340 | |||
| 341 | cuid=123456789&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 342 | |||
| 343 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 344 | |||
| 345 | "sign":"2be680121333bf3dc479958efae791e2" | ||
| 346 | |||
| 347 | **Step4: ** Set wcommon of header | ||
| 348 | |||
| 349 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"2be680121333bf3dc479958efae791e2","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 350 | |||
| 351 | [[image:1750906712204-462.png]] | ||
| 352 | |||
| 353 | **Result** | ||
| 354 | |||
| 355 | (% style="text-align:center" %) | ||
| 356 | [[image:1750924923320-272.png||height="566" width="475"]] | ||
| 357 | |||
| 358 | == 3.3 Get device state == | ||
| 359 | |||
| 360 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 361 | |**acturl**|(% colspan="2" %)we-data/device/getDeviceState | ||
| 362 | |**Function**|(% colspan="2" rowspan="1" %)Get device state | ||
| 363 | |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|**Description** | ||
| 364 | |machineCode|Machine Code | ||
| 365 | |(% colspan="1" rowspan="2" %)**Return value**|**Item**|**Description** | ||
| 366 | |state|0:Offline 1: Online | ||
| 367 | |(% colspan="1" %)**Example**|(% colspan="2" rowspan="1" %){ | ||
| 368 | "code": 200, | ||
| 369 | "msg": "ok", | ||
| 370 | "result": { | ||
| 371 | "state": 1 | ||
| 372 | } | ||
| 373 | } | ||
| 374 | |||
| 375 | **Operating procedures(Dome)** | ||
| 376 | |||
| 377 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/device/getDeviceState | ||
| 378 | |||
| 379 | **Step2: **Set parameters on Params | ||
| 380 | |||
| 381 | "machineCode": "V1400023040700790f5e19a1b55" | ||
| 382 | |||
| 383 | [[image:1750925468847-205.png]] | ||
| 384 | |||
| 385 | **Step3: **Get sign | ||
| 386 | |||
| 387 | cuid=123456789&lan=zh&machineCode=V1400023040700790f5e19a1b55&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 388 | |||
| 389 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 390 | |||
| 391 | "sign":"f0889257ce45e561959928ba5475fbf1" | ||
| 392 | |||
| 393 | **Step4: ** Set wcommon of header | ||
| 394 | |||
| 395 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"f0889257ce45e561959928ba5475fbf1","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 396 | |||
| 397 | **Result** | ||
| 398 | |||
| 399 | (% style="text-align:center" %) | ||
| 400 | [[image:1750925773973-469.png]] | ||
| 401 | |||
| 402 | |||
| 403 | == (% id="cke_bm_206555S" style="display:none" %) (%%)3.4 Get real-time tag list == | ||
| 404 | |||
| 405 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 406 | |**acturl**|(% colspan="3" %)we-data/actGroup | ||
| 407 | |**Function**|(% colspan="3" rowspan="1" %)Get real-time tag list | ||
| 408 | |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 409 | |boxId|(% colspan="2" %)V-box ID | ||
| 410 | |(% colspan="1" rowspan="4" %)**Return value**|**Item**|(% colspan="2" %)**Description** | ||
| 411 | |(% rowspan="3" %)list|(% colspan="2" %)Group list | ||
| 412 | |groupId|Group Id | ||
| 413 | |groupName|Group Name | ||
| 414 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){ | ||
| 415 | "code": 200, | ||
| 416 | "msg": "ok", | ||
| 417 | "result": { | ||
| 418 | "list": [ | ||
| 419 | { | ||
| 420 | "groupId": 1, | ||
| 421 | "groupName": "group 1" | ||
| 422 | }, | ||
| 423 | { | ||
| 424 | "groupId": 2, | ||
| 425 | "groupName": "group 2" | ||
| 426 | } | ||
| 427 | ] | ||
| 428 | } | ||
| 429 | } | ||
| 430 | |||
| 431 | **Operating procedures(Dome)** | ||
| 432 | |||
| 433 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/actGroup | ||
| 434 | |||
| 435 | **Step2: **Set parameters on Params | ||
| 436 | |||
| 437 | "boxId": "10108" | ||
| 438 | |||
| 439 | [[image:1750926881603-584.png]] | ||
| 440 | |||
| 441 | **Step3: **Get sign | ||
| 442 | |||
| 443 | boxId=10108&cuid=123456789&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 444 | |||
| 445 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 446 | |||
| 447 | "sign":"9e933e16e03f2821a58aa9694de49969" | ||
| 448 | |||
| 449 | **Step4: ** Set wcommon of header | ||
| 450 | |||
| 451 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"9e933e16e03f2821a58aa9694de49969","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 452 | |||
| 453 | [[image:1750926908151-938.png]] | ||
| 454 | |||
| 455 | **Result** | ||
| 456 | |||
| 457 | (% style="text-align:center" %) | ||
| 458 | [[image:1750926982185-137.png]] | ||
| 459 | |||
| 460 | == (% id="cke_bm_294214S" style="display:none" %) (%%)3.5 Get real-time tag configuration == | ||
| 461 | |||
| 462 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 463 | |**acturl**|(% colspan="3" %)/we-data/realcfgs | ||
| 464 | |**Function**|(% colspan="3" rowspan="1" %)Get real-time tag configuration | ||
| 465 | |(% colspan="1" rowspan="6" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 466 | |boxId|(% colspan="2" %)V-box ID (Required) | ||
| 467 | |groupId|(% colspan="2" %)Group ID (Required) | ||
| 468 | |pageSize|(% colspan="2" %)Number of items per page (defaults to 10 if not specified) | ||
| 469 | |pageIndex|(% colspan="2" %)Page number, starting from 1 | ||
| 470 | |devtype|(% colspan="2" %)0: V-Box ,1: HMI (Required) | ||
| 471 | |(% colspan="1" rowspan="16" %)**Return value**|**Item**|(% colspan="2" %)**Description** | ||
| 472 | |(% colspan="1" rowspan="12" %)cfgList|(% colspan="2" %)Configuration list | ||
| 473 | |monitorId|Monitor ID | ||
| 474 | |monitorName|Monitor Name | ||
| 475 | |updTime|Last Update Time | ||
| 476 | |dataId|((( | ||
| 477 | Data Type: | ||
| 478 | |||
| 479 | 100 - 16-bit Binary | ||
| 480 | |||
| 481 | 101 - 16-bit Octal | ||
| 482 | |||
| 483 | ... (Refer to Appendix 1) | ||
| 484 | ))) | ||
| 485 | |addr|Address | ||
| 486 | |addrType|((( | ||
| 487 | 0:bit address | ||
| 488 | |||
| 489 | 1:byte address | ||
| 490 | |||
| 491 | 2:word address | ||
| 492 | |||
| 493 | 3:double word | ||
| 494 | ))) | ||
| 495 | |digitCount|integer digits, decimal digits | ||
| 496 | |digitBinary|carry system | ||
| 497 | |dataLimit|Data Range | ||
| 498 | |rid|Register Address | ||
| 499 | |roleType|((( | ||
| 500 | Access Permission: | ||
| 501 | |||
| 502 | 1 - Read Only | ||
| 503 | |||
| 504 | 2 - Write Only | ||
| 505 | |||
| 506 | 3 - Read/Write | ||
| 507 | ))) | ||
| 508 | |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages | ||
| 509 | |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records | ||
| 510 | |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page | ||
| 511 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){ | ||
| 512 | "code":200, | ||
| 513 | "msg":"ok", | ||
| 514 | "reqId":"1595385125344", | ||
| 515 | "result": | ||
| 516 | { | ||
| 517 | "cfgList": | ||
| 518 | [ | ||
| 519 | { | ||
| 520 | "monitorId":544225, | ||
| 521 | "dataId":105, | ||
| 522 | "monitorName":"00", | ||
| 523 | "updTime":1589506814000, | ||
| 524 | "dataLimit":"0 99999", | ||
| 525 | "digitBinary":" decimal", | ||
| 526 | "addr":"0", | ||
| 527 | "rid":"0", | ||
| 528 | "roleType":3, | ||
| 529 | "digitCount":"", | ||
| 530 | "addrType":0 | ||
| 531 | }, | ||
| 532 | { | ||
| 533 | "monitorId":544224, | ||
| 534 | "dataId":105, | ||
| 535 | "monitorName":"40", | ||
| 536 | "updTime":1589507516000, | ||
| 537 | "dataLimit":"0 99999", | ||
| 538 | "digitBinary":" decimal", | ||
| 539 | "addr":"0", | ||
| 540 | "rid":"4", | ||
| 541 | "roleType":3, | ||
| 542 | "digitCount":"5, | ||
| 543 | 0", | ||
| 544 | "addrType":2 | ||
| 545 | } | ||
| 546 | ], | ||
| 547 | "totalPage":1, | ||
| 548 | "totalRecord":2, | ||
| 549 | "currentPage":1 | ||
| 550 | } | ||
| 551 | } | ||
| 552 | |||
| 553 | **Operating procedures(Dome)** | ||
| 554 | |||
| 555 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16~/~/we-data/realcfgs | ||
| 556 | |||
| 557 | **Step2: **Set parameters on Params | ||
| 558 | |||
| 559 | "boxId": "10108" | ||
| 560 | |||
| 561 | "groupId": "307096" | ||
| 562 | |||
| 563 | "devtype": "0" | ||
| 564 | |||
| 565 | [[image:1750930526412-753.png]] | ||
| 566 | |||
| 567 | **Step3: **Get sign | ||
| 568 | |||
| 569 | boxId=10108&cuid=123456789&devtype=0&groupId=307096&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 570 | |||
| 571 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 572 | |||
| 573 | "sign":"60fafbd0d795036e2ae09b4053c65671" | ||
| 574 | |||
| 575 | **Step4: ** Set wcommon of header | ||
| 576 | |||
| 577 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"60fafbd0d795036e2ae09b4053c65671","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 578 | |||
| 579 | [[image:1750930595350-219.png]] | ||
| 580 | |||
| 581 | **Result** | ||
| 582 | |||
| 583 | (% style="text-align:center" %) | ||
| 584 | [[image:1750930627007-466.png]] | ||
| 585 | |||
| 586 | == 3.6 Get Real-time data list == | ||
| 587 | |||
| 588 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 589 | |**acturl**|(% colspan="3" %)we-data/realdata | ||
| 590 | |**Function**|(% colspan="3" rowspan="1" %)Get Real-time data list | ||
| 591 | |(% colspan="1" rowspan="6" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 592 | |boxId|(% colspan="2" %)V-box ID (Required) | ||
| 593 | |groupId|(% colspan="2" %)Group ID (Required) | ||
| 594 | |pageSize|(% colspan="2" %)The number of each page, default 10 | ||
| 595 | |pageIndex|(% colspan="2" %)Pages, starting from 1 | ||
| 596 | |devtype|(% colspan="2" %)Device type (0:box,1:hmi) (Required) | ||
| 597 | |(% colspan="1" rowspan="11" %)**Return value**|**Item**|(% colspan="2" %)**Description** | ||
| 598 | |(% colspan="1" rowspan="7" %)list|(% colspan="2" %)Real-time data list | ||
| 599 | |com|Com port ID | ||
| 600 | |monitorId|Monitor ID | ||
| 601 | |monitorName|Monitor Name | ||
| 602 | |state|State | ||
| 603 | |value|Value | ||
| 604 | |groupId|Group ID | ||
| 605 | |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages | ||
| 606 | |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records | ||
| 607 | |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page | ||
| 608 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %)((( | ||
| 609 | { | ||
| 610 | "code": 200, | ||
| 611 | "msg": "ok", | ||
| 612 | "result": { | ||
| 613 | "list": [ | ||
| 614 | { | ||
| 615 | "com": 1, ~/~/ com port ID | ||
| 616 | "monitorId": 1, ~/~/Monitor ID | ||
| 617 | "monitorName": "plc1", ~/~/Monitor Name | ||
| 618 | "state": 1, ~/~/State | ||
| 619 | "value": 12, ~/~/value | ||
| 620 | "groupId": 8~/~/ Group ID | ||
| 621 | |||
| 622 | }, | ||
| 623 | { | ||
| 624 | "com": 2, ~/~/com port ID | ||
| 625 | "monitorId": 2, | ||
| 626 | "monitorName": "plc2", | ||
| 627 | "state": 1, | ||
| 628 | "value": 13, | ||
| 629 | "groupId": 8~/~/Group ID | ||
| 630 | } | ||
| 631 | ], | ||
| 632 | totalPage:10, | ||
| 633 | totalRecord:500, | ||
| 634 | currentPage:2 | ||
| 635 | } | ||
| 636 | } | ||
| 637 | ))) | ||
| 638 | |||
| 639 | **Operating procedures(Dome)** | ||
| 640 | |||
| 641 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/realdata | ||
| 642 | |||
| 643 | **Step2: **Set parameters on Params | ||
| 644 | |||
| 645 | "boxId": "10108" | ||
| 646 | |||
| 647 | "groupId": "307096" | ||
| 648 | |||
| 649 | "devtype": "0" | ||
| 650 | |||
| 651 | [[image:1750931496306-864.png]] | ||
| 652 | |||
| 653 | **Step3: **Get sign | ||
| 654 | |||
| 655 | boxId=10108&cuid=123456789&devtype=0&groupId=307096&lan=zh&mt=255&pid=1&sid=1750818494344&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 656 | |||
| 657 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 658 | |||
| 659 | "sign":"aa65f3d58da6dff1da04dc2f9babd931" | ||
| 660 | |||
| 661 | **Step4: ** Set wcommon of header | ||
| 662 | |||
| 663 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"aa65f3d58da6dff1da04dc2f9babd931","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 664 | |||
| 665 | [[image:1750931571632-223.png]] | ||
| 666 | |||
| 667 | **Result** | ||
| 668 | |||
| 669 | (% style="text-align:center" %) | ||
| 670 | [[image:1750931696007-370.png]] | ||
| 671 | |||
| 672 | == 3.7 Modify the data of real-time tag == | ||
| 673 | |||
| 674 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 675 | |**acturl**|(% colspan="3" %)we-data/updrealdata | ||
| 676 | |**Function**|(% colspan="3" rowspan="1" %)Modify the data of real-time tag | ||
| 677 | |(% colspan="1" rowspan="5" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 678 | |boxId|(% colspan="2" %)V-box ID (Required) | ||
| 679 | |monitorId|(% colspan="2" %)Monitor ID | ||
| 680 | |value|(% colspan="2" %)value | ||
| 681 | |devtype|(% colspan="2" %)Device type (0:box,1:hmi) (Required) | ||
| 682 | |(% colspan="1" rowspan="2" %)**Return value**|**Item**|(% colspan="2" %)**Description** | ||
| 683 | |(% colspan="1" %) |(% colspan="2" %) | ||
| 684 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){ | ||
| 685 | "code":200 | ||
| 686 | "msg":"ok", | ||
| 687 | "result":{ | ||
| 688 | } | ||
| 689 | } | ||
| 690 | |||
| 691 | **Operating procedures(Dome)** | ||
| 692 | |||
| 693 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/updrealdata | ||
| 694 | |||
| 695 | **Step2: **Set parameters on Params | ||
| 696 | |||
| 697 | "boxId": "10108" | ||
| 698 | |||
| 699 | "monitorId": "10002423" | ||
| 700 | |||
| 701 | "value": "33" | ||
| 702 | |||
| 703 | "devtype": "0" | ||
| 704 | |||
| 705 | [[image:1750932160187-949.png]] | ||
| 706 | |||
| 707 | **Step3: **Get sign | ||
| 708 | |||
| 709 | boxId=10108&cuid=123456789&devtype=0&lan=zh&monitorId=10002423&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&value=33&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 710 | |||
| 711 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 712 | |||
| 713 | "sign":"d8cd8c57e3220c8327be1895ed2b3ca8" | ||
| 714 | |||
| 715 | **Step4: ** Set wcommon of header | ||
| 716 | |||
| 717 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"d8cd8c57e3220c8327be1895ed2b3ca8","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 718 | |||
| 719 | [[image:1750932298989-982.png]] | ||
| 720 | |||
| 721 | **Result** | ||
| 722 | |||
| 723 | (% style="text-align:center" %) | ||
| 724 | [[image:1750932371164-131.png]] | ||
| 725 | |||
| 726 | == 3.8 Get Historical tags name list == | ||
| 727 | |||
| 728 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 729 | |**acturl**|(% colspan="3" %)we-data/monitors | ||
| 730 | |**Function**|(% colspan="3" rowspan="1" %)Get a list of historical tags | ||
| 731 | |(% colspan="1" rowspan="3" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 732 | |boxId|(% colspan="2" %)V-box ID (Required) | ||
| 733 | |devtype|(% colspan="2" %)Device type (0:box,1:hmi) (Required) | ||
| 734 | |(% colspan="1" rowspan="5" %)**Return value**|**Item**|(% colspan="2" %)**Description** | ||
| 735 | |(% colspan="1" rowspan="4" %)list|(% colspan="2" %)Tag list | ||
| 736 | |monitorId|Monitor ID | ||
| 737 | |monitorName|Monitor Name | ||
| 738 | |groupId|Group ID | ||
| 739 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){ | ||
| 740 | "code": 200, | ||
| 741 | "msg": "ok", | ||
| 742 | "result": { | ||
| 743 | "list": [ | ||
| 744 | { | ||
| 745 | "monitorId": 1, | ||
| 746 | "monitorName": "tag 1" | ||
| 747 | "groupId": "00000001" | ||
| 748 | }, | ||
| 749 | { | ||
| 750 | "monitorId": 2, | ||
| 751 | "monitorName": "tag 2" | ||
| 752 | "groupId": "00000002" | ||
| 753 | } | ||
| 754 | ] | ||
| 755 | } | ||
| 756 | } | ||
| 757 | |||
| 758 | **Operating procedures(Dome)** | ||
| 759 | |||
| 760 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/monitors | ||
| 761 | |||
| 762 | **Step2: **Set parameters on Params | ||
| 763 | |||
| 764 | "boxId": "10108" | ||
| 765 | |||
| 766 | "devtype": "0" | ||
| 767 | |||
| 768 | (% style="text-align:center" %) | ||
| 769 | [[image:1750937987348-940.png]] | ||
| 770 | |||
| 771 | |||
| 772 | **Step3: **Get sign | ||
| 773 | |||
| 774 | boxId=10108&cuid=123456789&devtype=0&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 775 | |||
| 776 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 777 | |||
| 778 | "sign":"066fd57475cbb808e1c095205b334e6e" | ||
| 779 | |||
| 780 | **Step4: ** Set wcommon of header | ||
| 781 | |||
| 782 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"066fd57475cbb808e1c095205b334e6e","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 783 | |||
| 784 | (% style="text-align:center" %) | ||
| 785 | [[image:1750938105712-443.png]] | ||
| 786 | |||
| 787 | **Result** | ||
| 788 | |||
| 789 | (% style="text-align:center" %) | ||
| 790 | [[image:1750938200648-249.png]] | ||
| 791 | |||
| 792 | == 3.9 Get Historical tag data list == | ||
| 793 | |||
| 794 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 795 | |**acturl**|(% colspan="3" %)we-data/historydata | ||
| 796 | |**Function**|(% colspan="3" rowspan="1" %)Get historical data | ||
| 797 | |(% colspan="1" rowspan="8" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 798 | |boxId|(% colspan="2" %)V-box ID (Required) | ||
| 799 | |monitorId|(% colspan="2" %)tag ID, (Required) | ||
| 800 | |groupId|(% colspan="2" %)Group ID | ||
| 801 | |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required) | ||
| 802 | |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required) | ||
| 803 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
| 804 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
| 805 | |(% colspan="1" rowspan="11" %)**Return value**|**Item**|(% colspan="2" %)**Description** | ||
| 806 | |(% colspan="1" rowspan="7" %)list|(% colspan="2" %)Historical data list | ||
| 807 | |monitorName|Tag Name | ||
| 808 | |monitorTime|Monitoring Time (timestamp) | ||
| 809 | |monitorTime_show|Monitoring time (formatted string) | ||
| 810 | |value|Value | ||
| 811 | |groupName|Group Name | ||
| 812 | |groupId|Group ID | ||
| 813 | |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages | ||
| 814 | |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records | ||
| 815 | |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page | ||
| 816 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){ | ||
| 817 | "code": 200, | ||
| 818 | "msg": "ok", | ||
| 819 | "result": { | ||
| 820 | "list": [ | ||
| 821 | { | ||
| 822 | "monitorName": "plc1", ~/~/Monitor Name | ||
| 823 | "value": 12, ~/~/value | ||
| 824 | "monitorTime": "15645122555", ~/~/monitoring time | ||
| 825 | "monitorTime_show": "2017-05-25 12:18:30", ~/~/monitoring time | ||
| 826 | "groupName": "", ~/~/ group name | ||
| 827 | "groupId": 1 ~/~/ group ID | ||
| 828 | }, | ||
| 829 | { | ||
| 830 | "monitorName": "plc2", | ||
| 831 | "value": 13, | ||
| 832 | "monitorTime": "2017-05-25 12:18:30" | ||
| 833 | "monitorTime_show": "2017-05-25 12:18:30", ~/~/monitoring time | ||
| 834 | "groupName": "", ~/~/ group name | ||
| 835 | "groupId": 1 ~/~/group ID | ||
| 836 | } | ||
| 837 | ], | ||
| 838 | totalPage:10, | ||
| 839 | totalRecord:500, | ||
| 840 | currentPage:2 | ||
| 841 | } | ||
| 842 | } | ||
| 843 | |||
| 844 | **Operating procedures(Dome)** | ||
| 845 | |||
| 846 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/historydata | ||
| 847 | |||
| 848 | **Step2: **Set parameters on Params | ||
| 849 | |||
| 850 | "boxId": "10108" | ||
| 851 | |||
| 852 | "groupId": "10000683" | ||
| 853 | |||
| 854 | "monitorId": "10002467" | ||
| 855 | |||
| 856 | [[image:1751251214664-153.png]] | ||
| 857 | |||
| 858 | **Step3: **Get sign | ||
| 859 | |||
| 860 | boxId=10108&cuid=123456789&groupId=10000683&lan=zh&monitorId=10002467&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 861 | |||
| 862 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 863 | |||
| 864 | "sign":"6aabcd106be192898ac8cdc683a27bdf" | ||
| 865 | |||
| 866 | **Step4: ** Set wcommon of header | ||
| 867 | |||
| 868 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"6aabcd106be192898ac8cdc683a27bdf","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 869 | |||
| 870 | [[image:1751251262825-117.png]] | ||
| 871 | |||
| 872 | **Result** | ||
| 873 | |||
| 874 | (% style="text-align:center" %) | ||
| 875 | [[image:1751251300796-556.png]] | ||
| 876 | |||
| 877 | |||
| 878 | == 3.10 Get Alarm tags data list == | ||
| 879 | |||
| 880 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 881 | |**acturl**|(% colspan="3" %)we-data/alarmdata | ||
| 882 | |**Function**|(% colspan="3" rowspan="1" %)Get alarm data | ||
| 883 | |(% colspan="1" rowspan="8" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 884 | |boxId|(% colspan="2" %)V-box ID (Required) | ||
| 885 | |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required) | ||
| 886 | |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required) | ||
| 887 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
| 888 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
| 889 | |state|(% colspan="2" %)Status 1-unconfirmed, 2-confirm | ||
| 890 | |alarmType|(% colspan="2" %)Alarm events: 1-trigger alarm, 0-disarm | ||
| 891 | |(% colspan="1" %) |alarmLevel|(% colspan="2" %)((( | ||
| 892 | Alarm level: | ||
| 893 | |||
| 894 | 1 general alarm,2 serious alarm,3 particularly serious alarm | ||
| 895 | ))) | ||
| 896 | |(% colspan="1" %) |devtype|(% colspan="2" %)0: V-Box ,1: HMI (Required) | ||
| 897 | |(% colspan="1" rowspan="15" %)**Return value**|**Item**|(% colspan="2" %)**Description** | ||
| 898 | |(% colspan="1" rowspan="11" %)list|(% colspan="2" %)Alarm data list | ||
| 899 | |monitorId|Monitor ID | ||
| 900 | |monitorName|Monitor Name | ||
| 901 | |state|State | ||
| 902 | |value|Value | ||
| 903 | |monitorTime|Monitoring time ( timestamp ) | ||
| 904 | |monitorTime_show|Monitoring time (formatted string) | ||
| 905 | |alarmType|Alarm Type | ||
| 906 | |alarmLevel|Alarm Level | ||
| 907 | |text|Alarm content | ||
| 908 | |alarm_role|Alarm permissions | ||
| 909 | |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages | ||
| 910 | |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records | ||
| 911 | |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page | ||
| 912 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){ | ||
| 913 | "code": 200, | ||
| 914 | "msg": "ok", | ||
| 915 | "result": { | ||
| 916 | "list": [ | ||
| 917 | { | ||
| 918 | "monitorId": 1, | ||
| 919 | "monitorName": "plc1", | ||
| 920 | "state": 1, | ||
| 921 | "value": 12, | ||
| 922 | "monitorTime": "15215452111", | ||
| 923 | "monitorTime_show": "2017-05-25 12:18:30", | ||
| 924 | "alarmType": "", | ||
| 925 | "alarmLevel": "", | ||
| 926 | "text": "", | ||
| 927 | "alarm_role": "" | ||
| 928 | }, | ||
| 929 | { | ||
| 930 | "monitorId": 1, | ||
| 931 | "monitorName": "plc2", | ||
| 932 | "state": 1, | ||
| 933 | "value": 13, | ||
| 934 | "monitorTime": "621554211225", | ||
| 935 | "monitorTime_show": "2017-05-25 12:18:30", | ||
| 936 | "alarmType": "", | ||
| 937 | "alarmLevel": "", | ||
| 938 | "text": "", | ||
| 939 | "alarm_role": "" | ||
| 940 | } | ||
| 941 | ], | ||
| 942 | totalPage:10, | ||
| 943 | totalRecord:500, | ||
| 944 | currentPage:2 | ||
| 945 | } | ||
| 946 | } | ||
| 947 | |||
| 948 | **Operating procedures(Dome)** | ||
| 949 | |||
| 950 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/alarmdata | ||
| 951 | |||
| 952 | **Step2: **Set parameters on Params | ||
| 953 | |||
| 954 | "boxId": "10108" | ||
| 955 | |||
| 956 | "state": "2" | ||
| 957 | |||
| 958 | "devtype": "0" | ||
| 959 | |||
| 960 | [[image:1751590830927-952.png]] | ||
| 961 | |||
| 962 | |||
| 963 | **Step3: **Get sign | ||
| 964 | |||
| 965 | boxId=10108&cuid=123456789&devtype=0&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&state=2&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 966 | |||
| 967 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 968 | |||
| 969 | "sign":"d689e54257984a9804bc0822df97d1a8" | ||
| 970 | |||
| 971 | **Step4: ** Set wcommon of header | ||
| 972 | |||
| 973 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"d689e54257984a9804bc0822df97d1a8","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 974 | |||
| 975 | [[image:1751590858077-283.png]] | ||
| 976 | |||
| 977 | |||
| 978 | **Result** | ||
| 979 | |||
| 980 | (% style="text-align:center" %) | ||
| 981 | [[image:1751590880404-167.png]] | ||
| 982 | |||
| 983 | == 3.11 Notify the device to report real-time data == | ||
| 984 | |||
| 985 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 986 | |**acturl**|(% colspan="3" %)we-data/sendSwitchToDevice | ||
| 987 | |**Function**|(% colspan="3" rowspan="1" %)Notify the device to report real-time data. Since the device now has a real-time data toggle feature, it will only report real-time data when on the real-time data page. Otherwise, it will not report. Therefore, to continuously obtain real-time data, you must first call this interface and then invoke it every 20 seconds to ensure the device keeps reporting real-time data. | ||
| 988 | |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 989 | |boxId|(% colspan="2" %)V-box ID (Required,supports batch operations with comma-separated values (maximum 5,000 box IDs per request), e.g., 3012,4021,5036) | ||
| 990 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){ | ||
| 991 | "code": 200, | ||
| 992 | "msg": "ok", | ||
| 993 | "result": {} | ||
| 994 | } | ||
| 995 | |||
| 996 | **Operating procedures(Dome)** | ||
| 997 | |||
| 998 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com~/~/m16/we-data/sendSwitchToDevice | ||
| 999 | |||
| 1000 | **Step2: **Set parameters on Params | ||
| 1001 | |||
| 1002 | "boxId": "10108" | ||
| 1003 | |||
| 1004 | [[image:1751590928746-181.png]] | ||
| 1005 | |||
| 1006 | **Step3: **Get sign | ||
| 1007 | |||
| 1008 | boxId=10108&cuid=123456789&groupId=10000683&lan=zh&monitorId=10002467&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 1009 | |||
| 1010 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 1011 | |||
| 1012 | "sign":"9e933e16e03f2821a58aa9694de49969" | ||
| 1013 | |||
| 1014 | **Step4: ** Set wcommon of header | ||
| 1015 | |||
| 1016 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"9e933e16e03f2821a58aa9694de49969","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 1017 | |||
| 1018 | [[image:1751590956278-632.png]] | ||
| 1019 | |||
| 1020 | **Result** | ||
| 1021 | |||
| 1022 | (% style="text-align:center" %) | ||
| 1023 | [[image:1751590971071-144.png]] | ||
| 1024 | |||
| 1025 | == 3.12 Confirm the alarm data (V-Box/HMI) == | ||
| 1026 | |||
| 1027 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 1028 | |**acturl**|(% colspan="3" %)we-data/historydata ~-~- (V-BOX) | ||
| 1029 | we-data/hmiDataAction/confirmData ~-~- (HMI) | ||
| 1030 | |**Function**|(% colspan="3" rowspan="1" %)Confirm the alarm data (V-BOX / HMI) | ||
| 1031 | |(% colspan="1" rowspan="5" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 1032 | |alarm_cfg_ids|(% colspan="2" %)Alarm confirmation ID (Required) | ||
| 1033 | |monitor_times|(% colspan="2" %)Monitor time (Required) | ||
| 1034 | |deviceId|(% colspan="2" %)Device ID (Required) | ||
| 1035 | |alarm_types (HMI only)|(% colspan="2" %)Alarm Type:1: Triggered, 0: Cancelled | ||
| 1036 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){ | ||
| 1037 | "code": 200, | ||
| 1038 | "msg": "ok", | ||
| 1039 | "reqId": "1663749297007", | ||
| 1040 | "result": {} | ||
| 1041 | } | ||
| 1042 | |||
| 1043 | **Operating procedures(Dome for V-BOX)** | ||
| 1044 | |||
| 1045 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/alarmDataAction/confirmData | ||
| 1046 | |||
| 1047 | **Step2: **Set parameters on Params | ||
| 1048 | |||
| 1049 | "alarm_cfg_ids": "10000017" | ||
| 1050 | |||
| 1051 | "deviceId": "10108" | ||
| 1052 | |||
| 1053 | "monitor_times": "1748588490783" | ||
| 1054 | |||
| 1055 | [[image:1751592962453-264.png]] | ||
| 1056 | |||
| 1057 | **Step3: **Get sign | ||
| 1058 | |||
| 1059 | alarm_cfg_ids=10000017&cuid=123456789&deviceId=10108&lan=zh&monitor_times=1748588490783&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 1060 | |||
| 1061 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 1062 | |||
| 1063 | "sign":"93e7cd5abe03040b16e645d2869706f2" | ||
| 1064 | |||
| 1065 | **Step4: ** Set wcommon of header | ||
| 1066 | |||
| 1067 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"93e7cd5abe03040b16e645d2869706f2","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 1068 | |||
| 1069 | [[image:1751593015952-261.png]] | ||
| 1070 | |||
| 1071 | **Result** | ||
| 1072 | |||
| 1073 | (% style="text-align:center" %) | ||
| 1074 | [[image:1751593034158-244.png]] | ||
| 1075 | |||
| 1076 | == 3.12 Get remote monitoring Url == | ||
| 1077 | |||
| 1078 | (% style="margin-left:auto; margin-right:auto; width:800px" %) | ||
| 1079 | |**acturl**|(% colspan="3" %)we-data/getMonitorUrl | ||
| 1080 | |**Function**|(% colspan="3" rowspan="1" %)Get remote monitoring Url | ||
| 1081 | |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|(% colspan="2" %)**Description** | ||
| 1082 | |deviceId|(% colspan="2" %)Device ID (Required) | ||
| 1083 | |(% colspan="1" rowspan="2" %)**Return value**|f_ver|(% colspan="2" %)Version | ||
| 1084 | |Url|(% colspan="2" %)Remote monitoring URL | ||
| 1085 | |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){ | ||
| 1086 | "code": 200, | ||
| 1087 | "msg": "ok", | ||
| 1088 | "reqId": "1663749297007", | ||
| 1089 | "result": {“f_ver”:”V_0.5”,“url”:http:~/~/245646468...52.hmi.we-con.com.cn:1142/index.html?d=115...&token=42354...} | ||
| 1090 | } | ||
| 1091 | |||
| 1092 | **Operating procedures(Dome)** | ||
| 1093 | |||
| 1094 | **Step1:** Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/getMonitorUrl | ||
| 1095 | |||
| 1096 | **Step2: **Set parameters on Params | ||
| 1097 | |||
| 1098 | "deviceId": "10000467" | ||
| 1099 | |||
| 1100 | (% style="text-align:center" %) | ||
| 1101 | [[image:1751593657691-677.png]] | ||
| 1102 | |||
| 1103 | **Step3: **Get sign | ||
| 1104 | |||
| 1105 | cuid=123456789&deviceId=10000467&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1 | ||
| 1106 | |||
| 1107 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
| 1108 | |||
| 1109 | "sign":"dd1324f34dc90683373504f31aaf24cf" | ||
| 1110 | |||
| 1111 | **Step4: ** Set wcommon of header | ||
| 1112 | |||
| 1113 | {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"dd1324f34dc90683373504f31aaf24cf","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"} | ||
| 1114 | |||
| 1115 | [[image:1751594984300-563.png]] | ||
| 1116 | |||
| 1117 | **Result** | ||
| 1118 | |||
| 1119 | [[image:1751595028434-214.png]] | ||
| 1120 | |||
| 1121 |