Difference between revisions of "EIS RESTfulAPI ESL Solution"

From ESS-WIKI
Jump to: navigation, search
 
(111 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
== Connectivity ==
 
== Connectivity ==
  
=== GET ===
+
=== Method: GET ===
  
'''Path: restapi/ESLManage/Connectivity'''
+
'''Path: restapi/WSNManage/Connectivity'''
  
 
-> All Capability ( without data )
 
-> All Capability ( without data )
 
<pre>{
 
<pre>{
&nbsp;&nbsp; &nbsp;"IoTGW": {
+
&nbsp;"IoTGW": {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Zigbee": {
+
&nbsp; "Zigbee": {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"0000852CF4B7B0E8": {
+
&nbsp; &nbsp;"0000852CF4B7B0E8": {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Info": {
+
&nbsp; &nbsp; "Info": {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"e": [
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "e":[ {"n":"DeviceList", "sv":"", "asm":"r"}, &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "DeviceList","sv": ",","asm": "r"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"device-number", "v":0, "asm":"r"}, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "pan-id","v": "","asm": "r"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"permit-tag-list","sv":"","asm":"rw"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "zd-channel","v": 11,"asm": "rw""min":11,"max":26},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"add-permit-tag-list","sv":"","asm":"w"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "zd-securekey","sv": "","asm": "w","min":32,"max":23},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"remove-permit-tag-list","sv":"","asm":"w"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "premit-tag-list","sv": "","asm": "rw"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"zd-securekey", "sv":"","asm":"w"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "zd-fw-version","v": 1,"asm": "r"},&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"tx-level", "v":16, "asm":"rw"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "zd-fw-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"pan-id","v":1, "asm":"r"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "all-router-fw-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"zd-fw-version", "v":1, "asm":"r"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "all-tag-fw-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"reboot", "bv":0, "asm":"rw"}],
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "all-tag-image-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
+
&nbsp; &nbsp; "bn": "Info" &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "ftp-username","sv": "","asm": "rw",},
+
&nbsp; &nbsp; },
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "ftp-password","sv": "","asm": "rw",},&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
+
&nbsp; &nbsp; "bn": "0000852CF4B7B0E8",
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "reboot","bv": 0,"asm": "rw"},
+
&nbsp; &nbsp; "ver": 1
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;],
+
&nbsp; &nbsp;},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "Info"
+
&nbsp; &nbsp;"bn": "Zigbee"
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
+
&nbsp; },
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "0000852CF4B7B0E8",
+
&nbsp; "ver": 1,
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"ver": 1
+
&nbsp; "bn": "IoTGW"
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
+
&nbsp;}
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "Zigbee"
 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"HostGateway": "",
 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"ver": 1,
 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "IoTGW"
 
&nbsp;&nbsp; &nbsp;}
 
 
}
 
}
 
</pre>
 
</pre>
  
'''Path: ''''''''WSNManage/Connectivity/IoTGW/Zigbee/'''0000852CF4B7B0E8/Info'''
+
'''''Path:''' '''r'''''<b>stapi/WSNManage/Connectivity/IoTGW/Zigbee/0000852CF4B7B0E8/Info</b>
  
 
'''Reply: with latest data value'''
 
'''Reply: with latest data value'''
 
<pre>{
 
<pre>{
&nbsp;&nbsp; &nbsp;"e": [
+
  "e": [
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   {"n": "DeviceList","sv": ",","asm": "r"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "e":[ {"n":"DeviceList", "sv":"", "asm":"r"}, &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "pan-id","v": "","asm": "r"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"device-number", "v":2, "asm":"r"}, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "zd-channel","v": 11,"asm": "rw""min":11,"max":26},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"permit-tag-list","sv":"0000001077C25002,0000001077C25001","asm":"rw"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "zd-securekey","sv": "","asm": "w","min":32,"max":23},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"add-permit-tag-list","sv":"","asm":"w"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "premit-tag-list","sv": "","asm": "rw"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"remove-permit-tag-list","sv":"","asm":"w"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "zd-fw-version","v": 1,"asm": "r"},&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"zd-securekey", "sv":"","asm":"w"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "zd-fw-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"tx-level", "v":16, "asm":"rw"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "all-router-fw-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"pan-id","v":1, "asm":"r"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "all-tag-fw-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"zd-fw-version", "v":1, "asm":"r"},
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "all-tag-image-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n":"reboot", "bv":0, "asm":"rw"}],
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "ftp-username","sv": "","asm": "rw",},
+
  "bn": "Info"
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {"n": "ftp-password","sv": "","asm": "rw",},&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{"n": "reboot","bv": 0,"asm": "rw"},
 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;],
 
&nbsp;&nbsp; &nbsp;&nbsp;"bn": "Info"
 
 
}</pre>
 
}</pre>
  
=== Put ===
+
=== Method: Put ===
  
'''Path: 'restapi/WSNManage/Connectivity/IoTGW/Zigbee/''''''0000852CF4B7B0E8''''''/Info/reset'''
+
'''''Path: r'''''<b>'''esta'''pi/WSNManage/Connectivity/IoTGW/Zigbee/0000852CF4B7B0E8/Info/reset</b>
  
 
'''Data:&nbsp;'''
 
'''Data:&nbsp;'''
 
<pre>{"bv":1}</pre>
 
<pre>{"bv":1}</pre>
  
'''Reply:'''
+
'''Reply: HTTP Code: 200'''
 
 
'''Status Code: 200'''
 
  
 
'''Data:&nbsp;'''
 
'''Data:&nbsp;'''
 
<pre>{"bv":1}</pre>
 
<pre>{"bv":1}</pre>
  
== SenHub ==
+
== Device ==
  
=== Get ===
+
=== Method Get: ===
  
'''1.Path: restapi/WSNManage/SenHub/AllSenHubList'''
+
==== Device ====
 +
 
 +
'''1.Path: restapi/WSNManage/SenHub/AllDeviceList'''
  
 
'''Reply:'''
 
'''Reply:'''
<pre>{"n":"AllSenHubList","sv":"xxxxxx,0017000E40000001,xxxxx"}
+
<pre>{"n":"AllDeviceList","sv":"xxxxxx,0017000E40000001,xxxxx"}
 
</pre>
 
</pre>
  
'''2. Path: WSNManage/SenHub/&lt;DeviceID&gt;/DevInfo''' &lt;/br&gt;
+
'''2. Path: restapi/WSNManage/SenHub/&lt;DeviceID&gt;/DevInfo'''
 +
 
 +
'''Reply by Router:'''
 +
<pre>{
 +
&nbsp; &nbsp; "devID": "88880034115521a4",
 +
&nbsp; &nbsp; "hostname": "ESL-Router-1:a4",
 +
&nbsp; &nbsp; "sn": "00:34:11:55:21:a4",
 +
&nbsp; &nbsp; "mac": "00:34:11:55:21:a4",
 +
&nbsp; &nbsp; "version": "3.1.23",
 +
&nbsp; &nbsp; "type": "Router",
 +
&nbsp; &nbsp; "product": "ESL-Router",
 +
&nbsp; &nbsp; "manufacture": "",
 +
&nbsp; &nbsp; "status": "1",
 +
&nbsp; &nbsp; "commCmd": 1,
 +
&nbsp; &nbsp; "requestID": 30002,
 +
&nbsp; &nbsp; "agentID": "88880034115521a4",
 +
&nbsp; &nbsp; "handlerName": "general",
 +
&nbsp; &nbsp; "parentID": "",
 +
&nbsp; &nbsp; "sendTS": 1513231576828
 +
}</pre>
  
'''Reply:'''
+
'''Reply by Tag ( SenHub )'''
 
<pre>{
 
<pre>{
  "devID":"0017000E40000001",
+
&nbsp; &nbsp; "devID": "0000001077C25002",
  "hostname":"AAA",
+
&nbsp; &nbsp; "hostname": "ESL-Tag-5002",
  "sn":"0017000E40000001",
+
&nbsp; &nbsp; "sn": "0000001077C25002",
  "mac":"0017000E40000001",
+
&nbsp; &nbsp; "mac": "0000001077C25002",
  "version":"3.1.23",
+
&nbsp; &nbsp; "version": "3.1.23",
  "type":"SenHub",
+
&nbsp; &nbsp; "type": "Tag",
  "product":"WISE-1020",
+
&nbsp; &nbsp; "product": "ESL-Tag",
  "manufacture":"",
+
&nbsp; &nbsp; "manufacture": "",
  "status":"1",
+
&nbsp; &nbsp; "status": "1",
  "commCmd":1,
+
&nbsp; &nbsp; "commCmd": 1,
  "requestID":30002,
+
&nbsp; &nbsp; "requestID": 30002,
  "agentID":"0017000E40000001",
+
&nbsp; &nbsp; "agentID": "0000001077C25002",
  "handlerName":"general",
+
&nbsp; &nbsp; "handlerName": "general",
  "sendTS":160081026
+
&nbsp; &nbsp; "parentID": "88880034115521a4",
 +
&nbsp; &nbsp; "sendTS": 1513231580989
 
}
 
}
 
</pre>
 
</pre>
  
 +
==== Device Capability and Data ====
  
 +
'''3. Path:&nbsp;''<span style="color:#FF0000;">restapi/WSNManage/</span>''<span style="color:#FF0000;">SenHub</span>''<span style="color:#FF0000;">/&lt;DeviceID&gt;</span>'''''
  
'''3. Path:&nbsp;restapi/WSNManage/SenHub/&lt;DeviceID&gt;'''
+
'''Reply:&nbsp;Capability ( without data ) with&nbsp;Router'''
 
+
<pre>{
'''Reply:&nbsp;Capability ( without data )'''
+
    "IoTGW": {
<pre> {
+
         "Zigbee": {
 
+
            "0022000E40000022": {
"SenHub": {
+
                "Info": {
         "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":""},
+
                    "e": [
                          {"n":"Humidity","u":"%","v":0.000000,"min":0.000000,"max":100.000000,"asm":"r","type":"d","rt":"ucum.%","st":"ipso","exten":""},
+
                        {"n": "DeviceList","sv": "","asm": "r"},
                          {"n":"GPIO1","u":"","bv":0,"min":0.000000,"max":1.000000,"asm":"r","type":"b","rt":"","st":"ipso","exten":""},
+
&nbsp;                      {"n": "device-number","v": 0,"asm": "r"},
                          {"n":"GPIO2","u":"","bv":0,"min":0.000000,"max":1.000000,"asm":"r","type":"b","rt":"","st":"ipso","exten":""}
+
                        {"n": "tx-level-t","v": 5,"asm": "rw","min":1,"max":10 }, // min/max?
                        ],
+
                        {"n": "tx-level-r","v": 5,"asm": "rw","min":1,"max":10 },
        "bn":"SenData"
+
                        {"n": "zd-fw-version","sv":"t-10010", "asm": "r"},                      
 +
                        {"n": "reboot","bv": 0,"asm": "rw"}
 +
                    ],
 +
                    "bn": "Info"
 +
                },
 +
                "bn": "0022000E40000022",
 +
                "ver": 1
 +
            },
 +
            "bn": "Zigbee"
 
         },
 
         },
         "Info": {"e":[{"n":"Name","sv":"SenHub1","asm":"rw"},
+
         "HostGateway": "0000852CF4B7B0E8",
                      {"n":"sw","sv":"1.0.00","asm":"r"}
+
        "ver": 1,
                    ],
+
        "bn": "IoTGW"
        "bn":"Info"
+
    }
      },
+
}</pre>
      "Net": {"e":[{"n":"sw","sv":"1.0.00","asm":"r"},
+
'''Reply:&nbsp;Capability ( without data ) with&nbsp;Tag'''<pre>{
                    {"n":"Neighbor","sv":"","asm":"r"},
+
&nbsp;&nbsp;"SenHub":{
                    {"n":"Health","v":"100.000000","asm":"r"}
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"SenData":{
                  ],
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"e":[{"n":"image-crc","sv":"ff10","asm":"r"},
        "bn":"Net"
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {"n":"resolution","sv":"","asm":"r"}],
      }
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn":"SenData"
    }  
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Info":{
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"e":[{"n":"data-request-period","v":60,"asm":"rw","min":30,"max":3600},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {"n":"state-report-period","v":3600,"asm":"rw","min":60,"max":86400},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {"n":"timeout","v":30,"asm":"rw","min":1,"max":60},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {"n":"battery","v":70,"asm":"r","min":0,"max":100,"u":"%"},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {"n":"fw-version","sv":1541,"asm":"r"}],
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn":"Info"
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Net":{
 +
            "e":[{"n":"tx-level","v":1,"asm":"r"},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n":"rssi","v":-30,"asm":"r"},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n":"channel","v":18,"asm":"r"}],
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn":"Net"
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Action":{
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"e":[{"n":"image-update","sv":"","asm":"w","encode":"base64","type":"octe-stream"},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {"n":"refresh-image","bv":0,"asm":"rw"},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {"n":"reboot","bv":0,"asm":"rw"},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {"n":"reset-to-default","bv":0,"asm":"rw"}],
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn":"Action"
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}
 +
&nbsp;&nbsp; &nbsp;}
 
}</pre>
 
}</pre>
  
'''4. Path:&nbsp;restapi/WSNManage/SenHub/&lt;DeviceID&gt;/SenHub'''
+
&nbsp;'''4. Path:&nbsp;'''<span style="color:#FF0000;">'''''restapi/''WSNManage/SenHub/&lt;DeviceID&gt;/SenHub'''</span>
  
 
'''Reply: with latest&nbsp;data value&nbsp;'''
 
'''Reply: with latest&nbsp;data value&nbsp;'''
<pre>{      
+
<pre>{  
    "SenData": {"e":[ {"n":"Temperature","v":26},
+
  "SenHub": {
                      {"n":"Humidity","v":80},
+
        "SenData": {
                      {"n":"GPIO1","u":"","bv":0},
+
                  "e":[ {"n":"image-crc","sv":"ff10","asm":"r"}],  
                      {"n":"GPIO2","u":"","bv":1}                    
+
        "bn":"SenData"
                    ],
+
        },  
    "bn":"SenData"
+
        "Info": {
    },
+
                "e":[{"n":"update-period","v":60,"asm":"rw"}, {"n":"timeout","v":30}, {"n":"battry":76},{"n":"fw-version","v":1}],  
    "Info": {"e":[{"n":"Name","sv":"SenHub1"},
+
        "bn":"Info"  
                  {"n":"sw","sv":"1.0.00"}
+
        },
                ],
+
        "Net": {
    "bn":"Info"
+
                "e":[{"n":"zd-tx-power","v":1}, {"n":"rssi","v":36}, {"n":"channel","v":11}, {"n":"fw-version","v":1}],
  },
+
        "bn":"Net"  
  "Net": {"e":[{"n":"sw","sv":"1.0.00"},
+
        },  
                {"n":"Neighbor","sv":"00017b8965"},
+
        "Action": {
                {"n":"Health","v":"100.000000"}
+
                "e":[{"n":"image-update","sv":""}, {"n":"refresh-image","bv":0},{"n":"reboot","bv":0}, {"n":"reset-to-default","bv":0}, {"n":"fw-update","sv":""}],  
              ],
+
        "bn":"Action"  
    "bn":"Net"
+
      }  
  },
+
"bn":"SenHub"  
  "bn":"SenHub"  
+
}
 
}</pre>
 
}</pre>
  
'''5. Path:&nbsp;restapi/WSNManage/SenHub/&lt;DeviceID&gt;/SenHub/SenData'''
+
'''5. Path:<span style="color:#FF0000;">''restapi/''</span>'''<span style="color:#FF0000;">'''WSNManage'''</span>'''<span style="color:#FF0000;">''/SenHub/&lt;DeviceID&gt;/SenHub/SenData''</span>'''
  
 
'''Reply: with latest&nbsp;data'''
 
'''Reply: with latest&nbsp;data'''
<pre>{
+
<pre>{  
    "SenData": {"e":[ {"n":"Temperature","v":26},
+
"SenData": {  
                      {"n":"Humidity","v":80},
+
            "e":[ {"n":"image-crc","sv":"ff10","asm":"r"},
                      {"n":"GPIO1","u":"","bv":0},
+
                  {"n":"resolution","sv":"","asm":"r"}],  
                      {"n":"GPIO2","u":"","bv":1}                      
+
"bn":"SenData"  
                    ]
 
    },
 
    "bn":"SenData"
 
 
}</pre>
 
}</pre>
  
'''6. restapi/WSNManage/SenHub/&lt;DeviceID&gt;/SenHub/SenData/Temperature'''
+
'''6.&nbsp;'''<span style="color:#FF0000;">'''''restapi/''WSNManage/'''</span>'''<span style="color:#FF0000;">''SenHub''</span>'''<span style="color:#FF0000;">'''/&lt;DeviceID&gt;/SenHub/SenData/image-crc​'''</span>
  
 
'''Reply: with latest&nbsp;data'''
 
'''Reply: with latest&nbsp;data'''
<pre>{"v":26}</pre>
+
<pre>{"n":"image-crc","sv":"ff10","asm":"r"}</pre>
  
=== Put ===
+
=== Method Put ===
  
 
'''EIS RESTful only supports change one resource in each request.'''
 
'''EIS RESTful only supports change one resource in each request.'''
Line 194: Line 233:
 
<pre>{"bv":1}</pre>
 
<pre>{"bv":1}</pre>
  
'''Reply:'''
+
'''Reply: HTTP Code: 200 OK'''
 
 
'''HTTP Code: 200 OK'''
 
  
 
'''Data:&nbsp;'''
 
'''Data:&nbsp;'''
 
<pre>{"bv":1}</pre>
 
<pre>{"bv":1}</pre>
  
= Socket.io =
+
== ESL API ==
  
There are&nbsp;two&nbsp;methods ( 1. request / response, 2. auto push message to client ) to get&nbsp;information by Socket.io.&nbsp;
+
=== FW Update ===
  
=== Request ===
+
==== GW Zigbee FW ====
  
'''Direction: '''Client -> Socket.io Server
+
'''Path:<span style="color:#FF0000;">/restapi/WSNManage/ESL/GW/All/zd-fw-update</span>'''
  
'''Event''': request
+
'''Method: Put'''
  
'''Format''': {"n":"&lt;Action&gt;", "data":{obj}, "sessionId":&lt;#&gt;}
+
'''Data:'''
 +
<pre>{"zd-fw-name":"gw-zd-v1","zd-fw-version":2,"zd-fw-crc":"f6d8"}</pre>
  
'''Action''':
+
'''Reply''': HTTP Code: 202
 +
<pre>{"sv": "ACCEPTED GW FW Update "}</pre>
  
*service: To qurey what services provided by Socket.io server.
+
==== All Router Zigbee FW ====
*subscribe: To subscribe service that you interested (ex:WSNManage). Server will auto push event and message after success to joint service.
 
*unsubscribe: To unsubscribe service if you don't want to interested it. Server will stop to push event and message to this client.
 
  
"'''data'''": data of request in JSON object.
+
'''Path: <span style="color:#FF0000;">/restapi/WSNManage/ESL/Router/All/zd-fw-update</span>'''
  
"'''sessionId'''": &nbsp;Unique interger&nbsp;number of&nbsp;each request for&nbsp;distinguish. Server would&nbsp;response and fill the same sessionId.
+
'''Method: Put'''
  
=== Response ===
+
'''Data:'''
 +
<pre>{"zd-t-fw-name":"router-zd-t-v1","zd-t-fw-version":1,"zd-t-fw-crc":"ff63", "zd-r-fw-name":"router-zd-r-v1","zd-r-fw-version":1,"zd-r-fw-crc":"ff63"}</pre>
  
'''Direction:&nbsp;'''Server -> Client
+
'''Reply:&nbsp;'''HTTP Code: 202
 +
<pre>{"sv": "ACCEPTED All Routers FW Update "}</pre>
  
'''Event''': response
+
==== All Tag Zigbee FW ====
  
'''Format''': {"status":&lt;#&gt;, "data":{obj}, "sessionId":&lt;#&gt;}
+
'''Path: <span style="color:#FF0000;">/restapi/WSNManage/ESL/Tag/All/zd-fw-update</span>'''
  
'''"status"''': Refer to HTTP Status Code ( 200 -> OK , 404 -> Not Found )
+
'''Method: Put'''
  
"'''data'''": data of reply information in JSON object
+
'''Data:'''
 +
<pre>{"zd-fw-name":"tag-zd-v1","zd-fw-version":1,"zd-fw-crc":"f1c0"}</pre>
  
"'''sessionId'''": Server need reply the same sessionId with client's request.
+
'''Reply:'''&nbsp;HTTP Code: 202
 +
<pre>{"sv": "ACCEPTED All Tags FW Update "}</pre>
  
 +
=== GW&nbsp;Web Management ===
  
 +
==== '''Path:&nbsp;<span style="color:#FF0000;">/restapi/WSNManage/ESL/GW/All/DevInfo</span>''' ====
  
=== Example of Action ===
+
'''Method: Get'''
  
==== '''service:&nbsp;'''Client query which event services provided by Socket.io Server ====
+
'''Reply:&nbsp;'''&nbsp;HTTP Code: 200
 +
<pre>{
 +
&nbsp;"List": [
 +
&nbsp; {
 +
&nbsp; &nbsp;"ID": "-",
 +
&nbsp; &nbsp;"Data": [{"n": "Router Number","v": 2},
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n": "Zigbee","sv": "50c27710425a5350"}],
 +
&nbsp; &nbsp;"RF": [{"n": "TX Power","v": 12}]
 +
&nbsp; }
 +
&nbsp;]
 +
}</pre>
  
==== C->S &lt;Request&gt;: {"n":"service", "data":"", "sessionId":8954} ====
+
==== '''Path:&nbsp;<span style="color:#FF0000;">/restapi/WSNManage/ESL/Router/All/DevInfo</span>''' ====
  
S-> C &lt;Response&gt;: {"status":200,"data":{"service":{ "e":[{"n":"WSNManage"},{"n":"SUSIManage"}]}},"sessionId":8954}
+
'''Method: Get'''
  
 +
'''Reply:&nbsp;'''&nbsp;HTTP Code: 200
 +
<pre>{
 +
&nbsp;"List": [
 +
&nbsp; {
 +
&nbsp; &nbsp;"ID": " 00000034115521a4",
 +
&nbsp; &nbsp;"Data": [{"n": "Tag Number","v": 360},
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n": "Zigbee","sv": "0000001077C25009"}],
 +
&nbsp; &nbsp;"RF": [{"n": "TX Power","v": 10}]
 +
&nbsp; },
 +
&nbsp; {
 +
&nbsp; &nbsp;"ID": "00000050BA485303",
 +
&nbsp; &nbsp;"Data": [{"n": "Tag Number","v": 36},
 +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"n": "Zigbee","sv": "0000001077C250096"}],
 +
&nbsp; &nbsp;"RF": [{"n": "TX Power","v": 12}]
 +
&nbsp; }
 +
&nbsp;]
 +
}</pre>
  
 +
==== '''Path:&nbsp;<span style="color:#FF0000;">/restapi/WSNManage/ESL/Router/&lt;ID&gt;/TagInfo</span>''' ====
  
'''subscribe:'''Client subscibe in to join to receive which event Socket.io service
+
'''Method: Get'''
 
 
==== C->S &lt;Request&gt;: {"n":"subscribe", "data":"WSNManage", "sessionId":54774} ====
 
 
 
S-> C &lt;Response&gt;: {"status":200,"data":[{"event":"eConnectivity_Capability"},{"event":"eConnectivity_UpdateData"}, {"event":"eSenHub_Connected"},{"event":"eSenHub_Disconnect"}, &nbsp;
 
 
 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {"event":"eSenHub_Capability"},&nbsp;{"event":"eSenHub_UpdateData"}]"sessionId":8954}
 
 
 
 
 
 
 
'''unsubscribe''': Clinet unsubscribe to leave which event Socket.io Service
 
 
 
C->S &lt;Request&gt;: {"n":"unsubscribe", "data":"WSNManage", "sessionId":6666}
 
 
 
S-> C &lt;Response&gt;: {"status":200,"sessionId":6666}
 
 
 
 
 
 
 
 
 
 
 
=== Message ===
 
 
 
'''Direction:&nbsp;'''Server -> Client
 
 
 
'''Event''': message
 
 
 
'''Format''': {"n":"&lt;ServiceName&gt;", "event":"&lt;eventType&gt;", "data":{obj})
 
 
 
"'''ServiceName'''": Service Name
 
 
 
"'''event'''": event type of this push message
 
 
 
"'''data'''": push data message in JSON object.
 
 
 
 
 
 
 
Please refer to "'''WSNManage evnent message"'''&nbsp;for WSNManage's event and data format.
 
 
 
  
 +
'''Reply:&nbsp;'''&nbsp;HTTP Code: 200
 +
<pre>{
 +
&nbsp;&nbsp; &nbsp;"List": [
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;"ID": " 0000001077C25001",
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Data": [{"n": "Image-CRC","sv": "ffc6"},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {"n": "Zigbee","sv": "0000001077C25001"}],
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"RF": [{"n": "TX Power","v": 10}]
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"ID": "0000001077C25002",
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Data": [{"n": "Image-CRC","sv": "f96e"},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {"n": "Zigbee","sv": "0000001077C25002"}],
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"RF": [{"n": "TX Power","v": 12}]
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"ID": "0000001077C25003",
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Data": [{"n": "Image-CRC","sv": "c49e"},
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {"n": "Zigbee","sv": "0000001077C25003"}],
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"RF": [{"n": "TX Power","v": 12}]
 +
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}
 +
&nbsp;&nbsp; &nbsp;]
 +
}</pre>
  
 
= WebSocket Service =
 
= WebSocket Service =
Line 315: Line 372:
 
     {"event":"eConnectivity_Capability"}, // => Update Connectivity Capability ( Without data )
 
     {"event":"eConnectivity_Capability"}, // => Update Connectivity Capability ( Without data )
 
     {"event":"eConnectivity_UpdateData"}, // => Update Connectivity's Data
 
     {"event":"eConnectivity_UpdateData"}, // => Update Connectivity's Data
     {"event":"eSenHub_Connected"},        // => A new SenHub connected
+
     {"event":"eDevice_Connected"},        // => A new SenHub connected
     {"event":"eSenHub_Disconnect"},      // => A SenHub is disconnected
+
     {"event":"eDevice_Disconnect"},      // => A SenHub is disconnected
     {"event":"eSenHub_Capability"},      // => Update a SenHub's Capability ( Without Data )
+
     {"event":"eDevice_Capability"},      // => Update a SenHub's Capability ( Without Data )
     {"event":"eSenHub_UpdateData"}]      // => Update SenHub's Data
+
     {"event":"eDevice_UpdateData"}]      // => Update SenHub's Data
 
</pre>
 
</pre>
  
Line 327: Line 384:
 
'''data:'''
 
'''data:'''
 
<pre>{
 
<pre>{
"IoTGW": {
+
&nbsp;&nbsp; &nbsp;"IoTGW": {
          "WSN": {  
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Zigbee": {
            "WSN0": {  
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"0000852CF4B7B0E8": {
&nbsp;                 "Info": {  
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Info": {
&nbsp;                           "e": [{"n":"SenHubList","sv":",","asm":"r"},
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"e": [
&nbsp;                                 {"n":"Neighbor","sv":"","asm":"r"},
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "DeviceList","sv": ",","asm": "r"},
&nbsp;                                 {"n":"Health","v":80,"asm":"r"},
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "premit-tag-list","sv": "","asm": "rw"},
&nbsp;                                 {"n":"Name","sv":"WSN0","asm":"r"},
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "pan-id","v": 1,"asm": "r"},
&nbsp;                                 {"n":"sw","sv":"1.0.0.1","asm":"r"},
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "zd-fw-version","v": 1,"asm": "r"},&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;                                 {"n":"reset","bv":0,"asm":"rw"}],
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "all-tag-image-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
&nbsp;                 "bn":"Info"
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{"n": "reboot","bv": 0,"asm": "rw"}
&nbsp;                 },
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;],
&nbsp;             "bn":"0000852CF4B7B0E8", "ver":1
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "Info"
&nbsp;           },
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
&nbsp;           "WSN1": {
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "0000852CF4B7B0E8",
&nbsp;                 "Info": {
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"ver": 1
&nbsp;                         "e": [{"n":"SenHubList","sv":"","asm":"r"},  
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
&nbsp;                                {"n":"Neighbor","sv":"","asm":"r"},  
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "Zigbee"
&nbsp;                               {"n":"Health","v":50,"asm":"r"},
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
&nbsp;                               {"n":"Name","sv":"WSN1","asm":"r"},
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"HostGateway": "",
&nbsp;                               {"n":"sw","sv":"1.0.0.1","asm":"r"},
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"ver": 1,
&nbsp;                               {"n":"reset","bv":0,"asm":"rw"}],  
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "IoTGW"
&nbsp;                 "bn":"Info"  
+
&nbsp;&nbsp; &nbsp;}
&nbsp;                 },  
+
}</pre>
&nbsp;           "bn":"0000852CF4B7B0E7",  
 
&nbsp;           "ver":1  
 
&nbsp;           },  
 
&nbsp;       "bn":"WSN"  
 
&nbsp;     },
 
&nbsp;     "Bt": {
 
&nbsp;           "Bt0": {
 
&nbsp;                   "Info": {
 
&nbsp;                           "e": [{"n":"SenHubList","sv":"","asm":"r"},
 
&nbsp;                                 {"n":"Health","v":90,"asm":"r"},  
 
&nbsp;                                 {"n":"Name","sv":"Bt0","asm":"r"},
 
&nbsp;                                 {"n":"sw","sv":"3.0.0.1","asm":"r"},
 
&nbsp;                                 {"n":"reset","bv":0,"asm":"rw"}],
 
&nbsp;                   "bn":"Info"
 
&nbsp;                   },
 
&nbsp;             "bn":"0000802CF4B7B028",  
 
&nbsp;             "ver":1
 
&nbsp;             },
 
&nbsp;       "bn":"Bt"
 
&nbsp;       }, 
 
&nbsp;   "ver": 1,
 
    "bn":"IoTGW"
 
    }
 
}
 
</pre>
 
  
 
=== Updtae data value of connectivity ===
 
=== Updtae data value of connectivity ===
Line 381: Line 413:
 
'''event Type:'''&nbsp;eConnectivity_UpdateData
 
'''event Type:'''&nbsp;eConnectivity_UpdateData
  
'''data:'''Update Health
+
'''data:&nbsp;'''Update DeviceList
 
<pre>{
 
<pre>{
    "data":{
+
&nbsp;&nbsp; &nbsp;"IoTGW": {
      "IoTGW": {
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Zigbee": {
          "WSN": {
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"0000852CF4B7B0E8": {
            "0000852CF4B7B0E8"{          
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"Info": {
                "Info": {
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"e": [{"n": "DeviceList","sv": "0000852CF4B7BABB"}],
                        "e": [{"n":"Health","v":30}],
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "Info"
                        "bn":"Info"
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
                }              
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "0000852CF4B7B0E8",
              "bn":"0000852CF4B7B0E8",
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"ver": 1
              "ver":1
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
            },          
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "Zigbee"
            "bn":"WSN"  
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},
        },
+
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;"bn": "IoTGW"
    "ver": 1       
+
&nbsp;&nbsp; &nbsp;}
    }
 
 
}</pre>
 
}</pre>
  
 +
=== A new Device&nbsp;connected ===
  
 
+
'''event Type:'''&nbsp;eDevice_Connected
=== A new SenHub connected ===
 
 
 
'''event Type:'''&nbsp;eSenHub_Connected
 
  
 
'''data:'''
 
'''data:'''
Line 415: Line 444:
 
         "version":"3.1.23",
 
         "version":"3.1.23",
 
         "type":"SenHub",
 
         "type":"SenHub",
         "product":"WISE-1020",
+
         "product":"WISE-101x",
 
         "manufacture":"",
 
         "manufacture":"",
 
         "status":"1",
 
         "status":"1",
Line 426: Line 455:
 
}</pre>
 
}</pre>
  
 +
=== A Device&nbsp;disconnected ===
  
 
+
'''event Type:'''&nbsp;eDevice_Disconnect
=== A SenHub disconnected ===
 
 
 
'''event Type:'''&nbsp;eSenHub_Disconnect
 
  
 
'''data:'''
 
'''data:'''
Line 441: Line 468:
 
         "version":"3.1.23",
 
         "version":"3.1.23",
 
         "type":"SenHub",
 
         "type":"SenHub",
         "product":"WISE-1020",
+
         "product":"WISE-101x",
 
         "manufacture":"",
 
         "manufacture":"",
 
         "status":"0",
 
         "status":"0",
Line 452: Line 479:
 
}</pre>
 
}</pre>
  
 +
=== Update capbaility of a Tag ===
 +
 +
'''event Type:'''&nbsp;eDevice_Capability
  
 +
'''data:''' '''Reply:&nbsp;Capability ( without data ) by Tag'''
 +
<pre>{
 +
  "SenHub": {
 +
          "SenData": {
 +
                      "e":[ {"n":"image-crc","sv":"","asm":"r"}],
 +
            "bn":"SenData"
 +
          },
 +
          "Info": {
 +
                  "e":[{"n":"update-period","v":60,"asm":"rw","min":30, "max":3600},
 +
                        {"n":"timeout","v":30,"asm":"rw","min":1, "max":60},
 +
                        {"n":"fw-version","v":1,"asm":"r"}],
 +
          "bn":"Info"
 +
          },
 +
          "Net": {
 +
                  "e":[{"n":"tx-level","v":1,"asm":"rw"},
 +
                        {"n":"rssi","v":36,"asm":"r"},
 +
                        {"n":"channel","v":11,"asm":"r", "min":11, "max":36}],
 +
          "bn":"Net"
 +
          },
 +
          "Action": {
 +
                  "e":[{"n":"image-update","sv":"","asm":"w", "encode":"base64","type":"octe-stream"},&nbsp;
 +
                        {"n":"refresh-image","bv":0,"asm":"rw"},&nbsp;
 +
                        {"n":"reboot","bv":0,"asm":"rw"},
 +
                        {"n":"reset-to-default","bv":0,"asm":"rw"},
 +
                        {"n":"fw-update","sv":"","asm":"w", "encode":"base64","type":"octe-stream"}],&nbsp;
 +
          "bn":"Action"
 +
          }
 +
    "bn":"SenHub"
 +
    }
 +
}</pre>
  
=== Update capbaility of a SenHub ===
+
=== Update data value of a Tag ===
  
'''event Type:'''&nbsp;eSenHub_Capability
+
'''event Type:'''&nbsp;eDevice_UpdateData
  
'''data:'''
+
'''data:''' '''Reply:&nbsp;Capability ( without data ) by Tag'''
 
<pre>{
 
<pre>{
    "SenHub": {
+
  "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":""},
+
          "SenData": {  
                          {"n":"Humidity","u":"%","v":0.000000,"min":0.000000,"max":100.000000,"asm":"r","type":"d","rt":"ucum.%","st":"ipso","exten":""},
+
                      "e":[ {"n":"image-crc","sv":"0xC6EB8EA8"}],
                          {"n":"GPIO1","u":"","bv":0,"min":0.000000,"max":1.000000,"asm":"r","type":"b","rt":"","st":"ipso","exten":""},
+
            "bn":"SenData"
                          {"n":"GPIO2","u":"","bv":0,"min":0.000000,"max":1.000000,"asm":"r","type":"b","rt":"","st":"ipso","exten":""}
+
          }
                        ],
+
    "bn":"SenHub"
        "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"
 
      },
 
     },
 
  "agentID":"0017000E40000001"
 
 
}</pre>
 
}</pre>
  
 +
= ESL&nbsp;Simulator =
  
 +
== WISE-PaaS/ESL ==
  
=== Update data value of a SenHub ===
+
[[File:ESL NodeREDSimulator WISE-PaaS.jpg|RTENOTITLE]]
 +
<pre>GW
 +
00000001-0000-0000-0000-017E40000001
 +
MAC: 00:0B:AB:6F:37:52
 +
    Zigbee
 +
        00124b00043a9749
 +
 +
Router-1
 +
00000001-0000-0000-0000-0050BA485303
 +
WiFi MAC: 00:50:BA:48:53:03
 +
IP: 172.22.12.85
 +
    Zigbee
 +
        00124b00043a9766
 +
       
 +
Router-
 +
00000001-0000-0000-0000-0034115521a4
 +
WiFi MAC: 00:34:11:55:21:a4
 +
IP: 172.22.12.86
 +
    Zigbee
 +
        00124b00043a9776
 +
 +
Tag-1
 +
00000001-0000-0000-50c2-7710425a5347
 +
    MAC:50c27710425a5347
 +
        image:0XB853
  
'''event Type:'''&nbsp;eSenHub_UpdateData
+
Tag-2
 +
00000001-0000-0000-50c2-7710425a5348
 +
    MAC:50c27710425a5348
 +
        image:0XB888
 +
Tag-3
 +
00000001-0000-0000-0000-001077C25001
 +
    MAC:0000001077C25001
 +
        image:0XB899</pre>
  
'''data:'''
+
 
<pre>{
+
 
    "SenHub":{ 
+
=== For WISE-PaaS/RMM3.3 ===
      "SenData":
+
 
          "e":[ {"n":"Temperature","v":18.6},
+
GW x 1
                {"n":"Humidity","v":57},
+
<pre>[{"id":"d8e8833e.7baf","type":"mqtt out","z":"fde929ec.69cc38","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1158.9999923706055,"y":338.00001287460327,"wires":[]},{"id":"b935a416.695758","type":"delay","z":"fde929ec.69cc38","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":309,"y":287,"wires":[["810a3dcc.ee96"]]},{"id":"5e970d04.4e1f44","type":"function","z":"fde929ec.69cc38","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_GW\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"IoTGW\",\"product\":\"ESL-GW\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":464.0000228881836,"y":119.9999885559082,"wires":[["9c649db2.be9b7"]]},{"id":"810a3dcc.ee96","type":"function","z":"fde929ec.69cc38","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"IoTGW\",\"osVersion\":\"OpenWRT\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv7\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":541,"y":288,"wires":[["33b9c533.5ed11a"]]},{"id":"813c1537.5e5e58","type":"delay","z":"fde929ec.69cc38","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":329,"y":546,"wires":[["d2233f9f.791a7"]]},{"id":"24175ea.ac3c8a2","type":"delay","z":"fde929ec.69cc38","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":301,"y":416,"wires":[["9a13262e.a0d048","813c1537.5e5e58"]]},{"id":"44102883.d70b18","type":"comment","z":"fde929ec.69cc38","name":"WISEAgent Connect","info":"","x":468.00003814697266,"y":67.9999885559082,"wires":[]},{"id":"657a55d2.0151dc","type":"comment","z":"fde929ec.69cc38","name":"Capability","info":"","x":487,"y":362,"wires":[]},{"id":"b55d1b70.8e93c8","type":"inject","z":"fde929ec.69cc38","name":"GW Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":98.99999237060547,"y":287.99999618530273,"wires":[["b935a416.695758","370e2543.81d80a","24175ea.ac3c8a2"]]},{"id":"7f44c5e2.ab26ac","type":"function","z":"fde929ec.69cc38","name":"deviceinfo","func":"msg.topic=context.global.topicprefix+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":745,"y":546.9999389648438,"wires":[["f1bdd2d0.c2df3"]]},{"id":"33b9c533.5ed11a","type":"function","z":"fde929ec.69cc38","name":"agentactionreq","func":"msg.topic=context.global.topicprefix+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":731.9999580383301,"y":341,"wires":[["f1bdd2d0.c2df3"]]},{"id":"9c649db2.be9b7","type":"function","z":"fde929ec.69cc38","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":730.999927520752,"y":122.99997901916504,"wires":[["f1bdd2d0.c2df3"]]},{"id":"182e9ad6.a5e185","type":"comment","z":"fde929ec.69cc38","name":"RMM Topic","info":"","x":707.9999656677246,"y":68.99999618530273,"wires":[]},{"id":"9a13262e.a0d048","type":"function","z":"fde929ec.69cc38","name":"GW InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9749\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"premit-tag-list\",\"sv\":\"\",\"asm\":\"rw\"},{\"n\":\"pan-id\",\"v\":1,\"asm\":\"r\"},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9749\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":479,"y":416,"wires":[["33b9c533.5ed11a"]]},{"id":"d2233f9f.791a7","type":"function","z":"fde929ec.69cc38","name":"GW Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9749\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"0000017E40000002,0000017E40000003\",\"asm\":\"r\"},{\"n\":\"premit-tag-list\",\"sv\":\"00554b00043a9755,00554b00043a9766,00554b00043a9777\",\"asm\":\"rw\"},{\"n\":\"pan-id\",\"v\":1,\"asm\":\"r\"},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9749\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":487,"y":547,"wires":[["7f44c5e2.ab26ac"]]},{"id":"f1bdd2d0.c2df3","type":"function","z":"fde929ec.69cc38","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":971.999942779541,"y":338.9999752044678,"wires":[["d8e8833e.7baf","633d1beb.49cad4"]]},{"id":"6de6e236.fe33fc","type":"comment","z":"fde929ec.69cc38","name":"Replace AgentID","info":"","x":989.9999313354492,"y":65.99999618530273,"wires":[]},{"id":"9340b233.f258","type":"comment","z":"fde929ec.69cc38","name":"Update Value","info":"","x":488,"y":499,"wires":[]},{"id":"633d1beb.49cad4","type":"debug","z":"fde929ec.69cc38","name":"","active":true,"console":"false","complete":"true","x":1138.9999923706055,"y":251.00001287460327,"wires":[]},{"id":"370e2543.81d80a","type":"function","z":"fde929ec.69cc38","name":"deviceID ( V )","func":"context.global.devID='0000017E40000001';\n// 0000017E40000001\n\ncontext.global.topicprefix='/cagent/admin/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":223.99998474121094,"y":119.99998474121094,"wires":[["5e970d04.4e1f44"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.45","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]</pre>
                {"n":"GPIO1","bv":0},
+
 
                {"n":"GPIO2","bv":0}],
+
Router x 2
          "bn":"SenData"
+
<pre>[{"id":"e7571bbf.5fb0e8","type":"mqtt out","z":"ce76ef7e.4f588","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1150,"y":365.00001668930054,"wires":[]},{"id":"4cf76aec.a93b64","type":"delay","z":"ce76ef7e.4f588","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":300.00000762939453,"y":314.00000381469727,"wires":[["a7bea00b.45691"]]},{"id":"f14102e7.2445d","type":"function","z":"ce76ef7e.4f588","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Router\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"IoTGW\",\"product\":\"ESL-Router\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":457.0000305175781,"y":144,"wires":[["4413db22.6f98e4"]]},{"id":"a7bea00b.45691","type":"function","z":"ce76ef7e.4f588","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Router\",\"osVersion\":\"Yocto\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv9\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":532.0000076293945,"y":315.00000381469727,"wires":[["39b99c32.154b14"]]},{"id":"ba0b1a0c.289b38","type":"delay","z":"ce76ef7e.4f588","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":320.00000762939453,"y":573.0000038146973,"wires":[["d2d559e5.0b9fe8"]]},{"id":"debb716c.a27db","type":"delay","z":"ce76ef7e.4f588","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":292.00000762939453,"y":443.00000381469727,"wires":[["696e5e07.f4c7","ba0b1a0c.289b38"]]},{"id":"49d4924b.79c89c","type":"comment","z":"ce76ef7e.4f588","name":"WISEAgent Connect","info":"","x":459.0000457763672,"y":94.99999237060547,"wires":[]},{"id":"4aa6a749.590048","type":"comment","z":"ce76ef7e.4f588","name":"Capability","info":"","x":473,"y":394,"wires":[]},{"id":"cb84e58e.05c798","type":"inject","z":"ce76ef7e.4f588","name":"R1 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":90,"y":315,"wires":[["4cf76aec.a93b64","1305b4bf.917d8b","debb716c.a27db"]]},{"id":"a1d4b0a.068d35","type":"function","z":"ce76ef7e.4f588","name":"deviceinfo","func":"msg.topic=context.global.topicprefix1+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":735.9999771118164,"y":577.9999589920044,"wires":[["2c4d357d.670cca"]]},{"id":"39b99c32.154b14","type":"function","z":"ce76ef7e.4f588","name":"agentactionreq","func":"msg.topic=context.global.topicprefix1+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":722.9999656677246,"y":368.00000381469727,"wires":[["2c4d357d.670cca"]]},{"id":"4413db22.6f98e4","type":"function","z":"ce76ef7e.4f588","name":"agentinfoack","func":"msg.topic=context.global.topicprefix1+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":721.9999351501465,"y":149.9999828338623,"wires":[["2c4d357d.670cca"]]},{"id":"8ffcd4ec.40d088","type":"comment","z":"ce76ef7e.4f588","name":"RMM Topic","info":"","x":698.9999732971191,"y":96,"wires":[]},{"id":"696e5e07.f4c7","type":"function","z":"ce76ef7e.4f588","name":"R1 InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9766\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9766\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"0000017E40000001\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":470.00000762939453,"y":443.00000381469727,"wires":[["39b99c32.154b14"]]},{"id":"d2d559e5.0b9fe8","type":"function","z":"ce76ef7e.4f588","name":"R1 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9766\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"00554b00043a9755,00554b00043a9766\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9766\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"0000017E40000001\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":484,"y":577,"wires":[["a1d4b0a.068d35"]]},{"id":"2c4d357d.670cca","type":"function","z":"ce76ef7e.4f588","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID1);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID1);\nreturn msg;","outputs":1,"noerr":0,"x":962.9999504089355,"y":365.99997901916504,"wires":[["e7571bbf.5fb0e8","be7f6247.29139"]]},{"id":"e9d11725.41f638","type":"comment","z":"ce76ef7e.4f588","name":"Replace AgentID","info":"","x":980.9999389648438,"y":93,"wires":[]},{"id":"4cc80f1d.8872","type":"comment","z":"ce76ef7e.4f588","name":"Update Value","info":"","x":479.00000762939453,"y":526.0000038146973,"wires":[]},{"id":"be7f6247.29139","type":"debug","z":"ce76ef7e.4f588","name":"","active":true,"console":"false","complete":"true","x":1130,"y":278.00001668930054,"wires":[]},{"id":"1305b4bf.917d8b","type":"function","z":"ce76ef7e.4f588","name":"deviceID R1 ( V )","func":"context.global.devID1='0000017E40000002';\n// 0000017E40000002\n\ncontext.global.topicprefix1='/cagent/admin/'+context.global.devID1+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":221.99999237060547,"y":145.9999885559082,"wires":[["f14102e7.2445d"]]},{"id":"3159bc9d.83c974","type":"mqtt out","z":"ce76ef7e.4f588","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1135,"y":901,"wires":[]},{"id":"38c2659b.cfc9da","type":"delay","z":"ce76ef7e.4f588","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":285.00000762939453,"y":849.9999871253967,"wires":[["868277bd.ddba38"]]},{"id":"db2c2f71.69c04","type":"function","z":"ce76ef7e.4f588","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Router\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"IoTGW\",\"product\":\"ESL-Router\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":442.0000305175781,"y":679.9999833106995,"wires":[["f3ba3e10.20741"]]},{"id":"868277bd.ddba38","type":"function","z":"ce76ef7e.4f588","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Router\",\"osVersion\":\"Yocto\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv9\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":517.0000076293945,"y":850.9999871253967,"wires":[["9d4aa642.ed0a18"]]},{"id":"ddcbd36b.b6ae4","type":"delay","z":"ce76ef7e.4f588","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":305.00000762939453,"y":1108.9999871253967,"wires":[["e9b2a174.a851c"]]},{"id":"3a9076ad.92fe8a","type":"delay","z":"ce76ef7e.4f588","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":277.00000762939453,"y":978.9999871253967,"wires":[["95c82586.4fc958","ddcbd36b.b6ae4"]]},{"id":"40303239.78a1cc","type":"comment","z":"ce76ef7e.4f588","name":"Capability","info":"","x":458,"y":929.9999833106995,"wires":[]},{"id":"ec63ea27.eac7b8","type":"inject","z":"ce76ef7e.4f588","name":"R2 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":75,"y":850.9999833106995,"wires":[["38c2659b.cfc9da","6e87d31e.3c46cc","3a9076ad.92fe8a"]]},{"id":"a6f1dc00.582728","type":"function","z":"ce76ef7e.4f588","name":"deviceinfo","func":"msg.topic=context.global.topicprefix2+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":720.9999771118164,"y":1113.9999423027039,"wires":[["82226c18.7419d"]]},{"id":"9d4aa642.ed0a18","type":"function","z":"ce76ef7e.4f588","name":"agentactionreq","func":"msg.topic=context.global.topicprefix2+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":707.9999656677246,"y":903.9999871253967,"wires":[["82226c18.7419d"]]},{"id":"f3ba3e10.20741","type":"function","z":"ce76ef7e.4f588","name":"agentinfoack","func":"msg.topic=context.global.topicprefix2+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":706.9999351501465,"y":685.9999661445618,"wires":[["82226c18.7419d"]]},{"id":"95c82586.4fc958","type":"function","z":"ce76ef7e.4f588","name":"R2 InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9776\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9776\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"0000017E40000001\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":455.00000762939453,"y":978.9999871253967,"wires":[["9d4aa642.ed0a18"]]},{"id":"e9b2a174.a851c","type":"function","z":"ce76ef7e.4f588","name":"R2 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9776\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"00554b00043a9777\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9776\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"0000017E40000001\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":469,"y":1112.9999833106995,"wires":[["a6f1dc00.582728"]]},{"id":"82226c18.7419d","type":"function","z":"ce76ef7e.4f588","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID2);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID2);\nreturn msg;","outputs":1,"noerr":0,"x":947.9999504089355,"y":901.9999623298645,"wires":[["3159bc9d.83c974","a1341b89.cf8658"]]},{"id":"e6a46d7d.1a932","type":"comment","z":"ce76ef7e.4f588","name":"Update Value","info":"","x":464.00000762939453,"y":1061.9999871253967,"wires":[]},{"id":"a1341b89.cf8658","type":"debug","z":"ce76ef7e.4f588","name":"","active":false,"console":"false","complete":"true","x":1115,"y":814,"wires":[]},{"id":"6e87d31e.3c46cc","type":"function","z":"ce76ef7e.4f588","name":"deviceID R2 ( V )","func":"context.global.devID2='0000017E40000003';\n// 0000017E40000003\n\ncontext.global.topicprefix2='/cagent/admin/'+context.global.devID2+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":206.99999237060547,"y":681.9999718666077,"wires":[["db2c2f71.69c04"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.45","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]</pre>
      },
+
 
      "ver":1
+
Tag x 3
  },
+
<pre>[{"id":"a4951e1a.31592","type":"mqtt out","z":"cb7d3963.d83ff8","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1139,"y":363.00001668930054,"wires":[]},{"id":"e5d0da41.986f88","type":"delay","z":"cb7d3963.d83ff8","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":289.00000762939453,"y":312.00000381469727,"wires":[["87b9fa92.c04398"]]},{"id":"a2f070be.9cb0e","type":"function","z":"cb7d3963.d83ff8","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Tag\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"SenHub\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":446.0000305175781,"y":142,"wires":[["a01cd7e3.0947b8"]]},{"id":"87b9fa92.c04398","type":"function","z":"cb7d3963.d83ff8","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Tag\",\"osVersion\":\"RTOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Snail\",\"osArch\":\"Cotex-M4\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":521.0000076293945,"y":313.00000381469727,"wires":[["27ce02a6.ee2d6e"]]},{"id":"50d2332b.cbef3c","type":"delay","z":"cb7d3963.d83ff8","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":309.00000762939453,"y":571.0000038146973,"wires":[["a6419946.8fd9e8"]]},{"id":"5bed6c9d.bddad4","type":"delay","z":"cb7d3963.d83ff8","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":281.00000762939453,"y":441.00000381469727,"wires":[["4c94115f.dfe2f","50d2332b.cbef3c"]]},{"id":"d930155f.1fbc88","type":"comment","z":"cb7d3963.d83ff8","name":"WISEAgent Connect","info":"","x":448.0000457763672,"y":92.99999237060547,"wires":[]},{"id":"7e069df9.dfe834","type":"comment","z":"cb7d3963.d83ff8","name":"Capability","info":"","x":462,"y":392,"wires":[]},{"id":"c00b15be.64c4c8","type":"inject","z":"cb7d3963.d83ff8","name":"T1 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":79,"y":313,"wires":[["e5d0da41.986f88","f129d443.b7f458","5bed6c9d.bddad4"]]},{"id":"b4286b0c.1f0798","type":"function","z":"cb7d3963.d83ff8","name":"deviceinfo","func":"msg.topic=context.global.topicprefix1+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":724.9999771118164,"y":575.9999589920044,"wires":[["97208f78.9be57"]]},{"id":"27ce02a6.ee2d6e","type":"function","z":"cb7d3963.d83ff8","name":"agentactionreq","func":"msg.topic=context.global.topicprefix1+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":711.9999656677246,"y":366.00000381469727,"wires":[["97208f78.9be57"]]},{"id":"a01cd7e3.0947b8","type":"function","z":"cb7d3963.d83ff8","name":"agentinfoack","func":"msg.topic=context.global.topicprefix1+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":710.9999351501465,"y":147.9999828338623,"wires":[["97208f78.9be57"]]},{"id":"5b3cc830.969228","type":"comment","z":"cb7d3963.d83ff8","name":"RMM Topic","info":"","x":687.9999732971191,"y":94,"wires":[]},{"id":"4c94115f.dfe2f","type":"function","z":"cb7d3963.d83ff8","name":"Tag InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":459.00000762939453,"y":441.00000381469727,"wires":[["27ce02a6.ee2d6e"]]},{"id":"a6419946.8fd9e8","type":"function","z":"cb7d3963.d83ff8","name":"T1 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB853\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":68,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":473,"y":575,"wires":[["b4286b0c.1f0798"]]},{"id":"97208f78.9be57","type":"function","z":"cb7d3963.d83ff8","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID1);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID1);\nreturn msg;","outputs":1,"noerr":0,"x":951.9999504089355,"y":363.99997901916504,"wires":[["a4951e1a.31592","c1d29236.e7c5d"]]},{"id":"dc4bbc2.d60ad4","type":"comment","z":"cb7d3963.d83ff8","name":"Replace AgentID","info":"","x":969.9999389648438,"y":91,"wires":[]},{"id":"2a9f98dc.0170e8","type":"comment","z":"cb7d3963.d83ff8","name":"Update Value","info":"","x":468.00000762939453,"y":524.0000038146973,"wires":[]},{"id":"c1d29236.e7c5d","type":"debug","z":"cb7d3963.d83ff8","name":"","active":true,"console":"false","complete":"true","x":1119,"y":276.00001668930054,"wires":[]},{"id":"f129d443.b7f458","type":"function","z":"cb7d3963.d83ff8","name":"deviceID T1 ( V )","func":"context.global.devID1='00554b00043a9755';\n// 00124b00043a9766\n\ncontext.global.topicprefix1='/cagent/admin/'+context.global.devID1+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":210.99999237060547,"y":143.9999885559082,"wires":[["a2f070be.9cb0e"]]},{"id":"d2711b99.d5ed58","type":"mqtt out","z":"cb7d3963.d83ff8","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1160,"y":904,"wires":[]},{"id":"76879bdf.ecd8b4","type":"delay","z":"cb7d3963.d83ff8","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":310.00000762939453,"y":852.9999871253967,"wires":[["60f92dd.55871d4"]]},{"id":"f97d0333.05a66","type":"function","z":"cb7d3963.d83ff8","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Tag\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"SenHub\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":467.0000305175781,"y":682.9999833106995,"wires":[["74406350.86267c"]]},{"id":"60f92dd.55871d4","type":"function","z":"cb7d3963.d83ff8","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Tag\",\"osVersion\":\"RTOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Snail\",\"osArch\":\"Cotex-M4\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":542.0000076293945,"y":853.9999871253967,"wires":[["8f9ce08d.39714"]]},{"id":"903e2d02.98daa","type":"delay","z":"cb7d3963.d83ff8","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":330.00000762939453,"y":1111.9999871253967,"wires":[["5bee436.e09fcbc"]]},{"id":"e83d81bd.dc4c8","type":"delay","z":"cb7d3963.d83ff8","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":302.00000762939453,"y":981.9999871253967,"wires":[["a558028d.cce43","903e2d02.98daa"]]},{"id":"5b2ece4f.bff2c","type":"comment","z":"cb7d3963.d83ff8","name":"Capability","info":"","x":483,"y":932.9999833106995,"wires":[]},{"id":"180c1f36.87cb11","type":"inject","z":"cb7d3963.d83ff8","name":"T2 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":100,"y":853.9999833106995,"wires":[["76879bdf.ecd8b4","46d82b23.f65054","e83d81bd.dc4c8"]]},{"id":"75929b2e.7bff04","type":"function","z":"cb7d3963.d83ff8","name":"deviceinfo","func":"msg.topic=context.global.topicprefix1+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":745.9999771118164,"y":1116.9999423027039,"wires":[["b1ad6ea6.ae619"]]},{"id":"8f9ce08d.39714","type":"function","z":"cb7d3963.d83ff8","name":"agentactionreq","func":"msg.topic=context.global.topicprefix1+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":732.9999656677246,"y":906.9999871253967,"wires":[["b1ad6ea6.ae619"]]},{"id":"74406350.86267c","type":"function","z":"cb7d3963.d83ff8","name":"agentinfoack","func":"msg.topic=context.global.topicprefix1+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":731.9999351501465,"y":688.9999661445618,"wires":[["b1ad6ea6.ae619"]]},{"id":"a558028d.cce43","type":"function","z":"cb7d3963.d83ff8","name":"Tag InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":480.00000762939453,"y":981.9999871253967,"wires":[["8f9ce08d.39714"]]},{"id":"5bee436.e09fcbc","type":"function","z":"cb7d3963.d83ff8","name":"T2 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB888\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":90,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":82,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":68,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":494,"y":1115.9999833106995,"wires":[["75929b2e.7bff04"]]},{"id":"b1ad6ea6.ae619","type":"function","z":"cb7d3963.d83ff8","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID1);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID1);\nreturn msg;","outputs":1,"noerr":0,"x":972.9999504089355,"y":904.9999623298645,"wires":[["d2711b99.d5ed58","99d9da3b.2cd638"]]},{"id":"a926c609.1a7e58","type":"comment","z":"cb7d3963.d83ff8","name":"Update Value","info":"","x":489.00000762939453,"y":1064.9999871253967,"wires":[]},{"id":"99d9da3b.2cd638","type":"debug","z":"cb7d3963.d83ff8","name":"","active":true,"console":"false","complete":"true","x":1140,"y":817,"wires":[]},{"id":"46d82b23.f65054","type":"function","z":"cb7d3963.d83ff8","name":"deviceID T2 ( V )","func":"context.global.devID1='00554b00043a9766';\n// 00554b00043a9766\n\ncontext.global.topicprefix1='/cagent/admin/'+context.global.devID1+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":231.99999237060547,"y":684.9999718666077,"wires":[["f97d0333.05a66"]]},{"id":"b497245c.89d958","type":"mqtt out","z":"cb7d3963.d83ff8","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1180,"y":1438,"wires":[]},{"id":"8a1dbf8f.d0a45","type":"delay","z":"cb7d3963.d83ff8","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":330.00000762939453,"y":1386.9999871253967,"wires":[["e07ccceb.f507d"]]},{"id":"da6651f4.decbc","type":"function","z":"cb7d3963.d83ff8","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Tag\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"SenHub\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":487.0000305175781,"y":1216.9999833106995,"wires":[["9e137740.42fce8"]]},{"id":"e07ccceb.f507d","type":"function","z":"cb7d3963.d83ff8","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Tag\",\"osVersion\":\"RTOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Snail\",\"osArch\":\"Cotex-M4\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":562.0000076293945,"y":1387.9999871253967,"wires":[["19549991.3f29a6"]]},{"id":"da5affdb.2b4d7","type":"delay","z":"cb7d3963.d83ff8","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":350.00000762939453,"y":1645.9999871253967,"wires":[["6aae090a.f44ef8"]]},{"id":"6d4cd530.191d4c","type":"delay","z":"cb7d3963.d83ff8","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":322.00000762939453,"y":1515.9999871253967,"wires":[["8d664e74.d7e5b","da5affdb.2b4d7"]]},{"id":"81549865.0b7f58","type":"comment","z":"cb7d3963.d83ff8","name":"Capability","info":"","x":503,"y":1466.9999833106995,"wires":[]},{"id":"ea199052.bbf02","type":"inject","z":"cb7d3963.d83ff8","name":"T3 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":1387.9999833106995,"wires":[["8a1dbf8f.d0a45","309c02f0.0a0ade","6d4cd530.191d4c"]]},{"id":"18c9906e.02095","type":"function","z":"cb7d3963.d83ff8","name":"deviceinfo","func":"msg.topic=context.global.topicprefix1+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":765.9999771118164,"y":1650.9999423027039,"wires":[["38c39541.53873a"]]},{"id":"19549991.3f29a6","type":"function","z":"cb7d3963.d83ff8","name":"agentactionreq","func":"msg.topic=context.global.topicprefix1+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":752.9999656677246,"y":1440.9999871253967,"wires":[["38c39541.53873a"]]},{"id":"9e137740.42fce8","type":"function","z":"cb7d3963.d83ff8","name":"agentinfoack","func":"msg.topic=context.global.topicprefix1+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":751.9999351501465,"y":1222.9999661445618,"wires":[["38c39541.53873a"]]},{"id":"8d664e74.d7e5b","type":"function","z":"cb7d3963.d83ff8","name":"Tag InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":500.00000762939453,"y":1515.9999871253967,"wires":[["19549991.3f29a6"]]},{"id":"6aae090a.f44ef8","type":"function","z":"cb7d3963.d83ff8","name":"T3 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB899\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":65,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":53,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":8,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":86,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":514,"y":1649.9999833106995,"wires":[["18c9906e.02095"]]},{"id":"38c39541.53873a","type":"function","z":"cb7d3963.d83ff8","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID1);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID1);\nreturn msg;","outputs":1,"noerr":0,"x":992.9999504089355,"y":1438.9999623298645,"wires":[["b497245c.89d958","91e07c84.60358"]]},{"id":"735d27c.fc0bcd8","type":"comment","z":"cb7d3963.d83ff8","name":"Update Value","info":"","x":509.00000762939453,"y":1598.9999871253967,"wires":[]},{"id":"91e07c84.60358","type":"debug","z":"cb7d3963.d83ff8","name":"","active":true,"console":"false","complete":"true","x":1160,"y":1351,"wires":[]},{"id":"309c02f0.0a0ade","type":"function","z":"cb7d3963.d83ff8","name":"deviceID T3 ( V )","func":"context.global.devID1='00554b00043a9777';\n// 00554b00043a9777\n\ncontext.global.topicprefix1='/cagent/admin/'+context.global.devID1+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":251.99999237060547,"y":1218.9999718666077,"wires":[["da6651f4.decbc"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.45","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]</pre>
  "agentID":"0017000E40000001"
+
 
}</pre>
+
=== For WISE-PaaS/2.0 ===
 +
 
 +
[[WISE-PaaS/2.0_Protocol|Communication Protocol for WISE-PaaS/2.0]]
 +
 
 +
GW x 1 + Router x 2
 +
<pre>[{"id":"d7014f9c.30cc5","type":"mqtt out","z":"c67ffc50.3dd8c","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1181.0000267028809,"y":357.00001668930054,"wires":[]},{"id":"65a98c70.126d94","type":"delay","z":"c67ffc50.3dd8c","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":331.0000343322754,"y":306.00000381469727,"wires":[["525df1c3.c29fd"]]},{"id":"9ae9f00d.5ed98","type":"function","z":"c67ffc50.3dd8c","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"\",\"hostname\":\"ESL_GW\",\"sn\":\"AAAAA\",\"mac\":\"00:0B:AB:6F:37:52\",\"version\":\"1.0.6.0\",\"type\":\"IoTGW\",\"product\":\"ESL-GW\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":486.000057220459,"y":138.99999237060547,"wires":[["d19a6510.0e4ce8"]]},{"id":"525df1c3.c29fd","type":"function","z":"c67ffc50.3dd8c","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"IoTGW\",\"osVersion\":\"OpenWRT\",\"biosVersion\":\"V1.10\",\"platformName\":\"WISE-3610\",\"processorName\":\"ARMv7\",\"osArch\":\"arm\",\"totalPhysMemKB\":1973544,\"macs\":\"00:0B:AB:6F:37:52\",\"IP\":\"172.22.12.84\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":510.0000305175781,"y":306,"wires":[["3a2d261e.11047a"]]},{"id":"b3fce408.bc5918","type":"delay","z":"c67ffc50.3dd8c","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":350.0000305175781,"y":570,"wires":[["363cbf84.4f673"]]},{"id":"3e0dfb71.05cb74","type":"delay","z":"c67ffc50.3dd8c","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":323.0000343322754,"y":435.00000381469727,"wires":[["605b6fd6.fe6eb","b3fce408.bc5918"]]},{"id":"e5551d36.d1619","type":"comment","z":"c67ffc50.3dd8c","name":"WISEAgent Connect","info":"","x":490.00007247924805,"y":86.99999237060547,"wires":[]},{"id":"c04e1c29.9de1a","type":"comment","z":"c67ffc50.3dd8c","name":"Capability","info":"","x":509.0000343322754,"y":381.00000381469727,"wires":[]},{"id":"b63dbd49.63f45","type":"inject","z":"c67ffc50.3dd8c","name":"GW","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":101.00002670288086,"y":307,"wires":[["65a98c70.126d94","15cc9240.81b73e","3e0dfb71.05cb74"]]},{"id":"3a2d261e.11047a","type":"function","z":"c67ffc50.3dd8c","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":766,"y":437,"wires":[["9dfd6b88.3738b8"]]},{"id":"d19a6510.0e4ce8","type":"function","z":"c67ffc50.3dd8c","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":749.9999389648438,"y":138.99998474121094,"wires":[["9dfd6b88.3738b8"]]},{"id":"6cba0c9a.7e0e74","type":"comment","z":"c67ffc50.3dd8c","name":"Topic","info":"","x":720,"y":88,"wires":[]},{"id":"605b6fd6.fe6eb","type":"function","z":"c67ffc50.3dd8c","name":"InfoSpec","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9749\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"premit-tag-list\",\"sv\":\"\",\"asm\":\"rw\"},{\"n\":\"pan-id\",\"v\":1,\"asm\":\"r\"},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9749\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":491.0000343322754,"y":435.00000381469727,"wires":[["3a2d261e.11047a"]]},{"id":"363cbf84.4f673","type":"function","z":"c67ffc50.3dd8c","name":"Data","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9749\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"00000050BA485303,00000034115521a4\",\"asm\":\"r\"},{\"n\":\"premit-tag-list\",\"sv\":\"50c27710425a5347,50c27710425a5348,0000001077C25001\",\"asm\":\"rw\"},{\"n\":\"pan-id\",\"v\":1,\"asm\":\"r\"},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9749\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":501.0000305175781,"y":574,"wires":[["c83f39f2.484098"]]},{"id":"9dfd6b88.3738b8","type":"function","z":"c67ffc50.3dd8c","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":999,"y":262.9999694824219,"wires":[["d7014f9c.30cc5","6ca208a5.f77e68"]]},{"id":"559c461d.6dfff8","type":"comment","z":"c67ffc50.3dd8c","name":"Replace AgentID","info":"","x":1011.9999656677246,"y":85,"wires":[]},{"id":"364d7b0a.8961a4","type":"comment","z":"c67ffc50.3dd8c","name":"Update Value","info":"","x":510.0000343322754,"y":518.0000038146973,"wires":[]},{"id":"6ca208a5.f77e68","type":"debug","z":"c67ffc50.3dd8c","name":"","active":true,"console":"false","complete":"true","x":1166,"y":262.00001525878906,"wires":[]},{"id":"15cc9240.81b73e","type":"function","z":"c67ffc50.3dd8c","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-0000-017E40000001';\n// 0000-017E40000001\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":246.00001907348633,"y":138.9999885559082,"wires":[["9ae9f00d.5ed98"]]},{"id":"c83f39f2.484098","type":"function","z":"c67ffc50.3dd8c","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":759,"y":576,"wires":[["9dfd6b88.3738b8"]]},{"id":"2f5ec821.1b8518","type":"mqtt out","z":"c67ffc50.3dd8c","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1177,"y":968,"wires":[]},{"id":"4a7ecc67.be97e4","type":"delay","z":"c67ffc50.3dd8c","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":327.00000762939453,"y":916.9999871253967,"wires":[["73e26bd8.722014"]]},{"id":"cef6cc75.23b51","type":"function","z":"c67ffc50.3dd8c","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-017E40000001\",\"hostname\":\"ESL-Router\",\"sn\":\"00:50:BA:48:53:03\",\"mac\":\"00:50:BA:48:53:03\",\"version\":\"1.0.6.0\",\"type\":\"IoTGW\",\"product\":\"ESL-Router\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":482.0000305175781,"y":749.9999756813049,"wires":[["3d146985.df24d6"]]},{"id":"73e26bd8.722014","type":"function","z":"c67ffc50.3dd8c","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Router\",\"osVersion\":\"Yocto\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv9\",\"totalPhysMemKB\":1973544,\"macs\":\"00:50:BA:48:53:03\",\"IP\":\"172.22.12.85\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":506.00000381469727,"y":916.9999833106995,"wires":[["563098a0.17ae88"]]},{"id":"66c83e7d.3e8a3","type":"delay","z":"c67ffc50.3dd8c","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":346.00000381469727,"y":1180.9999833106995,"wires":[["5bab9f3f.d3672"]]},{"id":"4e0f42bd.f3a98c","type":"delay","z":"c67ffc50.3dd8c","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":319.00000762939453,"y":1045.9999871253967,"wires":[["a0cd92e7.0047f","66c83e7d.3e8a3"]]},{"id":"7857689c.b42628","type":"comment","z":"c67ffc50.3dd8c","name":"WISEAgent Connect","info":"","x":486.0000457763672,"y":697.9999756813049,"wires":[]},{"id":"d2e9dcd7.62779","type":"comment","z":"c67ffc50.3dd8c","name":"Capability","info":"","x":505.00000762939453,"y":991.9999871253967,"wires":[]},{"id":"d855f500.8c2788","type":"inject","z":"c67ffc50.3dd8c","name":"R1","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":97,"y":917.9999833106995,"wires":[["4a7ecc67.be97e4","7af74c5e.70dd54","4e0f42bd.f3a98c"]]},{"id":"563098a0.17ae88","type":"function","z":"c67ffc50.3dd8c","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":761.9999732971191,"y":1047.9999833106995,"wires":[["5dfd764a.797f28"]]},{"id":"3d146985.df24d6","type":"function","z":"c67ffc50.3dd8c","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":745.9999122619629,"y":749.9999680519104,"wires":[["5dfd764a.797f28"]]},{"id":"e355fb41.2edaa8","type":"comment","z":"c67ffc50.3dd8c","name":"Topic","info":"","x":715.9999732971191,"y":698.9999833106995,"wires":[]},{"id":"a0cd92e7.0047f","type":"function","z":"c67ffc50.3dd8c","name":"InfoSpec","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9766\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9766\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":487.00000762939453,"y":1045.9999871253967,"wires":[["563098a0.17ae88"]]},{"id":"5bab9f3f.d3672","type":"function","z":"c67ffc50.3dd8c","name":"Data","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9766\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"50c27710425a5347,50c27710425a5348\"},{\"n\":\"tx-level\",\"v\":10},{\"n\":\"zd-fw-version\",\"v\":1},{\"n\":\"reboot\",\"bv\":0}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9766\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":497,"y":1191,"wires":[["9872385.dbce1c8"]]},{"id":"5dfd764a.797f28","type":"function","z":"c67ffc50.3dd8c","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":994.9999732971191,"y":873.9999527931213,"wires":[["2f5ec821.1b8518","ae7d5197.fd17c"]]},{"id":"c927f3f8.6b0e","type":"comment","z":"c67ffc50.3dd8c","name":"Replace AgentID","info":"","x":1007.9999389648438,"y":695.9999833106995,"wires":[]},{"id":"67181a00.c078b4","type":"comment","z":"c67ffc50.3dd8c","name":"Update Value","info":"","x":506.00000762939453,"y":1128.9999871253967,"wires":[]},{"id":"ae7d5197.fd17c","type":"debug","z":"c67ffc50.3dd8c","name":"","active":true,"console":"false","complete":"true","x":1161.9999732971191,"y":872.9999985694885,"wires":[]},{"id":"7af74c5e.70dd54","type":"function","z":"c67ffc50.3dd8c","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-0000-0050BA485303';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":241.99999237060547,"y":749.9999718666077,"wires":[["cef6cc75.23b51"]]},{"id":"9872385.dbce1c8","type":"function","z":"c67ffc50.3dd8c","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":753,"y":1190,"wires":[["5dfd764a.797f28"]]},{"id":"c8b2be68.39df8","type":"mqtt out","z":"c67ffc50.3dd8c","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1168,"y":1555,"wires":[]},{"id":"dc98c543.293f88","type":"delay","z":"c67ffc50.3dd8c","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":318.00000762939453,"y":1503.9999871253967,"wires":[["44652d5c.285fb4"]]},{"id":"fa9947c6.ca31d8","type":"function","z":"c67ffc50.3dd8c","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-017E40000001\",\"hostname\":\"ESL-Router\",\"sn\":\"00:34:11:55:21:a4\",\"mac\":\"00:34:11:55:21:a4\",\"version\":\"1.0.6.0\",\"type\":\"IoTGW\",\"product\":\"ESL-Router\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":473.0000305175781,"y":1336.999975681305,"wires":[["678ff89b.707868"]]},{"id":"44652d5c.285fb4","type":"function","z":"c67ffc50.3dd8c","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Router\",\"osVersion\":\"Yocto\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv9\",\"totalPhysMemKB\":1973544,\"macs\":\"00:34:11:55:21:a4\",\"IP\":\"172.22.12.86\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":497.00000381469727,"y":1503.9999833106995,"wires":[["ce5cb463.3b6768"]]},{"id":"435c741a.361a0c","type":"delay","z":"c67ffc50.3dd8c","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":337.00000381469727,"y":1767.9999833106995,"wires":[["8b734bfb.ec3a18"]]},{"id":"b6eca396.32106","type":"delay","z":"c67ffc50.3dd8c","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":310.00000762939453,"y":1632.9999871253967,"wires":[["346abbed.4b2334","435c741a.361a0c"]]},{"id":"d46e932d.114e7","type":"comment","z":"c67ffc50.3dd8c","name":"WISEAgent Connect","info":"","x":477.0000457763672,"y":1284.999975681305,"wires":[]},{"id":"94fe3983.7934e8","type":"comment","z":"c67ffc50.3dd8c","name":"Capability","info":"","x":496.00000762939453,"y":1578.9999871253967,"wires":[]},{"id":"b48f7a72.368958","type":"inject","z":"c67ffc50.3dd8c","name":"R2","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":88,"y":1504.9999833106995,"wires":[["dc98c543.293f88","18a19849.08aa98","b6eca396.32106"]]},{"id":"ce5cb463.3b6768","type":"function","z":"c67ffc50.3dd8c","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":752.9999732971191,"y":1634.9999833106995,"wires":[["cd4f030d.1c97"]]},{"id":"678ff89b.707868","type":"function","z":"c67ffc50.3dd8c","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":736.9999122619629,"y":1336.9999680519104,"wires":[["cd4f030d.1c97"]]},{"id":"a668d61f.0b68f8","type":"comment","z":"c67ffc50.3dd8c","name":"Topic","info":"","x":706.9999732971191,"y":1285.9999833106995,"wires":[]},{"id":"346abbed.4b2334","type":"function","z":"c67ffc50.3dd8c","name":"InfoSpec","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9776\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":12,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9776\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":478.00000762939453,"y":1632.9999871253967,"wires":[["ce5cb463.3b6768"]]},{"id":"8b734bfb.ec3a18","type":"function","z":"c67ffc50.3dd8c","name":"Data","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9776\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"0000001077C25001\"},{\"n\":\"tx-level\",\"v\":8},{\"n\":\"zd-fw-version\",\"v\":1},{\"n\":\"reboot\",\"bv\":0}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9776\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":488,"y":1778,"wires":[["6d1b0a6.b3414f4"]]},{"id":"cd4f030d.1c97","type":"function","z":"c67ffc50.3dd8c","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":985.9999732971191,"y":1460.9999527931213,"wires":[["c8b2be68.39df8","403b178a.92cf08"]]},{"id":"f940dd8e.44166","type":"comment","z":"c67ffc50.3dd8c","name":"Replace AgentID","info":"","x":999.9999389648438,"y":1291,"wires":[]},{"id":"10a3672.208e499","type":"comment","z":"c67ffc50.3dd8c","name":"Update Value","info":"","x":497.00000762939453,"y":1715.9999871253967,"wires":[]},{"id":"403b178a.92cf08","type":"debug","z":"c67ffc50.3dd8c","name":"","active":true,"console":"false","complete":"true","x":1152.9999732971191,"y":1459.9999985694885,"wires":[]},{"id":"18a19849.08aa98","type":"function","z":"c67ffc50.3dd8c","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-0000-0034115521a4';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":232.99999237060547,"y":1336.9999718666077,"wires":[["fa9947c6.ca31d8"]]},{"id":"6d1b0a6.b3414f4","type":"function","z":"c67ffc50.3dd8c","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":744,"y":1777,"wires":[["cd4f030d.1c97"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.19","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]</pre>
 +
 
 +
Tag x 3
 +
<pre>[{"id":"cc26a084.23f35","type":"mqtt out","z":"c18080d8.3ed68","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1185,"y":353.00002431869507,"wires":[]},{"id":"6ce90049.2a038","type":"delay","z":"c18080d8.3ed68","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":335.00000762939453,"y":302.0000114440918,"wires":[["4c2c1759.500558"]]},{"id":"c721ba6e.cabfd8","type":"function","z":"c18080d8.3ed68","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-0050BA485303\",\"hostname\":\"ESL-Tag\",\"sn\":\"50c27710425a5347\",\"mac\":\"50c27710425a5347\",\"version\":\"1.0.6.0\",\"type\":\"Tag\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":490.0000305175781,"y":135,"wires":[["e09dac15.dc689"]]},{"id":"4c2c1759.500558","type":"function","z":"c18080d8.3ed68","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Tag\",\"osVersion\":\"mbedOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Agent\",\"osArch\":\"Cortex-M4\",\"totalPhysMemKB\":1973544,\"macs\":\"50c27710425a5347\",\"IP\":\"\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":514.0000038146973,"y":302.00000762939453,"wires":[["50fcd20.140ee3"]]},{"id":"38a61f67.37594","type":"delay","z":"c18080d8.3ed68","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":354.00000381469727,"y":566.0000076293945,"wires":[["b5861731.a56f78"]]},{"id":"97c4b590.214f18","type":"delay","z":"c18080d8.3ed68","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":327.00000762939453,"y":431.0000114440918,"wires":[["3adce0da.f5a34","38a61f67.37594"]]},{"id":"ef583ce3.ae81b","type":"comment","z":"c18080d8.3ed68","name":"WISEAgent Connect","info":"","x":494.0000457763672,"y":83,"wires":[]},{"id":"9b6910b1.f5b35","type":"comment","z":"c18080d8.3ed68","name":"Capability","info":"","x":513.0000076293945,"y":377.0000114440918,"wires":[]},{"id":"fba42c7.88d30d","type":"inject","z":"c18080d8.3ed68","name":"T1","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":105,"y":303.00000762939453,"wires":[["6ce90049.2a038","314a5e96.915bf2","97c4b590.214f18"]]},{"id":"50fcd20.140ee3","type":"function","z":"c18080d8.3ed68","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":769.9999732971191,"y":433.00000762939453,"wires":[["b8bcb98a.b8a068"]]},{"id":"e09dac15.dc689","type":"function","z":"c18080d8.3ed68","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":753.9999122619629,"y":134.99999237060547,"wires":[["b8bcb98a.b8a068"]]},{"id":"6b3b1f5e.c0e6f","type":"comment","z":"c18080d8.3ed68","name":"Topic","info":"","x":723.9999732971191,"y":84.00000762939453,"wires":[]},{"id":"3adce0da.f5a34","type":"function","z":"c18080d8.3ed68","name":"InfoSpec","func":"msg.payload='{\"content\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"resolution\",\"sv\":\"296x128\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":495.00000762939453,"y":431.0000114440918,"wires":[["50fcd20.140ee3"]]},{"id":"b5861731.a56f78","type":"function","z":"c18080d8.3ed68","name":"Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB853\"},{\"n\":\"resolution\",\"sv\":\"296x128\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60},{\"n\":\"state-report-period\",\"v\":3600},{\"n\":\"timeout\",\"v\":30},{\"n\":\"battery\",\"v\":70},{\"n\":\"fw-version\",\"v\":1}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":10},{\"n\":\"rssi\",\"v\":68}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\"},{\"n\":\"refresh-image\",\"bv\":0},{\"n\":\"reboot\",\"bv\":0},{\"n\":\"reset-to-default\",\"bv\":0}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":505,"y":576.0000243186951,"wires":[["5f8fbebb.7abf2"]]},{"id":"b8bcb98a.b8a068","type":"function","z":"c18080d8.3ed68","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":1002.9999732971191,"y":258.9999771118164,"wires":[["cc26a084.23f35","f3b36eaf.ea1aa"]]},{"id":"46ea6d8e.9f6e24","type":"comment","z":"c18080d8.3ed68","name":"Replace AgentID","info":"","x":1016.9999389648438,"y":89.00002431869507,"wires":[]},{"id":"51b79582.2485fc","type":"comment","z":"c18080d8.3ed68","name":"Update Value","info":"","x":514.0000076293945,"y":514.0000114440918,"wires":[]},{"id":"f3b36eaf.ea1aa","type":"debug","z":"c18080d8.3ed68","name":"","active":true,"console":"false","complete":"true","x":1169.9999732971191,"y":258.0000228881836,"wires":[]},{"id":"314a5e96.915bf2","type":"function","z":"c18080d8.3ed68","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-50c2-7710425a5347';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":249.99999237060547,"y":134.99999618530273,"wires":[["c721ba6e.cabfd8"]]},{"id":"5f8fbebb.7abf2","type":"function","z":"c18080d8.3ed68","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":761,"y":575.0000243186951,"wires":[["b8bcb98a.b8a068"]]},{"id":"ecfc0450.b9faf8","type":"mqtt out","z":"c18080d8.3ed68","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1185,"y":930,"wires":[]},{"id":"ada30a55.6d1df8","type":"delay","z":"c18080d8.3ed68","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":335.00000762939453,"y":878.9999871253967,"wires":[["9ce4e00b.52fc3"]]},{"id":"5d3b1ca4.85f3d4","type":"function","z":"c18080d8.3ed68","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-0050BA485303\",\"hostname\":\"ESL-Tag\",\"sn\":\"50c27710425a5348\",\"mac\":\"50c27710425a5348\",\"version\":\"1.0.6.0\",\"type\":\"Tag\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":490.0000305175781,"y":711.9999756813049,"wires":[["42c871e2.ba655"]]},{"id":"9ce4e00b.52fc3","type":"function","z":"c18080d8.3ed68","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Tag\",\"osVersion\":\"mbedOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Agent\",\"osArch\":\"Cortex-M4\",\"totalPhysMemKB\":1973544,\"macs\":\"50c27710425a5348\",\"IP\":\"\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":514.0000038146973,"y":878.9999833106995,"wires":[["39d1cf89.75583"]]},{"id":"62a79e3a.18736","type":"delay","z":"c18080d8.3ed68","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":354.00000381469727,"y":1142.9999833106995,"wires":[["c3f58ce9.3280f"]]},{"id":"1e9240ca.b73e4f","type":"delay","z":"c18080d8.3ed68","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":327.00000762939453,"y":1007.9999871253967,"wires":[["d34a0af1.ccc368","62a79e3a.18736"]]},{"id":"aa714a26.6da608","type":"comment","z":"c18080d8.3ed68","name":"WISEAgent Connect","info":"","x":494.0000457763672,"y":659.9999756813049,"wires":[]},{"id":"7199eb3d.57e2c4","type":"comment","z":"c18080d8.3ed68","name":"Capability","info":"","x":513.0000076293945,"y":953.9999871253967,"wires":[]},{"id":"e4022fc1.d1ea","type":"inject","z":"c18080d8.3ed68","name":"T2","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":105,"y":879.9999833106995,"wires":[["ada30a55.6d1df8","9158af20.33838","1e9240ca.b73e4f"]]},{"id":"39d1cf89.75583","type":"function","z":"c18080d8.3ed68","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":769.9999732971191,"y":1009.9999833106995,"wires":[["f2ede1f8.88a0b"]]},{"id":"42c871e2.ba655","type":"function","z":"c18080d8.3ed68","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":753.9999122619629,"y":711.9999680519104,"wires":[["f2ede1f8.88a0b"]]},{"id":"7abbec26.6d74e4","type":"comment","z":"c18080d8.3ed68","name":"Topic","info":"","x":723.9999732971191,"y":660.9999833106995,"wires":[]},{"id":"d34a0af1.ccc368","type":"function","z":"c18080d8.3ed68","name":"InfoSpec","func":"msg.payload='{\"content\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"resolution\",\"sv\":\"296x128\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":62,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":495.00000762939453,"y":1007.9999871253967,"wires":[["39d1cf89.75583"]]},{"id":"c3f58ce9.3280f","type":"function","z":"c18080d8.3ed68","name":"Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB888\"},{\"n\":\"resolution\",\"sv\":\"296x128\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":80},{\"n\":\"state-report-period\",\"v\":3600},{\"n\":\"timeout\",\"v\":30},{\"n\":\"battery\",\"v\":92},{\"n\":\"fw-version\",\"v\":1}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":8},{\"n\":\"rssi\",\"v\":62}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\"},{\"n\":\"refresh-image\",\"bv\":0},{\"n\":\"reboot\",\"bv\":0},{\"n\":\"reset-to-default\",\"bv\":0}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":505,"y":1153,"wires":[["6c293de8.026484"]]},{"id":"f2ede1f8.88a0b","type":"function","z":"c18080d8.3ed68","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":1002.9999732971191,"y":835.9999527931213,"wires":[["ecfc0450.b9faf8","19054792.230558"]]},{"id":"5ccce3da.62a52c","type":"comment","z":"c18080d8.3ed68","name":"Replace AgentID","info":"","x":1016.9999389648438,"y":666,"wires":[]},{"id":"b1fc5be4.ab6008","type":"comment","z":"c18080d8.3ed68","name":"Update Value","info":"","x":514.0000076293945,"y":1090.9999871253967,"wires":[]},{"id":"19054792.230558","type":"debug","z":"c18080d8.3ed68","name":"","active":true,"console":"false","complete":"true","x":1169.9999732971191,"y":834.9999985694885,"wires":[]},{"id":"9158af20.33838","type":"function","z":"c18080d8.3ed68","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-50c2-7710425a5348';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":249.99999237060547,"y":711.9999718666077,"wires":[["5d3b1ca4.85f3d4"]]},{"id":"6c293de8.026484","type":"function","z":"c18080d8.3ed68","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":761,"y":1152,"wires":[["f2ede1f8.88a0b"]]},{"id":"810d6531.501818","type":"mqtt out","z":"c18080d8.3ed68","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1185,"y":1560,"wires":[]},{"id":"b6c7beb7.2dea9","type":"delay","z":"c18080d8.3ed68","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":335.00000762939453,"y":1508.9999871253967,"wires":[["9e2420c.07cc1e"]]},{"id":"b83122fe.e883","type":"function","z":"c18080d8.3ed68","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-0034115521a4\",\"hostname\":\"ESL-Tag\",\"sn\":\"0000001077C25001\",\"mac\":\"0000001077C25001\",\"version\":\"1.0.6.0\",\"type\":\"Tag\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":490.0000305175781,"y":1341.999975681305,"wires":[["663878ea.74c1b8"]]},{"id":"9e2420c.07cc1e","type":"function","z":"c18080d8.3ed68","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Tag\",\"osVersion\":\"mbedOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Agent\",\"osArch\":\"Cortex-M4\",\"totalPhysMemKB\":1973544,\"macs\":\"0000001077C25001\",\"IP\":\"\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":514.0000038146973,"y":1508.9999833106995,"wires":[["fef4ef2f.4eef6"]]},{"id":"f8c8cad3.6fcd28","type":"delay","z":"c18080d8.3ed68","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":354.00000381469727,"y":1772.9999833106995,"wires":[["19319c16.d0c7d4"]]},{"id":"41024d9d.642e44","type":"delay","z":"c18080d8.3ed68","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":327.00000762939453,"y":1637.9999871253967,"wires":[["1e54ded9.5afaa1","f8c8cad3.6fcd28"]]},{"id":"257bdc38.efdd44","type":"comment","z":"c18080d8.3ed68","name":"WISEAgent Connect","info":"","x":494.0000457763672,"y":1289.999975681305,"wires":[]},{"id":"889591c0.39807","type":"comment","z":"c18080d8.3ed68","name":"Capability","info":"","x":513.0000076293945,"y":1583.9999871253967,"wires":[]},{"id":"23612988.b43486","type":"inject","z":"c18080d8.3ed68","name":"T3","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":105,"y":1509.9999833106995,"wires":[["b6c7beb7.2dea9","bd84466.bcaefb8","41024d9d.642e44"]]},{"id":"fef4ef2f.4eef6","type":"function","z":"c18080d8.3ed68","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":769.9999732971191,"y":1639.9999833106995,"wires":[["df58dacd.2188f8"]]},{"id":"663878ea.74c1b8","type":"function","z":"c18080d8.3ed68","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":753.9999122619629,"y":1341.9999680519104,"wires":[["df58dacd.2188f8"]]},{"id":"f455e11d.f98c3","type":"comment","z":"c18080d8.3ed68","name":"Topic","info":"","x":723.9999732971191,"y":1290.9999833106995,"wires":[]},{"id":"1e54ded9.5afaa1","type":"function","z":"c18080d8.3ed68","name":"InfoSpec","func":"msg.payload='{\"content\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"resolution\",\"sv\":\"296x128\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":62,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":495.00000762939453,"y":1637.9999871253967,"wires":[["fef4ef2f.4eef6"]]},{"id":"19319c16.d0c7d4","type":"function","z":"c18080d8.3ed68","name":"Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB899\"},{\"n\":\"resolution\",\"sv\":\"296x128\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":80},{\"n\":\"state-report-period\",\"v\":3600},{\"n\":\"timeout\",\"v\":30},{\"n\":\"battery\",\"v\":92},{\"n\":\"fw-version\",\"v\":1}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":8},{\"n\":\"rssi\",\"v\":62}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\"},{\"n\":\"refresh-image\",\"bv\":0},{\"n\":\"reboot\",\"bv\":0},{\"n\":\"reset-to-default\",\"bv\":0}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":505,"y":1783,"wires":[["286a2911.e88206"]]},{"id":"df58dacd.2188f8","type":"function","z":"c18080d8.3ed68","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":1002.9999732971191,"y":1465.9999527931213,"wires":[["810d6531.501818","41b29e0b.cffc3"]]},{"id":"40948516.797f2c","type":"comment","z":"c18080d8.3ed68","name":"Replace AgentID","info":"","x":1016.9999389648438,"y":1296,"wires":[]},{"id":"7bafa9d2.f0ad88","type":"comment","z":"c18080d8.3ed68","name":"Update Value","info":"","x":514.0000076293945,"y":1720.9999871253967,"wires":[]},{"id":"41b29e0b.cffc3","type":"debug","z":"c18080d8.3ed68","name":"","active":true,"console":"false","complete":"true","x":1169.9999732971191,"y":1464.9999985694885,"wires":[]},{"id":"bd84466.bcaefb8","type":"function","z":"c18080d8.3ed68","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-0000-001077C25001';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":249.99999237060547,"y":1341.9999718666077,"wires":[["b83122fe.e883"]]},{"id":"286a2911.e88206","type":"function","z":"c18080d8.3ed68","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":761,"y":1782,"wires":[["df58dacd.2188f8"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.19","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]</pre>
 +
 
 +
== ESL GS GW MQTT SDK ==
 +
<pre>[{"id":"401cbf93.c6f38","type":"mqtt out","z":"db5de8db.903328","name":"ESL MQTT Broker","topic":"/esl/sdk","qos":"0","retain":"","broker":"280ce450.3c51ec","x":906.9998397827148,"y":225.00003814697266,"wires":[]},{"id":"3da72caa.0a55b4","type":"function","z":"db5de8db.903328","name":"GW Report","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":4,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00124b00043a9749\",\"router-number\":2}}';\nreturn msg;","outputs":1,"noerr":0,"x":474.9998779296875,"y":163.00002479553223,"wires":[["401cbf93.c6f38"]]},{"id":"c136797c.a1d6d8","type":"inject","z":"db5de8db.903328","name":"GW Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":169.9999771118164,"y":163.00002098083496,"wires":[["3da72caa.0a55b4"]]},{"id":"ee62283b.0ea568","type":"debug","z":"db5de8db.903328","name":"","active":true,"console":"false","complete":"true","x":925.9999809265137,"y":143.00000858306885,"wires":[]},{"id":"4995683f.c9fd38","type":"function","z":"db5de8db.903328","name":"R1 Report","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":5,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"0000017E40000002\",\"tag-number\":1}}';\nreturn msg;","outputs":1,"noerr":0,"x":439.0030288696289,"y":626.0104131698608,"wires":[["401cbf93.c6f38"]]},{"id":"261e6387.e84f1c","type":"inject","z":"db5de8db.903328","name":"R1 Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":111.00304412841797,"y":627.0103859901428,"wires":[["4995683f.c9fd38"]]},{"id":"dd267e6c.85fb","type":"function","z":"db5de8db.903328","name":"GW Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":1,\"Code\":0,\"Parameter\":{\"wifi-macaddr\":\"74:FE:48:19:D1:CD\",\"wifi-channel\":6,\"ip\":\"192.168.1.1\",\"port\":3669,\"zd-address\":\"00124b00043a9749\",\"pan-id\":3,\"zd-channel\":6,\"zd-fw-version\":8}}';\nreturn msg;","outputs":1,"noerr":0,"x":487.01422119140625,"y":91.00568103790283,"wires":[["401cbf93.c6f38"]]},{"id":"f7054299.1407b","type":"inject","z":"db5de8db.903328","name":"GW Reg","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":167.01419830322266,"y":93.0056791305542,"wires":[["dd267e6c.85fb"]]},{"id":"1decdfb4.f7537","type":"function","z":"db5de8db.903328","name":"R1 Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":2,\"Code\":0,\"Parameter\":{\"wifi-macaddr\":\"0000017E40000002\",\"wifi-channel\":6,\"ip\":\"192.168.1.1\",\"port\":3669,\"zdt-address\":\"00124b00043a9766\",\"zdr-address\":\"00124b00043a9765\",\"pan-id\":3,\"zdt-fw-version\":2,\"zdr-fw-version\":2}}';\nreturn msg;","outputs":1,"noerr":0,"x":435.99999237060547,"y":555.00563621521,"wires":[["401cbf93.c6f38"]]},{"id":"26a87fd3.8acc4","type":"inject","z":"db5de8db.903328","name":"R1 Reg (0000017E40000002)","topic":"00124b00043a9766","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"x":164.9999771118164,"y":559.00563621521,"wires":[["1decdfb4.f7537"]]},{"id":"475fc090.dfcb6","type":"inject","z":"db5de8db.903328","name":"R2 Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":123.01426696777344,"y":1256.0056195259094,"wires":[["2e275eac.e9b5c2"]]},{"id":"ee6947ae.334de8","type":"function","z":"db5de8db.903328","name":"R1 Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":2,\"Code\":0,\"Parameter\":{\"wifi-macaddr\":\"0000017E40000003\",\"wifi-channel\":6,\"ip\":\"192.168.1.1\",\"port\":3669,\"zdt-address\":\"00124b00043a9776\",\"zdr-address\":\"00124b00043a9775\",\"pan-id\":3,\"zdt-fw-version\":2,\"zdr-fw-version\":2}}';\nreturn msg;","outputs":1,"noerr":0,"x":433.99700927734375,"y":1196.0007886886597,"wires":[["401cbf93.c6f38"]]},{"id":"b9ebbe16.16d7a","type":"inject","z":"db5de8db.903328","name":"R2 Reg (0000017E40000003)","topic":"00124b00043a9776","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"x":162.9969940185547,"y":1200.0007886886597,"wires":[["ee6947ae.334de8"]]},{"id":"2e275eac.e9b5c2","type":"function","z":"db5de8db.903328","name":"R2 Report","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":5,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"0000017E40000003\",\"tag-number\":0}}';\nreturn msg;","outputs":1,"noerr":0,"x":419.0142517089844,"y":1254.0056085586548,"wires":[["401cbf93.c6f38"]]},{"id":"66e6a1d6.68a61","type":"function","z":"db5de8db.903328","name":"T1 Report","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":6,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00554b00043a9755\",\"parent-ieeeadr\":\"00124b00043a9766\",\"power\":86,\"total-image-crc\":\"0XB856\",\"rssi\":16}}';\nreturn msg;","outputs":1,"noerr":0,"x":444.99999237060547,"y":750.9147758483887,"wires":[["401cbf93.c6f38"]]},{"id":"a3ca4fee.72f1a","type":"inject","z":"db5de8db.903328","name":"T1 Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":127.00000762939453,"y":751.9147486686707,"wires":[["66e6a1d6.68a61"]]},{"id":"84c0fef7.f43e5","type":"function","z":"db5de8db.903328","name":"T1 Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":3,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00554b00043a9755\",\"tx-level\":10,\"image-crc\":\"0XB853\",\"rssi\":16,\"channel\":6,\"fw-version\":3,\"default-image\":true}}';\nreturn msg;","outputs":1,"noerr":0,"x":446.9969940185547,"y":688.9099893569946,"wires":[["401cbf93.c6f38"]]},{"id":"5e600afd.566a44","type":"inject","z":"db5de8db.903328","name":"T1 Reg (00554b00043a9755)","topic":"","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"x":175.99697875976562,"y":692.9099893569946,"wires":[["84c0fef7.f43e5"]]},{"id":"c07db3f3.78ff2","type":"function","z":"db5de8db.903328","name":"T1-2 Report &nbsp;Chan","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":6,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00554b00043a9766\",\"parent-ieeeadr\":\"00124b00043a9766\",\"power\":68,\"total-image-crc\":\"0XB822\",\"rssi\":3}}';\nreturn msg;\n\n// pw, im-crc, rssi","outputs":1,"noerr":0,"x":410.99999237060547,"y":1020.7327938079834,"wires":[["401cbf93.c6f38"]]},{"id":"af975dd9.6b549","type":"inject","z":"db5de8db.903328","name":"T1-2 Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":101.00001525878906,"y":1017.7327723503113,"wires":[["c07db3f3.78ff2"]]},{"id":"c2b1bd95.adc45","type":"function","z":"db5de8db.903328","name":"T1-2 Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":3,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00554b00043a9766\",\"tx-level\":10,\"image-crc\":\"0XB888\",\"rssi\":6,\"channel\":6,\"fw-version\":3,\"default-image\":true}}';\nreturn msg;","outputs":1,"noerr":0,"x":424.99698638916016,"y":932.7280254364014,"wires":[["401cbf93.c6f38"]]},{"id":"941638f7.596728","type":"inject","z":"db5de8db.903328","name":"T1-2 Reg (00554b00043a9766)","topic":"","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"x":163.9969711303711,"y":936.7280254364014,"wires":[["c2b1bd95.adc45"]]},{"id":"d4e26a05.42a378","type":"function","z":"db5de8db.903328","name":"GW premit-tag-list-rsp","func":"msg.payload='{\"Cmd-Type\":3,\"Trasnsaction-Id\":5786,\"Cmd-Id\":262,\"Code\":0,\"Parameter\":{\"device-ieeeadr-index\":0,\"device-ieeeadr-count\":2,\"device-ieeeadr-list\":[\"00554b00043a9755\",\"00554b00043a9766\"]}}';\nreturn msg;","outputs":1,"noerr":0,"x":447.0142135620117,"y":263.0056610107422,"wires":[["401cbf93.c6f38"]]},{"id":"9a08d1fa.5eab8","type":"inject","z":"db5de8db.903328","name":"GW Reply","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":166.01419067382812,"y":263.00567150115967,"wires":[["d4e26a05.42a378"]]},{"id":"352f9129.e8d32e","type":"function","z":"db5de8db.903328","name":"GW router-list-rsp","func":"msg.payload='{\"Cmd-Type\":3,\"Trasnsaction-Id\":5786,\"Cmd-Id\":265,\"Code\":0,\"Parameter\":{\"device-ieeeadr-index\":0,\"device-ieeeadr-count\":2,\"device-ieeeadr-list\":[\"00124b00043a9766\",\"00124b00043a9776\"]}}';\nreturn msg;","outputs":1,"noerr":0,"x":428.0000228881836,"y":349.00567626953125,"wires":[["401cbf93.c6f38"]]},{"id":"cb626539.984328","type":"inject","z":"db5de8db.903328","name":"GW Reply","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":157,"y":349.00568675994873,"wires":[["352f9129.e8d32e"]]},{"id":"146474d3.4a95bb","type":"mqtt in","z":"db5de8db.903328","name":"ESL_RCV","topic":"/esl/action","qos":"0","broker":"280ce450.3c51ec","x":140.0142059326172,"y":1538.914794921875,"wires":[["bcaf913c.f8e5d"]]},{"id":"bcaf913c.f8e5d","type":"debug","z":"db5de8db.903328","name":"","active":true,"console":"false","complete":"false","x":392.0056495666504,"y":1538.8125352859497,"wires":[]},{"id":"dfbad0d3.2712f","type":"comment","z":"db5de8db.903328","name":"ESL MQTT Recv","info":"","x":302,"y":1459,"wires":[]},{"id":"8a6411ff.ac192","type":"comment","z":"db5de8db.903328","name":"ESL MQTT SDK Send","info":"","x":537,"y":44,"wires":[]},{"id":"280ce450.3c51ec","type":"mqtt-broker","z":"","broker":"172.22.12.213","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]</pre>

Latest revision as of 03:40, 8 February 2018

RESTful API Path Rule for WSNManage

 This document is about EIS RESTful API service of Wireless Sensor Manage (WSNManage). There are two major classes in WSNManage service one is "Connectiviy" another is "SenHub". Connectivity is wireless interfaces information in the EIS IoT Gateway solution. "SenHub" is short of sensor hub. 

Connectivity

Method: GET

Path: restapi/WSNManage/Connectivity

-> All Capability ( without data )

{
 "IoTGW": {
  "Zigbee": {
   "0000852CF4B7B0E8": {
    "Info": {
            "e":[ {"n":"DeviceList", "sv":"", "asm":"r"},   
                {"n":"device-number", "v":0, "asm":"r"},                 
                {"n":"permit-tag-list","sv":"","asm":"rw"},
                {"n":"add-permit-tag-list","sv":"","asm":"w"},
                {"n":"remove-permit-tag-list","sv":"","asm":"w"},
                {"n":"zd-securekey", "sv":"","asm":"w"},
                {"n":"tx-level", "v":16, "asm":"rw"},
                {"n":"pan-id","v":1, "asm":"r"},
                {"n":"zd-fw-version", "v":1, "asm":"r"},
                {"n":"reboot", "bv":0, "asm":"rw"}],
    "bn": "Info"    
    },
    "bn": "0000852CF4B7B0E8",
    "ver": 1
   },
   "bn": "Zigbee"
  },
  "ver": 1,
  "bn": "IoTGW"
 }
}

Path: rstapi/WSNManage/Connectivity/IoTGW/Zigbee/0000852CF4B7B0E8/Info

Reply: with latest data value

{
   "e": [
            "e":[ {"n":"DeviceList", "sv":"", "asm":"r"},   
                {"n":"device-number", "v":2, "asm":"r"},                 
                {"n":"permit-tag-list","sv":"0000001077C25002,0000001077C25001","asm":"rw"},
                {"n":"add-permit-tag-list","sv":"","asm":"w"},
                {"n":"remove-permit-tag-list","sv":"","asm":"w"},
                {"n":"zd-securekey", "sv":"","asm":"w"},
                {"n":"tx-level", "v":16, "asm":"rw"},
                {"n":"pan-id","v":1, "asm":"r"},
                {"n":"zd-fw-version", "v":1, "asm":"r"},
                {"n":"reboot", "bv":0, "asm":"rw"}],
   "bn": "Info"
}

Method: Put

Path: restapi/WSNManage/Connectivity/IoTGW/Zigbee/0000852CF4B7B0E8/Info/reset

Data: 

{"bv":1}

Reply: HTTP Code: 200

Data: 

{"bv":1}

Device

Method Get:

Device

1.Path: restapi/WSNManage/SenHub/AllDeviceList

Reply:

{"n":"AllDeviceList","sv":"xxxxxx,0017000E40000001,xxxxx"}

2. Path: restapi/WSNManage/SenHub/<DeviceID>/DevInfo

Reply by Router:

{
    "devID": "88880034115521a4",
    "hostname": "ESL-Router-1:a4",
    "sn": "00:34:11:55:21:a4",
    "mac": "00:34:11:55:21:a4",
    "version": "3.1.23",
    "type": "Router",
    "product": "ESL-Router",
    "manufacture": "",
    "status": "1",
    "commCmd": 1,
    "requestID": 30002,
    "agentID": "88880034115521a4",
    "handlerName": "general",
    "parentID": "",
    "sendTS": 1513231576828
}

Reply by Tag ( SenHub )

{
    "devID": "0000001077C25002",
    "hostname": "ESL-Tag-5002",
    "sn": "0000001077C25002",
    "mac": "0000001077C25002",
    "version": "3.1.23",
    "type": "Tag",
    "product": "ESL-Tag",
    "manufacture": "",
    "status": "1",
    "commCmd": 1,
    "requestID": 30002,
    "agentID": "0000001077C25002",
    "handlerName": "general",
    "parentID": "88880034115521a4",
    "sendTS": 1513231580989
}

Device Capability and Data

3. Path: restapi/WSNManage/SenHub/<DeviceID>

Reply: Capability ( without data ) with Router

{
    "IoTGW": {
        "Zigbee": {
            "0022000E40000022": {
                "Info": {
                    "e": [
                        {"n": "DeviceList","sv": "","asm": "r"},
                        {"n": "device-number","v": 0,"asm": "r"},
                        {"n": "tx-level-t","v": 5,"asm": "rw","min":1,"max":10 }, // min/max?
                        {"n": "tx-level-r","v": 5,"asm": "rw","min":1,"max":10 },
                        {"n": "zd-fw-version","sv":"t-10010", "asm": "r"},                        
                        {"n": "reboot","bv": 0,"asm": "rw"}
                    ],
                    "bn": "Info"
                },
                "bn": "0022000E40000022",
                "ver": 1
            },
            "bn": "Zigbee"
        },
        "HostGateway": "0000852CF4B7B0E8",
        "ver": 1,
        "bn": "IoTGW"
    }
}
Reply: Capability ( without data ) with Tag
{
  "SenHub":{
        "SenData":{
            "e":[{"n":"image-crc","sv":"ff10","asm":"r"},
                 {"n":"resolution","sv":"","asm":"r"}],
        "bn":"SenData"
        },
        "Info":{
            "e":[{"n":"data-request-period","v":60,"asm":"rw","min":30,"max":3600},
                 {"n":"state-report-period","v":3600,"asm":"rw","min":60,"max":86400},
                 {"n":"timeout","v":30,"asm":"rw","min":1,"max":60},
                 {"n":"battery","v":70,"asm":"r","min":0,"max":100,"u":"%"},
                 {"n":"fw-version","sv":1541,"asm":"r"}],
        "bn":"Info"
        },
        "Net":{
            "e":[{"n":"tx-level","v":1,"asm":"r"},
                {"n":"rssi","v":-30,"asm":"r"},
                {"n":"channel","v":18,"asm":"r"}],
        "bn":"Net"
        },
        "Action":{
            "e":[{"n":"image-update","sv":"","asm":"w","encode":"base64","type":"octe-stream"},
                 {"n":"refresh-image","bv":0,"asm":"rw"},
                 {"n":"reboot","bv":0,"asm":"rw"},
                 {"n":"reset-to-default","bv":0,"asm":"rw"}],
        "bn":"Action"
        }
    }
}

 4. Path: restapi/WSNManage/SenHub/<DeviceID>/SenHub

Reply: with latest data value 

{ 
  "SenHub": { 
        "SenData": {
                   "e":[ {"n":"image-crc","sv":"ff10","asm":"r"}], 
        "bn":"SenData" 
        }, 
        "Info": {
                 "e":[{"n":"update-period","v":60,"asm":"rw"}, {"n":"timeout","v":30}, {"n":"battry":76},{"n":"fw-version","v":1}], 
        "bn":"Info" 
        },
        "Net": {
                "e":[{"n":"zd-tx-power","v":1}, {"n":"rssi","v":36}, {"n":"channel","v":11}, {"n":"fw-version","v":1}],
        "bn":"Net" 
        }, 
        "Action": {
                "e":[{"n":"image-update","sv":""}, {"n":"refresh-image","bv":0},{"n":"reboot","bv":0}, {"n":"reset-to-default","bv":0}, {"n":"fw-update","sv":""}], 
        "bn":"Action" 
       } 
 "bn":"SenHub" 
 } 
}

5. Path:restapi/WSNManage/SenHub/<DeviceID>/SenHub/SenData

Reply: with latest data

{ 
 "SenData": { 
             "e":[ {"n":"image-crc","sv":"ff10","asm":"r"},
                   {"n":"resolution","sv":"","asm":"r"}], 
 "bn":"SenData" 
}

6. restapi/WSNManage/SenHub/<DeviceID>/SenHub/SenData/image-crc​

Reply: with latest data

{"n":"image-crc","sv":"ff10","asm":"r"}

Method Put

EIS RESTful only supports change one resource in each request.

Ex: To chagne SenHub's Name by 'PUT' RESTful method

Path: restapi/WSNManage/SenHub/<DeviceID>/SenHub/SenData/GPI01

Data: 

{"bv":1}

Reply: HTTP Code: 200 OK

Data: 

{"bv":1}

ESL API

FW Update

GW Zigbee FW

Path:/restapi/WSNManage/ESL/GW/All/zd-fw-update

Method: Put

Data:

{"zd-fw-name":"gw-zd-v1","zd-fw-version":2,"zd-fw-crc":"f6d8"}

Reply: HTTP Code: 202

{"sv": "ACCEPTED GW FW Update "}

All Router Zigbee FW

Path: /restapi/WSNManage/ESL/Router/All/zd-fw-update

Method: Put

Data:

{"zd-t-fw-name":"router-zd-t-v1","zd-t-fw-version":1,"zd-t-fw-crc":"ff63", "zd-r-fw-name":"router-zd-r-v1","zd-r-fw-version":1,"zd-r-fw-crc":"ff63"}

Reply: HTTP Code: 202

{"sv": "ACCEPTED All Routers FW Update "}

All Tag Zigbee FW

Path: /restapi/WSNManage/ESL/Tag/All/zd-fw-update

Method: Put

Data:

{"zd-fw-name":"tag-zd-v1","zd-fw-version":1,"zd-fw-crc":"f1c0"}

Reply: HTTP Code: 202

{"sv": "ACCEPTED All Tags FW Update "}

GW Web Management

Path: /restapi/WSNManage/ESL/GW/All/DevInfo

Method: Get

Reply:  HTTP Code: 200

{
 "List": [
  {
   "ID": "-",
   "Data": [{"n": "Router Number","v": 2},
            {"n": "Zigbee","sv": "50c27710425a5350"}],
   "RF": [{"n": "TX Power","v": 12}]
  }
 ]
}

Path: /restapi/WSNManage/ESL/Router/All/DevInfo

Method: Get

Reply:  HTTP Code: 200

{
 "List": [
  {
   "ID": " 00000034115521a4",
   "Data": [{"n": "Tag Number","v": 360},
            {"n": "Zigbee","sv": "0000001077C25009"}],
   "RF": [{"n": "TX Power","v": 10}]
  },
  {
   "ID": "00000050BA485303",
   "Data": [{"n": "Tag Number","v": 36},
            {"n": "Zigbee","sv": "0000001077C250096"}],
   "RF": [{"n": "TX Power","v": 12}]
  }
 ]
}

Path: /restapi/WSNManage/ESL/Router/<ID>/TagInfo

Method: Get

Reply:  HTTP Code: 200

{
    "List": [
        {
            "ID": " 0000001077C25001",
            "Data": [{"n": "Image-CRC","sv": "ffc6"},
                     {"n": "Zigbee","sv": "0000001077C25001"}],
            "RF": [{"n": "TX Power","v": 10}]
        },
        {
            "ID": "0000001077C25002",
            "Data": [{"n": "Image-CRC","sv": "f96e"},
                     {"n": "Zigbee","sv": "0000001077C25002"}],
            "RF": [{"n": "TX Power","v": 12}]
        },
        {
            "ID": "0000001077C25003",
            "Data": [{"n": "Image-CRC","sv": "c49e"},
                     {"n": "Zigbee","sv": "0000001077C25003"}],
            "RF": [{"n": "TX Power","v": 12}]
        }
    ]
}

WebSocket Service

WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is being standardized by the W3C.

WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or server application. The WebSocket Protocol is an independent TCP-based protocol. Its only relationship to HTTP is that its handshake is interpreted by HTTP servers as an Upgrade request.[1] The WebSocket protocol makes more interaction between a browser and a web server possible, facilitating the real-time data transfer from and to the server. This is made possible by providing a standardized way for the server to send content to the browser without being solicited by the client, and allowing for messages to be passed back and forth while keeping the connection open. In this way, a two-way (bi-directional) ongoing conversation can take place between a browser and the server. The communications are done over TCP port number 80, which is of benefit for those environments which block non-web Internet connections using a firewall. Similar two-way browser-server communications have been achieved in non-standardized ways using stopgap technologies such as Comet.


API-Manage Websocket JSON Data Format

{"n":"<GroupName>","event":"event Type","data":{JSON Obj}}


Websocket of WSNManage 

Endpoint: ws://ServerIP:Port/WSNManage

Client request Server by this Endpoint to require "WSNManage" service. Server will auto push WSNManage event to client.

Please refer to "WSNManage evnent message" for WSNManage's event and data format.

WSNManage evnent message

events:[
     {"event":"eConnectivity_Capability"}, // => Update Connectivity Capability ( Without data )
     {"event":"eConnectivity_UpdateData"}, // => Update Connectivity's Data
     {"event":"eDevice_Connected"},        // => A new SenHub connected
     {"event":"eDevice_Disconnect"},       // => A SenHub is disconnected
     {"event":"eDevice_Capability"},       // => Update a SenHub's Capability ( Without Data )
     {"event":"eDevice_UpdateData"}]       // => Update SenHub's Data

Updtae Connectivity's Capability

event: eConnectivity_Capability

data:

{
    "IoTGW": {
        "Zigbee": {
            "0000852CF4B7B0E8": {
                "Info": {
                    "e": [
                        {"n": "DeviceList","sv": ",","asm": "r"},
                        {"n": "premit-tag-list","sv": "","asm": "rw"},
                        {"n": "pan-id","v": 1,"asm": "r"},
                        {"n": "zd-fw-version","v": 1,"asm": "r"},           
                        {"n": "all-tag-image-update","sv": "","asm": "w","type":"octe-stream","encode":"base64"},
                        {"n": "reboot","bv": 0,"asm": "rw"}
                    ],
                    "bn": "Info"
                },
                "bn": "0000852CF4B7B0E8",
                "ver": 1
            },
            "bn": "Zigbee"
        },
        "HostGateway": "",
        "ver": 1,
        "bn": "IoTGW"
    }
}

Updtae data value of connectivity

event Type: eConnectivity_UpdateData

data: Update DeviceList

{
    "IoTGW": {
        "Zigbee": {
            "0000852CF4B7B0E8": {
                "Info": {
                    "e": [{"n": "DeviceList","sv": "0000852CF4B7BABB"}],
                "bn": "Info"
                },
                "bn": "0000852CF4B7B0E8",
                "ver": 1
            },
            "bn": "Zigbee"
        },
        "bn": "IoTGW"
    }
}

A new Device connected

event Type: eDevice_Connected

data:

{
  "susiCommData": {
        "devID":"0017000E40000001",
        "hostname":"AAA",
        "sn":"0017000E40000001",
        "mac":"0017000E40000001",
        "version":"3.1.23",
        "type":"SenHub",
        "product":"WISE-101x",
        "manufacture":"",
        "status":"1",
        "commCmd":1,
        "requestID":30002,
        "agentID":"0017000E40000001",
        "handlerName":"general",
        "sendTS":160081026
   }
}

A Device disconnected

event Type: eDevice_Disconnect

data:

{
  "susiCommData": {
        "devID":"0017000E40000001",
        "hostname":"AAA",
        "sn":"0017000E40000001",
        "mac":"0017000E40000001",
        "version":"3.1.23",
        "type":"SenHub",
        "product":"WISE-101x",
        "manufacture":"",
        "status":"0",
        "commCmd":1,
        "requestID":30002,
        "agentID":"0017000E40000001",
        "handlerName":"general",
        "sendTS":160081026
   }
}

Update capbaility of a Tag

event Type: eDevice_Capability

data: Reply: Capability ( without data ) by Tag

{
   "SenHub": {
           "SenData": { 
                      "e":[ {"n":"image-crc","sv":"","asm":"r"}],
             "bn":"SenData"
           },
           "Info": {
                   "e":[{"n":"update-period","v":60,"asm":"rw","min":30, "max":3600},
                        {"n":"timeout","v":30,"asm":"rw","min":1, "max":60},
                        {"n":"fw-version","v":1,"asm":"r"}],
           "bn":"Info"
           },
           "Net": {
                   "e":[{"n":"tx-level","v":1,"asm":"rw"},
                        {"n":"rssi","v":36,"asm":"r"},
                        {"n":"channel","v":11,"asm":"r", "min":11, "max":36}],
           "bn":"Net"
           },
           "Action": {
                   "e":[{"n":"image-update","sv":"","asm":"w", "encode":"base64","type":"octe-stream"}, 
                        {"n":"refresh-image","bv":0,"asm":"rw"}, 
                        {"n":"reboot","bv":0,"asm":"rw"},
                        {"n":"reset-to-default","bv":0,"asm":"rw"},
                        {"n":"fw-update","sv":"","asm":"w", "encode":"base64","type":"octe-stream"}], 
          "bn":"Action"
          }
    "bn":"SenHub"
    }
}

Update data value of a Tag

event Type: eDevice_UpdateData

data: Reply: Capability ( without data ) by Tag

{
   "SenHub": {
           "SenData": { 
                      "e":[ {"n":"image-crc","sv":"0xC6EB8EA8"}],
             "bn":"SenData"
           }
    "bn":"SenHub"
    }
}

ESL Simulator

WISE-PaaS/ESL

RTENOTITLE

GW
 00000001-0000-0000-0000-017E40000001
 MAC: 00:0B:AB:6F:37:52
    Zigbee
        00124b00043a9749
 
 Router-1
 00000001-0000-0000-0000-0050BA485303
 WiFi MAC: 00:50:BA:48:53:03
 IP: 172.22.12.85
    Zigbee
        00124b00043a9766
        
 Router-
 00000001-0000-0000-0000-0034115521a4
 WiFi MAC: 00:34:11:55:21:a4
 IP: 172.22.12.86
    Zigbee
        00124b00043a9776
 
 Tag-1
 00000001-0000-0000-50c2-7710425a5347
    MAC:50c27710425a5347 
        image:0XB853

 Tag-2
 00000001-0000-0000-50c2-7710425a5348
    MAC:50c27710425a5348
        image:0XB888
 Tag-3
 00000001-0000-0000-0000-001077C25001
    MAC:0000001077C25001
        image:0XB899


For WISE-PaaS/RMM3.3

GW x 1

[{"id":"d8e8833e.7baf","type":"mqtt out","z":"fde929ec.69cc38","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1158.9999923706055,"y":338.00001287460327,"wires":[]},{"id":"b935a416.695758","type":"delay","z":"fde929ec.69cc38","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":309,"y":287,"wires":[["810a3dcc.ee96"]]},{"id":"5e970d04.4e1f44","type":"function","z":"fde929ec.69cc38","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_GW\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"IoTGW\",\"product\":\"ESL-GW\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":464.0000228881836,"y":119.9999885559082,"wires":[["9c649db2.be9b7"]]},{"id":"810a3dcc.ee96","type":"function","z":"fde929ec.69cc38","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"IoTGW\",\"osVersion\":\"OpenWRT\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv7\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":541,"y":288,"wires":[["33b9c533.5ed11a"]]},{"id":"813c1537.5e5e58","type":"delay","z":"fde929ec.69cc38","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":329,"y":546,"wires":[["d2233f9f.791a7"]]},{"id":"24175ea.ac3c8a2","type":"delay","z":"fde929ec.69cc38","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":301,"y":416,"wires":[["9a13262e.a0d048","813c1537.5e5e58"]]},{"id":"44102883.d70b18","type":"comment","z":"fde929ec.69cc38","name":"WISEAgent Connect","info":"","x":468.00003814697266,"y":67.9999885559082,"wires":[]},{"id":"657a55d2.0151dc","type":"comment","z":"fde929ec.69cc38","name":"Capability","info":"","x":487,"y":362,"wires":[]},{"id":"b55d1b70.8e93c8","type":"inject","z":"fde929ec.69cc38","name":"GW Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":98.99999237060547,"y":287.99999618530273,"wires":[["b935a416.695758","370e2543.81d80a","24175ea.ac3c8a2"]]},{"id":"7f44c5e2.ab26ac","type":"function","z":"fde929ec.69cc38","name":"deviceinfo","func":"msg.topic=context.global.topicprefix+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":745,"y":546.9999389648438,"wires":[["f1bdd2d0.c2df3"]]},{"id":"33b9c533.5ed11a","type":"function","z":"fde929ec.69cc38","name":"agentactionreq","func":"msg.topic=context.global.topicprefix+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":731.9999580383301,"y":341,"wires":[["f1bdd2d0.c2df3"]]},{"id":"9c649db2.be9b7","type":"function","z":"fde929ec.69cc38","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":730.999927520752,"y":122.99997901916504,"wires":[["f1bdd2d0.c2df3"]]},{"id":"182e9ad6.a5e185","type":"comment","z":"fde929ec.69cc38","name":"RMM Topic","info":"","x":707.9999656677246,"y":68.99999618530273,"wires":[]},{"id":"9a13262e.a0d048","type":"function","z":"fde929ec.69cc38","name":"GW InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9749\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"premit-tag-list\",\"sv\":\"\",\"asm\":\"rw\"},{\"n\":\"pan-id\",\"v\":1,\"asm\":\"r\"},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9749\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":479,"y":416,"wires":[["33b9c533.5ed11a"]]},{"id":"d2233f9f.791a7","type":"function","z":"fde929ec.69cc38","name":"GW Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9749\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"0000017E40000002,0000017E40000003\",\"asm\":\"r\"},{\"n\":\"premit-tag-list\",\"sv\":\"00554b00043a9755,00554b00043a9766,00554b00043a9777\",\"asm\":\"rw\"},{\"n\":\"pan-id\",\"v\":1,\"asm\":\"r\"},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9749\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":487,"y":547,"wires":[["7f44c5e2.ab26ac"]]},{"id":"f1bdd2d0.c2df3","type":"function","z":"fde929ec.69cc38","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":971.999942779541,"y":338.9999752044678,"wires":[["d8e8833e.7baf","633d1beb.49cad4"]]},{"id":"6de6e236.fe33fc","type":"comment","z":"fde929ec.69cc38","name":"Replace AgentID","info":"","x":989.9999313354492,"y":65.99999618530273,"wires":[]},{"id":"9340b233.f258","type":"comment","z":"fde929ec.69cc38","name":"Update Value","info":"","x":488,"y":499,"wires":[]},{"id":"633d1beb.49cad4","type":"debug","z":"fde929ec.69cc38","name":"","active":true,"console":"false","complete":"true","x":1138.9999923706055,"y":251.00001287460327,"wires":[]},{"id":"370e2543.81d80a","type":"function","z":"fde929ec.69cc38","name":"deviceID ( V )","func":"context.global.devID='0000017E40000001';\n// 0000017E40000001\n\ncontext.global.topicprefix='/cagent/admin/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":223.99998474121094,"y":119.99998474121094,"wires":[["5e970d04.4e1f44"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.45","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

Router x 2

[{"id":"e7571bbf.5fb0e8","type":"mqtt out","z":"ce76ef7e.4f588","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1150,"y":365.00001668930054,"wires":[]},{"id":"4cf76aec.a93b64","type":"delay","z":"ce76ef7e.4f588","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":300.00000762939453,"y":314.00000381469727,"wires":[["a7bea00b.45691"]]},{"id":"f14102e7.2445d","type":"function","z":"ce76ef7e.4f588","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Router\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"IoTGW\",\"product\":\"ESL-Router\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":457.0000305175781,"y":144,"wires":[["4413db22.6f98e4"]]},{"id":"a7bea00b.45691","type":"function","z":"ce76ef7e.4f588","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Router\",\"osVersion\":\"Yocto\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv9\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":532.0000076293945,"y":315.00000381469727,"wires":[["39b99c32.154b14"]]},{"id":"ba0b1a0c.289b38","type":"delay","z":"ce76ef7e.4f588","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":320.00000762939453,"y":573.0000038146973,"wires":[["d2d559e5.0b9fe8"]]},{"id":"debb716c.a27db","type":"delay","z":"ce76ef7e.4f588","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":292.00000762939453,"y":443.00000381469727,"wires":[["696e5e07.f4c7","ba0b1a0c.289b38"]]},{"id":"49d4924b.79c89c","type":"comment","z":"ce76ef7e.4f588","name":"WISEAgent Connect","info":"","x":459.0000457763672,"y":94.99999237060547,"wires":[]},{"id":"4aa6a749.590048","type":"comment","z":"ce76ef7e.4f588","name":"Capability","info":"","x":473,"y":394,"wires":[]},{"id":"cb84e58e.05c798","type":"inject","z":"ce76ef7e.4f588","name":"R1 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":90,"y":315,"wires":[["4cf76aec.a93b64","1305b4bf.917d8b","debb716c.a27db"]]},{"id":"a1d4b0a.068d35","type":"function","z":"ce76ef7e.4f588","name":"deviceinfo","func":"msg.topic=context.global.topicprefix1+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":735.9999771118164,"y":577.9999589920044,"wires":[["2c4d357d.670cca"]]},{"id":"39b99c32.154b14","type":"function","z":"ce76ef7e.4f588","name":"agentactionreq","func":"msg.topic=context.global.topicprefix1+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":722.9999656677246,"y":368.00000381469727,"wires":[["2c4d357d.670cca"]]},{"id":"4413db22.6f98e4","type":"function","z":"ce76ef7e.4f588","name":"agentinfoack","func":"msg.topic=context.global.topicprefix1+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":721.9999351501465,"y":149.9999828338623,"wires":[["2c4d357d.670cca"]]},{"id":"8ffcd4ec.40d088","type":"comment","z":"ce76ef7e.4f588","name":"RMM Topic","info":"","x":698.9999732971191,"y":96,"wires":[]},{"id":"696e5e07.f4c7","type":"function","z":"ce76ef7e.4f588","name":"R1 InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9766\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9766\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"0000017E40000001\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":470.00000762939453,"y":443.00000381469727,"wires":[["39b99c32.154b14"]]},{"id":"d2d559e5.0b9fe8","type":"function","z":"ce76ef7e.4f588","name":"R1 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9766\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"00554b00043a9755,00554b00043a9766\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9766\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"0000017E40000001\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":484,"y":577,"wires":[["a1d4b0a.068d35"]]},{"id":"2c4d357d.670cca","type":"function","z":"ce76ef7e.4f588","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID1);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID1);\nreturn msg;","outputs":1,"noerr":0,"x":962.9999504089355,"y":365.99997901916504,"wires":[["e7571bbf.5fb0e8","be7f6247.29139"]]},{"id":"e9d11725.41f638","type":"comment","z":"ce76ef7e.4f588","name":"Replace AgentID","info":"","x":980.9999389648438,"y":93,"wires":[]},{"id":"4cc80f1d.8872","type":"comment","z":"ce76ef7e.4f588","name":"Update Value","info":"","x":479.00000762939453,"y":526.0000038146973,"wires":[]},{"id":"be7f6247.29139","type":"debug","z":"ce76ef7e.4f588","name":"","active":true,"console":"false","complete":"true","x":1130,"y":278.00001668930054,"wires":[]},{"id":"1305b4bf.917d8b","type":"function","z":"ce76ef7e.4f588","name":"deviceID R1 ( V )","func":"context.global.devID1='0000017E40000002';\n// 0000017E40000002\n\ncontext.global.topicprefix1='/cagent/admin/'+context.global.devID1+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":221.99999237060547,"y":145.9999885559082,"wires":[["f14102e7.2445d"]]},{"id":"3159bc9d.83c974","type":"mqtt out","z":"ce76ef7e.4f588","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1135,"y":901,"wires":[]},{"id":"38c2659b.cfc9da","type":"delay","z":"ce76ef7e.4f588","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":285.00000762939453,"y":849.9999871253967,"wires":[["868277bd.ddba38"]]},{"id":"db2c2f71.69c04","type":"function","z":"ce76ef7e.4f588","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Router\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"IoTGW\",\"product\":\"ESL-Router\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":442.0000305175781,"y":679.9999833106995,"wires":[["f3ba3e10.20741"]]},{"id":"868277bd.ddba38","type":"function","z":"ce76ef7e.4f588","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Router\",\"osVersion\":\"Yocto\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv9\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":517.0000076293945,"y":850.9999871253967,"wires":[["9d4aa642.ed0a18"]]},{"id":"ddcbd36b.b6ae4","type":"delay","z":"ce76ef7e.4f588","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":305.00000762939453,"y":1108.9999871253967,"wires":[["e9b2a174.a851c"]]},{"id":"3a9076ad.92fe8a","type":"delay","z":"ce76ef7e.4f588","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":277.00000762939453,"y":978.9999871253967,"wires":[["95c82586.4fc958","ddcbd36b.b6ae4"]]},{"id":"40303239.78a1cc","type":"comment","z":"ce76ef7e.4f588","name":"Capability","info":"","x":458,"y":929.9999833106995,"wires":[]},{"id":"ec63ea27.eac7b8","type":"inject","z":"ce76ef7e.4f588","name":"R2 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":75,"y":850.9999833106995,"wires":[["38c2659b.cfc9da","6e87d31e.3c46cc","3a9076ad.92fe8a"]]},{"id":"a6f1dc00.582728","type":"function","z":"ce76ef7e.4f588","name":"deviceinfo","func":"msg.topic=context.global.topicprefix2+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":720.9999771118164,"y":1113.9999423027039,"wires":[["82226c18.7419d"]]},{"id":"9d4aa642.ed0a18","type":"function","z":"ce76ef7e.4f588","name":"agentactionreq","func":"msg.topic=context.global.topicprefix2+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":707.9999656677246,"y":903.9999871253967,"wires":[["82226c18.7419d"]]},{"id":"f3ba3e10.20741","type":"function","z":"ce76ef7e.4f588","name":"agentinfoack","func":"msg.topic=context.global.topicprefix2+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":706.9999351501465,"y":685.9999661445618,"wires":[["82226c18.7419d"]]},{"id":"95c82586.4fc958","type":"function","z":"ce76ef7e.4f588","name":"R2 InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9776\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9776\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"0000017E40000001\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":455.00000762939453,"y":978.9999871253967,"wires":[["9d4aa642.ed0a18"]]},{"id":"e9b2a174.a851c","type":"function","z":"ce76ef7e.4f588","name":"R2 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9776\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"00554b00043a9777\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9776\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"0000017E40000001\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":469,"y":1112.9999833106995,"wires":[["a6f1dc00.582728"]]},{"id":"82226c18.7419d","type":"function","z":"ce76ef7e.4f588","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID2);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID2);\nreturn msg;","outputs":1,"noerr":0,"x":947.9999504089355,"y":901.9999623298645,"wires":[["3159bc9d.83c974","a1341b89.cf8658"]]},{"id":"e6a46d7d.1a932","type":"comment","z":"ce76ef7e.4f588","name":"Update Value","info":"","x":464.00000762939453,"y":1061.9999871253967,"wires":[]},{"id":"a1341b89.cf8658","type":"debug","z":"ce76ef7e.4f588","name":"","active":false,"console":"false","complete":"true","x":1115,"y":814,"wires":[]},{"id":"6e87d31e.3c46cc","type":"function","z":"ce76ef7e.4f588","name":"deviceID R2 ( V )","func":"context.global.devID2='0000017E40000003';\n// 0000017E40000003\n\ncontext.global.topicprefix2='/cagent/admin/'+context.global.devID2+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":206.99999237060547,"y":681.9999718666077,"wires":[["db2c2f71.69c04"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.45","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

Tag x 3

[{"id":"a4951e1a.31592","type":"mqtt out","z":"cb7d3963.d83ff8","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1139,"y":363.00001668930054,"wires":[]},{"id":"e5d0da41.986f88","type":"delay","z":"cb7d3963.d83ff8","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":289.00000762939453,"y":312.00000381469727,"wires":[["87b9fa92.c04398"]]},{"id":"a2f070be.9cb0e","type":"function","z":"cb7d3963.d83ff8","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Tag\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"SenHub\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":446.0000305175781,"y":142,"wires":[["a01cd7e3.0947b8"]]},{"id":"87b9fa92.c04398","type":"function","z":"cb7d3963.d83ff8","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Tag\",\"osVersion\":\"RTOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Snail\",\"osArch\":\"Cotex-M4\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":521.0000076293945,"y":313.00000381469727,"wires":[["27ce02a6.ee2d6e"]]},{"id":"50d2332b.cbef3c","type":"delay","z":"cb7d3963.d83ff8","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":309.00000762939453,"y":571.0000038146973,"wires":[["a6419946.8fd9e8"]]},{"id":"5bed6c9d.bddad4","type":"delay","z":"cb7d3963.d83ff8","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":281.00000762939453,"y":441.00000381469727,"wires":[["4c94115f.dfe2f","50d2332b.cbef3c"]]},{"id":"d930155f.1fbc88","type":"comment","z":"cb7d3963.d83ff8","name":"WISEAgent Connect","info":"","x":448.0000457763672,"y":92.99999237060547,"wires":[]},{"id":"7e069df9.dfe834","type":"comment","z":"cb7d3963.d83ff8","name":"Capability","info":"","x":462,"y":392,"wires":[]},{"id":"c00b15be.64c4c8","type":"inject","z":"cb7d3963.d83ff8","name":"T1 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":79,"y":313,"wires":[["e5d0da41.986f88","f129d443.b7f458","5bed6c9d.bddad4"]]},{"id":"b4286b0c.1f0798","type":"function","z":"cb7d3963.d83ff8","name":"deviceinfo","func":"msg.topic=context.global.topicprefix1+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":724.9999771118164,"y":575.9999589920044,"wires":[["97208f78.9be57"]]},{"id":"27ce02a6.ee2d6e","type":"function","z":"cb7d3963.d83ff8","name":"agentactionreq","func":"msg.topic=context.global.topicprefix1+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":711.9999656677246,"y":366.00000381469727,"wires":[["97208f78.9be57"]]},{"id":"a01cd7e3.0947b8","type":"function","z":"cb7d3963.d83ff8","name":"agentinfoack","func":"msg.topic=context.global.topicprefix1+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":710.9999351501465,"y":147.9999828338623,"wires":[["97208f78.9be57"]]},{"id":"5b3cc830.969228","type":"comment","z":"cb7d3963.d83ff8","name":"RMM Topic","info":"","x":687.9999732971191,"y":94,"wires":[]},{"id":"4c94115f.dfe2f","type":"function","z":"cb7d3963.d83ff8","name":"Tag InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":459.00000762939453,"y":441.00000381469727,"wires":[["27ce02a6.ee2d6e"]]},{"id":"a6419946.8fd9e8","type":"function","z":"cb7d3963.d83ff8","name":"T1 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB853\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":68,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":473,"y":575,"wires":[["b4286b0c.1f0798"]]},{"id":"97208f78.9be57","type":"function","z":"cb7d3963.d83ff8","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID1);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID1);\nreturn msg;","outputs":1,"noerr":0,"x":951.9999504089355,"y":363.99997901916504,"wires":[["a4951e1a.31592","c1d29236.e7c5d"]]},{"id":"dc4bbc2.d60ad4","type":"comment","z":"cb7d3963.d83ff8","name":"Replace AgentID","info":"","x":969.9999389648438,"y":91,"wires":[]},{"id":"2a9f98dc.0170e8","type":"comment","z":"cb7d3963.d83ff8","name":"Update Value","info":"","x":468.00000762939453,"y":524.0000038146973,"wires":[]},{"id":"c1d29236.e7c5d","type":"debug","z":"cb7d3963.d83ff8","name":"","active":true,"console":"false","complete":"true","x":1119,"y":276.00001668930054,"wires":[]},{"id":"f129d443.b7f458","type":"function","z":"cb7d3963.d83ff8","name":"deviceID T1 ( V )","func":"context.global.devID1='00554b00043a9755';\n// 00124b00043a9766\n\ncontext.global.topicprefix1='/cagent/admin/'+context.global.devID1+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":210.99999237060547,"y":143.9999885559082,"wires":[["a2f070be.9cb0e"]]},{"id":"d2711b99.d5ed58","type":"mqtt out","z":"cb7d3963.d83ff8","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1160,"y":904,"wires":[]},{"id":"76879bdf.ecd8b4","type":"delay","z":"cb7d3963.d83ff8","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":310.00000762939453,"y":852.9999871253967,"wires":[["60f92dd.55871d4"]]},{"id":"f97d0333.05a66","type":"function","z":"cb7d3963.d83ff8","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Tag\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"SenHub\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":467.0000305175781,"y":682.9999833106995,"wires":[["74406350.86267c"]]},{"id":"60f92dd.55871d4","type":"function","z":"cb7d3963.d83ff8","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Tag\",\"osVersion\":\"RTOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Snail\",\"osArch\":\"Cotex-M4\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":542.0000076293945,"y":853.9999871253967,"wires":[["8f9ce08d.39714"]]},{"id":"903e2d02.98daa","type":"delay","z":"cb7d3963.d83ff8","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":330.00000762939453,"y":1111.9999871253967,"wires":[["5bee436.e09fcbc"]]},{"id":"e83d81bd.dc4c8","type":"delay","z":"cb7d3963.d83ff8","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":302.00000762939453,"y":981.9999871253967,"wires":[["a558028d.cce43","903e2d02.98daa"]]},{"id":"5b2ece4f.bff2c","type":"comment","z":"cb7d3963.d83ff8","name":"Capability","info":"","x":483,"y":932.9999833106995,"wires":[]},{"id":"180c1f36.87cb11","type":"inject","z":"cb7d3963.d83ff8","name":"T2 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":100,"y":853.9999833106995,"wires":[["76879bdf.ecd8b4","46d82b23.f65054","e83d81bd.dc4c8"]]},{"id":"75929b2e.7bff04","type":"function","z":"cb7d3963.d83ff8","name":"deviceinfo","func":"msg.topic=context.global.topicprefix1+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":745.9999771118164,"y":1116.9999423027039,"wires":[["b1ad6ea6.ae619"]]},{"id":"8f9ce08d.39714","type":"function","z":"cb7d3963.d83ff8","name":"agentactionreq","func":"msg.topic=context.global.topicprefix1+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":732.9999656677246,"y":906.9999871253967,"wires":[["b1ad6ea6.ae619"]]},{"id":"74406350.86267c","type":"function","z":"cb7d3963.d83ff8","name":"agentinfoack","func":"msg.topic=context.global.topicprefix1+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":731.9999351501465,"y":688.9999661445618,"wires":[["b1ad6ea6.ae619"]]},{"id":"a558028d.cce43","type":"function","z":"cb7d3963.d83ff8","name":"Tag InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":480.00000762939453,"y":981.9999871253967,"wires":[["8f9ce08d.39714"]]},{"id":"5bee436.e09fcbc","type":"function","z":"cb7d3963.d83ff8","name":"T2 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB888\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":90,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":82,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":68,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":494,"y":1115.9999833106995,"wires":[["75929b2e.7bff04"]]},{"id":"b1ad6ea6.ae619","type":"function","z":"cb7d3963.d83ff8","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID1);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID1);\nreturn msg;","outputs":1,"noerr":0,"x":972.9999504089355,"y":904.9999623298645,"wires":[["d2711b99.d5ed58","99d9da3b.2cd638"]]},{"id":"a926c609.1a7e58","type":"comment","z":"cb7d3963.d83ff8","name":"Update Value","info":"","x":489.00000762939453,"y":1064.9999871253967,"wires":[]},{"id":"99d9da3b.2cd638","type":"debug","z":"cb7d3963.d83ff8","name":"","active":true,"console":"false","complete":"true","x":1140,"y":817,"wires":[]},{"id":"46d82b23.f65054","type":"function","z":"cb7d3963.d83ff8","name":"deviceID T2 ( V )","func":"context.global.devID1='00554b00043a9766';\n// 00554b00043a9766\n\ncontext.global.topicprefix1='/cagent/admin/'+context.global.devID1+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":231.99999237060547,"y":684.9999718666077,"wires":[["f97d0333.05a66"]]},{"id":"b497245c.89d958","type":"mqtt out","z":"cb7d3963.d83ff8","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1180,"y":1438,"wires":[]},{"id":"8a1dbf8f.d0a45","type":"delay","z":"cb7d3963.d83ff8","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":330.00000762939453,"y":1386.9999871253967,"wires":[["e07ccceb.f507d"]]},{"id":"da6651f4.decbc","type":"function","z":"cb7d3963.d83ff8","name":"Connect Info","func":"msg.payload='{\"susiCommData\":{\"devID\":\"AAAAA\",\"hostname\":\"ESL_Tag\",\"sn\":\"BBBBB\",\"mac\":\"BBBBB\",\"version\":\"3.1.23\",\"type\":\"SenHub\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"status\":\"1\",\"commCmd\":1,\"requestID\":30002,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081026}}';\nreturn msg;","outputs":1,"noerr":0,"x":487.0000305175781,"y":1216.9999833106995,"wires":[["9e137740.42fce8"]]},{"id":"e07ccceb.f507d","type":"function","z":"cb7d3963.d83ff8","name":"OS Info","func":"msg.payload='{\"susiCommData\":{\"osInfo\":{\"cagentVersion\":\"3.1.23\",\"cagentType\":\"Tag\",\"osVersion\":\"RTOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Snail\",\"osArch\":\"Cotex-M4\",\"totalPhysMemKB\":123,\"macs\":\"AAAAA\",\"IP\":\"192.168.0.10\"},\"commCmd\":116,\"requestID\":109,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":1466730390}}';\nreturn msg;","outputs":1,"noerr":0,"x":562.0000076293945,"y":1387.9999871253967,"wires":[["19549991.3f29a6"]]},{"id":"da5affdb.2b4d7","type":"delay","z":"cb7d3963.d83ff8","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":350.00000762939453,"y":1645.9999871253967,"wires":[["6aae090a.f44ef8"]]},{"id":"6d4cd530.191d4c","type":"delay","z":"cb7d3963.d83ff8","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":322.00000762939453,"y":1515.9999871253967,"wires":[["8d664e74.d7e5b","da5affdb.2b4d7"]]},{"id":"81549865.0b7f58","type":"comment","z":"cb7d3963.d83ff8","name":"Capability","info":"","x":503,"y":1466.9999833106995,"wires":[]},{"id":"ea199052.bbf02","type":"inject","z":"cb7d3963.d83ff8","name":"T3 Connect","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":1387.9999833106995,"wires":[["8a1dbf8f.d0a45","309c02f0.0a0ade","6d4cd530.191d4c"]]},{"id":"18c9906e.02095","type":"function","z":"cb7d3963.d83ff8","name":"deviceinfo","func":"msg.topic=context.global.topicprefix1+'deviceinfo';\nreturn msg;\n","outputs":1,"noerr":0,"x":765.9999771118164,"y":1650.9999423027039,"wires":[["38c39541.53873a"]]},{"id":"19549991.3f29a6","type":"function","z":"cb7d3963.d83ff8","name":"agentactionreq","func":"msg.topic=context.global.topicprefix1+'agentactionreq';\nreturn msg;","outputs":1,"noerr":0,"x":752.9999656677246,"y":1440.9999871253967,"wires":[["38c39541.53873a"]]},{"id":"9e137740.42fce8","type":"function","z":"cb7d3963.d83ff8","name":"agentinfoack","func":"msg.topic=context.global.topicprefix1+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":751.9999351501465,"y":1222.9999661445618,"wires":[["38c39541.53873a"]]},{"id":"8d664e74.d7e5b","type":"function","z":"cb7d3963.d83ff8","name":"Tag InfoSpec","func":"msg.payload='{\"susiCommData\":{\"infoSpec\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":500.00000762939453,"y":1515.9999871253967,"wires":[["19549991.3f29a6"]]},{"id":"6aae090a.f44ef8","type":"function","z":"cb7d3963.d83ff8","name":"T3 Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB899\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":65,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":53,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":8,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":86,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":514,"y":1649.9999833106995,"wires":[["18c9906e.02095"]]},{"id":"38c39541.53873a","type":"function","z":"cb7d3963.d83ff8","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g,+ context.global.devID1);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID1);\nreturn msg;","outputs":1,"noerr":0,"x":992.9999504089355,"y":1438.9999623298645,"wires":[["b497245c.89d958","91e07c84.60358"]]},{"id":"735d27c.fc0bcd8","type":"comment","z":"cb7d3963.d83ff8","name":"Update Value","info":"","x":509.00000762939453,"y":1598.9999871253967,"wires":[]},{"id":"91e07c84.60358","type":"debug","z":"cb7d3963.d83ff8","name":"","active":true,"console":"false","complete":"true","x":1160,"y":1351,"wires":[]},{"id":"309c02f0.0a0ade","type":"function","z":"cb7d3963.d83ff8","name":"deviceID T3 ( V )","func":"context.global.devID1='00554b00043a9777';\n// 00554b00043a9777\n\ncontext.global.topicprefix1='/cagent/admin/'+context.global.devID1+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":251.99999237060547,"y":1218.9999718666077,"wires":[["da6651f4.decbc"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.45","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

For WISE-PaaS/2.0

Communication Protocol for WISE-PaaS/2.0

GW x 1 + Router x 2

[{"id":"d7014f9c.30cc5","type":"mqtt out","z":"c67ffc50.3dd8c","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1181.0000267028809,"y":357.00001668930054,"wires":[]},{"id":"65a98c70.126d94","type":"delay","z":"c67ffc50.3dd8c","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":331.0000343322754,"y":306.00000381469727,"wires":[["525df1c3.c29fd"]]},{"id":"9ae9f00d.5ed98","type":"function","z":"c67ffc50.3dd8c","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"\",\"hostname\":\"ESL_GW\",\"sn\":\"AAAAA\",\"mac\":\"00:0B:AB:6F:37:52\",\"version\":\"1.0.6.0\",\"type\":\"IoTGW\",\"product\":\"ESL-GW\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":486.000057220459,"y":138.99999237060547,"wires":[["d19a6510.0e4ce8"]]},{"id":"525df1c3.c29fd","type":"function","z":"c67ffc50.3dd8c","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"IoTGW\",\"osVersion\":\"OpenWRT\",\"biosVersion\":\"V1.10\",\"platformName\":\"WISE-3610\",\"processorName\":\"ARMv7\",\"osArch\":\"arm\",\"totalPhysMemKB\":1973544,\"macs\":\"00:0B:AB:6F:37:52\",\"IP\":\"172.22.12.84\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":510.0000305175781,"y":306,"wires":[["3a2d261e.11047a"]]},{"id":"b3fce408.bc5918","type":"delay","z":"c67ffc50.3dd8c","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":350.0000305175781,"y":570,"wires":[["363cbf84.4f673"]]},{"id":"3e0dfb71.05cb74","type":"delay","z":"c67ffc50.3dd8c","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":323.0000343322754,"y":435.00000381469727,"wires":[["605b6fd6.fe6eb","b3fce408.bc5918"]]},{"id":"e5551d36.d1619","type":"comment","z":"c67ffc50.3dd8c","name":"WISEAgent Connect","info":"","x":490.00007247924805,"y":86.99999237060547,"wires":[]},{"id":"c04e1c29.9de1a","type":"comment","z":"c67ffc50.3dd8c","name":"Capability","info":"","x":509.0000343322754,"y":381.00000381469727,"wires":[]},{"id":"b63dbd49.63f45","type":"inject","z":"c67ffc50.3dd8c","name":"GW","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":101.00002670288086,"y":307,"wires":[["65a98c70.126d94","15cc9240.81b73e","3e0dfb71.05cb74"]]},{"id":"3a2d261e.11047a","type":"function","z":"c67ffc50.3dd8c","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":766,"y":437,"wires":[["9dfd6b88.3738b8"]]},{"id":"d19a6510.0e4ce8","type":"function","z":"c67ffc50.3dd8c","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":749.9999389648438,"y":138.99998474121094,"wires":[["9dfd6b88.3738b8"]]},{"id":"6cba0c9a.7e0e74","type":"comment","z":"c67ffc50.3dd8c","name":"Topic","info":"","x":720,"y":88,"wires":[]},{"id":"605b6fd6.fe6eb","type":"function","z":"c67ffc50.3dd8c","name":"InfoSpec","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9749\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"premit-tag-list\",\"sv\":\"\",\"asm\":\"rw\"},{\"n\":\"pan-id\",\"v\":1,\"asm\":\"r\"},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9749\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":491.0000343322754,"y":435.00000381469727,"wires":[["3a2d261e.11047a"]]},{"id":"363cbf84.4f673","type":"function","z":"c67ffc50.3dd8c","name":"Data","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9749\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"00000050BA485303,00000034115521a4\",\"asm\":\"r\"},{\"n\":\"premit-tag-list\",\"sv\":\"50c27710425a5347,50c27710425a5348,0000001077C25001\",\"asm\":\"rw\"},{\"n\":\"pan-id\",\"v\":1,\"asm\":\"r\"},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9749\",\"ver\":1},\"bn\":\"Zigbee\"},\"HostGateway\":\"\",\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":501.0000305175781,"y":574,"wires":[["c83f39f2.484098"]]},{"id":"9dfd6b88.3738b8","type":"function","z":"c67ffc50.3dd8c","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":999,"y":262.9999694824219,"wires":[["d7014f9c.30cc5","6ca208a5.f77e68"]]},{"id":"559c461d.6dfff8","type":"comment","z":"c67ffc50.3dd8c","name":"Replace AgentID","info":"","x":1011.9999656677246,"y":85,"wires":[]},{"id":"364d7b0a.8961a4","type":"comment","z":"c67ffc50.3dd8c","name":"Update Value","info":"","x":510.0000343322754,"y":518.0000038146973,"wires":[]},{"id":"6ca208a5.f77e68","type":"debug","z":"c67ffc50.3dd8c","name":"","active":true,"console":"false","complete":"true","x":1166,"y":262.00001525878906,"wires":[]},{"id":"15cc9240.81b73e","type":"function","z":"c67ffc50.3dd8c","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-0000-017E40000001';\n// 0000-017E40000001\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":246.00001907348633,"y":138.9999885559082,"wires":[["9ae9f00d.5ed98"]]},{"id":"c83f39f2.484098","type":"function","z":"c67ffc50.3dd8c","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":759,"y":576,"wires":[["9dfd6b88.3738b8"]]},{"id":"2f5ec821.1b8518","type":"mqtt out","z":"c67ffc50.3dd8c","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1177,"y":968,"wires":[]},{"id":"4a7ecc67.be97e4","type":"delay","z":"c67ffc50.3dd8c","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":327.00000762939453,"y":916.9999871253967,"wires":[["73e26bd8.722014"]]},{"id":"cef6cc75.23b51","type":"function","z":"c67ffc50.3dd8c","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-017E40000001\",\"hostname\":\"ESL-Router\",\"sn\":\"00:50:BA:48:53:03\",\"mac\":\"00:50:BA:48:53:03\",\"version\":\"1.0.6.0\",\"type\":\"IoTGW\",\"product\":\"ESL-Router\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":482.0000305175781,"y":749.9999756813049,"wires":[["3d146985.df24d6"]]},{"id":"73e26bd8.722014","type":"function","z":"c67ffc50.3dd8c","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Router\",\"osVersion\":\"Yocto\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv9\",\"totalPhysMemKB\":1973544,\"macs\":\"00:50:BA:48:53:03\",\"IP\":\"172.22.12.85\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":506.00000381469727,"y":916.9999833106995,"wires":[["563098a0.17ae88"]]},{"id":"66c83e7d.3e8a3","type":"delay","z":"c67ffc50.3dd8c","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":346.00000381469727,"y":1180.9999833106995,"wires":[["5bab9f3f.d3672"]]},{"id":"4e0f42bd.f3a98c","type":"delay","z":"c67ffc50.3dd8c","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":319.00000762939453,"y":1045.9999871253967,"wires":[["a0cd92e7.0047f","66c83e7d.3e8a3"]]},{"id":"7857689c.b42628","type":"comment","z":"c67ffc50.3dd8c","name":"WISEAgent Connect","info":"","x":486.0000457763672,"y":697.9999756813049,"wires":[]},{"id":"d2e9dcd7.62779","type":"comment","z":"c67ffc50.3dd8c","name":"Capability","info":"","x":505.00000762939453,"y":991.9999871253967,"wires":[]},{"id":"d855f500.8c2788","type":"inject","z":"c67ffc50.3dd8c","name":"R1","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":97,"y":917.9999833106995,"wires":[["4a7ecc67.be97e4","7af74c5e.70dd54","4e0f42bd.f3a98c"]]},{"id":"563098a0.17ae88","type":"function","z":"c67ffc50.3dd8c","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":761.9999732971191,"y":1047.9999833106995,"wires":[["5dfd764a.797f28"]]},{"id":"3d146985.df24d6","type":"function","z":"c67ffc50.3dd8c","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":745.9999122619629,"y":749.9999680519104,"wires":[["5dfd764a.797f28"]]},{"id":"e355fb41.2edaa8","type":"comment","z":"c67ffc50.3dd8c","name":"Topic","info":"","x":715.9999732971191,"y":698.9999833106995,"wires":[]},{"id":"a0cd92e7.0047f","type":"function","z":"c67ffc50.3dd8c","name":"InfoSpec","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9766\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":10,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9766\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":487.00000762939453,"y":1045.9999871253967,"wires":[["563098a0.17ae88"]]},{"id":"5bab9f3f.d3672","type":"function","z":"c67ffc50.3dd8c","name":"Data","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9766\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"50c27710425a5347,50c27710425a5348\"},{\"n\":\"tx-level\",\"v\":10},{\"n\":\"zd-fw-version\",\"v\":1},{\"n\":\"reboot\",\"bv\":0}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9766\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":497,"y":1191,"wires":[["9872385.dbce1c8"]]},{"id":"5dfd764a.797f28","type":"function","z":"c67ffc50.3dd8c","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":994.9999732971191,"y":873.9999527931213,"wires":[["2f5ec821.1b8518","ae7d5197.fd17c"]]},{"id":"c927f3f8.6b0e","type":"comment","z":"c67ffc50.3dd8c","name":"Replace AgentID","info":"","x":1007.9999389648438,"y":695.9999833106995,"wires":[]},{"id":"67181a00.c078b4","type":"comment","z":"c67ffc50.3dd8c","name":"Update Value","info":"","x":506.00000762939453,"y":1128.9999871253967,"wires":[]},{"id":"ae7d5197.fd17c","type":"debug","z":"c67ffc50.3dd8c","name":"","active":true,"console":"false","complete":"true","x":1161.9999732971191,"y":872.9999985694885,"wires":[]},{"id":"7af74c5e.70dd54","type":"function","z":"c67ffc50.3dd8c","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-0000-0050BA485303';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":241.99999237060547,"y":749.9999718666077,"wires":[["cef6cc75.23b51"]]},{"id":"9872385.dbce1c8","type":"function","z":"c67ffc50.3dd8c","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":753,"y":1190,"wires":[["5dfd764a.797f28"]]},{"id":"c8b2be68.39df8","type":"mqtt out","z":"c67ffc50.3dd8c","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1168,"y":1555,"wires":[]},{"id":"dc98c543.293f88","type":"delay","z":"c67ffc50.3dd8c","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":318.00000762939453,"y":1503.9999871253967,"wires":[["44652d5c.285fb4"]]},{"id":"fa9947c6.ca31d8","type":"function","z":"c67ffc50.3dd8c","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-017E40000001\",\"hostname\":\"ESL-Router\",\"sn\":\"00:34:11:55:21:a4\",\"mac\":\"00:34:11:55:21:a4\",\"version\":\"1.0.6.0\",\"type\":\"IoTGW\",\"product\":\"ESL-Router\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":473.0000305175781,"y":1336.999975681305,"wires":[["678ff89b.707868"]]},{"id":"44652d5c.285fb4","type":"function","z":"c67ffc50.3dd8c","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Router\",\"osVersion\":\"Yocto\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"WISEAgent\",\"osArch\":\"ARMv9\",\"totalPhysMemKB\":1973544,\"macs\":\"00:34:11:55:21:a4\",\"IP\":\"172.22.12.86\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":497.00000381469727,"y":1503.9999833106995,"wires":[["ce5cb463.3b6768"]]},{"id":"435c741a.361a0c","type":"delay","z":"c67ffc50.3dd8c","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":337.00000381469727,"y":1767.9999833106995,"wires":[["8b734bfb.ec3a18"]]},{"id":"b6eca396.32106","type":"delay","z":"c67ffc50.3dd8c","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":310.00000762939453,"y":1632.9999871253967,"wires":[["346abbed.4b2334","435c741a.361a0c"]]},{"id":"d46e932d.114e7","type":"comment","z":"c67ffc50.3dd8c","name":"WISEAgent Connect","info":"","x":477.0000457763672,"y":1284.999975681305,"wires":[]},{"id":"94fe3983.7934e8","type":"comment","z":"c67ffc50.3dd8c","name":"Capability","info":"","x":496.00000762939453,"y":1578.9999871253967,"wires":[]},{"id":"b48f7a72.368958","type":"inject","z":"c67ffc50.3dd8c","name":"R2","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":88,"y":1504.9999833106995,"wires":[["dc98c543.293f88","18a19849.08aa98","b6eca396.32106"]]},{"id":"ce5cb463.3b6768","type":"function","z":"c67ffc50.3dd8c","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":752.9999732971191,"y":1634.9999833106995,"wires":[["cd4f030d.1c97"]]},{"id":"678ff89b.707868","type":"function","z":"c67ffc50.3dd8c","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":736.9999122619629,"y":1336.9999680519104,"wires":[["cd4f030d.1c97"]]},{"id":"a668d61f.0b68f8","type":"comment","z":"c67ffc50.3dd8c","name":"Topic","info":"","x":706.9999732971191,"y":1285.9999833106995,"wires":[]},{"id":"346abbed.4b2334","type":"function","z":"c67ffc50.3dd8c","name":"InfoSpec","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9776\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"tx-level\",\"v\":12,\"asm\":\"rw\",\"min\":1,\"max\":20},{\"n\":\"zd-fw-version\",\"v\":1,\"asm\":\"r\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9776\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":478.00000762939453,"y":1632.9999871253967,"wires":[["ce5cb463.3b6768"]]},{"id":"8b734bfb.ec3a18","type":"function","z":"c67ffc50.3dd8c","name":"Data","func":"msg.payload='{\"content\":{\"IoTGW\":{\"Zigbee\":{\"00124b00043a9776\":{\"Info\":{\"e\":[{\"n\":\"DeviceList\",\"sv\":\"0000001077C25001\"},{\"n\":\"tx-level\",\"v\":8},{\"n\":\"zd-fw-version\",\"v\":1},{\"n\":\"reboot\",\"bv\":0}],\"bn\":\"Info\"},\"bn\":\"00124b00043a9776\",\"ver\":1},\"bn\":\"Zigbee\"},\"ver\":1,\"bn\":\"IoTGW\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":488,"y":1778,"wires":[["6d1b0a6.b3414f4"]]},{"id":"cd4f030d.1c97","type":"function","z":"c67ffc50.3dd8c","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":985.9999732971191,"y":1460.9999527931213,"wires":[["c8b2be68.39df8","403b178a.92cf08"]]},{"id":"f940dd8e.44166","type":"comment","z":"c67ffc50.3dd8c","name":"Replace AgentID","info":"","x":999.9999389648438,"y":1291,"wires":[]},{"id":"10a3672.208e499","type":"comment","z":"c67ffc50.3dd8c","name":"Update Value","info":"","x":497.00000762939453,"y":1715.9999871253967,"wires":[]},{"id":"403b178a.92cf08","type":"debug","z":"c67ffc50.3dd8c","name":"","active":true,"console":"false","complete":"true","x":1152.9999732971191,"y":1459.9999985694885,"wires":[]},{"id":"18a19849.08aa98","type":"function","z":"c67ffc50.3dd8c","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-0000-0034115521a4';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":232.99999237060547,"y":1336.9999718666077,"wires":[["fa9947c6.ca31d8"]]},{"id":"6d1b0a6.b3414f4","type":"function","z":"c67ffc50.3dd8c","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":744,"y":1777,"wires":[["cd4f030d.1c97"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.19","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

Tag x 3

[{"id":"cc26a084.23f35","type":"mqtt out","z":"c18080d8.3ed68","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1185,"y":353.00002431869507,"wires":[]},{"id":"6ce90049.2a038","type":"delay","z":"c18080d8.3ed68","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":335.00000762939453,"y":302.0000114440918,"wires":[["4c2c1759.500558"]]},{"id":"c721ba6e.cabfd8","type":"function","z":"c18080d8.3ed68","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-0050BA485303\",\"hostname\":\"ESL-Tag\",\"sn\":\"50c27710425a5347\",\"mac\":\"50c27710425a5347\",\"version\":\"1.0.6.0\",\"type\":\"Tag\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":490.0000305175781,"y":135,"wires":[["e09dac15.dc689"]]},{"id":"4c2c1759.500558","type":"function","z":"c18080d8.3ed68","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Tag\",\"osVersion\":\"mbedOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Agent\",\"osArch\":\"Cortex-M4\",\"totalPhysMemKB\":1973544,\"macs\":\"50c27710425a5347\",\"IP\":\"\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":514.0000038146973,"y":302.00000762939453,"wires":[["50fcd20.140ee3"]]},{"id":"38a61f67.37594","type":"delay","z":"c18080d8.3ed68","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":354.00000381469727,"y":566.0000076293945,"wires":[["b5861731.a56f78"]]},{"id":"97c4b590.214f18","type":"delay","z":"c18080d8.3ed68","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":327.00000762939453,"y":431.0000114440918,"wires":[["3adce0da.f5a34","38a61f67.37594"]]},{"id":"ef583ce3.ae81b","type":"comment","z":"c18080d8.3ed68","name":"WISEAgent Connect","info":"","x":494.0000457763672,"y":83,"wires":[]},{"id":"9b6910b1.f5b35","type":"comment","z":"c18080d8.3ed68","name":"Capability","info":"","x":513.0000076293945,"y":377.0000114440918,"wires":[]},{"id":"fba42c7.88d30d","type":"inject","z":"c18080d8.3ed68","name":"T1","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":105,"y":303.00000762939453,"wires":[["6ce90049.2a038","314a5e96.915bf2","97c4b590.214f18"]]},{"id":"50fcd20.140ee3","type":"function","z":"c18080d8.3ed68","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":769.9999732971191,"y":433.00000762939453,"wires":[["b8bcb98a.b8a068"]]},{"id":"e09dac15.dc689","type":"function","z":"c18080d8.3ed68","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":753.9999122619629,"y":134.99999237060547,"wires":[["b8bcb98a.b8a068"]]},{"id":"6b3b1f5e.c0e6f","type":"comment","z":"c18080d8.3ed68","name":"Topic","info":"","x":723.9999732971191,"y":84.00000762939453,"wires":[]},{"id":"3adce0da.f5a34","type":"function","z":"c18080d8.3ed68","name":"InfoSpec","func":"msg.payload='{\"content\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"resolution\",\"sv\":\"296x128\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":70,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":495.00000762939453,"y":431.0000114440918,"wires":[["50fcd20.140ee3"]]},{"id":"b5861731.a56f78","type":"function","z":"c18080d8.3ed68","name":"Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB853\"},{\"n\":\"resolution\",\"sv\":\"296x128\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60},{\"n\":\"state-report-period\",\"v\":3600},{\"n\":\"timeout\",\"v\":30},{\"n\":\"battery\",\"v\":70},{\"n\":\"fw-version\",\"v\":1}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":10},{\"n\":\"rssi\",\"v\":68}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\"},{\"n\":\"refresh-image\",\"bv\":0},{\"n\":\"reboot\",\"bv\":0},{\"n\":\"reset-to-default\",\"bv\":0}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":505,"y":576.0000243186951,"wires":[["5f8fbebb.7abf2"]]},{"id":"b8bcb98a.b8a068","type":"function","z":"c18080d8.3ed68","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":1002.9999732971191,"y":258.9999771118164,"wires":[["cc26a084.23f35","f3b36eaf.ea1aa"]]},{"id":"46ea6d8e.9f6e24","type":"comment","z":"c18080d8.3ed68","name":"Replace AgentID","info":"","x":1016.9999389648438,"y":89.00002431869507,"wires":[]},{"id":"51b79582.2485fc","type":"comment","z":"c18080d8.3ed68","name":"Update Value","info":"","x":514.0000076293945,"y":514.0000114440918,"wires":[]},{"id":"f3b36eaf.ea1aa","type":"debug","z":"c18080d8.3ed68","name":"","active":true,"console":"false","complete":"true","x":1169.9999732971191,"y":258.0000228881836,"wires":[]},{"id":"314a5e96.915bf2","type":"function","z":"c18080d8.3ed68","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-50c2-7710425a5347';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":249.99999237060547,"y":134.99999618530273,"wires":[["c721ba6e.cabfd8"]]},{"id":"5f8fbebb.7abf2","type":"function","z":"c18080d8.3ed68","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":761,"y":575.0000243186951,"wires":[["b8bcb98a.b8a068"]]},{"id":"ecfc0450.b9faf8","type":"mqtt out","z":"c18080d8.3ed68","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1185,"y":930,"wires":[]},{"id":"ada30a55.6d1df8","type":"delay","z":"c18080d8.3ed68","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":335.00000762939453,"y":878.9999871253967,"wires":[["9ce4e00b.52fc3"]]},{"id":"5d3b1ca4.85f3d4","type":"function","z":"c18080d8.3ed68","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-0050BA485303\",\"hostname\":\"ESL-Tag\",\"sn\":\"50c27710425a5348\",\"mac\":\"50c27710425a5348\",\"version\":\"1.0.6.0\",\"type\":\"Tag\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":490.0000305175781,"y":711.9999756813049,"wires":[["42c871e2.ba655"]]},{"id":"9ce4e00b.52fc3","type":"function","z":"c18080d8.3ed68","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Tag\",\"osVersion\":\"mbedOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Agent\",\"osArch\":\"Cortex-M4\",\"totalPhysMemKB\":1973544,\"macs\":\"50c27710425a5348\",\"IP\":\"\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":514.0000038146973,"y":878.9999833106995,"wires":[["39d1cf89.75583"]]},{"id":"62a79e3a.18736","type":"delay","z":"c18080d8.3ed68","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":354.00000381469727,"y":1142.9999833106995,"wires":[["c3f58ce9.3280f"]]},{"id":"1e9240ca.b73e4f","type":"delay","z":"c18080d8.3ed68","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":327.00000762939453,"y":1007.9999871253967,"wires":[["d34a0af1.ccc368","62a79e3a.18736"]]},{"id":"aa714a26.6da608","type":"comment","z":"c18080d8.3ed68","name":"WISEAgent Connect","info":"","x":494.0000457763672,"y":659.9999756813049,"wires":[]},{"id":"7199eb3d.57e2c4","type":"comment","z":"c18080d8.3ed68","name":"Capability","info":"","x":513.0000076293945,"y":953.9999871253967,"wires":[]},{"id":"e4022fc1.d1ea","type":"inject","z":"c18080d8.3ed68","name":"T2","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":105,"y":879.9999833106995,"wires":[["ada30a55.6d1df8","9158af20.33838","1e9240ca.b73e4f"]]},{"id":"39d1cf89.75583","type":"function","z":"c18080d8.3ed68","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":769.9999732971191,"y":1009.9999833106995,"wires":[["f2ede1f8.88a0b"]]},{"id":"42c871e2.ba655","type":"function","z":"c18080d8.3ed68","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":753.9999122619629,"y":711.9999680519104,"wires":[["f2ede1f8.88a0b"]]},{"id":"7abbec26.6d74e4","type":"comment","z":"c18080d8.3ed68","name":"Topic","info":"","x":723.9999732971191,"y":660.9999833106995,"wires":[]},{"id":"d34a0af1.ccc368","type":"function","z":"c18080d8.3ed68","name":"InfoSpec","func":"msg.payload='{\"content\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"resolution\",\"sv\":\"296x128\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":62,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":495.00000762939453,"y":1007.9999871253967,"wires":[["39d1cf89.75583"]]},{"id":"c3f58ce9.3280f","type":"function","z":"c18080d8.3ed68","name":"Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB888\"},{\"n\":\"resolution\",\"sv\":\"296x128\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":80},{\"n\":\"state-report-period\",\"v\":3600},{\"n\":\"timeout\",\"v\":30},{\"n\":\"battery\",\"v\":92},{\"n\":\"fw-version\",\"v\":1}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":8},{\"n\":\"rssi\",\"v\":62}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\"},{\"n\":\"refresh-image\",\"bv\":0},{\"n\":\"reboot\",\"bv\":0},{\"n\":\"reset-to-default\",\"bv\":0}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":505,"y":1153,"wires":[["6c293de8.026484"]]},{"id":"f2ede1f8.88a0b","type":"function","z":"c18080d8.3ed68","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":1002.9999732971191,"y":835.9999527931213,"wires":[["ecfc0450.b9faf8","19054792.230558"]]},{"id":"5ccce3da.62a52c","type":"comment","z":"c18080d8.3ed68","name":"Replace AgentID","info":"","x":1016.9999389648438,"y":666,"wires":[]},{"id":"b1fc5be4.ab6008","type":"comment","z":"c18080d8.3ed68","name":"Update Value","info":"","x":514.0000076293945,"y":1090.9999871253967,"wires":[]},{"id":"19054792.230558","type":"debug","z":"c18080d8.3ed68","name":"","active":true,"console":"false","complete":"true","x":1169.9999732971191,"y":834.9999985694885,"wires":[]},{"id":"9158af20.33838","type":"function","z":"c18080d8.3ed68","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-50c2-7710425a5348';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":249.99999237060547,"y":711.9999718666077,"wires":[["5d3b1ca4.85f3d4"]]},{"id":"6c293de8.026484","type":"function","z":"c18080d8.3ed68","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":761,"y":1152,"wires":[["f2ede1f8.88a0b"]]},{"id":"810d6531.501818","type":"mqtt out","z":"c18080d8.3ed68","name":"WISE-PaaS (V)","topic":"","qos":"0","retain":"","broker":"7c54e18.cf0132","x":1185,"y":1560,"wires":[]},{"id":"b6c7beb7.2dea9","type":"delay","z":"c18080d8.3ed68","name":"1 sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":335.00000762939453,"y":1508.9999871253967,"wires":[["9e2420c.07cc1e"]]},{"id":"b83122fe.e883","type":"function","z":"c18080d8.3ed68","name":"Connect Info","func":"msg.payload='{\"content\":{\"parentID\":\"00000001-0000-0000-0000-0034115521a4\",\"hostname\":\"ESL-Tag\",\"sn\":\"0000001077C25001\",\"mac\":\"0000001077C25001\",\"version\":\"1.0.6.0\",\"type\":\"Tag\",\"product\":\"ESL-Tag\",\"manufacture\":\"\",\"account\":\"\",\"passwd\":\"\",\"status\":1,\"tag\":\"RMM\"},\"commCmd\":1,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044370561}}';\nreturn msg;","outputs":1,"noerr":0,"x":490.0000305175781,"y":1341.999975681305,"wires":[["663878ea.74c1b8"]]},{"id":"9e2420c.07cc1e","type":"function","z":"c18080d8.3ed68","name":"OS Info","func":"msg.payload='{\"content\":{\"cagentVersion\":\"1.0.6.0\",\"cagentType\":\"Tag\",\"osVersion\":\"mbedOS\",\"biosVersion\":\"\",\"platformName\":\"\",\"processorName\":\"Agent\",\"osArch\":\"Cortex-M4\",\"totalPhysMemKB\":1973544,\"macs\":\"0000001077C25001\",\"IP\":\"\"},\"commCmd\":116,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":1510044371812}}';\nreturn msg;","outputs":1,"noerr":0,"x":514.0000038146973,"y":1508.9999833106995,"wires":[["fef4ef2f.4eef6"]]},{"id":"f8c8cad3.6fcd28","type":"delay","z":"c18080d8.3ed68","name":"20 ms","pauseType":"delay","timeout":"20","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":354.00000381469727,"y":1772.9999833106995,"wires":[["19319c16.d0c7d4"]]},{"id":"41024d9d.642e44","type":"delay","z":"c18080d8.3ed68","name":"1.2 s","pauseType":"delay","timeout":"1.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":327.00000762939453,"y":1637.9999871253967,"wires":[["1e54ded9.5afaa1","f8c8cad3.6fcd28"]]},{"id":"257bdc38.efdd44","type":"comment","z":"c18080d8.3ed68","name":"WISEAgent Connect","info":"","x":494.0000457763672,"y":1289.999975681305,"wires":[]},{"id":"889591c0.39807","type":"comment","z":"c18080d8.3ed68","name":"Capability","info":"","x":513.0000076293945,"y":1583.9999871253967,"wires":[]},{"id":"23612988.b43486","type":"inject","z":"c18080d8.3ed68","name":"T3","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":105,"y":1509.9999833106995,"wires":[["b6c7beb7.2dea9","bd84466.bcaefb8","41024d9d.642e44"]]},{"id":"fef4ef2f.4eef6","type":"function","z":"c18080d8.3ed68","name":"RMM/agentactionreq","func":"msg.topic=context.global.rmmtopicprefix+'agentactionack';\nreturn msg;","outputs":1,"noerr":0,"x":769.9999732971191,"y":1639.9999833106995,"wires":[["df58dacd.2188f8"]]},{"id":"663878ea.74c1b8","type":"function","z":"c18080d8.3ed68","name":"agentinfoack","func":"msg.topic=context.global.topicprefix+'agentinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":753.9999122619629,"y":1341.9999680519104,"wires":[["df58dacd.2188f8"]]},{"id":"f455e11d.f98c3","type":"comment","z":"c18080d8.3ed68","name":"Topic","info":"","x":723.9999732971191,"y":1290.9999833106995,"wires":[]},{"id":"1e54ded9.5afaa1","type":"function","z":"c18080d8.3ed68","name":"InfoSpec","func":"msg.payload='{\"content\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"\",\"asm\":\"r\"},{\"n\":\"resolution\",\"sv\":\"296x128\",\"asm\":\"r\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":60,\"asm\":\"rw\",\"min\":30,\"max\":3600},{\"n\":\"state-report-period\",\"v\":3600,\"asm\":\"rw\",\"min\":60,\"max\":86400},{\"n\":\"timeout\",\"v\":30,\"asm\":\"rw\",\"min\":1,\"max\":60},{\"n\":\"battery\",\"v\":62,\"asm\":\"r\",\"min\":0,\"max\":100,\"u\":\"%\"},{\"n\":\"fw-version\",\"v\":1,\"asm\":\"r\"}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":1,\"asm\":\"rw\"},{\"n\":\"rssi\",\"v\":36,\"asm\":\"r\"}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\",\"asm\":\"w\",\"encode\":\"base64\",\"type\":\"octe-stream\"},{\"n\":\"refresh-image\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reboot\",\"bv\":0,\"asm\":\"rw\"},{\"n\":\"reset-to-default\",\"bv\":0,\"asm\":\"rw\"}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":1510044371815}}},\"commCmd\":2052,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":{\"$date\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":495.00000762939453,"y":1637.9999871253967,"wires":[["fef4ef2f.4eef6"]]},{"id":"19319c16.d0c7d4","type":"function","z":"c18080d8.3ed68","name":"Data","func":"msg.payload='{\"susiCommData\":{\"data\":{\"SenHub\":{\"SenData\":{\"e\":[{\"n\":\"image-crc\",\"sv\":\"0XB899\"},{\"n\":\"resolution\",\"sv\":\"296x128\"}],\"bn\":\"SenData\"},\"Info\":{\"e\":[{\"n\":\"data-request-period\",\"v\":80},{\"n\":\"state-report-period\",\"v\":3600},{\"n\":\"timeout\",\"v\":30},{\"n\":\"battery\",\"v\":92},{\"n\":\"fw-version\",\"v\":1}],\"bn\":\"Info\"},\"Net\":{\"e\":[{\"n\":\"tx-level\",\"v\":8},{\"n\":\"rssi\",\"v\":62}],\"bn\":\"Net\"},\"Action\":{\"e\":[{\"n\":\"image-update\",\"sv\":\"\"},{\"n\":\"refresh-image\",\"bv\":0},{\"n\":\"reboot\",\"bv\":0},{\"n\":\"reset-to-default\",\"bv\":0}],\"bn\":\"Action\"},\"bn\":\"SenHub\",\"opTS\":{\"$date\":160081024}}},\"commCmd\":2055,\"requestID\":2001,\"agentID\":\"AAAAA\",\"handlerName\":\"general\",\"sendTS\":160081024}}';\nreturn msg;","outputs":1,"noerr":0,"x":505,"y":1783,"wires":[["286a2911.e88206"]]},{"id":"df58dacd.2188f8","type":"function","z":"c18080d8.3ed68","name":"Replace","func":"//msg.deviceID='000BABBB91CC';\n// 0000000BABBB91CC\n\n\n\n//msg.topicprefix='/cagent/admin/0000'+msg.deviceID+'/';\n\nmsg.payload=msg.payload.replace(/AAAAA/g, context.global.devID);\nmsg.payload=msg.payload.replace(/BBBBB/g, context.global.devID);\nreturn msg;","outputs":1,"noerr":0,"x":1002.9999732971191,"y":1465.9999527931213,"wires":[["810d6531.501818","41b29e0b.cffc3"]]},{"id":"40948516.797f2c","type":"comment","z":"c18080d8.3ed68","name":"Replace AgentID","info":"","x":1016.9999389648438,"y":1296,"wires":[]},{"id":"7bafa9d2.f0ad88","type":"comment","z":"c18080d8.3ed68","name":"Update Value","info":"","x":514.0000076293945,"y":1720.9999871253967,"wires":[]},{"id":"41b29e0b.cffc3","type":"debug","z":"c18080d8.3ed68","name":"","active":true,"console":"false","complete":"true","x":1169.9999732971191,"y":1464.9999985694885,"wires":[]},{"id":"bd84466.bcaefb8","type":"function","z":"c18080d8.3ed68","name":"deviceID ( V )","func":"context.global.devID='00000001-0000-0000-0000-001077C25001';\n\n\ncontext.global.topicprefix='/wisepaas/device/'+context.global.devID+'/';\ncontext.global.rmmtopicprefix='/wisepaas/RMM/'+context.global.devID+'/';\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":249.99999237060547,"y":1341.9999718666077,"wires":[["b83122fe.e883"]]},{"id":"286a2911.e88206","type":"function","z":"c18080d8.3ed68","name":"deviceinfoack ","func":"msg.topic=context.global.topicprefix+'deviceinfoack';\nreturn msg;","outputs":1,"noerr":0,"x":761,"y":1782,"wires":[["df58dacd.2188f8"]]},{"id":"7c54e18.cf0132","type":"mqtt-broker","z":"","broker":"172.22.12.19","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

ESL GS GW MQTT SDK

[{"id":"401cbf93.c6f38","type":"mqtt out","z":"db5de8db.903328","name":"ESL MQTT Broker","topic":"/esl/sdk","qos":"0","retain":"","broker":"280ce450.3c51ec","x":906.9998397827148,"y":225.00003814697266,"wires":[]},{"id":"3da72caa.0a55b4","type":"function","z":"db5de8db.903328","name":"GW Report","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":4,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00124b00043a9749\",\"router-number\":2}}';\nreturn msg;","outputs":1,"noerr":0,"x":474.9998779296875,"y":163.00002479553223,"wires":[["401cbf93.c6f38"]]},{"id":"c136797c.a1d6d8","type":"inject","z":"db5de8db.903328","name":"GW Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":169.9999771118164,"y":163.00002098083496,"wires":[["3da72caa.0a55b4"]]},{"id":"ee62283b.0ea568","type":"debug","z":"db5de8db.903328","name":"","active":true,"console":"false","complete":"true","x":925.9999809265137,"y":143.00000858306885,"wires":[]},{"id":"4995683f.c9fd38","type":"function","z":"db5de8db.903328","name":"R1 Report","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":5,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"0000017E40000002\",\"tag-number\":1}}';\nreturn msg;","outputs":1,"noerr":0,"x":439.0030288696289,"y":626.0104131698608,"wires":[["401cbf93.c6f38"]]},{"id":"261e6387.e84f1c","type":"inject","z":"db5de8db.903328","name":"R1 Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":111.00304412841797,"y":627.0103859901428,"wires":[["4995683f.c9fd38"]]},{"id":"dd267e6c.85fb","type":"function","z":"db5de8db.903328","name":"GW Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":1,\"Code\":0,\"Parameter\":{\"wifi-macaddr\":\"74:FE:48:19:D1:CD\",\"wifi-channel\":6,\"ip\":\"192.168.1.1\",\"port\":3669,\"zd-address\":\"00124b00043a9749\",\"pan-id\":3,\"zd-channel\":6,\"zd-fw-version\":8}}';\nreturn msg;","outputs":1,"noerr":0,"x":487.01422119140625,"y":91.00568103790283,"wires":[["401cbf93.c6f38"]]},{"id":"f7054299.1407b","type":"inject","z":"db5de8db.903328","name":"GW Reg","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":167.01419830322266,"y":93.0056791305542,"wires":[["dd267e6c.85fb"]]},{"id":"1decdfb4.f7537","type":"function","z":"db5de8db.903328","name":"R1 Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":2,\"Code\":0,\"Parameter\":{\"wifi-macaddr\":\"0000017E40000002\",\"wifi-channel\":6,\"ip\":\"192.168.1.1\",\"port\":3669,\"zdt-address\":\"00124b00043a9766\",\"zdr-address\":\"00124b00043a9765\",\"pan-id\":3,\"zdt-fw-version\":2,\"zdr-fw-version\":2}}';\nreturn msg;","outputs":1,"noerr":0,"x":435.99999237060547,"y":555.00563621521,"wires":[["401cbf93.c6f38"]]},{"id":"26a87fd3.8acc4","type":"inject","z":"db5de8db.903328","name":"R1 Reg (0000017E40000002)","topic":"00124b00043a9766","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"x":164.9999771118164,"y":559.00563621521,"wires":[["1decdfb4.f7537"]]},{"id":"475fc090.dfcb6","type":"inject","z":"db5de8db.903328","name":"R2 Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":123.01426696777344,"y":1256.0056195259094,"wires":[["2e275eac.e9b5c2"]]},{"id":"ee6947ae.334de8","type":"function","z":"db5de8db.903328","name":"R1 Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":2,\"Code\":0,\"Parameter\":{\"wifi-macaddr\":\"0000017E40000003\",\"wifi-channel\":6,\"ip\":\"192.168.1.1\",\"port\":3669,\"zdt-address\":\"00124b00043a9776\",\"zdr-address\":\"00124b00043a9775\",\"pan-id\":3,\"zdt-fw-version\":2,\"zdr-fw-version\":2}}';\nreturn msg;","outputs":1,"noerr":0,"x":433.99700927734375,"y":1196.0007886886597,"wires":[["401cbf93.c6f38"]]},{"id":"b9ebbe16.16d7a","type":"inject","z":"db5de8db.903328","name":"R2 Reg (0000017E40000003)","topic":"00124b00043a9776","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"x":162.9969940185547,"y":1200.0007886886597,"wires":[["ee6947ae.334de8"]]},{"id":"2e275eac.e9b5c2","type":"function","z":"db5de8db.903328","name":"R2 Report","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":5,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"0000017E40000003\",\"tag-number\":0}}';\nreturn msg;","outputs":1,"noerr":0,"x":419.0142517089844,"y":1254.0056085586548,"wires":[["401cbf93.c6f38"]]},{"id":"66e6a1d6.68a61","type":"function","z":"db5de8db.903328","name":"T1 Report","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":6,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00554b00043a9755\",\"parent-ieeeadr\":\"00124b00043a9766\",\"power\":86,\"total-image-crc\":\"0XB856\",\"rssi\":16}}';\nreturn msg;","outputs":1,"noerr":0,"x":444.99999237060547,"y":750.9147758483887,"wires":[["401cbf93.c6f38"]]},{"id":"a3ca4fee.72f1a","type":"inject","z":"db5de8db.903328","name":"T1 Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":127.00000762939453,"y":751.9147486686707,"wires":[["66e6a1d6.68a61"]]},{"id":"84c0fef7.f43e5","type":"function","z":"db5de8db.903328","name":"T1 Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":3,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00554b00043a9755\",\"tx-level\":10,\"image-crc\":\"0XB853\",\"rssi\":16,\"channel\":6,\"fw-version\":3,\"default-image\":true}}';\nreturn msg;","outputs":1,"noerr":0,"x":446.9969940185547,"y":688.9099893569946,"wires":[["401cbf93.c6f38"]]},{"id":"5e600afd.566a44","type":"inject","z":"db5de8db.903328","name":"T1 Reg (00554b00043a9755)","topic":"","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"x":175.99697875976562,"y":692.9099893569946,"wires":[["84c0fef7.f43e5"]]},{"id":"c07db3f3.78ff2","type":"function","z":"db5de8db.903328","name":"T1-2 Report  Chan","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":6,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00554b00043a9766\",\"parent-ieeeadr\":\"00124b00043a9766\",\"power\":68,\"total-image-crc\":\"0XB822\",\"rssi\":3}}';\nreturn msg;\n\n// pw, im-crc, rssi","outputs":1,"noerr":0,"x":410.99999237060547,"y":1020.7327938079834,"wires":[["401cbf93.c6f38"]]},{"id":"af975dd9.6b549","type":"inject","z":"db5de8db.903328","name":"T1-2 Report","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":101.00001525878906,"y":1017.7327723503113,"wires":[["c07db3f3.78ff2"]]},{"id":"c2b1bd95.adc45","type":"function","z":"db5de8db.903328","name":"T1-2 Reg","func":"msg.payload='{\"Cmd-Type\":1,\"Trasnsaction-Id\":0,\"Cmd-Id\":3,\"Code\":0,\"Parameter\":{\"device-ieeeadr\":\"00554b00043a9766\",\"tx-level\":10,\"image-crc\":\"0XB888\",\"rssi\":6,\"channel\":6,\"fw-version\":3,\"default-image\":true}}';\nreturn msg;","outputs":1,"noerr":0,"x":424.99698638916016,"y":932.7280254364014,"wires":[["401cbf93.c6f38"]]},{"id":"941638f7.596728","type":"inject","z":"db5de8db.903328","name":"T1-2 Reg (00554b00043a9766)","topic":"","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"x":163.9969711303711,"y":936.7280254364014,"wires":[["c2b1bd95.adc45"]]},{"id":"d4e26a05.42a378","type":"function","z":"db5de8db.903328","name":"GW premit-tag-list-rsp","func":"msg.payload='{\"Cmd-Type\":3,\"Trasnsaction-Id\":5786,\"Cmd-Id\":262,\"Code\":0,\"Parameter\":{\"device-ieeeadr-index\":0,\"device-ieeeadr-count\":2,\"device-ieeeadr-list\":[\"00554b00043a9755\",\"00554b00043a9766\"]}}';\nreturn msg;","outputs":1,"noerr":0,"x":447.0142135620117,"y":263.0056610107422,"wires":[["401cbf93.c6f38"]]},{"id":"9a08d1fa.5eab8","type":"inject","z":"db5de8db.903328","name":"GW Reply","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":166.01419067382812,"y":263.00567150115967,"wires":[["d4e26a05.42a378"]]},{"id":"352f9129.e8d32e","type":"function","z":"db5de8db.903328","name":"GW router-list-rsp","func":"msg.payload='{\"Cmd-Type\":3,\"Trasnsaction-Id\":5786,\"Cmd-Id\":265,\"Code\":0,\"Parameter\":{\"device-ieeeadr-index\":0,\"device-ieeeadr-count\":2,\"device-ieeeadr-list\":[\"00124b00043a9766\",\"00124b00043a9776\"]}}';\nreturn msg;","outputs":1,"noerr":0,"x":428.0000228881836,"y":349.00567626953125,"wires":[["401cbf93.c6f38"]]},{"id":"cb626539.984328","type":"inject","z":"db5de8db.903328","name":"GW Reply","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":157,"y":349.00568675994873,"wires":[["352f9129.e8d32e"]]},{"id":"146474d3.4a95bb","type":"mqtt in","z":"db5de8db.903328","name":"ESL_RCV","topic":"/esl/action","qos":"0","broker":"280ce450.3c51ec","x":140.0142059326172,"y":1538.914794921875,"wires":[["bcaf913c.f8e5d"]]},{"id":"bcaf913c.f8e5d","type":"debug","z":"db5de8db.903328","name":"","active":true,"console":"false","complete":"false","x":392.0056495666504,"y":1538.8125352859497,"wires":[]},{"id":"dfbad0d3.2712f","type":"comment","z":"db5de8db.903328","name":"ESL MQTT Recv","info":"","x":302,"y":1459,"wires":[]},{"id":"8a6411ff.ac192","type":"comment","z":"db5de8db.903328","name":"ESL MQTT SDK Send","info":"","x":537,"y":44,"wires":[]},{"id":"280ce450.3c51ec","type":"mqtt-broker","z":"","broker":"172.22.12.213","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]