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:
The live motion API opens a web socket and triggers the network to emit recorded motion at a 500ms interval.
High-level APIs for retrieving the network's topology, last status message, or to view or modify the network's metadata.
The location data APIs expose localized motion data. Localization happens on a per mac, or custom location name base.
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.
APIs of the internal Home Insights Microservice. Used for motion-based activity and sleep insights.
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.
Interface to manage the access point or mesh nodes of a network. Provides APIs to find, delete or alter the configuration of nodes.
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.
Execute commands directly on the network's access point, or on a mesh node. We recommend using the NOC Management Page for these actions.
https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/
https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/api/v1/universal-alert
curl -i -X GET \
'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/api/v1/universal-alert?network_id=0'
200 - OK
{ "alerts": [ { … } ] }
The RRULE string which can be generated here: https://jakubroztocil.github.io/rrule/
Note that new lines must be explicitly escaped with \n
. Note that providing the RRULE string without the RRULE will result in a yearly alert. For a single occurrence, COUNT=1 must be provided
Example: DTSTART;TZID=America/New_York:20211201T163000\nRRULE:FREQ=WEEKLY;COUNT=30;INTERVAL=1;WKST=MO
Motion monitor object. monitor_mode
Specifies the type of monitoring.
NONE
: Ignore motion and triggers actions at specified time.
SIMPLE
: Checks period between alert trigger and duration_minutes
.
INACTIVITY
: checks for inactivity in the given period. inactive_minutes
specifies the length of the inactivity. repeat_monitoring
specifies if the alert should continue after inactivity was detected
The length of time in minutes of the monitored duration. The cloud will determine the start time per the timezone in the rrule field by subtracting this from the targeted time of the monitor completion (in which the result is sent).
If the monitor_mode
is "INACTIVITY", this boolean determines if the alert should continue monitoring if inactivity is detected. Defaults to true
The contents of this object are decided by the client and will not persist if the alert is deleted.
Any string that can be used for analytics tracing. Defaults to "" if the field is not included.
Actions to perform when no motion is detected
Actions to perform when motion is detected
Actions to perform when there is no record of past motion on the network
https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/api/v1/universal-alert
curl -i -X POST \
'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/api/v1/universal-alert?network_id=0' \
-H 'Content-Type: application/json' \
-d '{
"enabled": true,
"alert_name": "",
"rrule": "",
"monitor": {
"monitor_mode": "NONE",
"duration_minutes": 0,
"inactive_minutes": 0,
"repeat_monitoring": true,
"stop_event_filter": {}
},
"meta": {},
"analytics_tag": "",
"no_motion_actions": [
{
"action": "string",
"user_ids": [
0
],
"payload": {}
}
],
"motion_actions": [
{
"action": "string",
"user_ids": [
0
],
"payload": {}
}
],
"unknown_actions": [
{
"action": "string",
"user_ids": [
0
],
"payload": {}
}
],
"error_actions": [
{
"action": "string",
"user_ids": [
0
],
"payload": {}
}
]
}'
201 - Created
{ "uuid": "Unique alert identifier", "enabled": true, "target": "2021-12-13T16:00:00.000+00:00", "timezone": "America/New_York", "alert_name": "client decided label", "rrule": "DTSTART;TZID=America/New_York:20211201T163000\nRRULE:FREQ=WEEKLY;COUNT=30;INTERVAL=1;WKST=MO", "monitor": { "monitor_mode": "INACTIVITY", "duration_minutes": 10, "inactive_minutes": 2, "repeat_monitoring": true }, "meta": { "anything": "client controlled writable space" }, "analytics_tag": "caregiver_alert_trace", "no_motion_actions": [ { … } ], "motion_actions": [ { … } ], "unknown_actions": [], "error_actions": [], "id": 2255 }
https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/api/v1/universal-alert/status
curl -i -X GET \
'https://docs.cognitivesystems.com/_mock/assets/specs/mns/v3-x-x/api/v1/universal-alert/status?network_id=0'
200 - OK
{ "alerts": [ { … } ] }