Difference between revisions of "Connectivity/Agent Communication Protocol in MQTT"

From ESS-WIKI
Jump to: navigation, search
(EventNotify)
 
(19 intermediate revisions by 2 users not shown)
Line 62: Line 62:
 
     }
 
     }
 
  }
 
  }
 +
 +
== 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: /cagent/admin/devId/willmessage
 +
*QoS: 0
 +
*Retained: 0
 +
*Payload:
 +
 +
{
 +
    "susiCommData": {
 +
        "devID": "000014DAE996BE04",
 +
        "hostname": "PC001104",
 +
        "sn": "14DAE996BE04",
 +
        "mac": "14DAE996BE04",
 +
        "version": "1.0.0.0",
 +
        "type": "IPC",
 +
        "product": "",
 +
        "manufacture": "",
 +
        "account": "anonymous",
 +
        "password": "",
 +
        "status": 0,
 +
        "commCmd": 1,
 +
        "requestID": 21,
 +
        "agentID": "000014DAE996BE04",
 +
        "handlerName": "general",
 +
        "sendTS": 1423536737
 +
    }
 +
}
 +
 +
== OS Info ==
 +
 +
*Description: Agent Client sends the OS Info" to RMM Server for device OS information.
 +
*Type: Info
 +
*Direction: Agent -> Server
 +
*Topic: /cagent/admin/<devID>/agentactionreq
 +
*QoS: 0
 +
*Retained: 0
 +
*Payload:
 +
<pre>{
 +
  "susiCommData":{
 +
    "osInfo":
 +
      {
 +
        "cagentVersion":"3.1.23",
 +
        "cagentType":"IoTGW",
 +
        "osVersion":"SnailOS",
 +
        "biosVersion":"",
 +
        "platformName":"",
 +
        "processorName":"SnailGW",
 +
        "osArch":"SnailX86",
 +
        "totalPhysMemKB":123,
 +
        "macs":"000E40ABCDEF",
 +
        "IP":"192.168.0.100"
 +
    },
 +
    "commCmd":116,
 +
    "requestID":109,
 +
    "agentID":"0000000E40ABCDEF",
 +
    "handlerName":"general",
 +
    "sendTS":1466730390
 +
  }
 +
}</pre>
 +
 +
  
 
== Info or Update Device's Capability ==
 
== Info or Update Device's Capability ==
Line 106: Line 171:
 
   }
 
   }
 
  }
 
  }
<div>Example: ML HDD Predicitaion&nbsp;Capability<br/></div><pre>{ 
+
 
  "susiCommData":{ 
+
== Eable Auto&nbsp;Update&nbsp; ==
      "infoSpec":
+
 
        "ML":
+
*Description: Server can send start auto report command to Agent
            "HDD_Predition":
+
*Type: Auto report
              "0085458221447854589":
+
*Direction: Server -> Agent
                  "Info":{
+
*Topic: /cagent/admin/&lt;device&gt;/agentcallbackreq
                        "e":[{"n":"Name","sv":"HDD Machine Learning Predition,"asm":"r"},
+
*Broadcast Topic: /cagent/admin/broadcast/agentctrl
                            {"n":"Accuracy","v":83,"u":"%"}
+
*QoS: 0
                            {"n":"version","sv":"v2.0.1"}],
+
*Retained: 0
                    "bn":"Info"
+
*Payload:
                  },
+
 
                  "Input":{
+
{
                        "e":[{"n":"Name","sv":"disk0","asm":"w"},
+
&nbsp; &nbsp;"susiCommData": {
                            {"n":"SMART1","v":10,"asm":"w","require":"MUST"},
+
&nbsp; &nbsp; &nbsp; "commCmd": 2053,
                            {"n":"SMART2","v":20,"asm":"w","require":"SHOULD"},
+
&nbsp; &nbsp; &nbsp; "requestItems": {"All":{}},
                            {"n":"SMART3","v":20,"asm":"w","require":"MAY"}],
+
&nbsp; &nbsp; &nbsp; "autoUploadIntervalSec": 10,
                    "bn":"Input"
+
&nbsp; &nbsp; &nbsp; "handlerName": "general"
                  },
+
&nbsp; &nbsp;}
                  "Output":{
+
}
                        "e":[{"n":"Name","sv":"disk0","asm":"r"},
+
 
                            {"n":"Health","bv":1,"asm":"r"},
+
*Description: Agent reply&nbsp;
                            {"n":"Alert1","sv":"","asm":"r"},
+
*Type: Reply of auto report command
                            {"n":"Alert2","sv":"","asm":"r"},
+
*Direction: Server -> Agent
                            {"n":"Alert3","sv":"","asm":"r"}],
+
*Topic: /cagent/admin/&lt;device&gt;/agentactionreq
                    "bn":"Output"
+
*QoS: 0
                  }
+
*Retained: 0
                  "bn":"0085458221447854589",
+
*Payload:
                  "ver":1
+
<pre>{
              },
+
  "susiCommData": {
              "bn":"HDD_Predition",
+
    "result": "SUCCESS",
              "ver":1
+
    "dataFlow": "general/NetMonitor",
            },
+
    "seq": "70_1611629702692",
            "ver":1
+
    "srcTs": 1611629702692,
        }
+
    "commCmd": 2054,
      },
+
    "agentID": "NetMonitor",
      "commCmd":2052,
+
    "handlerName": "general",
      "requestID":2001,
+
    "sendTS": : 1611629702692
      "agentID":"0085458221447854589",
+
  }
      "handlerName":"general",
 
      "sendTS":160081020
 
  }
 
 
}</pre>
 
}</pre>
<div><br/></div><pre>require:
 
        MUST : This word, or the words "REQUIRED" and "SHALL" mean that
 
        the item is an absolute requirement of the specification
 
       
 
        SHOULD: This word or the adjective "RECOMMENDED" means that
 
        there may exist valid reasons in particular circumstances to
 
        ignore this item, but the full implications should be
 
        understood and the case carefully weighed before choosing a
 
        different course
 
       
 
        MAY: This word or the adjective "OPTIONAL" means that this
 
        item is truly optional.  One vendor may choose to include the
 
        item because a particular marketplace requires it or because it
 
        enhances the product, for example; another vendor may omit the
 
        same item</pre>
 
  
== ==
+
== Stope Auto&nbsp;Update&nbsp; ==
 +
 
 +
*Description: Server can send stop&nbsp;auto report command to Agent
 +
*Type: Auto update
 +
*Direction: Server -> Agent
 +
*Topic: /cagent/admin/&lt;device&gt;/agentcallbackreq
 +
*Broadcast Topic: /cagent/admin/broadcast/agentctrl
 +
*QoS: 0
 +
*Retained: 0
 +
*Payload:
 +
 
 +
{
 +
&nbsp; "susiCommData": {
 +
&nbsp; &nbsp; "requestID": 1001,
 +
&nbsp; &nbsp; "catalogID": 4,
 +
&nbsp; &nbsp; "commCmd": 2056,
 +
&nbsp; &nbsp; "handlerName": "general",
 +
&nbsp; &nbsp; "requestItems": {
 +
&nbsp; &nbsp; &nbsp; "All": {}
 +
&nbsp; &nbsp; }
 +
&nbsp; }
 +
}
  
 
== Auto Update Sensor Data Value ==
 
== Auto Update Sensor Data Value ==
Line 182: Line 250:
 
         "SenHub":{   
 
         "SenHub":{   
 
             "SenData":{   
 
             "SenData":{   
               "e":[
+
               "e":[{"n":"Temperature","v":1},
                  {
+
                    {"n":"Humidity","v":57},
                    "n":"Temperature",
+
                    {"n":"GPIO1","bv":0},
                    "v":1
+
                    {"n":"GPIO2","bv":0}],
                  },
 
                  {
 
                    "n":"Humidity",
 
                    "v":57
 
                  },
 
                  {
 
                    "n":"GPIO1",
 
                    "bv":0
 
                  },
 
                  {
 
                    "n":"GPIO2",
 
                    "bv":0
 
                  }
 
              ],
 
 
               "bn":"SenData"
 
               "bn":"SenData"
 
             },
 
             },
Line 212: Line 266:
 
   }
 
   }
 
  }
 
  }
 +
 +
== Start Monitor Request ==
 +
 +
*Description: Server send the&nbsp;start monitor requestto Agent to trigger a plugin to report data with&nbsp;reply topic.
 +
*Type: Auto update
 +
*Direction: Server -> Agent
 +
*Topic: /cagent/admin/&lt;devID&gt;/agentcallbackreq
 +
*QoS: 0
 +
*Retained: 0
 +
*Payload:
 +
 +
{
 +
&nbsp; "susiCommData": {
 +
&nbsp; &nbsp; "commCmd": 533,
 +
&nbsp; &nbsp; "catalogID": 4,
 +
&nbsp; &nbsp; "requestID": 10,
 +
&nbsp; &nbsp; "autoUploadIntervalMs": 10000,
 +
&nbsp; &nbsp; "autoUploadTimeoutMs": 30000
 +
&nbsp; }
 +
}
 +
 +
*Description: Agent will reply sensor data every autoUploadIntervalMs&nbsp;( millisecond ) duration autoUploadTimeoutMs.
 +
*Type: Reply
 +
*Direction: Agent -> Server
 +
*Topic: /cagent/admin/&lt;devID&gt;/agentactionreq
 +
*QoS: 0
 +
*Retained: 0
 +
*Payload: Refer to Auto Update Sensor Data Value
 +
<pre>{
 +
&nbsp; "susiCommData": {
 +
&nbsp; &nbsp; "OPCUAClient": {
 +
&nbsp; &nbsp; &nbsp; "info": {
 +
&nbsp; &nbsp; &nbsp; &nbsp; "bn": "info",
 +
&nbsp; &nbsp; &nbsp; &nbsp; "e": [
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "n": "type",
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "sv": "Protocol-Converter",
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "asm": "r"
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "n": "name",
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "sv": "OPCUAClient",
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "asm": "r"
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
 +
&nbsp; &nbsp; &nbsp; &nbsp; ]
 +
&nbsp; &nbsp; &nbsp; }
 +
&nbsp; &nbsp; },
 +
&nbsp; &nbsp; "commCmd": 534,
 +
&nbsp; &nbsp; "requestID": 30002,
 +
&nbsp; &nbsp; "agentID": "OPCUAClient",
 +
&nbsp; &nbsp; "handlerName": "OPCUAClient",
 +
&nbsp; &nbsp; "sendTS": 1587353254699
 +
&nbsp; }
 +
}</pre>
  
 
== Get Sensor Data ==
 
== Get Sensor Data ==
Line 312: Line 420:
 
             {   
 
             {   
 
               "n":"/Info/Name",
 
               "n":"/Info/Name",
               "sv":"Success",
+
               "sv":"SenHub1",
 
               "StatusCode":200
 
               "StatusCode":200
 
             }
 
             }
Line 319: Line 427:
 
   }
 
   }
 
  }
 
  }
 
 
  
 
== EventNotify ==
 
== EventNotify ==
  
*Description:&nbsp;
+
*Description:Event Notify
 
*Type: Auto update
 
*Type: Auto update
 
*Direction: Agent -> Server
 
*Direction: Agent -> Server
Line 338: Line 444:
 
       "handlerName":"general",
 
       "handlerName":"general",
 
       "sendTS":1453356274,
 
       "sendTS":1453356274,
       "eventnotify":{
+
       "eventnotify": {
      "subtype":"MsgGen",
+
            "subtype": "predict",
      "msg":"My MsgGenTest",
+
            "msg": "Hard disk long-term operation in more than 40°C or vibration environment.",
      "severity":2,
+
            "severity": 4,
      "handler":"MsgGen",
+
            "handler": "HDD_PMQ",
      "extMsg":{
+
            "extMsg": {
&nbsp;          "predictMsg":{
+
                "n": "WDC WD3200BUCT-63TWBY0",
            "Healthy":"Good",
+
                "eventID":"e2"
            "Model Accuracy":"83%",
 
            "Suggestion":"...",
 
            "Model Version":"1.0.8"
 
 
             }
 
             }
        }
+
        }
      }
+
&nbsp;  }
  }
 
 
}</pre>
 
}</pre>
  
Line 366: Line 468:
  
 
subtype:  
 
subtype:  
&nbsp;    THRESHOLD_CHECK_INFO
+
    THRESHOLD_CHECK_INFO
&nbsp;    THRESHOLD_CHECK_ERROR</pre>
+
    THRESHOLD_CHECK_ERROR
 
+
</pre>
== Service Discover ==
 
 
 
== Interactive Communication ==
 
 
 
*Description: Request Communication protocol to others service (agent)
 
*Type: Request
 
*Direction: Service-1 -> Service-2
 
*Topic: /cagent/admin/&lt;devID&gt;/Input
 
*QoS: 0
 
*Retained: 0
 
*Payload:
 
<pre>{ 
 
  "susiCommData":{ 
 
    "Input":{ 
 
        "e":[{"n":"Name","sv":"disk2"},
 
            {"n":"SMART1","v":68},
 
            {"n":"SMART2","v":10}]
 
        ]
 
    },
 
    "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
 
    "commCmd":525,
 
    "requestID":0,
 
    "agentID":"",
 
    "handlerName":"ML",
 
    "sendTS":1466088605
 
  }
 
}</pre>
 
 
 
*Description: Service will response
 
*Type: Request
 
*Direction: Service-2&nbsp;-> Service-1
 
*Topic: /cagent/admin/&lt;devID&gt;/Output
 
*QoS: 0
 
*Retained: 0
 
*Payload:
 
<pre>{ 
 
  "susiCommData":{ 
 
    "data":{ 
 
        "ML":{ 
 
            "HDD_Predition":{ 
 
              "0085458221447854589":{ 
 
                  "Output":{
 
                        "e":[{"n":"Name","sv":"disk2"},
 
                            {"n":"Health","bv":0}],
 
                    "bn":"Output"
 
                  }
 
                  "bn":"0085458221447854589",
 
                  "ver":1
 
              },
 
              "bn":"HDD_Predition",
 
              "ver":1
 
            },
 
            "ver":1
 
        }
 
    },
 
    "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
 
    "commCmd":2055,
 
    "requestID":2001,
 
    "agentID":"0085458221447854589",
 
    "handlerName":"general",
 
    "sendTS":160081031
 
  }
 
}</pre>
 
 
 
== Action ==
 
  
*Description:&nbsp;
+
== [[Connectivity/AdvHeartBeat|AdvHeartBeat]] ==
*Type:&nbsp;?
 
*Direction: Agent -> Server
 
*Topic:&nbsp;????
 
*QoS:&nbsp;?
 
*Retained:&nbsp;?
 
*Payload:?
 
<pre>???</pre>
 

Latest revision as of 07:56, 17 February 2023

Overview

Introduction for "WISEAgent 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 ]

Protocol

Connect

  • Description: Agent Client sends the "Connect Info" to RMM Server for on-line notification.
  • Type: Info
  • Direction: Agent -> Server
  • Topic: /cagent/admin/<devID>/agentinfoack
  • QoS: 2
  • Retained: 0
  • Payload:
{
  "susiCommData": {
    	"devID":"0017000E40000001",
    	"hostname":"AAA",
    	"sn":"0017000E40000001",
    	"mac":"0017000E40000001",
    	"version":"3.1.23",
    	"type":"SenHub",
    	"product":"WISE-1020",
    	"manufacture":"",
    	"status":"1",
    	"commCmd":1,
    	"requestID":30002,
    	"agentID":"0017000E40000001",
    	"handlerName":"general",
    	"sendTS":160081026
   }
}

Disconnect

  • Description: Agent Client sends the "Disconnect Info" to Server for off-line notification.
  • Type: Info
  • Direction: Agent -> Server
  • Topic: /cagent/admin/<devID>/agentinfoack
  • QoS: 2
  • Retained: 0
  • Payload:
{
  "susiCommData": {
    	"devID":"0017000E40000001",
    	"hostname":"AAA",
    	"sn":"0017000E40000001",
    	"mac":"0017000E40000001",
    	"version":"3.1.23",
    	"type":"SenHub",
    	"product":"WISE-1020",
    	"manufacture":"",
    	"status":"0",
    	"commCmd":1,
    	"requestID":30002,
    	"agentID":"0017000E40000001",
    	"handlerName":"general",
    	"sendTS":160081026
   }
}

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: /cagent/admin/devId/willmessage
  • QoS: 0
  • Retained: 0
  • Payload:
{
    "susiCommData": {
        "devID": "000014DAE996BE04",
        "hostname": "PC001104",
        "sn": "14DAE996BE04",
        "mac": "14DAE996BE04",
        "version": "1.0.0.0",
        "type": "IPC",
        "product": "",
        "manufacture": "",
        "account": "anonymous",
        "password": "",
        "status": 0,
        "commCmd": 1,
        "requestID": 21,
        "agentID": "000014DAE996BE04",
        "handlerName": "general",
        "sendTS": 1423536737
    }
}

OS Info

  • Description: Agent Client sends the OS Info" to RMM Server for device OS information.
  • Type: Info
  • Direction: Agent -> Server
  • Topic: /cagent/admin/<devID>/agentactionreq
  • QoS: 0
  • Retained: 0
  • Payload:
{
  "susiCommData":{
     "osInfo":
      {
        "cagentVersion":"3.1.23",
        "cagentType":"IoTGW",
        "osVersion":"SnailOS",
        "biosVersion":"",
        "platformName":"",
        "processorName":"SnailGW",
        "osArch":"SnailX86",
        "totalPhysMemKB":123,
        "macs":"000E40ABCDEF",
        "IP":"192.168.0.100"
     },
     "commCmd":116,
     "requestID":109,
     "agentID":"0000000E40ABCDEF",
     "handlerName":"general",
     "sendTS":1466730390
   }
}


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: /cagent/admin/<devID>/agentactionreq
  • QoS: 0
  • Retained: 0
  • Payload: 

Example: SenHub's Capability

{
  "susiCommData":{
    "infoSpec": {
        "SenHub": {
            "SenData": {"e":[ {"n":"Temperature","u":"Cel","v":0.000000,"min":-100.000000,"max":200.000000,"asm":"r","type":"d","rt":"ucum.Cel","st":"ipso","exten":""},
                              {"n":"Humidity","u":"%","v":0.000000,"min":0.000000,"max":100.000000,"asm":"r","type":"d","rt":"ucum.%","st":"ipso","exten":""},
                              {"n":"GPIO1","u":"","bv":0,"min":0.000000,"max":1.000000,"asm":"r","type":"b","rt":"","st":"ipso","exten":""},
                              {"n":"GPIO2","u":"","bv":0,"min":0.000000,"max":1.000000,"asm":"r","type":"b","rt":"","st":"ipso","exten":""}
                            ],
            "bn":"SenData"
            },
            "Info": {"e":[{"n":"Name","sv":"SenHub1","asm":"rw"},
                          {"n":"sw","sv":"1.0.00","asm":"r"}
                         ],
            "bn":"Info"
           },
           "Net": {"e":[{"n":"sw","sv":"1.0.00","asm":"r"},
                        {"n":"Neighbor","sv":"","asm":"r"},
                        {"n":"Health","v":"100.000000","asm":"r"}
                       ],
            "bn":"Net"
           }
       }
   },
   "commCmd":2052,
   "requestID":2001,
   "agentID":"0017000E40000001",
   "handlerName":"general",
   "sendTS":160081024
  }
}

Eable Auto Update 

  • Description: Server can send start auto report command to Agent
  • Type: Auto report
  • Direction: Server -> Agent
  • Topic: /cagent/admin/<device>/agentcallbackreq
  • Broadcast Topic: /cagent/admin/broadcast/agentctrl
  • QoS: 0
  • Retained: 0
  • Payload:
{
   "susiCommData": {
      "commCmd": 2053,
      "requestItems": {"All":{}},
      "autoUploadIntervalSec": 10,
      "handlerName": "general"
   }
}
  • Description: Agent reply 
  • Type: Reply of auto report command
  • Direction: Server -> Agent
  • Topic: /cagent/admin/<device>/agentactionreq
  • QoS: 0
  • Retained: 0
  • Payload:
{
  "susiCommData": {
    "result": "SUCCESS",
    "dataFlow": "general/NetMonitor",
    "seq": "70_1611629702692",
    "srcTs": 1611629702692,
    "commCmd": 2054,
    "agentID": "NetMonitor",
    "handlerName": "general",
    "sendTS": : 1611629702692
  }
}

Stope Auto Update 

  • Description: Server can send stop auto report command to Agent
  • Type: Auto update
  • Direction: Server -> Agent
  • Topic: /cagent/admin/<device>/agentcallbackreq
  • Broadcast Topic: /cagent/admin/broadcast/agentctrl
  • QoS: 0
  • Retained: 0
  • Payload:
{
  "susiCommData": {
    "requestID": 1001,
    "catalogID": 4,
    "commCmd": 2056,
    "handlerName": "general",
    "requestItems": {
      "All": {}
    }
  }
}

Auto Update Sensor Data Value

  • Description: Agent will update latest value to server.
  • Type: Auto update
  • Direction: Agent-> Server
  • Topic: /cagent/admin/<devID>/deviceinfo
  • QoS: 0
  • Retained: 0
  • Payload:
{  
  "susiCommData":{  
     "data":{  
        "SenHub":{  
           "SenData":{  
              "e":[{"n":"Temperature","v":1},
                   {"n":"Humidity","v":57},
                   {"n":"GPIO1","bv":0},
                   {"n":"GPIO2","bv":0}],
              "bn":"SenData"
           },
           "ver":1
        }
     },
     "commCmd":2055,
     "requestID":2001,
     "agentID":"0017000E40000001",
     "handlerName":"general",
     "sendTS":160081031
  }
}

Start Monitor Request

  • Description: Server send the start monitor requestto Agent to trigger a plugin to report data with reply topic.
  • Type: Auto update
  • Direction: Server -> Agent
  • Topic: /cagent/admin/<devID>/agentcallbackreq
  • QoS: 0
  • Retained: 0
  • Payload:
{
  "susiCommData": {
    "commCmd": 533,
    "catalogID": 4,
    "requestID": 10,
    "autoUploadIntervalMs": 10000,
    "autoUploadTimeoutMs": 30000
  }
}
  • Description: Agent will reply sensor data every autoUploadIntervalMs ( millisecond ) duration autoUploadTimeoutMs.
  • Type: Reply
  • Direction: Agent -> Server
  • Topic: /cagent/admin/<devID>/agentactionreq
  • QoS: 0
  • Retained: 0
  • Payload: Refer to Auto Update Sensor Data Value
{
  "susiCommData": {
    "OPCUAClient": {
      "info": {
        "bn": "info",
        "e": [
          {
            "n": "type",
            "sv": "Protocol-Converter",
            "asm": "r"
          },
          {
            "n": "name",
            "sv": "OPCUAClient",
            "asm": "r"
          }
        ]
      }
    },
    "commCmd": 534,
    "requestID": 30002,
    "agentID": "OPCUAClient",
    "handlerName": "OPCUAClient",
    "sendTS": 1587353254699
  }
}

Get Sensor Data

  • Description: Server can send mqtt message to get sensor data value.
  • Type: Request
  • Direction: Server -> Agent
  • Topic: /cagent/admin/<devID>/agentcallbackreq
  • QoS: 0
  • Retained: 0
  • Payload:
{  
  "susiCommData":{  
     "sessionID":"2746E3B65BAB115338B9668CDC5C35C4",
     "sensorIDList":{  
        "e":[  
           {  
              "n":"SenHub/Info/sw"
           }
        ]
     },
     "commCmd":523,
     "requestID":0,
     "agentID":"",
     "handlerName":"SenHub",
     "sendTS":1466057267
  }
}
  • Description: Agent will reply its data value.
  • Type: Reply
  • Direction: Agent -> Server
  • Topic: /cagent/admin/<devID>/agentactionreq
  • QoS: 0
  • Retained: 0
  • Payload:
{  
  "susiCommData":{  
     "commCmd":524,
     "handlerName":"SenHub",
     "sessionID":"2746E3B65BAB115338B9668CDC5C35C4",
     "sensorInfoList":{  
        "e":[  
           {  
              "n":"/Info/sw",
              "sv":"1.0.00",
              "StatusCode":200
           }
        ]
     }
  }
}

Set Sensor Data

  • Description: Server can send mqtt message to set sensor data value.
  • Type: Request
  • Direction: Server -> Agent
  • Topic: /cagent/admin/<devID>/agentcallbackreq
  • QoS: 0
  • Retained: 0
  • Payload:
{  
  "susiCommData":{  
     "sensorIDList":{  
        "e":[  
           {  
              "sv":"SenHub1",
              "n":"SenHub/Info/Name"
           }
        ]
     },
     "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
     "commCmd":525,
     "requestID":0,
     "agentID":"",
     "handlerName":"SenHub",
     "sendTS":1466088605
  }
}
  • Description: Agent will reply its result.
  • Type: Reply
  • Direction: Agent -> Server
  • Topic: /cagent/admin/<devID>/agentactionreq
  • QoS: 0
  • Retained: 0
  • Payload:
{  
  "susiCommData":{  
     "commCmd":526,
     "handlerName":"SenHub",
     "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
     "sensorInfoList":{  
        "e":[  
           {  
              "n":"/Info/Name",
              "sv":"SenHub1",
              "StatusCode":200
           }
        ]
     }
  }
}

EventNotify

  • Description:Event Notify
  • Type: Auto update
  • Direction: Agent -> Server
  • Topic: /cagent/admin/<devID>/eventnotify
  • QoS: ?
  • Retained: ?
  • Payload:
{  
   "susiCommData":{  
      "commCmd":2059,
      "requestID":2001,
      "agentID":"000014DAE996BE04",
      "handlerName":"general",
      "sendTS":1453356274,
      "eventnotify": {
            "subtype": "predict",
            "msg": "Hard disk long-term operation in more than 40°C or vibration environment.",
            "severity": 4,
            "handler": "HDD_PMQ",
            "extMsg": {
                "n": "WDC WD3200BUCT-63TWBY0",
                "eventID":"e2"
            }
        }  
    }
}


severity:
     Severity_Emergency = 0,
     Severity_Alert     = 1,
     Severity_Critical  = 2,
     Severity_Error     = 3,
     Severity_Warning   = 4,
     Severity_Informational = 5,
     Severity_Debug     = 6,

subtype: 
    THRESHOLD_CHECK_INFO
    THRESHOLD_CHECK_ERROR

AdvHeartBeat