Skip to content

WebRTC/RTSP/RTMP/LL-HLS bridge for Wyze cams in a docker container

Notifications You must be signed in to change notification settings

pballandras/docker-wyze-bridge

 
 

Repository files navigation

Docker GitHub release (latest by date) Docker Image Size (latest semver) Docker Pulls

WebRTC/RTSP/RTMP/HLS Bridge for Wyze Cam

479shots_so

Create a local WebRTC, RTSP, RTMP, or HLS/Low-Latency HLS stream for most of your Wyze cameras including the outdoor, doorbell, and 2K cams.

No third-party or special firmware required.

It just works!

Streams direct from camera without additional bandwidth or subscriptions.

Based on @noelhibbard's script with kroo/wyzecam and bluenviron/mediamtx.

Please consider ⭐️ starring or ☕️ sponsoring this project if you found it useful, or use the affiliate link when shopping on amazon!

API Changes

As of July 2023, you will need to update your bridge to v2.3.x or newer for compatibility with the latest changes to the Wyze API.

Quick Start

Install docker and run:

docker run -p 8554:8554 -p 8888:8888 -p 5000:5000 mrlt8/wyze-bridge

You can then use the web interface at http://localhost:5000 where localhost is the hostname or ip of the machine running the bridge.

See basic usage for additional information or visit the wiki page for additional information on using the bridge as a Home Assistant Add-on.

What's Changed in v2.4.0

  • Motion Events!
    • Pulls events from the wyze API, so it doesn't require an active connection to the camera to detect motion - great for battery cams.
    • Motion status and timestamp available via MQTT and REST API:
      • MQTT topics: wyzebridge/{cam-name}/motion or wyzebridge/{cam-name}/motion_ts
      • REST endpoint: /api/{cam-name}/motion or /api/{cam-name}/motion_ts
    • Webhooks ready and works with ntfy.sh triggers.
    • See Camera Motion wiki for more information.
  • Other fixes and changes:
    • Potential improvements for audio sync. Audio will still lag on frame drops. (#388)
      • Using wallclock seems to help in some situations: - FFMPEG_FLAGS=-use_wallclock_as_timestamps 1
    • UPDATE FFmpeg to v6.0
    • UPDATE MediaMTX version from v1.0.3 to v1.1.0 (#1002)
    • Store and reuse s3 thumbnail from events to reduce calls to the wyze api (#970)
    • Increase default MTX_WRITEQUEUESIZE (#984)
    • keep stream alive if livestream enabled (#985)
    • Catch RuntimeError if libseccomp2 is missing (#994)
    • Refactored API client to better handle exceptions and limit connections.
    • Check bitrate from videoParams for all 11.x or newer firmware (#975)
    • buffer mtx event data (#990)
    • Exclude battery cams from scheduled RTSP snapshots (#970)
  • New ENV/Options:
    • 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)
    • MOTION_WEBHOOK=<str> webhooks url. Can use {cam_name} in the url to make a request to a url with the camera name. Image url and title are available in the request header.
    • MOTION_WEBHOOK_<CAM-NAME>=<str> Same as MOTION_WEBHOOK but for a specific camera.

View previous changes

Supported Cameras

Wyze Cam V1 Wyze Cam V2 Wyze Cam V3 Wyze Cam V3 Pro Wyze Cam Floodlight Wyze Cam Pan Wyze Cam Pan V2 Wyze Cam Pan V3 Wyze Cam Pan Pro Wyze Cam Outdoor Wyze Cam Outdoor V2 Wyze Cam Doorbell

Cameras from Gwell Times are currently not supported:

Wyze Cam Doorbell Pro Wyze Cam OG Wyze Cam OG 3x

Camera Model Supported
Wyze Cam v1 [HD only] WYZEC1
Wyze Cam V2 WYZEC1-JZ
Wyze Cam V3 WYZE_CAKP2JFUS
Wyze Cam V3 Pro [2K] HL_CAM3P
Wyze Cam Floodlight WYZE_CAKP2JFUS
Wyze Cam Pan WYZECP1_JEF
Wyze Cam Pan v2 HL_PAN2
Wyze Cam Pan v3 HL_PAN3
Wyze Cam Pan Pro [2K] HL_PANP
Wyze Cam Outdoor WVOD1
Wyze Cam Outdoor v2 HL_WCO2
Wyze Cam Doorbell WYZEDB3
Wyze Battery Cam Pro AN_RSCW
Wyze Cam Doorbell Pro 2 AN_RDB1
Wyze Cam Flood Light Pro [2K] LD_CFP ⚠️
Wyze Cam Doorbell Pro GW_BE1 ⚠️
Wyze Cam OG GW_GC1 ⚠️
Wyze Cam OG Telephoto 3x GW_GC2 ⚠️

Compatibility

Supports armv7 Architecture Supports aarch64 Architecture Supports amd64 Architecture

Home Assistant Add-on Homebridge Portainer stack Unraid Community App

Should work on most x64 systems as well as on some arm-based systems like the Raspberry Pi.

The container can be run on its own, in Portainer, Unraid, as a Home Assistant Add-on, locally or remotely in the cloud.

Ubiquiti Unifi

Some network adjustments may be needed - see this discussion for more information.

Basic Usage

docker-compose (recommended)

This is similar to the docker run command, but will save all your options in a yaml file. (If your credentials have special characters, you must escape them)

  1. Install Docker Compose.
  2. Use the sample as a guide to create a docker-compose.yml file with your wyze credentials.
  3. Run docker-compose up.

Once you're happy with your config you can use docker-compose up -d to run it in detached mode.

NOTE: You may need to update the WebUI links if you're changing the ports or using a reverse proxy.

Updating your container

To update your container, cd into the directory where your docker-compose.yml is located and run:

docker-compose pull # Pull new image
docker-compose up -d # Restart container in detached mode
docker image prune # Remove old images

🏠 Home Assistant

Visit the wiki page for additional information on Home Assistant.

Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.

Additional Info

Web-UI

The bridge features a basic Web-UI which can display a preview of all your cameras as well as direct links to all the video streams.

The web-ui can be accessed on the default port 5000:

http://localhost:5000/

See also:

WebRTC

WebRTC should work automatically in Home Assistant mode, however, some additional configuration is required to get WebRTC working in the standard docker mode.

  • WebRTC requires two additional ports to be configured in docker:

      ports:
        ...
        - 8889:8889 #WebRTC
        - 8189:8189/udp # WebRTC/ICE
  • In addition, the WB_IP env needs to be set with the IP address of the server running the bridge.

      environment:
        - WB_IP=192.168.1.116
  • See documentation for additional information/options.

Advanced Options

WYZE_EMAIL and WYZE_PASSWORD are the only two required environment variables.

About

WebRTC/RTSP/RTMP/LL-HLS bridge for Wyze cams in a docker container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 80.2%
  • JavaScript 10.2%
  • HTML 8.0%
  • CSS 1.2%
  • Dockerfile 0.4%