WiFi Motion Core APIs (v3-x-x)

The WiFi Motion Core Cloud APIs facilitate the creation, configuration, and management of WiFi Motion networks via RESTful APIs. Additionally, it offers interfaces for accessing topologies, events, and motion data. This documentation outlines the endpoints for engaging with the WiFi Motion cloud and includes specifications for the following APIs:

Network Settings

Motion History

The motion history APIs provide various historical motion metrics.

Live Motion

The live motion API opens a web socket and triggers the network to emit recorded motion at a 500ms interval.

Events

The events APIs allow you to retrieve, create or tag events emitted by the network.

Network Status

High-level APIs for retrieving the network's topology, last status message, or to view or modify the network's metadata.

Location Data

The location data APIs expose localized motion data. Localization happens on a per mac, or custom location name base.

Find

A set of APIs to find a network in the WiFi Motion Cloud. Individual, or groups of networks can be queried by their primary identifiers or by MAC.

Insights (advanced)

APIs of the internal Home Insights Microservice. Used for motion-based activity and sleep insights.

Config (advanced)

Fine-grained network configuration. These APIs give full access to the underlying motion detection controls, but have no safeguards to prevent unwanted side effects. For friendlier configuration management, see the Network Settings APIs.

Node (advanced)

Interface to manage the access point or mesh nodes of a network. Provides APIs to find, delete or alter the configuration of nodes.

Gatekeeper (advanced)

Endpoint used by WiFi Motion agent for the initial cloud connection. This API returns credentials for connecting to the MQTT broker and stores the initial network configuration. We don't recommend using this API directly.

Management (advanced)

Execute commands directly on the network's access point, or on a mesh node. We recommend using the NOC Management Page for these actions.

Debug (advanced)

Debug endpoints, for internal use only.

Application Settings (advanced)

The application settings API allows users to create, update, delete, and retrieve configurations based on network ID.

Download OpenAPI description
Languages
Servers
Mock server

https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/

Network Settings

Operations

Motion History

Operations

Live Motion

Operations

Detailed live motion

Request

Opens connection to stream live motion data from the network. The websocket will stream motion data updates live from the network until closed.

Path
network_idintegerrequired

Motion Network ID (returned as 'id' by Find API calls)

curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/motion/live'

Responses

OK.

Bodyapplication/json
countnumber

Number of samples (number of strides in the inner data dimension) - always 1

locArray of arrays

The first entry is a string representing the MAC addresses near which motion has been localized. If present, the second entry is p_confidence a float representing how sure the algorithm is of its decision.

loc_namestring

User indicated location of the device being localized to in loc field (if provided, empty string otherwise)

loc_confArray of numbers

The location confidence information as an array of number (float) for the corresponding loc output index. Available as debug output values when Guardian Config -> live_motion -> loc_conf_enable = 1. Supported as of GuardianCore = 0.7.2

linksArray of strings(LinkId)

Array of link IDs (outer data dimension). Format is dst_mac-src_mac

intervalnumber

Milliseconds/sample (stride time of inner data dimension) - always 500ms

tsnumber(float)

Timestamp of the first sample in the stream (start time of inner data dimension)

last_motionnumber(float)

UTC timestamp

dataobject

Data fields as 2D arrays

Response
application/json
{ "count": 0, "loc": [], "loc_name": "string", "loc_conf": [ 0 ], "links": [ "string" ], "interval": 0, "ts": 0.1, "last_motion": 0.1, "data": { "mkai": [ … ], "throughput": [ … ], "mconf": [ … ], "msad": [ … ], "lraw": [ … ], "o.rst": [ … ], "o.bw": [ … ], "o.snr": [ … ], "o.nse": [ … ], "o.pwr": [ … ], "o.dsnr": [ … ], "o.dsne": [ … ], "o.dpwr": [ … ], "snr": [ … ], "jconf": [ … ], "jraw": [ … ], "jtype": [ … ], "zzscore": [ … ], "debug": [ … ] } }

PubNub start

Request

Path
network_idintegerrequired

Motion Network ID (returned as 'id' by Find API calls)

Bodyapplication/json
subscribeKeystringrequired
publishKeystringrequired
authKeystringrequired
channelstringrequired
ttlinteger

If not refreshed after this many seconds the publishing will automatically cease.

Default 300
curl -i -X POST \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/motion/pubnub' \
  -H 'Content-Type: application/json' \
  -d '{
    "subscribeKey": "string",
    "publishKey": "string",
    "authKey": "string",
    "channel": "string",
    "ttl": 300
  }'

Responses

OK.

Bodyapplication/json
statusinteger
successinteger
Response
application/json
{ "status": 0, "success": 0 }

Motion stream start

Request

Path
network_idintegerrequired

Motion Network ID (returned as 'id' by Find API calls)

Bodyapplication/json
ttlinteger

If not refreshed after this many seconds the publishing will automatically cease.

Default 120
curl -i -X POST \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/motion/refresh' \
  -H 'Content-Type: application/json' \
  -d '{
    "ttl": 120
  }'

Responses

OK.

Bodyapplication/json
statusinteger
successinteger
Response
application/json
{ "status": 0, "success": 0 }

Events

Operations

Network Status

Operations

Network Meta

Operations

Location Data

Operations

Find

Operations

Config

Operations

Node

Operations

Gatekeeper

Operations

Management

Operations

Debug

Operations

Insights

Operations

Insights v2

Operations

Universal Alerting

Operations

Application Settings

Operations