Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Location-based services (LBS) uses real-time location or geo-data from devices to monitor and track devices. The geo extension in WSO2 IoT Server provides real-time information about geospatial objects. It processes spatial data from an external source of events and analyzes/manipulates this data to produce meaningful information to end users. You can interact with it to generate a variety of alerts and warnings. 

...

  1. Download the WSO2 IoT Server.

    Tip

    If you are running WSO2 IoT Server already, stop the server before proceeding to the next step.





  2. Navigate to the <IOTS_HOME>/wso2/analytics/scripts folder and run the following command. This installs the required geo extension feature to WSO2 IoT Server.

    Code Block
    mvn clean install -f siddhi-geo-extention-deployer.xml
  3. Open the cdm-config.xml file found in the <IOTS_HOME>/conf folder and set the following properties under the <GeoLocationConfiguration> tag to true. 
    This enables the geo extension feature in WSO2 IoT Server.

    Code Block
    <GeoLocationConfiguration>
          <isEnabled>true</isEnabled>
          <PublishLocationOperationResponse>true</PublishLocationOperationResponse>
    </GeoLocationConfiguration>
  4. Start the WSO2 IoT Server core and analytics profiles and sign in to the WSO2 IoT Server Device Management Console.

    Expand
    titleClick here for more information.
    1. Start the WSO2 IoT Server core profile.

      Code Block
      cd <IOTS_HOME>/bin
      sh iot-server.sh
    2. Next, start the WSO2 IoT Server analytics profile.

      Code Block
      cd <IOTS_HOME>/bin
      sh analytics.sh
    3. Access the device management console.

    4. Enter the username and password, and sign in.

      Info

      The system administrator will be able to log in using admin for both the username and password. However, other users will have to first register with IoTS before being able to log into the IoTS device management console. For more information on creating a new account, see Registering with WSO2 IoT Server.

    5. Click  LOGIN . The respective device management console will change, based on the permissions assigned to the user.
      For example, the device management console for an administrator is as follows:

    Tip
    titleDeploying in a multi-tenant environment

    The geo analytics artifacts are deployed by default in the WSO2 IoT Server super tenant. However, if you are setting up geofencing in a multi-tenant environment, you have to deploy the geo analytics artifacts in each tenant. 

    1. Login to the device management console using the tenant credentials.

    2. Click on the menu button Image Addedand select Configuration Management>Platform Configurations.

    3. Click the Deploy Geo Analytics Artifacts button. You can also use this button to redeploy the geo analytics artifacts in super tenant mode if required.
      Image Added
  5. Enroll a device. For this tutorial, an Android device has been enrolled. 

    Tip

    For more information on how to enroll an Android device, see Android.

    For more information on how to enroll other sample device types, see Enrolling Sample Devices

  6. Access the geofencing map for the device you just enrolled by doing the following:
    1. Click the menu icon, and then click Device Management.
    2. Click view on the device you just enrolled and select the Location tab. 

...