Skip to content

Camera Motion

mrlt8 edited this page Sep 12, 2023 · 4 revisions

Uses motion events from the Wyze Web API, so an active connection to the camera is not required - great for battery based cams.

Please note, that this will be limited by the 5 minute cooldown between events, so a CamPlus subscription is recommended if you need more frequent detection.

Config

  • MOTION_API=True to enable motion events. (Default: False)
  • MOTION_INT=<float> number of seconds between motion checks. (Default: 1.5)
  • MOTION_START=True to have the bridge initiate a connection to the camera on a motion event. (Default: False)

MQTT Topics

  • wyzebridge/{cam-name}/motion
  • wyzebridge/{cam-name}/motion_ts

REST endpoints

  • /api/{cam-name}/motion
  • /api/{cam-name}/motion_ts

Webhooks

Can optionally use {cam_name} in the url to make a request to a url with the camera name.

For all cameras:

environment:
  ...
  - MOTION_WEBHOOKS=http://localhost/event?cam={cam_name}

For a specific camera:

environment:
  ...
  - MOTION_WEBHOOKS_CAM-NAME=http://localhost/myEvent
  - MOTION_WEBHOOKS_CAM2=http://localhost/myOtherEvent
  - MOTION_WEBHOOKS_CAM3=http://localhost/all_events?cam={cam_name}

🏠 Home Assistant - Use CAM_OPTIONS and add a new entry for each camera:

- CAM_NAME: My Camera
  MOTION_WEBHOOKS: http://localhost/myEvent

Image url and title are available in the request header:

X-Title: Motion detected on cam-name
X-Attach: https://...

ntfy

Motion webooks are ntfy ready and will automatically display the title and preview image.

- MOTION_WEBHOOKS=https://ntfy.sh/mytopic/trigger

self hosted ntfy:

- MOTION_WEBHOOKS=http://<local IP>/mytopic/trigger
Clone this wiki locally