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 Status

Operations

Network Meta

Operations

Location Data

Operations

Find

Operations

Config

Operations

Node

Operations

Gatekeeper

Operations

Gatekeeper

Request

This is the entry point for new devices that are unable to discover an existing local Motion Network

Note that this endpoint does not require authentication even if it's otherwise configured.

Bodyapplication/jsonrequired
standalonebooleanrequired

Stand-alone mode (legacy, should always be set to true)

factory_resetbooleanrequired

If True indicates that the device has been freshly factory reset

capabilitiesArray of strings

Report the device platform capabilities

radar_statusobject(RadarStatusReport)required
radar_status.​loadArray of strings

Device load averages (1min, 5min, 15min)

radar_status.​bridge_uptimenumber

Duration of bridge process uptime in seconds

radar_status.​linksArray of objects(RadarNetworkLink)

Details on all active motion links

radar_status.​p2p_bssidstring(MachineAddress)

MAC in 00:11:22:33:44:55 format

radar_status.​ap_bssid_5ghzstring(MachineAddress)

MAC in 00:11:22:33:44:55 format

radar_status.​fw_versionstring

Halo Edge Firmware version

radar_status.​root_modenumber

This device's role in the wifi mesh network topology: 0 - unknown, 1 - slave, 2 - master

Default 0
Enum012
radar_status.​hw_idstring

Hardware platform identifier

radar_status.​uptimestring

Device uptime (seconds)

radar_status.​location_idstring

OVSDB location id

radar_status.​mem_statsobject

measured memory usage inside the device per process, key is process name and value is process memory usage

radar_status.​tsnumber(float)

UTC timestamp

radar_status.​versionobject

Radar components version

radar_status.​status_timenumber

Duration of time it took to generate this status report on device (sec)

radar_status.​gw_ip_changeboolean
radar_status.​ap_bssid_6ghzstring
radar_status.​base_image_versionstring or null
radar_status.​updatedboolean

flag indicator that link stats have changed since the last status

radar_status.​blower_timenumber

Duration of time it took to generate this leafblower report on device (sec)

radar_status.​UdiStatsReportobject(UdiStatsReport)
radar_status.​memobject

Device memory usage diagnostics

radar_status.​interfacesArray of objects(RadarNetworkInterface)

Details on all available network interfaces

Example: [{"status":"NoMedia","mesh_paths":[{"expire_time":-1801651,"metric":90041760,"next_hop_mac":"f","target_mac":"esse amet nulla eiusmod"},{"expire_time":69043633,"metric":-61487094,"next_hop_mac":"in","target_mac":"tempor"}],"wifi_txpwr":18535595,"name":"minim","bridge_id":"sunt","ip":"fugiat","wifi_bw":-66349216,"mac":"nisi cillum mollit magna voluptate","wifi_channel":-1399905,"motion_enabled":false,"type":"WIFI_CLIENT","wifi_ssid":"ut"}]
radar_status.​node_idstring

OVSDB node id

radar_status.​deviceIdstring

radar_deviceId from Gatekeeper

radar_status.​gateway_bssidstring(MachineAddress)

MAC in 00:11:22:33:44:55 format

radar_status.​_ageinteger

last status cycle the radar was seen

radar_status.​cpu_statsobject or null

measured CPU usage inside the device per process, key is process name and value is process cpu usage

radar_status.​ap_bssid_2ghzstring(MachineAddress)

MAC in 00:11:22:33:44:55 format

radar_status.​hw_versionstring

Hardware platform version

radar_status.​mesh_bssidstring(MachineAddress)

MAC in 00:11:22:33:44:55 format

radar_status.​dhcpobject

map of dhcp mac address and dhcp stats object

radar_status.​hw_variantstring

OVSDB model variant

radar_status.​meta_location_idstring
radar_status.​zmq_restart_countintegerDeprecated

(Deprecated) Number of restart count for nng socket

master_failedbooleanrequired

If True indicates that the device was unable to contact the local master

debugobject

Extra debug fields to understand delays in gatekeeper startup

curl -i -X POST \
  https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/gatekeeper \
  -H 'Content-Type: application/json' \
  -d '{
    "standalone": true,
    "factory_reset": true,
    "capabilities": [
      "string"
    ],
    "radar_status": {
      "load": [
        "string"
      ],
      "bridge_uptime": 0,
      "links": [
        {
          "ip": "string",
          "ht_capabilities": "string",
          "implicit_measurements": "string",
          "serial_number": "string",
          "connected_time": "string",
          "vht_capabilities": "string",
          "max_rx_streams": "string",
          "uptime": "string",
          "motion_state": "string",
          "tx_bitrate": "string",
          "tx_retries": "string",
          "fw_rssi": 0,
          "peer_type": "string",
          "hostname": "string",
          "tx_failed": "string",
          "rx_bitrate": "string",
          "motion_type": "MOTION_NONE",
          "mac": "string",
          "last_heard": "string",
          "if_name": "string",
          "ifname": "string",
          "if_mac": "string",
          "if_type": "MESH",
          "if_ch": 0,
          "aid": "string",
          "tx_bytes": "string",
          "rx_bytes": "string",
          "wifi_protocol": "WIRED",
          "sounding_rate": "string",
          "node": "string",
          "rssi": "string",
          "rssi_db": "string",
          "implicit_error_count": "string",
          "csi_report_count": "string",
          "v_matrix_report_count": "string",
          "cv_matrix_report_count": "string",
          "mconf_zero_count": 0,
          "phy": "string",
          "implicit_bw_downgrades": "string",
          "implicit_dsss": "string",
          "implicit_legacy_20": "string",
          "implicit_legacy_40": "string",
          "implicit_legacy_80_80": "string",
          "implicit_legacy_80": "string",
          "implicit_legacy_160": "string",
          "implicit_cck": "string",
          "dhcp_id": "string",
          "dhcp_expire": "string",
          "ht_supported": "string",
          "vht_supported": "string",
          "rate_ms": "string",
          "wifi_txpwr": "string"
        }
      ],
      "p2p_bssid": "string",
      "ap_bssid_5ghz": "string",
      "fw_version": "string",
      "root_mode": 0,
      "hw_id": "string",
      "uptime": "string",
      "location_id": "string",
      "mem_stats": {
        "property1": "string",
        "property2": "string"
      },
      "ts": 0.1,
      "zmq_restart_count": 0,
      "version": {},
      "status_time": 0,
      "gw_ip_change": true,
      "ap_bssid_6ghz": "string",
      "base_image_version": "string",
      "updated": true,
      "blower_time": 0,
      "UdiStatsReport": {
        "start_epoch_ms": 0,
        "start_mac_tsf": 0,
        "count": 0,
        "bw": [
          0.1
        ],
        "downgrades": 0,
        "invalid": 0,
        "Tmax_ms": 0.1,
        "Tmin_ms": 0.1,
        "Tmean_ms": 0.1,
        "Tstd_ms": 0.1,
        "udi_error": 0.1,
        "dbg_pe_cnt": [
          0,
          0,
          0,
          0,
          0
        ]
      },
      "mem": {
        "avail": "string",
        "total": "string",
        "free": "string"
      },
      "interfaces": [
        {
          "status": "NoMedia",
          "mesh_paths": [
            {
              "expire_time": -1801651,
              "metric": 90041760,
              "next_hop_mac": "f",
              "target_mac": "esse amet nulla eiusmod"
            },
            {
              "expire_time": 69043633,
              "metric": -61487094,
              "next_hop_mac": "in",
              "target_mac": "tempor"
            }
          ],
          "wifi_txpwr": 18535595,
          "name": "minim",
          "bridge_id": "sunt",
          "ip": "fugiat",
          "wifi_bw": -66349216,
          "mac": "nisi cillum mollit magna voluptate",
          "wifi_channel": -1399905,
          "motion_enabled": false,
          "type": "WIFI_CLIENT",
          "wifi_ssid": "ut"
        }
      ],
      "node_id": "string",
      "deviceId": "string",
      "gateway_bssid": "string",
      "_age": 0,
      "cpu_stats": {
        "property1": 0,
        "property2": 0
      },
      "ap_bssid_2ghz": "string",
      "hw_version": "string",
      "mesh_bssid": "string",
      "dhcp": {
        "property1": {
          "ip": "string",
          "hostname": "string",
          "expiry": "string",
          "client_id": "string"
        },
        "property2": {
          "ip": "string",
          "hostname": "string",
          "expiry": "string",
          "client_id": "string"
        }
      },
      "hw_variant": "string",
      "meta_location_id": "string"
    },
    "master_failed": true,
    "debug": {
      "property1": "string",
      "property2": "string"
    }
  }'

Responses

OK - See body for more information

Bodyapplication/json
local_configobject(LocalConfig)

Node and role-specific credentials and endpoints (provided by gatekeeper)

messagestring

When result is TRYAGAIN, this field contains an explanation.

resultstringrequired

This node's role in wifi motion network:

MASTER - This node will be the master

RADAR - This node will be a slave

TRYAGAIN - Role cannot be determined at this time (see message for reason why)

UNAUTHORIZED - Node is not authorized

Enum"MASTER""RADAR""TRYAGAIN""UNAUTHORIZED"
Response
application/json
{ "local_config": { "guardian_mqtt": {}, "radar_mqtt": {} }, "message": "string", "result": "MASTER" }

Management

Operations

Debug

Operations

Insights

Operations

Insights v2

Operations

Universal Alerting

Operations

Application Settings

Operations