cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
682
Views
0
Helpful
6
Replies
Highlighted
Cisco Employee

CMX - How to get zone's latitude and longitude

Hi

  How can I get zone's latitude and longitude.

Thanks,

Rajesh

6 REPLIES 6
Frequent Contributor

Re: CMX - How to get zone's latitude and longitude

Hi,

If GPS data points are required in the Cisco CMX API output, then GPS markers must be placed in Cisco PI. 

The floor map must have valid GPS markers, see the following article regarding adding GPS markers to Cisco Prime Infrastructure.

Cisco Prime Infrastructure 3.2 User Guide - Use Wireless Site Maps [Cisco Prime Infrastructure] - Cisco

If the floor map has valid GPS markers, they will be visible on the CMX Activity Map by toggling on GPS markers.

Use Location Clients API resource GET cmxlocationsandbox.cisco.com/api/location/v2/clients?macAddress=00:00:2a:01:00:01 to see the geoCoordinate values.


[

    {

        "macAddress": "00:00:2a:01:00:01",

        "mapInfo": {

            "mapHierarchyString": "DevNetCampus>DevNetBuilding>DevNetZone",

            "floorRefId": "723413320329068590",

            "floorDimension": {

                "length": 81.9,

                "width": 307,

                "height": 16.5,

                "offsetX": 0,

                "offsetY": 0,

                "unit": "FEET"

            },

            "image": {

                "imageName": "domain_0_1421088463647.png",

                "zoomLevel": 4,

                "width": 2038,

                "height": 544,

                "size": 2038,

                "maxResolution": 8,

                "colorDepth": 8

            },

            "tagList": [

                "Entrance",

                "Parking",

                "Security"

            ]

        },

        "mapCoordinate": {

            "x": 86.40239,

            "y": 37.284157,

            "z": 0,

            "unit": "FEET"

        },

        "currentlyTracked": true,

        "confidenceFactor": 48,

        "statistics": {

            "currentServerTime": "2017-09-06T15:35:38.562+0100",

            "firstLocatedTime": "2017-08-28T11:34:26.117+0100",

            "lastLocatedTime": "2017-09-06T15:35:37.185+0100",

            "maxDetectedRssi": {

                "apMacAddress": "00:2b:01:00:02:00",

                "band": "IEEE_802_11_B",

                "slot": 0,

                "rssi": -33,

                "antennaIndex": 1,

                "lastHeardInSeconds": 3

            }

        },

        "historyLogReason": null,

        "geoCoordinate": {

            "latitude": 36.12575840185173,

            "longitude": -97.06667675491467,

            "unit": "DEGREES"

        },

        "rawLocation": {

            "rawX": -999,

            "rawY": -999,

            "unit": "FEET"

        },

        "networkStatus": "ACTIVE",

        "changedOn": 1504708537185,

        "ipAddress": [

            "10.10.20.160"

        ],

        "userName": "",

        "ssId": "test",

        "sourceTimestamp": null,

        "band": "IEEE_802_11_B",

        "apMacAddress": "00:2b:01:00:02:00",

        "dot11Status": "ASSOCIATED",

        "manufacturer": "Trw",

        "areaGlobalIdList": [

            70,

            3,

            2,

            1,

            16,

            17,

            58,

            103,

            106,

            73

        ],

        "detectingControllers": "10.10.20.90",

        "bytesSent": 132,

        "bytesReceived": 120,

        "guestUser": false

    }

]

Cisco Employee

Re: CMX - How to get zone's latitude and longitude

thanks Matthew

Re: CMX - How to get zone's latitude and longitude

Hi,

I want to get the geoCoordinates of Tags NOT clients.

I have setup GPS Markers in Cisco PI and exported them to Cisco CMX.

In Cisco CMX I can see the GPS markers and when I issue the request for all clients:

https://x.x.x.x/api/location/v2/clients

I correctly see that my clients have geoCoordinates:

  "mapInfo":{ 

    "floorDimension":{ 

      "length":126.2584,

      "width":91.7689,

      "height":17.0,

      "offsetX":0.0,

      "offsetY":0.0,

      "unit":"FEET"

    },

  },

  "mapCoordinate":{ 

    "x":71.72857,

    "y":116.94428,

    "z":0.0,

    "unit":"FEET"

  },

  "geoCoordinate":{ 

    "latitude":49.18872340344746,

    "longitude":-122.98728307121202,

    "unit":"DEGREES"

  },

  "rawLocation":{ 

    "rawX":-999.0,

    "rawY":-999.0,

    "unit":"FEET"

  },

}

My question is this.

Is it possible to have tags also send me their geoCoordinates?

If I do request for all tags:

https://x.x.x.x/api/location/v1/tags


I get the following:

{

 

  "mapCoordinate":{

    "x":55.90457,

    "y":88.335434,

    "z":0.0,

    "unit":"FEET"

  },

  "geoCoordinate":null,

  "rawLocation":{

    "rawX":-999.0,

    "rawY":-999.0,

    "unit":"FEET"

  },

}


I tried subscribing for tag location update notifications with "condition": "locationupdate.deviceType == tag"


but the location updates I get have incorrect geoCoordinate data:


{

  "notifications":[

    {

      "notificationType":"locationupdate",

      "subscriptionName":"my_subscription",

      "locationCoordinate":{

        "x":55.90457,

        "y":88.335434,

        "z":0.0,

        "unit":"FEET"

      },

      "geoCoordinate":{

        "latitude":-999.0,

        "longitude":-999.0,

        "unit":"DEGREES"

      },

      "confidenceFactor":32.0,

      "apMacAddress":"NOT APPLICABLE",

      "associated":false,

      "username":"NOT APPLICABLE",

      "ipAddress":[

        "NOT APPLICABLE"

      ],

      "ssid":"NOT APPLICABLE",

      "band":"NOT APPLICABLE",

      "floorId":-4564359589109170133,

      "floorRefId":"-4564359589109170133",

      "entity":"TAGS",

      "deviceId":"00:09:62:06:fc:19",

      "lastSeen":"2018-03-16T10:28:50.622-0700",

      "rawLocation":{

        "rawX":-999.0,

        "rawY":-999.0,

        "unit":"FEET"

      },

    }

  ]

}


If I change my condition to "condition": "locationupdate.deviceType == client


Then I correctly get notifications with geoCoordinates:

  'manufacturer':'Intel',

  'ipAddress':[ 

    'NOT APPLICABLE'

  ],

  'subscriptionName':'combox_integration',

  'rawLocation':{ 

    'rawY':-999.0,

    'unit':'FEET',

    'rawX':-999.0

  },

  'username':'NOT APPLICABLE',

  'timestamp':1521221438476,

  'tagVendorData':None,

  'band':'NOT APPLICABLE',

  'confidenceFactor':120.0,

  'entity':'WIRELESS_CLIENTS',

  'floorRefId':'-4564359589109170133',

  'locationMapHierarchy':'PRH_POC>PRH-Site>PRH-Main>Coverage Area-1506551599305',

  'notificationType':'locationupdate',

  'ssid':'NOT APPLICABLE',

  'lastSeen':'2018-03-16T10:30:38.476-0700',

  'apMacAddress':'NOT APPLICABLE',

  'deviceId':'84:3a:4b:de:be:68',

  'associated':False,

  'eventId':36128,

  'floorId':-4564359589109170133,

  'geoCoordinate':{ 

    'latitude':49.18878387071896,

    'unit':'DEGREES',

    'longitude':-122.98740854528127

  },

  'locationCoordinate':{ 

    'z':0.0,

    'y':117.03,

    'unit':'FEET',

    'x':34.94

  }

}


Does geoCoordinates only work for clients and not for tags?

Frequent Contributor

Re: CMX - How to get zone's latitude and longitude

Hi,

Which version of CMX are you using?  I will ask the CMX engineering team for us.

Thanks.

Re: CMX - How to get zone's latitude and longitude

CMX 10.3.1-35

Thank you!

Re: CMX - How to get zone's latitude and longitude

By the way, I opened a seperate question for this here:

Re: Get GeoCoordinates of Tags NOT Clients

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.