Difference between revisions of "EIS Service Protocol"

From ESS-WIKI
Jump to: navigation, search
(Created page with "= Overview = :Introduction for "WISE-Snail communication protocol for EIS Service". WISEAgent communication protocol is base on standard MQTT protocol. We also define Advante...")
 
 
(36 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
*Retained: 0
 
*Retained: 0
 
*Payload:
 
*Payload:
<pre>{
+
<div>{<br/>&nbsp; &nbsp;"susiCommData": {<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"devID":"<span style="color:#FF0000;">0005000E40000001</span>",&nbsp;&nbsp;&nbsp;&nbsp; // User Define, NULL-> Auto UUID-like devID<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"hostname":"WISE-1520+(devID4)",&nbsp;&nbsp;&nbsp;&nbsp; // The same with Handler Name<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"sn":"0005000E40000001",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"mac":"0005000E40000001",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"version":"3.1.23",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"type":"<span style="color:#0000FF;">Service</span>", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Fixed: Service<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"product":"<span style="color:#006400;">&lt;ServiceGroup&gt;</span>",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"manufacture":"",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"status":"1",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"commCmd":1,<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"requestID":30002,<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"agentID":"0005000E40000001", // the same with devID<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"handlerName":"general",<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"sendTS":160081026<br/>&nbsp;&nbsp; }<br/>}</div>
  "susiCommData": {
 
    "devID":"0027000E40000001",    // <span style="color:#FF0000;">User Define</span>, NULL-> Auto <span style="color:#FF0000;">UUID-like</span>
 
    "hostname":"<span style="color:#FF0000;"><ServiceName></span>",    // <span style="color:#FF0000;">The same with Handler Name</span>  
 
    "sn":"0027000E40000001",
 
    "mac":"0027000E40000001",
 
    "version":"<span style="color:#000000;">3.1.23</span>",         
 
    "type":"<span style="color:#FF0000;">Service</span>",               // <span style="color:#FF0000;">Fixed: Service</span>    
 
    "product":"<span style="color:#FF0000;"><ServiceName></span>",
 
    "manufacture":"",
 
    "status":"1",
 
    "commCmd":1,
 
    "requestID":30002,
 
    "agentID":"0027000E40000001",
 
    "handlerName":"general",
 
    "sendTS":160081026
 
  }
 
}
 
</pre>
 
  
 
== OS Info ==
 
== OS Info ==
Line 43: Line 25:
 
*Retained: 0
 
*Retained: 0
 
*Payload:
 
*Payload:
<pre>{
 
  "susiCommData":{
 
    "osInfo":
 
    {
 
        "cagentVersion":"3.1.23",
 
        "cagentType":"<span style="color:#FF0000;"><ServiceName></span>",  // <span style="color:#FF0000;">The same with Handler Name</span>
 
        "osVersion":"SnailOS",
 
        "biosVersion":"",
 
        "platformName":"",
 
        "processorName":"SnailGW",
 
        "osArch":"SnailX86",
 
        "totalPhysMemKB":123,
 
        "macs":"000E40ABCDEF",
 
        "IP":"192.168.0.100"
 
    },
 
    "commCmd":116,
 
    "requestID":109,
 
    "agentID":"0027000E40000001",
 
    "handlerName":"general",
 
    "sendTS":1466730390
 
  }
 
}</pre>
 
 
  
 +
{<br/>&nbsp; "susiCommData":{<br/>&nbsp;&nbsp;&nbsp;&nbsp; "osInfo":<br/>&nbsp;&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "cagentVersion":"<span style="color:#008000;">3.1.23</span>", &nbsp;// Service version for user define<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "cagentType":<span style="color:#000000;">"</span><span style="color:#0000FF;">Service</span>", &nbsp; &nbsp;// fixed<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "osVersion":"SnailOS",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "biosVersion":"",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "platformName":"",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "processorName":"Snail", &nbsp;// different to SnailGW&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "osArch":"SnailX86",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "totalPhysMemKB":123,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "macs":"000E40ABCDEF", // uuid<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "IP":"" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// "null"<br/>&nbsp;&nbsp;&nbsp;&nbsp; },<br/>&nbsp;&nbsp;&nbsp;&nbsp; "commCmd":116,<br/>&nbsp;&nbsp;&nbsp;&nbsp; "requestID":109,<br/>&nbsp;&nbsp;&nbsp;&nbsp; "agentID":"0005000E40000001",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "handlerName":"general",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sendTS":1466730390<br/>&nbsp;&nbsp; }<br/>}
  
 
== Disconnect ==
 
== Disconnect ==
Line 77: Line 37:
 
*Retained: 0
 
*Retained: 0
 
*Payload:
 
*Payload:
<pre>{
 
  "susiCommData": {
 
    "devID":"0027000E40000001",
 
    "hostname":"<span style="color:#FF0000;"><ServiceName></span>"",
 
    "sn":"0027000E40000001",
 
    "mac":"0027000E40000001",
 
    "version":"3.1.23",
 
    "type":"<span style="color:#FF0000;">Service</span>",
 
    "product":"<span style="color:#FF0000;"><ServiceName></span>",
 
    "manufacture":"",
 
    "status":"0",
 
    "commCmd":1,
 
    "requestID":30002,
 
    "agentID":"0027000E40000001",
 
    "handlerName":"general",
 
    "sendTS":160081026
 
  }
 
}
 
</pre>
 
  
== Info or Update Device's Capability ==
+
{<br/>&nbsp; "susiCommData": {<br/>&nbsp;&nbsp;&nbsp;&nbsp; "devID":"0005000E40000001",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "hostname":"<span style="color:#FF0000;"></span>WISE-1520+(devID4)<span style="color:#FF0000;"></span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sn":"0005000E40000001",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "mac":"0005000E40000001",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "version":"3.1.23",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "type":"<span style="color:#0000FF;">Service</span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "product":"",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "manufacture":"",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "status":"0",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "commCmd":1,<br/>&nbsp;&nbsp;&nbsp;&nbsp; "requestID":30002,<br/>&nbsp;&nbsp;&nbsp;&nbsp; "agentID":"0005000E40000001",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "handlerName":"general",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sendTS":160081026<br/>&nbsp;&nbsp; }<br/>}
 +
 
 +
== Info or Update Service'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.
Line 108: Line 51:
  
 
Example: Service's&nbsp;Capability
 
Example: Service's&nbsp;Capability
<pre>{
 
  "susiCommData":{
 
    "infoSpec": {
 
        "<span style="color:#FF0000;"><ServiceName></span>": {
 
            "Info": {"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":"Info"
 
            },
 
&nbsp;      "bn":"ServiceName"
 
      }
 
  },
 
  "commCmd":2052,
 
  "requestID":2001,
 
  "agentID":"0027000E40000001",
 
  "handlerName":"general",
 
  "sendTS":160081024
 
  }
 
}
 
</pre>
 
 
 
<pre />
 
  
 +
{<br/>&nbsp;&nbsp; "susiCommData":{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "infoSpec": {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color:#FF0000;">&lt;ServiceGroup&gt;</span>": {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color:#FF0000;">&lt;ServeName&gt;</span>":{<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"ServeName0":{<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"Info": { "e": [ &nbsp;{"n":"Temperature","u":"Cel","v":0.000000,"min":-100},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{"n":"Humidity","u":"%","v":0.000000,"min":0.000000,"max":100.000000,"asm":"r","type":"d","rt":"ucum.%","st":"ipso","exten":""},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{"n":"SmartML", "sv":"&lt;xml&gt;", "asm":"rw", "format":"xml", "encoding":"base64"},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; {"n":"SmartData", "sv":"&lt;json&gt;", "asm":"r", "format":"json", "encoding":"base64"} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "bn":"Info"<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;},<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "bn":"0005000E40000001" &nbsp; <span style="color:#FF0000;">// => uuid</span><br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "bn":"<span style="color:#FF0000;">&lt;ServeName&gt;</span>"<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br/>&nbsp; &nbsp;},<br/>&nbsp; &nbsp;"commCmd":2052,<br/>&nbsp; &nbsp;"requestID":2001,<br/>&nbsp; &nbsp;"agentID":"0005000E40000001",<br/>&nbsp; &nbsp;"handlerName":"general",<br/>&nbsp; &nbsp;"sendTS":160081024<br/>&nbsp; }<br/>}
  
 
== Auto Update Sensor Data Value ==
 
== Auto Update Sensor Data Value ==
Line 144: Line 63:
 
*Retained: 0
 
*Retained: 0
 
*Payload:
 
*Payload:
<pre>
+
 
  "susiCommData":{
+
{&nbsp;<br/>&nbsp; "susiCommData":{&nbsp;<br/>&nbsp; &nbsp; &nbsp;"data":{ &nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "<span style="color:#FF0000;">&lt;ServiceGroup&gt;</span>":{&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "<span style="color:#FF0000;">&lt;ServeName&gt;</span>":{&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "ServeName0": {<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Info":{&nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"e":[&nbsp;{"n":"SmartData", "sv":"&lt;json&gt;"}],<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "bn":"Info"<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "bn":"0005000E40000001" &nbsp; &nbsp;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "bn":"&lt;ServeName&gt;"<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;},<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "bn":"&lt;ServiceName&gt;"<br/>&nbsp; &nbsp; &nbsp; &nbsp; }<br/>&nbsp; &nbsp; &nbsp;},<br/>&nbsp; &nbsp; &nbsp;"commCmd":2055,<br/>&nbsp; &nbsp; &nbsp;"requestID":2001,<br/>&nbsp; &nbsp; &nbsp;"agentID":"0005000E40000001",<br/>&nbsp; &nbsp; &nbsp;"handlerName":"general",<br/>&nbsp; &nbsp; &nbsp;"sendTS":160081031<br/>&nbsp; }<br/>}
    "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
 
  }
 
}
 
</pre>
 
  
 
== Get Sensor Data ==
 
== Get Sensor Data ==
Line 190: Line 75:
 
*Retained: 0
 
*Retained: 0
 
*Payload:
 
*Payload:
<pre>
+
 
  "susiCommData":{
+
{&nbsp;<br/>&nbsp; "susiCommData":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sessionID":"2746E3B65BAB115338B9668CDC5C35C4",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sensorIDList":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "e":[&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "n":"<span style="color:#FF0000;">ServiceGroup/ServeName/devID/Info/SmartML</span>"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br/>&nbsp;&nbsp;&nbsp;&nbsp; },<br/>&nbsp;&nbsp;&nbsp;&nbsp; "commCmd":523,<br/>&nbsp;&nbsp;&nbsp;&nbsp; "requestID":0,<br/>&nbsp;&nbsp;&nbsp;&nbsp; "agentID":"",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "handlerName":"<span style="color:#FF0000;"></span><span style="color:#0000FF;">Service</span><span style="color:#FF0000;"></span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sendTS":1466057267<br/>&nbsp; }<br/>}
    "sessionID":"2746E3B65BAB115338B9668CDC5C35C4",
 
    "sensorIDList":{
 
        "e":[
 
          {
 
              "n":"SenHub/Info/sw"
 
          }
 
        ]
 
    },
 
    "commCmd":523,
 
    "requestID":0,
 
    "agentID":"",
 
    "handlerName":"SenHub",
 
    "sendTS":1466057267
 
  }
 
}
 
</pre>
 
  
 
*Description: Agent will reply its data value.
 
*Description: Agent will reply its data value.
Line 216: Line 85:
 
*Retained: 0
 
*Retained: 0
 
*Payload:
 
*Payload:
<pre>
+
 
  "susiCommData":{
+
{&nbsp;<br/>&nbsp; "susiCommData":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp; "commCmd":524,<br/>&nbsp;&nbsp;&nbsp;&nbsp; "handlerName":"<span style="color:#FF0000;">&lt;ServiceGroup&gt;</span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sessionID":"2746E3B65BAB115338B9668CDC5C35C4",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sensorInfoList":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "e":[&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "n":"<span style="color:#FF0000;">ServiceGroup/ServeName/devID/Info/SmartML</span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:#FF0000;">"sv":"&lt;xml&gt;",</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "StatusCode":200<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br/>&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp; }<br/>}
    "commCmd":524,
 
    "handlerName":"SenHub",
 
    "sessionID":"2746E3B65BAB115338B9668CDC5C35C4",
 
    "sensorInfoList":{
 
        "e":[
 
          {
 
              "n":"/Info/sw",
 
              "sv":"1.0.00",
 
              "StatusCode":200
 
          }
 
        ]
 
    }
 
  }
 
}
 
</pre>
 
  
 
== Set Sensor Data ==
 
== Set Sensor Data ==
Line 243: Line 97:
 
*Retained: 0
 
*Retained: 0
 
*Payload:
 
*Payload:
<pre>
+
 
  "susiCommData":{
+
{&nbsp;<br/>&nbsp; "susiCommData":{&nbsp;<br/>&nbsp;&nbsp;&nbsp; "sessionID":"4DDF0B6DE2773176095F55E8C930507A",<br/>&nbsp; &nbsp; "commCmd":525,<br/>&nbsp; &nbsp; "requestID":0,<br/>&nbsp; &nbsp;"agentID":"",<br/>&nbsp; &nbsp; "handlerName":"<span style="color:#0000FF;">Service</span>", &nbsp; // Fixed name for wisesnail parse rule<br/>&nbsp; &nbsp;"sendTS":1466088605<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sensorIDList":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "e":[&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "sv":"<span style="color:#FF0000;">&lt;xml&gt;</span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "n":"<span style="color:#FF0000;">ServiceGroup/ServeName/devID/Info/SmartML</span>"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br/>&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp; }<br/>}
    "sensorIDList":{
+
 
        "e":[
+
*Description: Agent will reply accept this command
          {
+
*Type: Reply
              "sv":"SenHub1",
+
*Direction: Agent -> Server
              "n":"SenHub/Info/Name"
+
*Topic: /cagent/admin/&lt;devID&gt;/agentactionreq
          }
+
*QoS: 0
        ]
+
*Retained: 0
    },
+
*Payload:
    "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
+
 
    "commCmd":525,
+
{&nbsp;<br/>&nbsp; "susiCommData":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp; "commCmd":526,<br/>&nbsp;&nbsp;&nbsp;&nbsp; "handlerName":"<span style="color:#0000FF;">Service</span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sessionID":"4DDF0B6DE2773176095F55E8C930507A",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sensorInfoList":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "e":[&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "n":"<span style="color:#FF0000;">&lt;ServiceGroup&gt;/ServeName/&lt;devID&gt;/Info/SmartML</span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "StatusCode":<span style="color:#FF0000;">202</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br/>&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp; }<br/>}
    "requestID":0,
 
    "agentID":"",
 
    "handlerName":"SenHub",
 
    "sendTS":1466088605
 
  }
 
}
 
</pre>
 
  
 
*Description: Agent will reply its result.
 
*Description: Agent will reply its result.
Line 270: Line 117:
 
*Retained: 0
 
*Retained: 0
 
*Payload:
 
*Payload:
<pre>{ 
 
  "susiCommData":{ 
 
    "commCmd":526,
 
    "handlerName":"SenHub",
 
    "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
 
    "sensorInfoList":{ 
 
        "e":[ 
 
          { 
 
              "n":"/Info/Name",
 
              "sv":"Success",
 
              "StatusCode":200
 
          }
 
        ]
 
    }
 
  }
 
}
 
</pre>
 
 
  
 +
{&nbsp;<br/>&nbsp; "susiCommData":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp; "commCmd":526,<br/>&nbsp;&nbsp;&nbsp;&nbsp; "handlerName":"<span style="color:#0000FF;">Service</span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sessionID":"4DDF0B6DE2773176095F55E8C930507A",<br/>&nbsp;&nbsp;&nbsp;&nbsp; "sensorInfoList":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "e":[&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "n":"<span style="color:#FF0000;">&lt;ServiceGroup&gt;/ServeName/&lt;devID&gt;/Info/SmartML</span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "sv":"<span style="color:#FF0000;">&lt;xml&gt;</span>",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "StatusCode":<span style="color:#FF0000;">200</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br/>&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp; }<br/>}
  
 
== EventNotify ==
 
== EventNotify ==
Line 296: Line 126:
 
*Direction: Agent -> Server
 
*Direction: Agent -> Server
 
*Topic: /cagent/admin/&lt;devID&gt;/eventnotify
 
*Topic: /cagent/admin/&lt;devID&gt;/eventnotify
*QoS:&nbsp;?
+
*QoS: 0
*Retained:&nbsp;?
+
*Retained: 0
 
*Payload:
 
*Payload:
<pre>
+
 
  "susiCommData":{
+
{&nbsp;<br/>&nbsp;&nbsp; "susiCommData":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "commCmd":2059,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "requestID":2001,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "agentID":"0005000E40000001",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "handlerName":"general",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "sendTS":1453356274,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "eventnotify":{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "subtype":"predictError", #predictError/predictInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "msg":"HDD smart 5 over the threshold",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "severity":2,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "handler":"MsgGen",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "extMsg":{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "predictMsg":{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "health":"Sick",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "suggestion1":"Please back up your HDD data. The HDD has the probability to break down in 30 days.",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "deviceName":"ST9250315AS"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; },<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "alertMsg":{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "warning":"Yes",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "suggestion1":"Please lower the environment temperature under 40C.",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "suggestion2":"Please make sure the cooling system is working properly.",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "deviceName":"ST9250315AS"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp; }<br/>}
      "commCmd":2059,
 
      "requestID":2001,
 
      "agentID":"000014DAE996BE04",
 
      "handlerName":"general",
 
      "sendTS":1453356274,
 
      "eventnotify":{
 
        "subtype":"predictError", #predictError/predictInfo
 
        "msg":"HDD smart 5 over the threshold",
 
        "severity":2,
 
        "handler":"MsgGen",
 
        "extMsg":{
 
&nbsp;           "predictMsg":{
 
              "health":"Sick",
 
              "suggestion1":"Please back up your HDD data. The HDD has the probability to break down in 30 days.",
 
              "deviceName":"ST9250315AS"
 
            },
 
&nbsp;           "alertMsg":{
 
&nbsp;             "warning":"Yes",
 
&nbsp;             "suggestion1":"Please lower the environment temperature under 40C.",
 
&nbsp;             "suggestion2":"Please make sure the cooling system is working properly.",
 
&nbsp;             "deviceName":"ST9250315AS"
 
&nbsp;           }
 
&nbsp;       }
 
      }
 
  }
 
}</pre>
 
  
  
Line 339: Line 143:
  
 
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":{ 
 
    "Output":{
 
              "e":[{"n":"Name","sv":"disk2"},
 
                    {"n":"Health","bv":0}],
 
      "bn":"Output"
 
    },
 
    "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
 
    "commCmd":2055,
 
    "requestID":2001,
 
    "agentID":"0085458221447854589",
 
    "handlerName":"general",
 
    "sendTS":160081031
 
  }
 
}</pre>
 
 
 
== Action ==
 
 
 
*Description:&nbsp;
 
*Type:&nbsp;?
 
*Direction: Agent -> Server
 
*Topic:&nbsp;????
 
*QoS:&nbsp;?
 
*Retained:&nbsp;?
 
*Payload:?
 
<pre>???</pre>
 

Latest revision as of 08:49, 25 April 2017

Overview

Introduction for "WISE-Snail communication protocol for EIS Service". 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":"0005000E40000001",     // User Define, NULL-> Auto UUID-like devID
         "hostname":"WISE-1520+(devID4)",     // The same with Handler Name
         "sn":"0005000E40000001",
         "mac":"0005000E40000001",
         "version":"3.1.23",          
         "type":"Service",                               // Fixed: Service
         "product":"<ServiceGroup>",
         "manufacture":"",
         "status":"1",
         "commCmd":1,
         "requestID":30002,
         "agentID":"0005000E40000001", // the same with devID
         "handlerName":"general",
         "sendTS":160081026
   }
}

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",  // Service version for user define
        "cagentType":"Service",    // fixed
        "osVersion":"SnailOS",
        "biosVersion":"",
        "platformName":"",
        "processorName":"Snail",  // different to SnailGW 
        "osArch":"SnailX86",
        "totalPhysMemKB":123,
        "macs":"000E40ABCDEF", // uuid
        "IP":""                                  // "null"
     },
     "commCmd":116,
     "requestID":109,
     "agentID":"0005000E40000001",
     "handlerName":"general",
     "sendTS":1466730390
   }
}

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":"0005000E40000001",
     "hostname":"WISE-1520+(devID4)",
     "sn":"0005000E40000001",
     "mac":"0005000E40000001",
     "version":"3.1.23",
     "type":"Service",
     "product":"",
     "manufacture":"",
     "status":"0",
     "commCmd":1,
     "requestID":30002,
     "agentID":"0005000E40000001",
     "handlerName":"general",
     "sendTS":160081026
   }
}

Info or Update Service'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: Service's Capability

{
   "susiCommData":{
       "infoSpec": {
           "<ServiceGroup>": {
              "<ServeName>":{
                "ServeName0":{
                       "Info": { "e": [  {"n":"Temperature","u":"Cel","v":0.000000,"min":-100},
                                         {"n":"Humidity","u":"%","v":0.000000,"min":0.000000,"max":100.000000,"asm":"r","type":"d","rt":"ucum.%","st":"ipso","exten":""},
                                         {"n":"SmartML", "sv":"<xml>", "asm":"rw", "format":"xml", "encoding":"base64"},
                                         {"n":"SmartData", "sv":"<json>", "asm":"r", "format":"json", "encoding":"base64"}                       
                                      ]
                               },
                        "bn":"Info"
                 },
                 "bn":"0005000E40000001"   // => uuid
            },
           "bn":"<ServeName>"
          }
   },
   "commCmd":2052,
   "requestID":2001,
   "agentID":"0005000E40000001",
   "handlerName":"general",
   "sendTS":160081024
  }
}

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":{  
            "<ServiceGroup>":{ 
                "<ServeName>":{ 
                    "ServeName0": {
                          "Info":{ 
                                 "e":[ {"n":"SmartData", "sv":"<json>"}],
                          "bn":"Info"
                      },
                      "bn":"0005000E40000001"    
                 },
                "bn":"<ServeName>"
             },
            "bn":"<ServiceName>"
        }
     },
     "commCmd":2055,
     "requestID":2001,
     "agentID":"0005000E40000001",
     "handlerName":"general",
     "sendTS":160081031
  }
}

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":"ServiceGroup/ServeName/devID/Info/SmartML"
           }
        ]
     },
     "commCmd":523,
     "requestID":0,
     "agentID":"",
     "handlerName":"Service",
     "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":"<ServiceGroup>",
     "sessionID":"2746E3B65BAB115338B9668CDC5C35C4",
     "sensorInfoList":{ 
        "e":[ 
           { 
              "n":"ServiceGroup/ServeName/devID/Info/SmartML",
              "sv":"<xml>",
              "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":{ 
    "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
    "commCmd":525,
    "requestID":0,
   "agentID":"",
    "handlerName":"Service",   // Fixed name for wisesnail parse rule
   "sendTS":1466088605
     "sensorIDList":{ 
        "e":[ 
           { 
              "sv":"<xml>",
              "n":"ServiceGroup/ServeName/devID/Info/SmartML"
           }
        ]
     }
  }
}

  • Description: Agent will reply accept this command
  • Type: Reply
  • Direction: Agent -> Server
  • Topic: /cagent/admin/<devID>/agentactionreq
  • QoS: 0
  • Retained: 0
  • Payload:


  "susiCommData":{ 
     "commCmd":526,
     "handlerName":"Service",
     "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
     "sensorInfoList":{ 
        "e":[ 
           { 
              "n":"<ServiceGroup>/ServeName/<devID>/Info/SmartML",
              "StatusCode":202
           }
        ]
     }
  }
}

  • 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":"Service",
     "sessionID":"4DDF0B6DE2773176095F55E8C930507A",
     "sensorInfoList":{ 
        "e":[ 
           { 
              "n":"<ServiceGroup>/ServeName/<devID>/Info/SmartML",
              "sv":"<xml>",
              "StatusCode":200
           }
        ]
     }
  }
}

EventNotify

  • Description: 
  • Type: Auto update
  • Direction: Agent -> Server
  • Topic: /cagent/admin/<devID>/eventnotify
  • QoS: 0
  • Retained: 0
  • Payload:


   "susiCommData":{ 
      "commCmd":2059,
      "requestID":2001,
      "agentID":"0005000E40000001",
      "handlerName":"general",
      "sendTS":1453356274,
      "eventnotify":{ 
         "subtype":"predictError", #predictError/predictInfo
         "msg":"HDD smart 5 over the threshold",
         "severity":2,
         "handler":"MsgGen",
         "extMsg":{
               "predictMsg":{
               "health":"Sick",
               "suggestion1":"Please back up your HDD data. The HDD has the probability to break down in 30 days.",
               "deviceName":"ST9250315AS"
            },
              "alertMsg":{
                    "warning":"Yes",
                    "suggestion1":"Please lower the environment temperature under 40C.",
                    "suggestion2":"Please make sure the cooling system is working properly.",
                    "deviceName":"ST9250315AS"
                 }
             }
      }
   }
}


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