/docker-wyze-bridge

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

Primary LanguagePython

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 aler9/mediamtx.

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

Quick Start

Install docker and use your Wyze credentials to run:

(If your credentials have special characters, you must escape them)

docker run \
  -e WYZE_EMAIL=you@email.com \
  -e WYZE_PASSWORD=yourpassw0rd \
  -p 1935:1935 -p 8554:8554 -p 8888:8888 -p 5000:5000 \
  mrlt8/wyze-bridge:latest

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.1.4

  • FIX: Record option would not auto-connect. #784 Thanks @JA16122000!

What's Changed in v2.1.2/3

  • Increase close on-demand time to 60s to prevent reconnect messages. #643 #750 #764
  • Disable default LL-HLS for compatibility with apple. LL-HLS can still be enabled with LLHLS=true which will generate the necessary SSL certificates to work on Apple devices.
  • Disable MQTT if connection refused.
  • UPDATED: MediaMTX to v0.22.2

What's Changed in v2.1.1

  • FIXED: WebRTC on UDP Port #772
  • UPDATED: MediaMTX to v0.22.1
  • ENV Options: Re-enable ON_DEMAND to toggle connection mode. #643 #750 #764

What's Changed in v2.1.0

⚠️ This version updates the backend rtsp-simple-server to MediaMTX which may cause some issues if you're using custom rtsp-simple-server related configs.

  • CHANGED: rtsp-simple-server to MediaMTX.
  • ENV Options:
    • New: SUB_QUALITY - Specify the quality to be used for the substream. #755
    • New: SNAPSHOT_FORMAT - Specify the output file format when using SNAPSHOT which can be used to create a timelapse/save multiple snapshots. e.g., SNAPSHOT_FORMAT={cam_name}/%Y-%m-%d/%H-%M.jpg #757:
  • Home Assistant/MQTT:
    • Fixed: MQTT auto-discovery error #751
    • New: Additional entities for each of the cameras.
    • Changed: Default IMG_DIR to media/wyze/img/ #660

Known Issues/Bugs:

  • WebUI Audio: Limited audio compatibility between HLS and WebRTC. May need to force the audio codec to AUDIO_CODEC=aac for HLS and AUDIO_CODEC=libopus for WebRTC.
  • Substream: SD stream seems to have a stuttering issue due to the hardware encoding on the camera. May need to force a re-encode of the video using FORCE_ENCODE=true.

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

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 ⚠️

Requirements

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.

Basic Usage

docker-compose (recommended)

This is similar to the docker run command, but will save all your options in a yaml file.

  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

Special Characters

If your email or password contains a % or $ character, you may need to escape them with an extra character. e.g., pa$$word should be entered as pa$$$$word

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.