Difference between revisions of "Edge Configuration"

From AMTech WikiDocs
Jump to: navigation, search
Line 1: Line 1:
 
For details on Edge see [[AMTech...#Edge|Edge]]
 
For details on Edge see [[AMTech...#Edge|Edge]]
 
==M2MBridge configuration==
 
==M2MBridge configuration==
Configuration is based on cloning. You make a reference to a M2MBridge referenced as template and all its configuration will be cloned. The objective is to have a single configuration that allows you to create and maintain multiples deployments. It requires you to define template id and prefix in a file named <code>bridgeConfig.json</code>. Other configuration options are described below by using an example.
+
Configuration is based on cloning. You make a reference to a M2MBridge referenced as template and all its configuration will be cloned. The objective is to have a single configuration that allows you to create and maintain multiples deployments. It requires you to define template id and prefix in a file named <code>bridgeConfig.json</code>. Other configuration options are described below:
 +
 
 +
* '''description''' Text to be assigned to M2MBridges description property. Type: string.
 +
* '''description:children''' If the description property will be assigned to M2MBridge's linked things. Type: boolean.
 +
* '''dap''' DAP connection options. Type: JSON, having:
 +
** '''dapUrl''' AMTech IoT DAP URL. Type: string, valid URL
 +
** '''userId''' Bridge instance user ID. Type: string.
 +
** '''tenant''' Bridge tenant. Type: string. 
 +
** '''password''' Bridge password. Type: string.
 +
* '''templateId''' Bridge instance ID to be cloned. Type: string, valid bridge name.
 +
* '''bridgeIdPrefix''' Prefix to add to the unique M2MBridge identifier, the MAC address of the device is used as unique ID. In the absence of a prefix, just the MAC address is used as identifier. Type: string.     
 +
* '''location''' WKT location to set to the M2MBridge location. Overrides address if also present. Type: stringified version of JSON representing the WKT.
 +
* '''location:children''' Express if the location property will be assigned to M2MBridge's linked things. Type: boolean.
 +
* '''address''' Address to be used to guess M2MBridge location. Type: JSON.
  
 
==Example of Clone Configuration ==
 
==Example of Clone Configuration ==
Line 27: Line 40:
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
*"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'''
 
 
==Configuration validation==
 
==Configuration validation==
 
*At startup time the M2MBridge validates it configuration with the cloud is an error occurrences the application aborts
 
*At startup time the M2MBridge validates it configuration with the cloud is an error occurrences the application aborts
 
*To simplify the process of validation configuration there is an option to validate to the configuration for a M2MBridge instance (See [[Sensor%27s_network#Observation_production_.26_M2MBridge_validation|here]])
 
*To simplify the process of validation configuration there is an option to validate to the configuration for a M2MBridge instance (See [[Sensor%27s_network#Observation_production_.26_M2MBridge_validation|here]])

Revision as of 13:08, 12 October 2016

For details on Edge see Edge

M2MBridge configuration

Configuration is based on cloning. You make a reference to a M2MBridge referenced as template and all its configuration will be cloned. The objective is to have a single configuration that allows you to create and maintain multiples deployments. It requires you to define template id and prefix in a file named bridgeConfig.json. Other configuration options are described below:

  • description Text to be assigned to M2MBridges description property. Type: string.
  • description:children If the description property will be assigned to M2MBridge's linked things. Type: boolean.
  • dap DAP connection options. Type: JSON, having:
    • dapUrl AMTech IoT DAP URL. Type: string, valid URL
    • userId Bridge instance user ID. Type: string.
    • tenant Bridge tenant. Type: string.
    • password Bridge password. Type: string.
  • templateId Bridge instance ID to be cloned. Type: string, valid bridge name.
  • bridgeIdPrefix Prefix to add to the unique M2MBridge identifier, the MAC address of the device is used as unique ID. In the absence of a prefix, just the MAC address is used as identifier. Type: string.
  • location WKT location to set to the M2MBridge location. Overrides address if also present. Type: stringified version of JSON representing the WKT.
  • location:children Express if the location property will be assigned to M2MBridge's linked things. Type: boolean.
  • address Address to be used to guess M2MBridge location. Type: 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"
    },
}

Configuration validation

  • At startup time the M2MBridge validates it configuration with the cloud is an error occurrences the application aborts
  • To simplify the process of validation configuration there is an option to validate to the configuration for a M2MBridge instance (See here)