Difference between revisions of "EnOcean Link Solution"

From ESS-WIKI
Jump to: navigation, search
Line 462: Line 462:
 
== <span style="font-size:x-large;">Gateway Configuration:</span> ==
 
== <span style="font-size:x-large;">Gateway Configuration:</span> ==
  
<span style="font-size:larger;">1. Download and Install RMM EI Agent 1.0.12 from [https://portal-rmm.wise-paas.com/main/system https://portal-rmm.wise-paas.com/main/system]<br/>2. Download and Install EoLinkManagerSetup_1.0.0B.exe from [https://www.dropbox.com/s/b02azh7tiqse2cy/EoLinkManagerSetup_1.0.0B.exe?dl=0 https://www.dropbox.com/s/b02azh7tiqse2cy/EoLinkManagerSetup_1.0.0B.exe?dl=0]<br/>3. Run APIGateway:<br/>&nbsp; &nbsp;cd C:\APIGateway<br/>&nbsp; &nbsp;node app.js</span>
+
<span style="font-size:larger;">1. Download RMM EI Agent 1.0.12 from [https://portal-rmm.wise-paas.com/main/system https://portal-rmm.wise-paas.com/main/system]&nbsp;and install to the Gateway.<br/>2. Download EoLinkManagerSetup_1.0.0B.exe from [https://www.dropbox.com/s/b02azh7tiqse2cy/EoLinkManagerSetup_1.0.0B.exe?dl=0 https://www.dropbox.com/s/b02azh7tiqse2cy/EoLinkManagerSetup_1.0.0B.exe?dl=0]&nbsp;and install to the Gateway.<br/>3. Run APIGateway:<br/>&nbsp; &nbsp; > cd C:\APIGateway<br/>&nbsp; &nbsp; > node app.js</span>
  
<span style="font-size:larger;">4. Open EoLinkManager.ini and set the configurations:<br/>&nbsp; &nbsp;notepad C:\Program Files (x86)\Advantech\EoLinkManager\EoLinkManager.ini</span>
+
<span style="font-size:larger;">4. Open EoLinkManager.ini and set the configurations:<br/>&nbsp; &nbsp; > notepad C:\Program Files (x86)\Advantech\EoLinkManager\EoLinkManager.ini</span>
  
<span style="font-size:larger;">&nbsp; &nbsp;------------------------------------------<br/>&nbsp; &nbsp;[Platform]<br/>&nbsp; &nbsp;InterfaceName=EoLink_Receiver<br/>&nbsp; &nbsp;ServerURL=172.22.12.175<br/>&nbsp; &nbsp;ModuleName=EoLinkMgr<br/>&nbsp; &nbsp;SensorName=LightTower_Sensor<br/>&nbsp; &nbsp;SerialPort=COM6<br/>&nbsp; &nbsp;ServerPort=1883<br/>&nbsp; &nbsp;------------------------------------------<br/>&nbsp; &nbsp;&nbsp;<br/>5. Run EoLinkManager:<br/>&nbsp; &nbsp;cd C:\Program Files (x86)\Advantech\EoLinkManager<br/>&nbsp; &nbsp;EoLinkManager.exe<br/>&nbsp; &nbsp;<br/>6. Open [https://portal-rmm.wise-paas.com/main/device https://portal-rmm.wise-paas.com/main/device] and add your device.</span>
+
<span style="font-size:larger;">&nbsp; &nbsp; ------------------------------------------<br/>&nbsp; &nbsp; [Platform]<br/>&nbsp; &nbsp; InterfaceName=EoLink_Receiver<br/>&nbsp; &nbsp; ServerURL=172.22.12.175<br/>&nbsp; &nbsp; ModuleName=EoLinkMgr<br/>&nbsp; &nbsp; SensorName=LightTower_Sensor<br/>&nbsp; &nbsp; SerialPort=COM6<br/>&nbsp; &nbsp; ServerPort=1883<br/>&nbsp; &nbsp; ------------------------------------------<br/>&nbsp; &nbsp;&nbsp;<br/>5. Run EoLinkManager:<br/>&nbsp; &nbsp; > cd C:\Program Files (x86)\Advantech\EoLinkManager<br/>&nbsp; &nbsp; > EoLinkManager.exe<br/>&nbsp; &nbsp;<br/>6. Open [https://portal-rmm.wise-paas.com/main/device https://portal-rmm.wise-paas.com/main/device] and add your device.</span>

Revision as of 10:34, 18 April 2018

System Architecture:

Rohm light tower sensor demokit 01.png
















EnOcean Sensor and Light Tower (chip & demo kit vendor: ROHM)

EnOcean light sensor 01.png













Sensor Communication Protocol:

EnOcean light sensor 03.png





Tower Light Data Format:

EnOcean light sensor 02.png












EnOcean Sample Program:

EnOcean light sensor 04.png









Data type and Data Format:

Agent ID (Sensor ID): String

Sensor Data: Unsigned Integer number

Data Capability in JSON:

{
  "susiCommData":{
     "infoSpec":{
        "SenHub":{
           "SenData":{
              "e":[
                 {
                    "n":"Light_1",
                    "u":"State",
                    "v":0,
                    "min":0,
                    "max":4,
                    "asm":"r",
                    "type":"d",
                    "rt":"",
                    "st":"ipso",
                    "exten":""
                 },
                 {
                    "n":"Light_2",
                    "u":"State",
                    "v":0,
                    "min":0,
                    "max":4,
                    "asm":"r",
                    "type":"d",
                    "rt":"",
                    "st":"ipso",
                    "exten":""
                 },
                 {
                    "n":"Light_3",
                    "u":"State",
                    "v":0,
                    "min":0,
                    "max":4,
                    "asm":"r",
                    "type":"d",
                    "rt":"",
                    "st":"ipso",
                    "exten":""
                 },
                 {
                    "n":"Light_4",
                    "u":"State",
                    "v":0,
                    "min":0,
                    "max":4,
                    "asm":"r",
                    "type":"d",
                    "rt":"",
                    "st":"ipso",
                    "exten":""
                 }
              ],
              "bn":"SenData"
           },
           "Info":{
              "e":[
                 {
                    "n":"Name",
                    "u":"",
                    "sv":"LightTower1",
                    "min":0,
                    "max":0,
                    "asm":"r",
                    "type":"s",
                    "rt":"",
                    "st":"ipso",
                    "exten":""
                 },
                 {
                    "n":"sw",
                    "u":"",
                    "sv":"1.0.00",
                    "min":0,
                    "max":0,
                    "asm":"r",
                    "type":"s",
                    "rt":"",
                    "st":"ipso",
                    "exten":""
                 }
              ],
              "bn":"Info"
           },
           "Net":{
              "e":[
                 {
                    "n":"sw",
                    "u":"",
                    "sv":"2.0.0.0",
                    "min":0,
                    "max":0,
                    "asm":"r",
                    "type":"s",
                    "rt":"",
                    "st":"ipso",
                    "exten":""
                 },
                 {
                    "n":"Neighbor",
                    "u":"",
                    "sv":"",
                    "min":0,
                    "max":0,
                    "asm":"r",
                    "type":"s",
                    "rt":"",
                    "st":"ipso",
                    "exten":""
                 },
                 {
                    "n":"Health",
                    "u":"",
                    "v":100,
                    "min":0,
                    "max":0,
                    "asm":"r",
                    "type":"d",
                    "rt":"",
                    "st":"ipso",
                    "exten":""
                 }
              ],
              "bn":"Net"
           },
           "Action":{
              "e":[
              ],
              "bn":"Action"
           },
           "ver":1
        }
     },
     "commCmd":2052,
     "requestID":2001,
     "agentID":"0017000004016940",
     "handlerName":"general",
     "sendTS":160081024
  }
}

Data Format in JSON:

{
  "susiCommData":{
     "data":{
        "SenHub":{
           "SenData":{
              "e":[
                 {
                    "n":"Light_1",
                    "v":0
                 },
                 {
                    "n":"Light_2",
                    "v":0
                 },
                 {
                    "n":"Light_3",
                    "v":0
                 },
                 {
                    "n":"Light_4",
                    "v":0
                 }
              ],
              "bn":"SenData"
           },
           "ver":1
        }
     },
     "commCmd":2055,
     "requestID":2001,
     "agentID":"0017000004016940",
     "handlerName":"general",
     "sendTS":160081028
  }
}

Protocol Specification:

http://ess-wiki.advantech.com.tw/wiki/images/d/d9/Advantech_EnOcean_light_tower_2018.03.18.pdf


Dashboard Configuration:

1. Sign in WISE-PaaS Dashboard using your User ID and Password:

    https://dashboard-grafana-eiot.wise-paas.com

Tower Light 03-1.png






2. Drop down “Home” and select Tower Light Board.

    Board name: Advantech EIoT DTOS Tower Light Monitoring


Tower Light 04-1.png




Tower Light 05-1.png



3. You will see the board is showed like this when all lights off:

Tower Light 01 .png






4. You will see the board is showed like this when all lights on:

Tower Light 02 .png








5. Drop down “Tower Light” and select “Edit” to edit the widget’s HTML:

Tower Light 06-2.png





6. Define Tower Light Sensor ID in the widget’s HTML:

Tower Light 10.png






7. RESTful API and HTML request content:

Tower Light 08-1.png






RESTful API:      

https://portal-rmm.wise-paas.com/rmm/v1/grafana/simplejson/query

 

Example:

cache: false

url: 'https://portal-rmm.wise-paas.com/rmm/v1/grafana/simplejson/query'

type: "post",

contentType: 'application/json'

dataType: 'json'

data: '{"timezone":"browser","panelId":2,"range":{"from":"2018-04-09T05:46:51.357Z","to":"2018-04-09T09:46:51.357Z","raw":{"from":"now-6h","to":"now"}},"rangeRaw":{"from":"now-6h","to":"now"},"interval":"20s","intervalMs":20000,"targets":[{"target":"00000001-0000-0000-0017-000004016940|SenHub|/SenData/Light1","device":"00000001-0000-0000-0017-000004016940","plugin":"SenHub","sensor":"/SenData/Light1","refId":"A","type":"table"}],"maxDataPoints":960,"scopedVars":{"__interval":{"text":"20s","value":"20s"},"__interval_ms":{"text":20000,"value":20000}}}'

xhrFields: {withCredentials: true}



8. Lights blinking status for the Tower Light:

Tower Light 09.png




Gateway Configuration:

1. Download RMM EI Agent 1.0.12 from https://portal-rmm.wise-paas.com/main/system and install to the Gateway.
2. Download EoLinkManagerSetup_1.0.0B.exe from https://www.dropbox.com/s/b02azh7tiqse2cy/EoLinkManagerSetup_1.0.0B.exe?dl=0 and install to the Gateway.
3. Run APIGateway:
    > cd C:\APIGateway
    > node app.js

4. Open EoLinkManager.ini and set the configurations:
    > notepad C:\Program Files (x86)\Advantech\EoLinkManager\EoLinkManager.ini

    ------------------------------------------
    [Platform]
    InterfaceName=EoLink_Receiver
    ServerURL=172.22.12.175
    ModuleName=EoLinkMgr
    SensorName=LightTower_Sensor
    SerialPort=COM6
    ServerPort=1883
    ------------------------------------------
    
5. Run EoLinkManager:
    > cd C:\Program Files (x86)\Advantech\EoLinkManager
    > EoLinkManager.exe
   
6. Open https://portal-rmm.wise-paas.com/main/device and add your device.