Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Copy-edit

...

WSO2 IoT Server's analytics profile that runs on WSO2 Data Analytics Server (WSO2 DAS) uses execution plans to store the event processing logic. An execution plan is bound to an instance of the Siddhi Data Analytics Server runtime, which is responsible for the actual processing of events.

Let's get started!

MobX employees bring their own devices to work. To ensure the security of corporate data, MobX wants the camera on the mobile devices to be disabled once the devices are within the office premise. Therefore, the MobX administrators write an execution plan using WSO2 IoT Server to disable the camera on the devices once the devices enter the office premise and to enable the camera on the devices once they leave the office premise.

Let's get started!

Table of Contents

Setting up geofencing 

...

  1. Enroll an Android Virtual Device as a Bring Your Own Device (BYOD). By default, the BYOD device group has the group ID 1.

    Info

    For more information, see Android Virtual Device.

  2. Updating the location of the device so that it is inside the geofenced area:

    1. After the Android virtual device starts and it is enrolled with WSO2 IoT Server, click the more button.

    2. Click Location, define the Longitude as 79.8525 and Latitude as 6.9099, and click Send.
      These coordinates are within the geofenced area that is defined in the execution plan.

      Info

      In order to save the device's energy, the WSO2 IoT Server's Android agent sends the device location to the server after five minutes from the last location update. Therefore, it takes a maximum of five minutes to update the location change. To verify if the location is updated, go to the enrolled device's page and click the location tab after five minutes.

      Five minutes after your last location update, you see a notification on the Android Virtual Device mentioning that the device's camera is disabled.
      The execution plan you created, disables the device's camera when you enter the geofenced area.

      Now, when you try to access the camera you see the following message:

  3. Updating the location of the device so that it is outside the geofenced area:
    1. Click the more button on the Android Virtual Device.
    2. Click Location, define the Longitude as 78.8525 and Latitude as 6.9099, and click Send. These coordinates are outside of the geofenced area that is defined in the execution plan.

      Five minutes after your last location update you update, you see a notification on the Android Virtual Device mentioning that the device's camera is enabled.
      The execution plan you created, enables the device's camera when you move out of the geofenced area.

    3. Try to access the device camera. You see that you are able to access it. 

      Expand
      titleAre you getting a Camera Error message?

      If the Android virtual device is unable to connect to your machine's camera, you get a message saying Camera Error. It is not caused by WSO2 IoT Server.

...