0

I have set up Presence Insights on Bluemx with several beacons on my map. However, I tried sending this command via the REST API Client

{
  "bnm": [
    {
      "descriptor": "80:b1:81:61:97:22", 
      "detectedTime": "2015-07-09T12:22:21.102Z",
      "data": {              
        "proximityUUID": "b9407f30-f5f8-466e-aff9-25556b57fe6d",   
        "major": "101",       
        "minor": "1402",        
        "accuracy": 70,         
        "rssi": 60,
        "proximity":"1"
      }
    }
  ]
}

I received a status 204 message, but the data doesn't come up on the dashboard

John Gerken
  • 686
  • 6
  • 13
touchaponk
  • 404
  • 4
  • 17
  • Can you describe more what you are trying to do? – Jeff Sloyer Jul 13 '15 at 19:02
  • I'm trying to send in location data using Rest API, and see that data show up on the dashboard (e.g. device 4e3d3 walked into Branch A, Zone 1) – touchaponk Jul 14 '15 at 05:03
  • What language are you using? – Jeff Sloyer Jul 14 '15 at 16:30
  • I see that you asked this question here as well: https://developer.ibm.com/answers/questions/201516/bluemix-presence-insight-mock-data-not-showing/ It looks like there are useful answers over there. Please try not to post the exact same question to multiple websites unless you are not getting any help on one after a few days. – MBillau Jul 15 '15 at 12:02
  • @MBillau Check the post date - I did not get the answer here so I moved to that forum. – touchaponk Jul 15 '15 at 16:54

2 Answers2

2

@touchaponk, I was able to recreate the problem and drill down. This is a configuration issue, but different from what I mentioned before. You need to consider 2 factors. 1 - "threshold" - from the PI beacon configuration.
2 - "accuracy" - from the mobile device SDK or the simulated payload sent from PostMan (or Swagger when that gets fixed)

The beacon threshold indicates a radius in meters surrounding the beacon, for which input events will be considered in the zone. You have this set to 3 in your configuration. So, the device must be within 3 meters for you to get a zone detection.

The problem is that your beacon connector payload lists "accuracy" as 70. This is indicating that the mobile device believes it is 70 meters from the beacon. Given it isn't in the 3 meter range of the PI beacon configuration, the event detected from the payload is dropped as NOT a hit in the zone ... so the visitor count doesn't go up.

I tried several combinations and found that in order to get a visit count "hit", the beacon configured threshold must be greater than the payload accuracy. Try changing the accuracy of your payload from 70 to 2 and see if the visit count goes up.

1

You may want to consult the REST API documentation: https://presenceinsights.ng.bluemix.net/pi-swagger

Using documented beacons API:

POST /pi-config/v1/tenants/{tenantCode}/orgs/{orgCode}/sites/{siteCode}/floors/{floorCode}/beacons

P.S. You'd also be able to try it out directly on that page

Alex P
  • 11
  • 1