wso2 / product-iots

Welcome to the WSO2 IoT Server source code! For info on working with the WSO2 IoT Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
181 stars 181 forks source link

Events Duplicated in IoT Analytics When Publishing the Location #1652

Open rasika opened 6 years ago

rasika commented 6 years ago

Description: I have noticed that when location is published into WSO2 IoT Analytics Server; location events are duplicated. This is observable when navigated into the Data-Explorer and selecting "IOT_PER_DEVICE_STREAM_GEO_FUSEDSPATIALEVENT" from the list.

screen shot 2018-02-01 at 11 53 12 pm

To make sure that device is not publishing the location twice; I have added log publishers named "LocationStream", "StandardSpatialEvents", "ProcessedSpatialEvents" and "FusedSpatialEvents" for the streams as below;

screen shot 2018-02-01 at 11 46 10 pm

Following logs are observed when publishing a location from the device.

[2018-02-01 23:42:54,116] [IoT-Analytics]  INFO {org.wso2.carbon.event.output.adapter.logger.LoggerEventAdapter} -  Unique ID: ***FusedSpatialEvents***,
 Event: id:1c30dce6f91a6ce5,
latitude:6.912019999999999,
longitude:79.85099833333334,
timeStamp:1517508772619,
type:android,
speed:0.0,
heading:0.0,
state:NORMAL,
information:Normal driving pattern,
notify:false

[2018-02-01 23:42:54,120] [IoT-Analytics]  INFO {org.wso2.carbon.event.output.adapter.logger.LoggerEventAdapter} -  Unique ID: ***FusedSpatialEvents***,
 Event: id:1c30dce6f91a6ce5,
latitude:6.912019999999999,
longitude:79.85099833333334,
timeStamp:1517508772619,
type:android,
speed:0.0,
heading:0.0,
state:NORMAL,
information:Normal driving pattern,
notify:false

[2018-02-01 23:42:54,122] [IoT-Analytics]  INFO {org.wso2.carbon.event.output.adapter.logger.LoggerEventAdapter} -  Unique ID: ***ProcessedSpatialEvents***,
 Event: id:1c30dce6f91a6ce5,
latitude:6.912019999999999,
longitude:79.85099833333334,
timeStamp:1517508772619,
type:android,
speed:0.0,
heading:0.0,
eventId:b0467872-a0cb-4168-88f2-39ac71ed0f74,
state:NORMAL,
information:Normal driving pattern

[2018-02-01 23:42:54,126] [IoT-Analytics]  INFO {org.wso2.carbon.event.output.adapter.logger.LoggerEventAdapter} -  Unique ID: ***StandardSpatialEvents***,
 Event: id:1c30dce6f91a6ce5,
latitude:6.912019999999999,
longitude:79.85099833333334,
timeStamp:1517508772619,
type:android,
speed:0.0,
heading:0.0,
eventId:b0467872-a0cb-4168-88f2-39ac71ed0f74

[2018-02-01 23:42:54,128] [IoT-Analytics]  INFO {org.wso2.carbon.event.output.adapter.logger.LoggerEventAdapter} -  Unique ID: ***LocationStream***,
 Event: meta_deviceId:1c30dce6f91a6ce5,
meta_deviceType:android,
timeStamp:1517508772619,
latitude:6.912019999999999,
longitude:79.85099833333334

Suggested Labels: Type/Bug

Suggested Assignees: N/A

Affected Product Version: IoT Server 3.2.0

OS, DB, other environment details and versions:
Java version: 1.8.0_152, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre Default locale: en_LK, platform encoding: UTF-8 OS name: "mac os x", version: "10.13.2", arch: "x86_64", family: "mac"

Steps to reproduce:

  1. Create a new map path using https://www.google.com/maps/d/u/0/.
  2. Export it as KML format
  3. Start WSO2 IoT Server with Geo Services enabled as in here
  4. Enroll a new Android device using emulator
  5. Navigate into the device details page of the enrolled device
  6. Feed the Android emulator geo locations using KML file
  7. Navigate into the Data-Explorer in IoT Analytics Server

Related Issues: N/A

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity.