SwitchBotAPI
SwitchBotAPI copied to clipboard
Add 'No Motion' event to camera webhook
Current Situation
We currently get a notification when motion is detected but not when no motion is detected after that. The camera must keep track of it as generating constant motion prevents new motion events from coming through.
Proposed Change
Add a new webhook event for the camera when it determines motion is no longer detected.
{
"eventType": "changeReport",
"eventVersion": "1",
"context": {
"deviceType": "WoCamera",
"deviceMac": DEVICE_MAC_ADDR,
"detectionState": "NOT_DETECTED",
"timeOfSample": 123456789
}
}
Additional Context
Current, I have to reset the alarm status in my app using a timer. But then I will only get a notification of new movement if the camera has at some point decided there is no movement. This means the alarm status in the app is out of sync. so it cam appear tat it has stopped working. If there was a notification for NOT_DETECTED then I could use that to switch off the alarm status ready for a new detection.