Difference between revisions of "Sample configuration for beacons"

From AMTech WikiDocs
Jump to: navigation, search
Line 1: Line 1:
 +
== Requirements and required steps ==
 +
 +
=== Required thing types ===
 +
* amtechM2mBridge
 +
* BLEbeaconsScanner
 +
 +
=== As a creator define a service with actor(s) ===
 +
* Define and actor and name it.
 +
* Add to the actor policies to GET (read), POST (create) and/or PUT (edit) entities of the required types. In this case amtechM2mBridge and BLEbeaconsScanner.
 +
* Create an activity and name it.
 +
* Add this actor to the activity.
 +
* Optionally add logic to the activity through new observers/reasoners/etc.
 +
* Publish the activity and in the process, share it with at least one follower tenant by using the property guesttenants. Now the admin of these tenants will have the possibility to subscribe to the generated service and invite new users to its own tenant using the actors defined by the creator or a subset of them.
 +
 +
=== As follower admin ===
 +
* Subscribe to the service that the creator is offering.
 +
* Figure out the accesses you want to give to the bridge or bridges that will be configured based on this service and design a serie of invited followers (one for each bridge). Invite these new users (bridge users) to the tenant with the actors defined by the creator or a subset of them.
 +
 +
=== Design the bridges ===
 +
Still as follower admin (although this can also be done by the creator), start designing the bridge templates:
 +
* Create a new BLEbeaconsScanner instance and configure all its required properties.
 +
* Create an amtechM2mBridge instance.
 +
* Configure required properties and useful properties as:
 +
** Add the BLEbeaconsScanner instance to the bridge instances
 +
** Bridge error observation config (topic needed).
 +
** Might be useful to configure the logger level to "debug" instead of the default value "error".
 +
** Do the [[Observation_production_config|observation production configuration part]].
 +
** If configured as creator, share this bridge instance with the follower tenant so that invited users belonging to the least can clone it.
 +
* Validate the bridge
 +
 +
=== As invited user to the follower tenant ===
 +
* Accept the invitation sent by the follower admin.
 +
* Configure the bridge with the DAP URL and your credentials in bridgeConfig.json
 +
* Set the configured bridge as the template.
 +
* Configure all the other required properties as templateId, bridgeIdPrefix, etc.
 +
* Run the bridge.
 +
 +
<!-- '''As creator'''
 
* Using the thing type BLEbeaconsScanner
 
* Using the thing type BLEbeaconsScanner
 
* Create BLEBeaconsScanner instance, set properties related to the specific instance (Ex. scanEddystone)
 
* Create BLEBeaconsScanner instance, set properties related to the specific instance (Ex. scanEddystone)
Line 8: Line 46:
 
* Publish activity
 
* Publish activity
 
* Subscribe follower to the generated service.  
 
* Subscribe follower to the generated service.  
* This is the userId to set at [[Edge_Configuration|bridgeConfig.json]]
+
* This is the userId to set at [[Edge_Configuration|bridgeConfig.json]] -->

Revision as of 16:29, 20 October 2016

Requirements and required steps

Required thing types

  • amtechM2mBridge
  • BLEbeaconsScanner

As a creator define a service with actor(s)

  • Define and actor and name it.
  • Add to the actor policies to GET (read), POST (create) and/or PUT (edit) entities of the required types. In this case amtechM2mBridge and BLEbeaconsScanner.
  • Create an activity and name it.
  • Add this actor to the activity.
  • Optionally add logic to the activity through new observers/reasoners/etc.
  • Publish the activity and in the process, share it with at least one follower tenant by using the property guesttenants. Now the admin of these tenants will have the possibility to subscribe to the generated service and invite new users to its own tenant using the actors defined by the creator or a subset of them.

As follower admin

  • Subscribe to the service that the creator is offering.
  • Figure out the accesses you want to give to the bridge or bridges that will be configured based on this service and design a serie of invited followers (one for each bridge). Invite these new users (bridge users) to the tenant with the actors defined by the creator or a subset of them.

Design the bridges

Still as follower admin (although this can also be done by the creator), start designing the bridge templates:

  • Create a new BLEbeaconsScanner instance and configure all its required properties.
  • Create an amtechM2mBridge instance.
  • Configure required properties and useful properties as:
    • Add the BLEbeaconsScanner instance to the bridge instances
    • Bridge error observation config (topic needed).
    • Might be useful to configure the logger level to "debug" instead of the default value "error".
    • Do the observation production configuration part.
    • If configured as creator, share this bridge instance with the follower tenant so that invited users belonging to the least can clone it.
  • Validate the bridge

As invited user to the follower tenant

  • Accept the invitation sent by the follower admin.
  • Configure the bridge with the DAP URL and your credentials in bridgeConfig.json
  • Set the configured bridge as the template.
  • Configure all the other required properties as templateId, bridgeIdPrefix, etc.
  • Run the bridge.