Difference between revisions of "Observation production config"

From AMTech WikiDocs
Jump to: navigation, search
(Configuration options)
 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The goal of this configuration is to identify the observation types a Thing type produces behind a bridge.  
+
=== What is it===
* Types to configure as producers are the types of the bridge instances (things in the property bridgeInstnace
+
 
*Select observation type, this observation has to be an observation that the Thing type produces.
+
* Configuration of the observation types produced by the bridge instances
**[[Sensor%27s_network#Topics|Topic]]
+
* It is configured for each bridge instance type
**[[Sensor%27s_network|Producer]]  
+
* It is automatically updated when bridge instances are deleted (if it is the last instances of its type in the bridge instance list, the observation production config for that thing type is deleted)
**[[Sensor%27s_network#targetthings|targetthings]]
+
 
This configuration can be used by followers subscribed to the service of the activity (for instances, the Amtech M2M bridge, consumes this configuration to generate the observations it sends)
+
=== Configuration options ===
;the follower must have a role with access polices to the [[Activities#Thing types|Thing type]] in order to get this information
+
 
*Configuration details
+
* When you access this configuration, you're presented with a list of thing types (initially empty).
**The configuration involved thing types and the observation types they produce. The following example shows where a thing type LLRPReader produces 2 observations type [[Sensor%27s_network#CRUD_observation|observationresourcecrud]] and graiEPC
+
* You can add new thing types as a way of expressing a production for all the bridge thing instances belonging to that type. Therefore only those types associated to the things that are already configured as bridge instances are shown (things in the ''bridgeInstances'' property).
**[[File:ObservationConfigProd1.png|850px|thumbnail|center|Select thing and observations type]]
+
* Once the type is added to the observation production configuration you can navigate to the produced observations and add new observation types. This allows you to express that those bridge instances that belong to the selected type can produce the observation that you're about to add/modify.
**Configure observations' properties required to produce selected observations and enforce security including topic, targetthings, producer, guestusers, and guesttenants. (See [[Sensor's network#Observations and observation types|Observations and observation types]]). The following example illustrates an graiEPC observation type with:
+
* So you select an observation type. It has got to be an observation type listed in the observation types that this thing type can produce. See the definition of the corresponding thing type, ''observationproductionconfig'' property
***[[Sensor%27s_network#Topics|topic]] thingsInBoardroom/LLRPReader/#{smoothingResult}, placeholder #{smoothingResult} is used to group observations in child branches new or lost
+
* Once selected you should configure the following properties:
***[[Sensor%27s_network|producer]] reunionMexicoEDN:llrpantenna#{antennaId}, placeholder #{antennaId} is used to group identify what antenna id produced the observation  
+
*; topic : This is the topic or topics where this observation will be addressed to. Unless the simple definition of a [[Sensor's_network#Topics|topic]] in an observation, this allows you to specify several destinations. It consist of vertical bar (|) separated list of single destinations, each one consisting in a destination protocol and an address. Currently there is support for the following destination protocols:
***[[File:configActivityObserProdcution2.png|850px|thumbnail|center|topic, producer, guest tenant and guest user]]
+
*:; amtech: Topic in amtech cloud. In this case the address follows the same rules explained [[Sensor's_network#Topics|here]]. Example: <code>amtech:/thingsInBoardroom/llrpReasoner/#{smoothingResult}</code>.
***[[Sensor%27s_network#targetthings|targetthings]] resource id reunionMexicoEDN:llrpantenna#{antennaId}:#{serialNumber}, placeholders #{antennaId} and #{serialNumber} are used to antenna id and product serial number from graiEPC values to uniquely identify the target thing.  
+
*:; edge: The observation will be produced for it to be consumed by edge reasoners. No address is allowed for this destination.
***[[File:configActivityObserProdcution3.png|850px|thumbnail|center|targetthings]]
+
*:; mqtt or mqtts: The observation will be directed to a MQTT broker. The address must express the host and port of the MQTT broker but it might also contain authentication information, certificates for SSL protocol and other options. Example: <code>mqtt://user:pass@mqtthost.example.com:1883</code>.
* [[Sensor%27s_network#Placeholders_substitution|Placeholders]]
+
*; producer: This is the definition of the [[Sensor's_network|producer]] when this observation will be sent in the bridge.
**Allows to set identifiers that will be substituted by real values at different intelligence layers, the following example illustrates.
+
*; targetthings: This is the definition of the [[Sensor's_network#targetthings|targetthings]] when this observation will be sent in the bridge.
**guesttenants #{companyPrefix}, placeholder is used to set a guesttenants from graiEPC value companyPrefix allowing to control the access to observations and things from the intelligence in the edge.
+
 
**topic thingsInBoardroom/LLRPReader/#{smoothingResult}/#{country}, placeholder is used to group observations in child branches by countries.
+
Remarks: The Amtech M2MBridge uses this configuration to automatically fill this fields in the observations it sends. The follower must have a role with access polices to the [[Activities#Thing types|thing type]] in order to get this information
**[[File:configActivityObserProdcution4.png|850px|thumbnail|center|placeholder]]
+
 
* Relation with thing types observation production configuration (See [[Activities#Thing types|Thing types]])
+
=== Example ===
**Each thing type defines which observation types produces as part of the type semantic. The following example illustrates selecting observation type graiEPC produced by LLRPReader type.
+
Let's show some more configuration details through an example:
**[[File:configActivityObserProdcution5.png|850px|thumbnail|center|Select observation type]]
+
* As we can appreciate from the previous explanation, the configuration involves thing types and the observation types they produce. The first step is to open the bridge and go to observation production configuration setting:
 +
*: [[File:amtech_bridge_observationproductionconfig.png|850px|thumbnail|center|Open bridge and go to observation production configuration settings]]
 +
* When you navigate into it you're presented with a list of already configured thing types (initially empty):
 +
*: [[File:amtech_bridge_observationproductionconfig_ttype_list.png|850px|thumbnail|center|Thing type list for observation production configuration]]
 +
* Then you can add or navigate to an existing entity type. Let's choose LLRPReader for the example:
 +
*: [[File:amtech_bridge_observationproductionconfig_ttype.png|850px|thumbnail|center|Specific thing type configuration]]
 +
* Then you can browse the list of observation types that it produces:
 +
*: [[File:amtech_bridge_observationproductionconfig_obs_list.png|850px|thumbnail|center|Observation type list for a give thing type]]
 +
* Again you can add or delete existing entries: observation types in this case. Let's go to graiEPC config:
 +
*: [[File:amtech_bridge_observationproductionconfig_obs.png|850px|thumbnail|center|Specific observation type configuration]]
 +
* The example shows a LLRPReader that is configured to produce observations of type graiEPC. Then you configure the observation properties required to produce this observation and enforce security including fixed settings for topic, targetthings, producer, guestusers and guesttenants (See [[Sensor's network#Observations and observation types|Observations and observation types]]). In the example we set:
 +
** [[Sensor%27s_network#Topics|topic]] to /thingsInBoardroom/LLRPReader/#{smoothingResult}. #{smoothingResult} placeholder evaluated to ''new'' or ''lost'' so it allows us to group observations in corresponding child topics.
 +
** [[Sensor%27s_network|producer]] to #{thingId}. #{thingId} placeholder is replaced by the thing ID of the thing sending the observation.
 +
** [[Sensor%27s_network#targetthings|targetthings]] through a new page where you can add or edit existing target types:
 +
**: [[File:amtech_bridge_observationproductionconfig_targettypes_list.png|850px|thumbnail|center|List of target types for the targetthings]]
 +
**: For the example let's add/modify the type thingInBoardroom so we're presented with the targetthings properties:
 +
**: [[File:amtech_bridge_observationproductionconfig_targetthings.png|850px|thumbnail|center|Configuration of instances for the selected type in targetthings]]
 +
**: So you can configure the resource Id to #{thingId}:#{serialNumber} for instance. #{thingId} and #{serialNumber} placeholders are replaced with the thing ID of the thing sending the observation and the serial number from the graiEPC observation to uniquely identify the target thing.
 +
**: [[File:observ-prod-bridge-targething.png|850px|thumbnail|center|targetthings]]
 +
 
 +
=== Placeholders ===
 +
 
 +
Allows to set identifiers that will be substituted by real values at different intelligence layers. See [[Sensor%27s_network#Placeholders_substitution|placeholders]].
 +
 
 +
Let's see some examples:
 +
* guesttenants set to #{companyPrefix} - In this case we use the placeholder to set guesttenants from graiEPC value companyPrefix. It allows you to control the access to observations and things from the intelligence in the edge.
 +
* topic set to /thingsInBoardroom/LLRPReader/#{smoothingResult}/#{country} - placeholder is used to group observations by new or lost and then by country.
 +
: [[File:observ-prod-placeholder.png|850px|thumbnail|center|placeholder]]
 +
 
 +
=== Relation between thing types and the observation types allowed in the observation production configuration ===
 +
 
 +
For the relation among thing types and observation production configuration (See [[Activities#Thing types|Thing types]])
 +
 
 +
In the definition of a thing type you express the list of observation types it produces. It constrains the list of observation types that can be selected in the observation production configuration for that thing type. For instance, you're presented with a screen like this when you try to add new observations for the LLRPReader type.
 +
[[File:obser-prod-bridge-sel-observ.png|850px|thumbnail|center|Select observation type]]
 +
 
 +
=== Thing type without observation production configuration ===
 +
 
 +
A use case could require that an instance of thing type is needed just to receive [[Actions#Send_command|commands]], in that case the bridge configuration allows to set a thing instance without observation production configuration. '''Remark this thing type instance will not produce observations.'''

Latest revision as of 23:26, 18 August 2019

What is it

  • Configuration of the observation types produced by the bridge instances
  • It is configured for each bridge instance type
  • It is automatically updated when bridge instances are deleted (if it is the last instances of its type in the bridge instance list, the observation production config for that thing type is deleted)

Configuration options

  • When you access this configuration, you're presented with a list of thing types (initially empty).
  • You can add new thing types as a way of expressing a production for all the bridge thing instances belonging to that type. Therefore only those types associated to the things that are already configured as bridge instances are shown (things in the bridgeInstances property).
  • Once the type is added to the observation production configuration you can navigate to the produced observations and add new observation types. This allows you to express that those bridge instances that belong to the selected type can produce the observation that you're about to add/modify.
  • So you select an observation type. It has got to be an observation type listed in the observation types that this thing type can produce. See the definition of the corresponding thing type, observationproductionconfig property
  • Once selected you should configure the following properties:
    topic 
    This is the topic or topics where this observation will be addressed to. Unless the simple definition of a topic in an observation, this allows you to specify several destinations. It consist of vertical bar (|) separated list of single destinations, each one consisting in a destination protocol and an address. Currently there is support for the following destination protocols:
    amtech
    Topic in amtech cloud. In this case the address follows the same rules explained here. Example: amtech:/thingsInBoardroom/llrpReasoner/#{smoothingResult}.
    edge
    The observation will be produced for it to be consumed by edge reasoners. No address is allowed for this destination.
    mqtt or mqtts
    The observation will be directed to a MQTT broker. The address must express the host and port of the MQTT broker but it might also contain authentication information, certificates for SSL protocol and other options. Example: mqtt://user:pass@mqtthost.example.com:1883.
    producer
    This is the definition of the producer when this observation will be sent in the bridge.
    targetthings
    This is the definition of the targetthings when this observation will be sent in the bridge.

Remarks: The Amtech M2MBridge uses this configuration to automatically fill this fields in the observations it sends. The follower must have a role with access polices to the thing type in order to get this information

Example

Let's show some more configuration details through an example:

  • As we can appreciate from the previous explanation, the configuration involves thing types and the observation types they produce. The first step is to open the bridge and go to observation production configuration setting:
    Open bridge and go to observation production configuration settings
  • When you navigate into it you're presented with a list of already configured thing types (initially empty):
    Thing type list for observation production configuration
  • Then you can add or navigate to an existing entity type. Let's choose LLRPReader for the example:
    Specific thing type configuration
  • Then you can browse the list of observation types that it produces:
    Observation type list for a give thing type
  • Again you can add or delete existing entries: observation types in this case. Let's go to graiEPC config:
    Specific observation type configuration
  • The example shows a LLRPReader that is configured to produce observations of type graiEPC. Then you configure the observation properties required to produce this observation and enforce security including fixed settings for topic, targetthings, producer, guestusers and guesttenants (See Observations and observation types). In the example we set:
    • topic to /thingsInBoardroom/LLRPReader/#{smoothingResult}. #{smoothingResult} placeholder evaluated to new or lost so it allows us to group observations in corresponding child topics.
    • producer to #{thingId}. #{thingId} placeholder is replaced by the thing ID of the thing sending the observation.
    • targetthings through a new page where you can add or edit existing target types:
      List of target types for the targetthings
      For the example let's add/modify the type thingInBoardroom so we're presented with the targetthings properties:
      Configuration of instances for the selected type in targetthings
      So you can configure the resource Id to #{thingId}:#{serialNumber} for instance. #{thingId} and #{serialNumber} placeholders are replaced with the thing ID of the thing sending the observation and the serial number from the graiEPC observation to uniquely identify the target thing.
      targetthings

Placeholders

Allows to set identifiers that will be substituted by real values at different intelligence layers. See placeholders.

Let's see some examples:

  • guesttenants set to #{companyPrefix} - In this case we use the placeholder to set guesttenants from graiEPC value companyPrefix. It allows you to control the access to observations and things from the intelligence in the edge.
  • topic set to /thingsInBoardroom/LLRPReader/#{smoothingResult}/#{country} - placeholder is used to group observations by new or lost and then by country.
placeholder

Relation between thing types and the observation types allowed in the observation production configuration

For the relation among thing types and observation production configuration (See Thing types)

In the definition of a thing type you express the list of observation types it produces. It constrains the list of observation types that can be selected in the observation production configuration for that thing type. For instance, you're presented with a screen like this when you try to add new observations for the LLRPReader type.

Select observation type

Thing type without observation production configuration

A use case could require that an instance of thing type is needed just to receive commands, in that case the bridge configuration allows to set a thing instance without observation production configuration. Remark this thing type instance will not produce observations.