Office Dashboard – DNA Spaces Module

DNA Spaces Module

What is DNA Spaces?

Cisco DNA Spaces is a cloud-based location services platform. Through Cisco wireless infrastructure, organizations can gain insights into how people and things move throughout their physical spaces. With these insights, they can deliver contextual engagements that are valuable and relevant. Besides looking at where people go, organizations can also drive operational efficiencies by monitoring the location, movement, and utilization of assets. For example, retail and hospitality organizations can use the engagement toolkits to increase customer visits, revenues, and satisfaction. Through effective asset management, healthcare or workspace customers can save time and costs, and improve their productivity.

Cisco DNA Spaces comes from the July Systems acquisition made in 2018. Over the last couple of years Cisco invested into getting CMX capabilities into DNA Spaces.

(UPDATE) I wrote this post on the early days of COVID-19 and since then DNA Spaces add several new APPs to better help companies on their back to work strategy. You can find more information at this link.

(UPDATE) A new addition to DNA Spaces is the possibility of integrating Meraki MV Cameras to DNA Spaces APPs for Workspace analytics.

DNA Spaces Module Overview

DNA Spaces analytic capabilities goes well beyond the scope of OFFICE-DASHBORD, thru several different APPs DNA Spaces can add valuable insights into your workspace environment. This module will use only Detect and Locate APP, to retrieve location information on clients connected or probing your Wireless infrastructure.

DNA Spaces Module is one of the 4 Modules of Office Dashboard APP. It is written in python and it is responsible for collecting and receiving data from DNA Spaces cloud service. As some of the other modules, you can run this module as a standalone module, I will detail how in a second. There is no difference in capabilities running it as a standalone or via dashboard APP.

When running as a standalone module it will only collect information from the cloud, it will NOT be able to receive data from it. To receive notifications, it is required to run office dashboard app because of the web socket created by flask to listen to rest post requests with notifications coming from the cloud.

DNA Spaces Module detailed function diagram

Above you can see the detailed diagram of all functions inside the module. This module has 2 major layers (Collection and Translation), let’s understand what each layer/function does:

  • Data Collection layer: Responsible for handling communication to the cloud and processing the data collected. Important function within this layer is:
    • get_clients(): This function is responsible to collect a list of all clients connected or probing your wireless network.
    • get_elements(): This function is responsible to collect a list of all map elements like building, floors and zones.
    • get_floor_images(): This function is responsible to collect a list of all floor images.
  • Data Translation layer: Responsible for manipulating and reformatting the JSON data so it can be sent to the data retention module. Important functions within this layer are:
    • prime_client(): This function is responsible to prime the json response by transforming all location coordinates to float.
    • prime_influx(): This function is responsible to prime the json response from the API calls.

Configuring DNA Spaces Module

  • Create and configure a DNA Spaces Connector VM (link)
  • Connect your Wireless Lan Controller to your newly deployed Connector (link)
  • Import Controllers into your Location Hierarchy (link)

Let’s verify if you are getting location data. Go to the top left corner and click on the 3 bars before DNA Spaces to open the menu. Select “Setup” then “Wireless Networks”. On the new page select “Connect via Spaces Connector” section, then “View Connectors” under “Configure Spaces Connector”. On the new page you will see a list of connectors, select the one you just created and click on the “i” icon in the far right, you should see the detailed statistics of the selected connector. You want to see “Data Channel Connection Status:” as Active and the message rate graph in the bottom should display incoming and outgoing messages being exchanged.

Now that your controller is sending location data to DNA Spaces you are ready to configure DNA Spaces to be able to share this information via API.

  • Create an API key on Detect and Locate APP. (link)

One really important note is that to get a non empty response from DNS Spaces APIs you will need your Access Points associated to a MAP. I did NOT find any public documentation on it, but found out by opening a TAC Case with Cisco. See this link on how to setup map services.

Using DNA Spaces Module

Using this module is very straight forward. As you probably understand by now there are 2 ways of running the module. One is by running OFFICE-DASHBOARD app and let the Flask scheduler do the job and the second which we will use for now (We need all modules configured for the APP to run). So make sure you have the app installed in your linux machine, for that follow this instructions (https://github.com/diegogsoares/OFFICE-DASHBOARD#how-to-install-office-dashboard).

Once the app is installed the next step (step 5 in the link above) is to configure/update the credentials.py file with the information you got while configuring the module. You will need:

  • DNA Spaces API Token

Now that everything is installed and configured the last step is to test that everything is working, for that use this instructions https://github.com/diegogsoares/OFFICE-DASHBOARD#testing-dna-spaces-module

(venv)$ python3 modules/dnaspaces.py

approximated expected output:

(venv) Linux:OFFICE-DASHBOARD$ python3 modules/dnaspaces.py 
##############
##  List of Clients
##############
[
    {
... (OMITTED FOR BREVITY)
    }
]
##############
##  Summary of Device Types
##############
[
    {
... (OMITTED FOR BREVITY)
    }
]
##############
##  Device Counts
##############
[
    {
... (OMITTED FOR BREVITY)
    }
]
##############
##  List of MAP Elements
##############
[
    {
... (OMITTED FOR BREVITY)
    }
]
##############
##  List of MAP Images
##############
[
    {
... (OMITTED FOR BREVITY)
    }
]

(venv) Linux:OFFICE-DASHBOARD$

Resources