Difference between revisions of "WISE-PaaS/2.0 Protocol"
From ESS-WIKI
Eric.liang (talk | contribs) |
Eric.liang (talk | contribs) (→Protocol) |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Overview = | = Overview = | ||
− | :Introduction for "EI-Agent to WISE-PaaS-2.0 communication protocol". WISEAgent communication protocol is base on standard MQTT protocol. We also define Advantech IoT Topic and message in JSON format. Follow standard to design our [[http://ess-wiki.advantech.com.tw/view/IoTGateway/SDK/WirelessSensorNetworkSDK|Advantech Sensor Format in JSON ]] | + | :Introduction for "EI-Agent to WISE-PaaS-2.0 communication protocol". WISEAgent communication protocol is base on standard MQTT protocol. We also define Advantech IoT Topic and message in JSON format. Follow standard to design our [[http://ess-wiki.advantech.com.tw/view/IoTGateway/SDK/WirelessSensorNetworkSDK|Advantech Sensor Format in JSON ]] [http://advgitlab.eastasia.cloudapp.azure.com/WISE-PaaS-Documentation/Documentation/blob/master/documents/EI-Connect/handshake-protocol.md EI-Agent Protocol] |
+ | |||
= Protocol = | = Protocol = | ||
Line 7: | Line 8: | ||
== Connect == | == Connect == | ||
− | *Description: Agent Client sends the "Connect Info" to WISE-PaaS-2.0 Server for on-line notification. | + | *Description: Agent Client sends the "Connect Info" to WISE-PaaS-2.0 Server for on-line notification. |
− | *Type: Info | + | *Type: Info |
− | *Direction: Agent -> Server | + | *Direction: Agent -> Server |
− | *Topic: /wisepaas/device/00000001-0000-0000-0000-001077C25002/agentinfoack | + | *Topic: /wisepaas/device/00000001-0000-0000-0000-001077C25002/agentinfoack |
− | *QoS: 0 | + | *QoS: 0 |
− | *Retained: 0 | + | *Retained: 0 |
− | *Payload: | + | *Payload: |
<pre>{ | <pre>{ | ||
"content": { | "content": { | ||
Line 40: | Line 41: | ||
== OS Info == | == OS Info == | ||
− | *Description: Agent Client sends the OS Info" to RMM Server for device OS information. | + | *Description: Agent Client sends the OS Info" to RMM Server for device OS information. |
− | *Type: Info | + | *Type: Info |
− | *Direction: Agent -> Server | + | *Direction: Agent -> Server |
− | *Topic: /wisepaas/RMM/00000001-0000-0000-0000-999BAB6F4000/agentactionack | + | *Topic: /wisepaas/RMM/00000001-0000-0000-0000-999BAB6F4000/agentactionack |
− | *QoS: 0 | + | *QoS: 0 |
− | *Retained: 0 | + | *Retained: 0 |
− | *Payload: | + | *Payload: |
<pre>{ | <pre>{ | ||
"content": { | "content": { | ||
Line 68: | Line 69: | ||
}</pre> | }</pre> | ||
− | + | | |
== Disconnect == | == Disconnect == | ||
− | *Description: Agent Client sends the "Disconnect Info" to Server for off-line notification. | + | *Description: Agent Client sends the "Disconnect Info" to Server for off-line notification. |
− | *Type: Info | + | *Type: Info |
− | *Direction: Agent -> Server | + | *Direction: Agent -> Server |
− | *Topic: /wisepaas/device/00000001-0000-0000-0000-001077C25002/agentinfoack | + | *Topic: /wisepaas/device/00000001-0000-0000-0000-001077C25002/agentinfoack |
− | *QoS: 0 | + | *QoS: 0 |
− | *Retained: 0 | + | *Retained: 0 |
− | *Payload: | + | *Payload: |
<pre>{ | <pre>{ | ||
"content": { | "content": { | ||
Line 105: | Line 106: | ||
== Will Message == | == Will Message == | ||
− | *Description: While Client lost connection or keep-alive timeout, the will message will send to the client that subscribe the topic | + | *Description: While Client lost connection or keep-alive timeout, the will message will send to the client that subscribe the topic |
− | *Type: Info | + | *Type: Info |
− | *Direction: Agent -> Broker | + | *Direction: Agent -> Broker |
− | *Topic: /wisepaas/device/00000001-0000-0000-0000-999BAB6F4000/willmessage | + | *Topic: /wisepaas/device/00000001-0000-0000-0000-999BAB6F4000/willmessage |
− | *QoS: 0 | + | *QoS: 0 |
− | *Retained: 0 | + | *Retained: 0 |
− | *Payload: | + | *Payload: |
<pre>{ | <pre>{ | ||
"content": { | "content": { | ||
Line 138: | Line 139: | ||
== Info or Update Device's Capability == | == Info or Update Device's Capability == | ||
− | *Description: Agent will send it's capability to Server for description all resource. | + | *Description: Agent will send it's capability to Server for description all resource. |
− | *Type: Auto update | + | *Type: Auto update |
− | *Direction: Agent-> Server | + | *Direction: Agent-> Server |
− | *Topic: /wisepaas/RMM/00000001-0000-0000-0000-999BAB6F4000/agentactionack | + | *Topic: /wisepaas/RMM/00000001-0000-0000-0000-999BAB6F4000/agentactionack |
− | *QoS: 0 | + | *QoS: 0 |
− | *Retained: 0 | + | *Retained: 0 |
− | *Payload: | + | *Payload: |
Example: HDD PMQ Capability | Example: HDD PMQ Capability | ||
Line 152: | Line 153: | ||
"info": { | "info": { | ||
"bn": "info", | "bn": "info", | ||
− | "e": [ | + | "e": [{"n": "type","sv": "PMQ","asm": "r"},{"n": "name","sv": "HDD_PMQ","asm": "r"},{"n": "description","sv": "This service is HDD PMQ Service","asm": "r"}, |
− | + | {"n": "version","sv": "1.0.2","asm": "r"},{"n": "confidence level","v": 83.12,"asm": "r","u": "%"},{"n": "update","sv": null,"asm": "rw"}, | |
− | + | {"n": "eventNotify","bv": true,"asm": "r"}] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
}, | }, | ||
"action": { | "action": { | ||
"bn": "action", | "bn": "action", | ||
− | "e": [ | + | "e": [{"n": "a1","bv": false,"asm": "r","msg": "Lower system temperature ( < 40 Celsius )."},{"n": "a2","bv": false,"asm": "r","msg": "Backup data to new disk."}, |
− | + | {"n": "a3","bv": false,"asm": "r","msg": "Check power source."},{"n": "ActionLog","sv": null,"asm": "r"}] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}, | }, | ||
"param": { | "param": { | ||
"bn": "param", | "bn": "param", | ||
− | "e": [ | + | "e": [{"n": "report interval","v": 60,"max": 3600,"min": 10,"asm": "rw","u": "sec"},{"n": "enable report","bv": true,"asm": "rw"}] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}, | }, | ||
"opTS": { | "opTS": { | ||
Line 248: | Line 177: | ||
"$date": 1510044371815 | "$date": 1510044371815 | ||
} | } | ||
− | } | + | }</pre> |
− | </pre> | ||
== Auto Update Data Value == | == Auto Update Data Value == | ||
− | *Description: Agent will update latest value to server. | + | *Description: Agent will update latest value to server. |
− | *Type: Auto update | + | *Type: Auto update |
− | *Direction: Agent-> Server | + | *Direction: Agent-> Server |
− | *Topic: /wisepaas/ | + | *Topic: /wisepaas/device/00000001-0000-0000-0000-999BAB6F4000/devinfoack |
− | *QoS: 0 | + | *QoS: 0 |
− | *Retained: 0 | + | *Retained: 0 |
− | *Payload: | + | *Payload: |
<pre>{ | <pre>{ | ||
"content": { | "content": { | ||
Line 265: | Line 193: | ||
"info": { | "info": { | ||
"bn": "info", | "bn": "info", | ||
− | "e": [ | + | "e": [{"n": "version","sv": "1.0.2"},{"n": "confidence level","v": 89.6,"asm": "r","u": "%"}] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}, | }, | ||
"param": { | "param": { | ||
"bn": "param", | "bn": "param", | ||
− | "e": [ | + | "e": [{"n": "report interval","v": 30},{"n": "enable report","bv": true}] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}, | }, | ||
"opTS": { | "opTS": { | ||
Line 306: | Line 214: | ||
== <span style="background-color:#FF8C00;">Get Sensor Data</span> == | == <span style="background-color:#FF8C00;">Get Sensor Data</span> == | ||
− | *Description: Server can send mqtt message to get sensor data value. | + | *Description: Server can send mqtt message to get sensor data value. |
− | *Type: Request | + | *Type: Request |
− | *Direction: Server -> Agent | + | *Direction: Server -> Agent |
− | *Topic: / | + | *Topic: /wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/agentactionreq |
− | *QoS: 0 | + | *QoS: 0 |
− | *Retained: 0 | + | *Retained: 0 |
− | *Payload: | + | *Payload: |
− | <pre> | + | <pre>{ |
− | { | + | "agentId": "00000001-0000-0000-0000-000babbb7ef3", |
− | + | "handlerName": "custom", | |
− | " | + | "commCmd": 523, |
− | | + | "content": { |
− | " | + | "sessionID": "2A1FBCA22A64C2E27341DB5FA7E83FBF", |
− | " | + | "sensorIDList": { |
− | | + | "e": [{"n": "custom/custom_data2"}] |
− | " | + | } |
− | | + | } |
− | + | }</pre> | |
− | } | ||
+ | *Description: Agent will reply its data value. | ||
+ | *Type: Reply | ||
+ | *Direction: Agent -> Server | ||
+ | *Topic: /wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/agentactionack | ||
+ | *QoS: 0 | ||
+ | *Retained: 0 | ||
+ | *Payload: | ||
+ | <pre>{ | ||
+ | "agentID": "00000001-0000-0000-0000-000babbb7ef3", | ||
+ | "commCmd": 524, | ||
+ | "handlerName": "custom", | ||
+ | "content": { | ||
+ | "sessionID": "2A1FBCA22A64C2E27341DB5FA7E83FBF", | ||
+ | "sensorInfoList": { | ||
+ | "e": [{"n": "custom/custom_data2","v": 123,"StatusCode": 200}] | ||
+ | } | ||
+ | }, | ||
+ | "sendTS": {"$date": 1499328934471} | ||
+ | }</pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== <span style="background-color:#FF8C00;">Set Data</span> == | == <span style="background-color:#FF8C00;">Set Data</span> == | ||
− | *Description: Server can send mqtt message to set sensor data value. | + | *Description: Server can send mqtt message to set sensor data value. |
− | *Type: Request | + | *Type: Request |
− | *Direction: Server -> Agent | + | *Direction: Server -> Agent |
− | *Topic:/wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/agentactionreq | + | *Topic:/wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/agentactionreq |
− | *QoS: 0 | + | *QoS: 0 |
− | *Retained: 0 | + | *Retained: 0 |
− | *Payload: | + | *Payload: |
<pre>{ | <pre>{ | ||
− | + | "agentId": "00000001-0000-0000-0000-000babbb7ef3", | |
− | + | "handlerName": "custom", | |
− | + | "commCmd": 525, | |
− | + | "content": { | |
− | + | "sessionID": "B303E3DE2C062B8C148DAEF2D3F6C723", | |
− | + | "sensorIDList": { | |
− | + | "e": [{"v": 12,"n": "custom/custom_data2"}] | |
− | + | } | |
− | + | } | |
}</pre> | }</pre> | ||
− | *Description: Agent will reply its result. There are have two status 1. status code: 202 -> device receive this command, 2. code: 200 -> succesful to set, code: is not 200 => Fail to set | + | *Description: Agent will reply its result. There are have two status 1. status code: 202 -> device receive this command, 2. code: 200 -> succesful to set, code: is not 200 => Fail to set |
− | *Type: Reply | + | *Type: Reply |
− | *Direction: Agent -> Server | + | *Direction: Agent -> Server |
− | *Topic: /wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/ | + | *Topic: /wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/agentactionack |
− | *QoS: 0 | + | *QoS: 0 |
− | *Retained: 0 | + | *Retained: 0 |
− | *Payload: | + | *Payload: |
Accept 1: | Accept 1: | ||
− | <pre>{ " | + | <pre>{ |
+ | "agentID": "00000001-0000-0000-0000-000babbb7ef3", | ||
+ | "commCmd": 526, | ||
+ | "handlerName": "custom", | ||
+ | "content": { | ||
+ | "sessionID": "B303E3DE2C062B8C148DAEF2D3F6C723", | ||
+ | "sensorInfoList":{ | ||
+ | "e": [ | ||
+ | { | ||
+ | "n": "custom/custom_data2", | ||
+ | "sv": "Accept", | ||
+ | "StatusCode": 202 | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | }, | ||
+ | "sendTS": {"$date": 1499329284038} | ||
+ | }</pre> | ||
Success: | Success: | ||
− | <pre>{ | + | <pre>{ |
− | + | "agentID": "00000001-0000-0000-0000-000babbb7ef3", | |
− | + | "commCmd": 526, | |
− | + | "handlerName": "custom", | |
− | + | "content": { | |
− | + | "sessionID": "B303E3DE2C062B8C148DAEF2D3F6C723", | |
− | + | "sensorInfoList":{ | |
− | + | "e": [ | |
− | + | { | |
− | + | "n": "custom/custom_data2", | |
− | + | "sv": "Success", | |
+ | "StatusCode": 200 | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | }, | ||
+ | "sendTS": {"$date": 1499329284038} | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | == Event Notify == | ||
+ | Description: Agent send event notify to Server | ||
+ | Type: Auto Report | ||
+ | Direction: Server -> Agent | ||
+ | Topic:/wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/eventnotify | ||
+ | QoS: 0 | ||
+ | Retained: 0 | ||
+ | <pre> | ||
+ | { | ||
+ | "commCmd":2059, | ||
+ | "agentID":"00000001-0000-0000-0000-305A3A77B1DA", | ||
+ | "handlerName":"general", | ||
+ | "content":{ | ||
+ | "eventnotify":{ | ||
+ | "subtype":"ACTION_TRIGGER_INFO", | ||
+ | "msg":"Action "00000001-0000-0000-0000-305A3A77B1DA/SUSIControl/Hardware Monitor/GPIO/DI0" triggered by 00000001-0000-0000-0000-305A3A77B1DA/HDDMonitor/hddSmartInfoList/Disk0/TotalLBAsWritten/value:1", | ||
+ | "extMsg": { | ||
+ | "rules":[ | ||
+ | { | ||
+ | "n": "00000001-0000-0000-0000-305A3A77B1DA/HDDMonitor/hddSmartInfoList/Disk0/TotalLBAsWritten/value", | ||
+ | "v":1, | ||
+ | "action":"00000001-0000-0000-0000-305A3A77B1DA/SUSIControl/Hardware Monitor/GPIO/DI0", | ||
+ | "param":true, | ||
+ | "status":"trigger" | ||
+ | } | ||
] | ] | ||
− | + | } | |
− | } | + | }, |
+ | "opTS":{"$date":1494308768000} | ||
+ | }, | ||
+ | "sendTS":{"$date":1522457629328} | ||
} | } | ||
</pre> | </pre> |
Latest revision as of 07:57, 17 February 2023
Contents
Overview
- Introduction for "EI-Agent to WISE-PaaS-2.0 communication protocol". WISEAgent communication protocol is base on standard MQTT protocol. We also define Advantech IoT Topic and message in JSON format. Follow standard to design our [Sensor Format in JSON ] EI-Agent Protocol
Protocol
Connect
- Description: Agent Client sends the "Connect Info" to WISE-PaaS-2.0 Server for on-line notification.
- Type: Info
- Direction: Agent -> Server
- Topic: /wisepaas/device/00000001-0000-0000-0000-001077C25002/agentinfoack
- QoS: 0
- Retained: 0
- Payload:
{ "content": { "parentID": "00000001-0000-0000-8888-0034115521a4", "hostname": "ESL-Tag-5002", "sn": "0000001077C25002", "mac": "0000001077C25002", "version": "1.0.7.252316989", "type": "SenHub", "product": "ESL-Tag", "manufacture": "", "account": "", "passwd": "", "status": 1, "tag": "ESL" }, "commCmd": 1, "agentID": "00000001-0000-0000-0000-001077C25002", "handlerName": "SenHub", "sendTS": { "$date": 1513232002117 } }
OS Info
- Description: Agent Client sends the OS Info" to RMM Server for device OS information.
- Type: Info
- Direction: Agent -> Server
- Topic: /wisepaas/RMM/00000001-0000-0000-0000-999BAB6F4000/agentactionack
- QoS: 0
- Retained: 0
- Payload:
{ "content": { "cagentVersion": "1.0.6.0", "cagentType": "IPC", "osVersion": "Windows Embedded Standard", "biosVersion": "V1.10", "platformName": "ARK-DS762", "processorName": "Intel(R) Core(TM) i7-3610QE CPU @ 2.30GHz", "osArch": "X64", "totalPhysMemKB": 1973544, "macs": "00:0B:AB:6F:37:52", "IP": "172.22.12.84" }, "commCmd": 116, "agentID": "00000001-0000-0000-0000-999BAB6F4000", "handlerName": "general", "sendTS": { "$date": 1510044371812 } }
Disconnect
- Description: Agent Client sends the "Disconnect Info" to Server for off-line notification.
- Type: Info
- Direction: Agent -> Server
- Topic: /wisepaas/device/00000001-0000-0000-0000-001077C25002/agentinfoack
- QoS: 0
- Retained: 0
- Payload:
{ "content": { "parentID": "00000001-0000-0000-8888-0034115521a4", "hostname": "ESL-Tag-5002", "sn": "0000001077C25002", "mac": "0000001077C25002", "version": "1.0.7.252316989", "type": "SenHub", "product": "ESL-Tag", "manufacture": "", "account": "", "passwd": "", "status": 0, "tag": "ESL" }, "commCmd": 1, "agentID": "00000001-0000-0000-0000-001077C25002", "handlerName": "SenHub", "sendTS": { "$date": 1513232002117 } }
Will Message
- Description: While Client lost connection or keep-alive timeout, the will message will send to the client that subscribe the topic
- Type: Info
- Direction: Agent -> Broker
- Topic: /wisepaas/device/00000001-0000-0000-0000-999BAB6F4000/willmessage
- QoS: 0
- Retained: 0
- Payload:
{ "content": { "parentID": "", "hostname": "chihyu-PC", "sn": "000BAB578433", "mac": "000BAB6F3752", "version": "1.0.6.0", "type": "IPC", "product": "", "manufacture": "", "account": "", "passwd": "", "status": 0, "tag": "RMM" }, "commCmd": 1, "agentID": "00000001-0000-0000-0000-999BAB6F4000", "handlerName": "general", "sendTS": { "$date": 1510044370561 } }
Info or Update Device's Capability
- Description: Agent will send it's capability to Server for description all resource.
- Type: Auto update
- Direction: Agent-> Server
- Topic: /wisepaas/RMM/00000001-0000-0000-0000-999BAB6F4000/agentactionack
- QoS: 0
- Retained: 0
- Payload:
Example: HDD PMQ Capability
{ "content": { "HDD_PMQ": { "info": { "bn": "info", "e": [{"n": "type","sv": "PMQ","asm": "r"},{"n": "name","sv": "HDD_PMQ","asm": "r"},{"n": "description","sv": "This service is HDD PMQ Service","asm": "r"}, {"n": "version","sv": "1.0.2","asm": "r"},{"n": "confidence level","v": 83.12,"asm": "r","u": "%"},{"n": "update","sv": null,"asm": "rw"}, {"n": "eventNotify","bv": true,"asm": "r"}] }, "action": { "bn": "action", "e": [{"n": "a1","bv": false,"asm": "r","msg": "Lower system temperature ( < 40 Celsius )."},{"n": "a2","bv": false,"asm": "r","msg": "Backup data to new disk."}, {"n": "a3","bv": false,"asm": "r","msg": "Check power source."},{"n": "ActionLog","sv": null,"asm": "r"}] }, "param": { "bn": "param", "e": [{"n": "report interval","v": 60,"max": 3600,"min": 10,"asm": "rw","u": "sec"},{"n": "enable report","bv": true,"asm": "rw"}] }, "opTS": { "$date": 1510044371815 } } }, "commCmd": 2052, "agentID": "00000001-0000-0000-0000-999BAB6F4000", "handlerName": "general", "sendTS": { "$date": 1510044371815 } }
Auto Update Data Value
- Description: Agent will update latest value to server.
- Type: Auto update
- Direction: Agent-> Server
- Topic: /wisepaas/device/00000001-0000-0000-0000-999BAB6F4000/devinfoack
- QoS: 0
- Retained: 0
- Payload:
{ "content": { "HDD_PMQ": { "info": { "bn": "info", "e": [{"n": "version","sv": "1.0.2"},{"n": "confidence level","v": 89.6,"asm": "r","u": "%"}] }, "param": { "bn": "param", "e": [{"n": "report interval","v": 30},{"n": "enable report","bv": true}] }, "opTS": { "$date": 1510044371815 } } }, "commCmd": 2055, "agentID": "00000001-0000-0000-0000-999BAB6F4000", "handlerName": "general", "sendTS": { "$date": 1510044371815 } }
Get Sensor Data
- Description: Server can send mqtt message to get sensor data value.
- Type: Request
- Direction: Server -> Agent
- Topic: /wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/agentactionreq
- QoS: 0
- Retained: 0
- Payload:
{ "agentId": "00000001-0000-0000-0000-000babbb7ef3", "handlerName": "custom", "commCmd": 523, "content": { "sessionID": "2A1FBCA22A64C2E27341DB5FA7E83FBF", "sensorIDList": { "e": [{"n": "custom/custom_data2"}] } } }
- Description: Agent will reply its data value.
- Type: Reply
- Direction: Agent -> Server
- Topic: /wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/agentactionack
- QoS: 0
- Retained: 0
- Payload:
{ "agentID": "00000001-0000-0000-0000-000babbb7ef3", "commCmd": 524, "handlerName": "custom", "content": { "sessionID": "2A1FBCA22A64C2E27341DB5FA7E83FBF", "sensorInfoList": { "e": [{"n": "custom/custom_data2","v": 123,"StatusCode": 200}] } }, "sendTS": {"$date": 1499328934471} }
Set Data
- Description: Server can send mqtt message to set sensor data value.
- Type: Request
- Direction: Server -> Agent
- Topic:/wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/agentactionreq
- QoS: 0
- Retained: 0
- Payload:
{ "agentId": "00000001-0000-0000-0000-000babbb7ef3", "handlerName": "custom", "commCmd": 525, "content": { "sessionID": "B303E3DE2C062B8C148DAEF2D3F6C723", "sensorIDList": { "e": [{"v": 12,"n": "custom/custom_data2"}] } } }
- Description: Agent will reply its result. There are have two status 1. status code: 202 -> device receive this command, 2. code: 200 -> succesful to set, code: is not 200 => Fail to set
- Type: Reply
- Direction: Agent -> Server
- Topic: /wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/agentactionack
- QoS: 0
- Retained: 0
- Payload:
Accept 1:
{ "agentID": "00000001-0000-0000-0000-000babbb7ef3", "commCmd": 526, "handlerName": "custom", "content": { "sessionID": "B303E3DE2C062B8C148DAEF2D3F6C723", "sensorInfoList":{ "e": [ { "n": "custom/custom_data2", "sv": "Accept", "StatusCode": 202 } ] }, }, "sendTS": {"$date": 1499329284038} }
Success:
{ "agentID": "00000001-0000-0000-0000-000babbb7ef3", "commCmd": 526, "handlerName": "custom", "content": { "sessionID": "B303E3DE2C062B8C148DAEF2D3F6C723", "sensorInfoList":{ "e": [ { "n": "custom/custom_data2", "sv": "Success", "StatusCode": 200 } ] }, }, "sendTS": {"$date": 1499329284038} }
Event Notify
Description: Agent send event notify to Server Type: Auto Report Direction: Server -> Agent Topic:/wisepaas/RMM/00000001-0000-0000-0000-000babbb7ef3/eventnotify QoS: 0 Retained: 0
{ "commCmd":2059, "agentID":"00000001-0000-0000-0000-305A3A77B1DA", "handlerName":"general", "content":{ "eventnotify":{ "subtype":"ACTION_TRIGGER_INFO", "msg":"Action "00000001-0000-0000-0000-305A3A77B1DA/SUSIControl/Hardware Monitor/GPIO/DI0" triggered by 00000001-0000-0000-0000-305A3A77B1DA/HDDMonitor/hddSmartInfoList/Disk0/TotalLBAsWritten/value:1", "extMsg": { "rules":[ { "n": "00000001-0000-0000-0000-305A3A77B1DA/HDDMonitor/hddSmartInfoList/Disk0/TotalLBAsWritten/value", "v":1, "action":"00000001-0000-0000-0000-305A3A77B1DA/SUSIControl/Hardware Monitor/GPIO/DI0", "param":true, "status":"trigger" } ] } }, "opTS":{"$date":1494308768000} }, "sendTS":{"$date":1522457629328} }