Difference between revisions of "Edge Configuration"

From AMTech WikiDocs
Jump to: navigation, search
Line 1: Line 1:
 
[[AMTech...#Edge|Edge]]
 
[[AMTech...#Edge|Edge]]
 
+
There are 2 types of  M2MBridge configurations:
 +
==Clone configuration==
 +
From a M2MBridge instance references as  “template” it clones the configuration
 +
*The objectives is from one configuration create and maintain multiples deployments, it requires template id and prefix  to be defined in the bridgeConfig.json 
 +
==Instance configuration==
 +
From an existing M2MBridge instance references as bridgeId it requires bridgeId to be defined in the bridgeConfig.json 
 +
==Example of Clone Configuration ==
 
bridgeConfig.json located at M2MBridge.js directory
 
bridgeConfig.json located at M2MBridge.js directory
 
<syntaxhighlight lang="jsonld">
 
<syntaxhighlight lang="jsonld">
Line 35: Line 41:
 
*"location:children" : true, '''if the location property will be assigned to M2MBridge's linked things'''
 
*"location:children" : true, '''if the location property will be assigned to M2MBridge's linked things'''
 
*"address" '''Address to be used to get m2mBridge's location'''
 
*"address" '''Address to be used to get m2mBridge's location'''
 +
==Example of Instance configuration==
 +
<syntaxhighlight lang="jsonld">
 +
{
 +
    "description": "AMTech M2M Bridge",
 +
    "dap":{ 
 +
        "dapUrl": "https://dap.amtech.mx",   
 +
        "userId": "xxxxxxx@amtech.mx",
 +
        "tenant" : "xxxxxxx", 
 +
        "password" :"xxxxxxxx"
 +
    },
 +
    "bridgeId":"m2mCreator:m2mBridge",
 +
    "location": "{\"wkt\":\"POINT(-99.17125583 19.40501031)\",\"sContext\":\"geo\"}", 
 +
    "address" :{
 +
        "country" : "usa",
 +
        "city": "Las Vegas",
 +
        "road": "Las Vegas Boulevard South",
 +
        "number":"3960"
 +
    },
 +
}
 +
</syntaxhighlight>
 +
* "bridgeId":"m2mCreator:m2mBridge", '''the name of the M2MBridge instance'''

Revision as of 15:54, 31 May 2016

Edge There are 2 types of M2MBridge configurations:

Clone configuration

From a M2MBridge instance references as “template” it clones the configuration

*The objectives is from one configuration create and maintain multiples deployments, it requires template id and prefix  to be defined in the bridgeConfig.json  

Instance configuration

From an existing M2MBridge instance references as bridgeId it requires bridgeId to be defined in the bridgeConfig.json

Example of Clone Configuration

bridgeConfig.json located at M2MBridge.js directory

{
    "description": "AMTech M2M Bridge", 
    "description:children" : true,
    "dap":{   
        "dapUrl": "https://dap.amtech.mx",     
        "userId": "xxxxxxx@amtech.mx",
        "tenant" : "xxxxxxx",  
        "password" :"xxxxxxxx"
    },
    "templateId":"m2mCreator:m2mBridge",
    "bridgeIdPrefix":"tienda1",       
    "location": "{\"wkt\":\"POINT(-99.17125583 19.40501031)\",\"sContext\":\"geo\"}",  
    "location:children" : true,
    "address" :{				 
        "country" : "usa",
        "city": "Las Vegas",
        "road": "Las Vegas Boulevard South",
        "number":"3960"
    },
}
  • "description": "AMTech M2M Bridge" Text to be assigned to M2MBridges description property
  • "description:children" : true If the description property will be assigned to M2MBridge's linked things
  • "dapUrl": "https://dap.amtech.mx" Amtech IoT DAP url
  • "userId": "xxxxxxx@amtech.mx" m2mBridge instance user id
  • "tenant" : "xxxxxxx", bridge tenant
  • "password" :"xxxxxxxx" m2mBridge password
  • "templateId":"m2mCreator:m2mBridge" M2MBridge instance id to be cloned
  • "bridgeIdPrefix":"tienda1", Prefix to add to the unique M2MBridge identifier, the mac address of the device is use as unique id, In absence of the prefix just the mac address is used as identifier
  • "location": "{\"wkt\":\"POINT(-99.17125583 19.40501031)\",\"sContext\":\"geo\"}" wkt location to set m2mBridge location overrides address
  • "location:children" : true, if the location property will be assigned to M2MBridge's linked things
  • "address" Address to be used to get m2mBridge's location

Example of Instance configuration

{
    "description": "AMTech M2M Bridge", 
    "dap":{   
        "dapUrl": "https://dap.amtech.mx",     
        "userId": "xxxxxxx@amtech.mx",
        "tenant" : "xxxxxxx",  
        "password" :"xxxxxxxx"
    },
    "bridgeId":"m2mCreator:m2mBridge",
    "location": "{\"wkt\":\"POINT(-99.17125583 19.40501031)\",\"sContext\":\"geo\"}",  
    "address" :{				 
        "country" : "usa",
        "city": "Las Vegas",
        "road": "Las Vegas Boulevard South",
        "number":"3960"
    },
}
  • "bridgeId":"m2mCreator:m2mBridge", the name of the M2MBridge instance