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

Events

Operations

Network event history

Request

Retrieve a list of events.

Path
network_idintegerrequired

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

Query
frominteger

To go FORWARD in time, provide the UTC timestamp of the newest report client has received.

tointeger

To go BACK in time, provide the UTC timestamp of the oldest report client has received.

filterstring

Only return a particular category of event: Link, Network, Motion

lastinteger

Maximum number of events to return, default is 10

Default 10
sortboolean

When true the returned events will be post-sorted by timestamp (in case it's possible they were written out of order)

Default false
event_typesstring

Specifies the event parameter used to filter the query results

curl -i -X GET \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/events/history?event_types=string&filter=string&from=0&last=10&sort=false&to=0'

Responses

OK, will return an array of events.

Bodyapplication/jsonArray [
_idstring

Event uuid (for tagging)

categorystringrequired

Event category (for filtering)

Enum"Link""Network""Motion""System"
locArray of any

Event location

detailobject

Event detail k/v pairs

link_dst_namestring

Link destination friendly name

network_idintegerrequired

Guardian network_id

tsnumber(float)required

UTC timestamp

evt_detected_tsnumber(float)

Present in MotionStoppedEvent. References the UTC timestamp of preceding MotionDetectedEvent.

intensity_windowArray of numbers(float)

Array of float, of length guardian_config.motion_events.density_window -1 (Nominally len 7). Corresponds to the motion intensity values in the integration buffer at the time of the DetectedEvent.

link_idstring(LinkId)

DST_MAC-SRC_MAC using 3 lsbs of each address and without the colons. Ex: 001122-001133

loc_namestring

First location friendly name

tagstring

Event tag. Note that this field is always space-padded to 10 characters.

link_src_namestring

Link source friendly name

guardian_idstringrequired

Guardian deviceId

node_idinteger

Database id of this node that generate the event

deviceIdstring

Device identification, such as mac address

node_namestring

Alternative device identification, that can be used by vendor from deviceId

debugobject(Root Type for MotionStoppedEventDebug)

Motion detection parameters from event generator. Used for debug and sensitivity calibration purposes. Present in MotionStoppedEvent on newer firmware.

Example: {"linkSens":{},"msad":[187.22],"links":["4C72900A6B.30894ab76326"],"mconf":[80],"sens":1}
armedinteger

Feedback of armed from GuardianConfig.motion_events

If 0, this event will not be stored in history or pushed to the user.

eventstringrequired

Event identifier

Enum"MotionDetectedEvent""MotionStoppedEvent""LinkConnectedEvent""LinkDisconnectedEvent""LinkLowThroughputEvent""LinkCreatedEvent""MemberArrivedEvent""MemberLeftEvent""MemberJoinedEvent""MemberRemovedEvent"
_consumerstring

The consumer for Custom Alerts.

dataobject

Data from Custom Alerts.

]
Response
application/json
[ { "_id": "string", "category": "Link", "loc": [ … ], "detail": { … }, "link_dst_name": "string", "network_id": 0, "ts": 0.1, "evt_detected_ts": 0.1, "intensity_window": [ … ], "link_id": "string", "loc_name": "string", "tag": "string", "link_src_name": "string", "guardian_id": "string", "node_id": 0, "deviceId": "string", "node_name": "string", "debug": { … }, "armed": 0, "event": "MotionDetectedEvent", "_consumer": "string", "data": { … } } ]

Live event stream

Request

Opens a connection to stream live events from the network. The websocket will stream any new events from the network until closed. Will contain LinkEvent, NetworkEvent and MotionEvents unless filtered.

Path
network_idintegerrequired

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

Query
filterstring

Only subscribe to a particular type of event: Link, Network, Motion

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

Responses

OK, WebSocket will return events as they are generated by the network.

Bodyapplication/json
_idstring

Event uuid (for tagging)

categorystringrequired

Event category (for filtering)

Enum"Link""Network""Motion""System"
locArray of any

Event location

detailobject

Event detail k/v pairs

link_dst_namestring

Link destination friendly name

network_idintegerrequired

Guardian network_id

tsnumber(float)required

UTC timestamp

evt_detected_tsnumber(float)

Present in MotionStoppedEvent. References the UTC timestamp of preceding MotionDetectedEvent.

intensity_windowArray of numbers(float)

Array of float, of length guardian_config.motion_events.density_window -1 (Nominally len 7). Corresponds to the motion intensity values in the integration buffer at the time of the DetectedEvent.

link_idstring(LinkId)

DST_MAC-SRC_MAC using 3 lsbs of each address and without the colons. Ex: 001122-001133

loc_namestring

First location friendly name

tagstring

Event tag. Note that this field is always space-padded to 10 characters.

link_src_namestring

Link source friendly name

guardian_idstringrequired

Guardian deviceId

node_idinteger

Database id of this node that generate the event

deviceIdstring

Device identification, such as mac address

node_namestring

Alternative device identification, that can be used by vendor from deviceId

debugobject(Root Type for MotionStoppedEventDebug)

Motion detection parameters from event generator. Used for debug and sensitivity calibration purposes. Present in MotionStoppedEvent on newer firmware.

Example: {"linkSens":{},"msad":[187.22],"links":["4C72900A6B.30894ab76326"],"mconf":[80],"sens":1}
armedinteger

Feedback of armed from GuardianConfig.motion_events

If 0, this event will not be stored in history or pushed to the user.

eventstringrequired

Event identifier

Enum"MotionDetectedEvent""MotionStoppedEvent""LinkConnectedEvent""LinkDisconnectedEvent""LinkLowThroughputEvent""LinkCreatedEvent""MemberArrivedEvent""MemberLeftEvent""MemberJoinedEvent""MemberRemovedEvent"
_consumerstring

The consumer for Custom Alerts.

dataobject

Data from Custom Alerts.

Response
application/json
{ "_id": "string", "category": "Link", "loc": [ null ], "detail": { "property1": "string", "property2": "string" }, "link_dst_name": "string", "network_id": 0, "ts": 0.1, "evt_detected_ts": 0.1, "intensity_window": [ 0.1 ], "link_id": "string", "loc_name": "string", "tag": "string", "link_src_name": "string", "guardian_id": "string", "node_id": 0, "deviceId": "string", "node_name": "string", "debug": { "linkSens": {}, "msad": [ … ], "links": [ … ], "mconf": [ … ], "sens": 1 }, "armed": 0, "event": "MotionDetectedEvent", "_consumer": "string", "data": { "title": "string", "uuid": "string", "id": 0, "first_name": "string", "last_name": "string", "sub": "string", "user": { … } } }

Event tagging

Request

Adds a string based tag to an event. Tags greater than 10 characters are truncated.

Path
network_idintegerrequired

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

Query
eventidstring
tagstring
curl -i -X POST \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/events/tag?eventid=string&tag=string'

Responses

Event stored OK

Bodyapplication/json
_idstring

Event uuid (for tagging)

categorystringrequired

Event category (for filtering)

Enum"Link""Network""Motion""System"
locArray of any

Event location

detailobject

Event detail k/v pairs

link_dst_namestring

Link destination friendly name

network_idintegerrequired

Guardian network_id

tsnumber(float)required

UTC timestamp

evt_detected_tsnumber(float)

Present in MotionStoppedEvent. References the UTC timestamp of preceding MotionDetectedEvent.

intensity_windowArray of numbers(float)

Array of float, of length guardian_config.motion_events.density_window -1 (Nominally len 7). Corresponds to the motion intensity values in the integration buffer at the time of the DetectedEvent.

link_idstring(LinkId)

DST_MAC-SRC_MAC using 3 lsbs of each address and without the colons. Ex: 001122-001133

loc_namestring

First location friendly name

tagstring

Event tag. Note that this field is always space-padded to 10 characters.

link_src_namestring

Link source friendly name

guardian_idstringrequired

Guardian deviceId

node_idinteger

Database id of this node that generate the event

deviceIdstring

Device identification, such as mac address

node_namestring

Alternative device identification, that can be used by vendor from deviceId

debugobject(Root Type for MotionStoppedEventDebug)

Motion detection parameters from event generator. Used for debug and sensitivity calibration purposes. Present in MotionStoppedEvent on newer firmware.

Example: {"linkSens":{},"msad":[187.22],"links":["4C72900A6B.30894ab76326"],"mconf":[80],"sens":1}
armedinteger

Feedback of armed from GuardianConfig.motion_events

If 0, this event will not be stored in history or pushed to the user.

eventstringrequired

Event identifier

Enum"MotionDetectedEvent""MotionStoppedEvent""LinkConnectedEvent""LinkDisconnectedEvent""LinkLowThroughputEvent""LinkCreatedEvent""MemberArrivedEvent""MemberLeftEvent""MemberJoinedEvent""MemberRemovedEvent"
_consumerstring

The consumer for Custom Alerts.

dataobject

Data from Custom Alerts.

Response
application/json
{ "_id": "string", "category": "Link", "loc": [ null ], "detail": { "property1": "string", "property2": "string" }, "link_dst_name": "string", "network_id": 0, "ts": 0.1, "evt_detected_ts": 0.1, "intensity_window": [ 0.1 ], "link_id": "string", "loc_name": "string", "tag": "string", "link_src_name": "string", "guardian_id": "string", "node_id": 0, "deviceId": "string", "node_name": "string", "debug": { "linkSens": {}, "msad": [ … ], "links": [ … ], "mconf": [ … ], "sens": 1 }, "armed": 0, "event": "MotionDetectedEvent", "_consumer": "string", "data": { "title": "string", "uuid": "string", "id": 0, "first_name": "string", "last_name": "string", "sub": "string", "user": { … } } }

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