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

Update Global Settings

Request

Update global network configurations.

Path
network_idintegerrequired

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

Query
updateboolean

When true the new configuration is immediately propagated to the network this node is part of.

If this value is false, the change will be propagated to edge either when the device is rebooted or an update is triggered.

Default false
Bodyapplication/json
zone_priority_listArray of strings

Locations the device selection algorithm will prioritize. Setting this parameter to [] will turn off prioritization. Updates require the complete array to be included in the request.

motion_events_enabledinteger

Enable motion events. On detected motion, the network emits a MotionDetectedEvent.

Enum01
device_eventsinteger

Enable Device Connection Events.

Requires global sounding_mode to equal deny and individual devices' sounding_mode to equal allow. When the connection state of device changes, an event is emitted. Possible events are: DeviceConnectedEvent, DeviceDisconnectedEvent and DeviceTimedOutEvent

Enum01
motion_history_enablednumber

Enable historical motion data from the network. The data can be queried through the Motion History APIs.

Enum01
mesh_auto_disableinteger

Disable motion detection on all current and added mesh nodes.

Enum01
motion_events_armedinteger

Enable storage of motion events. Requires motion_events_enabled to be enabled. The stored events can be queried through the Events APIs.

Enum01
motion_pausedinteger

Pauses all motion detection. While paused, the network can't receive setting changes.

Enum01
leafblower_cutoffnumber(float)[ -1.1 .. 1 ]

Advanced - Minimum score for device selection algorithm. Set to -1.1 to ignore device quality, and always use them for motion detection. This feature should be used in conjunction with the sounding_mode features.

link_limitnumber[ 0 .. 10 ]

Maximum number of motion-detecting devices per access point or mesh node

pet_modeinteger

When enabled, pet motion is less likely to generate a MotionDetectedEvent. Can only be used when global sensitivity is set to high (1.0) and all clients' sensitivity_mode is global.

Enum01
cooldowninteger(seconds)

Represents the duration of inactivity following a MotionDetectedEvent, that the network keeps monitoring for motion. Once inactivity is observed, the network emits a MotionStoppedEvent and concludes the event window.

sensitivitynumber(float)

Global motion detection sensitivity (1.0 - high, 2.0 - medium, 3.0 - low, 7.0 - very-low)

sounding_modestring

This parameter controls the default leaf selection policy for the network, the two policy modes are allow and deny.

Allow mode: leafs will be selected as best determined by leaf blower. Leaf(s) can be blocked from selection by setting txenble=0 for that leaf(s).

Deny mode: leafs that are not explicitly listed via a whitelist will be disallowed from sounding.

Note switching this mode will clear any existing device device availability settings and all devices will revert to available for allow mode or unavailable for deny mode.

Enum"allow""deny"
curl -i -X PATCH \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/sounding/settings?update=false' \
  -H 'Content-Type: application/json' \
  -d '{
    "cooldown": 20,
    "leafblower_cutoff": -1.1
  }'

Responses

200 - OK

Bodyapplication/json
statusinteger

0 failure

1 full success

2 some changes failed

3 an IoT update was requested but network has not yet started up

successinteger

1 if the operation was successful, 0 otherwise

detailsobject(Root Type for WarningErrors)
Example: {"warnings":[],"errors":[]}
Response
application/json
{ "status": 0, "success": 0, "details": { "warnings": [], "errors": [] } }

Retrieve Client Configuration

Request

Retrieve sounding clients and configurations.

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}/sounding/clients'

Responses

Bodyapplication/json
devicesArray of objects(SoundingClientDeviceStatus)
Response
application/json
{ "devices": [ { … } ] }

Update Client Configuration

Request

Update sounding client[s] configuration.

Path
network_idintegerrequired

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

Query
updateboolean

When true the new configuration is immediately propagated to the network this node is part of.

If this value is false, the change will be propagated to edge either when the device is rebooted or an update is triggered.

Default false
Bodyapplication/json
devicesArray of objects(SoundingClientDeviceConfig)required
Example: [{"id":0,"location":"LocationA"},{"mac":"00:11:22:33:44:55","sensitivity":1,"sounding_mode":"allow"}]
devices[].​macstring

Mac address of the target device, either this or id must be provided.

Example: "22:33:44:ff:ee:dd"
devices[].​idstring

Internal node_id of the target node, either this or mac must be provided.

devices[].​friendly_namestring

Human readable name assigned to the Device or Node. Maximum of 256 characters, supporting letters, spaces, digits, with only the following special characters: =, +, -, _, @, !. Supports base64 encoding. Can also be an empty string.

Example: "name"
devices[].​locationstring

Device location name assigned to the Device or Node. Maximum of 256 characters, supporting letters, spaces, digits, with only the following special characters: =, +, -, _, @, !. Supports base64 encoding. Can also be an empty string.

Example: "location"
devices[].​sensitivity_modestring

Indicates whether the device is using the global sensitivity setting or is being overridden at the device level.

Enum"override""global"
devices[].​sensitivitynumber

Current sensitivity of the device

Only valid when sensitivity_mode = override, otherwise an error will be returned.

devices[].​sounding_modestring

Controls if the device can be used for sounding.

Enum"allow""deny"
Example: "allow"
devices[].​sounding_meshstring

Applicable only to nodes. Controls if the node will accept or reject sounding on mesh links.

Enum"allow""deny"
curl -i -X PATCH \
  'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/network/{network_id}/sounding/clients?update=false' \
  -H 'Content-Type: application/json' \
  -d '{
    "devices": [
      {
        "id": 0,
        "location": "LocationA"
      },
      {
        "mac": "00:11:22:33:44:55",
        "sensitivity": 1,
        "sounding_mode": "allow"
      }
    ]
  }'

Responses

Bodyapplication/json
statusinteger

0 failure

1 full success

2 some changes failed

3 an IoT update was requested but network has not yet started up

successinteger

1 if the operation was successful, 0 otherwise

detailsobject(Root Type for WarningErrors)
Example: {"warnings":[],"errors":[]}
Response
application/json
{ "status": 0, "success": 0, "details": { "warnings": [], "errors": [] } }

Motion History

Operations

Live Motion

Operations

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