Skip to content

Commit

Permalink
v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlt8 authored Sep 29, 2021
1 parent 0757c6e commit b1ec5cd
Show file tree
Hide file tree
Showing 12 changed files with 446 additions and 297 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
schedule:
- cron: "31 22 * * *"
push:
branches: [main]
branches: [main, dev]
# Publish semver tags as releases.
tags: ["v*.*.*"]
pull_request:
Expand Down Expand Up @@ -60,6 +60,7 @@ jobs:
type=schedule
type=semver,pattern={{ version }}
type=edge,branch=main
type=ref,event=branch
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand Down
225 changes: 127 additions & 98 deletions README.md

Large diffs are not rendered by default.

63 changes: 10 additions & 53 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,10 @@
## Changes in v0.6.10

- 🔨 Doorbell adjust HD res size

## Changes in v0.6.9

- 🔨 Changed RTSP_THUMB command to use 127.0.0.1 instead of localhost
- 🐛 Fixed: `OFFLINE_TIME` lower case int bug.

## Changes in v0.6.8

- 🔨 Doorbell (WYZEDB3) related changes. Please post feedback [here #133](https://github.com/mrlt8/docker-wyze-bridge/issues/133)
- ✨ New: `OFFLINE_TIME` env option to specify the time before retrying to connect to a camera that is offline [#143](https://github.com/mrlt8/docker-wyze-bridge/issues/143).

## Changes in v0.6.7

- 🔨 FIX: Set default frame size for WYZEDB3

## Changes in v0.6.6

- 🐛 Potential fix for WYZEDB3

## Changes in v0.6.5

- 🔨 Always set default frame size and bitrate to prevent restart loop.

## Changes in v0.6.4

- 🐛 BUG: Fixed the issue introduced in v0.6.2 where a resolution change caused issues for RTMP and HLS streams. This will now raise an exception which *should* restart ffmpeg if the resolution doesn't match for more than 30 frames.

## Changes in v0.6.3

- 🐛 BUG: Fixed bug where cam on older firmware would not connect due to missing `wifidb`

## Changes in v0.6.2

- 🔨 FIX: Fixed an issue where chaning the resolution in the app would cause the stream to die. Could also potentially solve an issue with the doorbell.
- 🏠 FIX: Invalid boolean in config

## Changes in v0.6.1

- ✨ NEW: `RTSP_THUMB` ENV parameter to save images from RTSP stream

## Changes in v0.6.0

- 💥 BREAKING: Renamed `FILTER_MODE` to `FILTER_BLOCK` and will be disabled if blank or set to false.
- 💥 BREAKING: Renamed `FILTER_MODEL` to `FILTER_MODELS`
- 🔨 Reworked auth and caching and other other code refactoring
- ✨ NEW: Use refresh token when token expires - no need to 2FA when your session expires!
- ✨ NEW: Use seed to generate TOTP
- ✨ NEW: `DEBUG_FRAMES` ENV parameter to show all dropped frames
- ⏪ CHANGE: Only show first lost/incomplete frame warning
- 🐧 CHANGE: Switch all base images to debian buster for consistency
# Changes in v0.7.0

- 💥 BREAKING: `API_THUMB` and `RTSP_THUMB` are now `SNAPSHOT=API` or `SNAPSHOT=RTSP` or `SNAPSHOT=RTSP30` for custom interval. [See Snapshot](https://github.com/mrlt8/docker-wyze-bridge#snapshotstill-images)
- 💥 BREAKING: `LAN_ONLY` is now `NET_MODE=LAN`. See [LAN Mode](https://github.com/mrlt8/docker-wyze-bridge#lan-mode)
- ✨ NEW: `NET_MODE=P2P` to block relay mode and stream from the camera using P2P mode for VPS/cloud and remote installs. [See P2P Mode](https://github.com/mrlt8/docker-wyze-bridge#p2p-mode)
- ✨ NEW: Basic MQTT support with discovery - publishes camera status, connections to camera, and snapshot if available [See MQTT](https://github.com/mrlt8/docker-wyze-bridge#mqtt-beta)
- ✨ NEW: `ROTATE_DOOR` will use ffmpeg to roate the Doorbell (WYZEDB3) stream. NOTE: this will re-encoding rather than copy h264 stream, which may require additional processing power.
- 🔀 Removed Supervisord
- 📦 Switch to static build of [ffmpeg-for-homebridge](https://github.com/homebridge/ffmpeg-for-homebridge)
- 🔨 Fixed broken rtsp auth
17 changes: 9 additions & 8 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@ ENV PYTHONUNBUFFERED=1
ARG ARM
ARG TUTK_ARCH=${ARM:+Arm11_BCM2835_4.8.3}
ARG RTSP_ARCH=${ARM:+armv7}
ARG FFMPEG_ARCH=${ARM:+armhf}
ARG FFMPEG_ARCH=${ARM:+armv7l}
RUN apt-get update \
&& apt-get install -y tar xz-utils unzip curl jq g++ \
&& apt-get install -y tar unzip curl jq g++ \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --disable-pip-version-check --prefix=/build/usr/local mintotp requests supervisor https://github.com/mrlt8/wyzecam/archive/refs/heads/main.zip
ADD https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-${FFMPEG_ARCH:-amd64}-static.tar.xz /tmp/ffmpeg.tar.xz
RUN pip3 install --disable-pip-version-check --prefix=/build/usr/local mintotp paho-mqtt requests https://github.com/mrlt8/wyzecam/archive/refs/heads/main.zip
ADD https://github.com/miguelangel-nubla/videoP2Proxy/archive/refs/heads/master.zip /tmp/tutk.zip
RUN mkdir -p /build/app /build/tokens /build/img \
&& curl -L https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-debian-${FFMPEG_ARCH:-x86_64}.tar.gz \
| tar xzf - -C /build \
&& RTSP_TAG=$(curl -s https://api.github.com/repos/aler9/rtsp-simple-server/releases/latest | jq -r .tag_name) \
&& echo -n $RTSP_TAG > /build/RTSP_TAG \
&& curl -L https://github.com/aler9/rtsp-simple-server/releases/download/${RTSP_TAG}/rtsp-simple-server_${RTSP_TAG}_linux_${RTSP_ARCH:-amd64}.tar.gz \
| tar xzf - -C /build/app \
&& unzip -j /tmp/tutk.zip */lib/Linux/${TUTK_ARCH:-x64}/*.a -d /tmp/tutk/ \
&& g++ -fpic -shared -Wl,--whole-archive /tmp/tutk/libAVAPIs.a /tmp/tutk/libIOTCAPIs.a -Wl,--no-whole-archive -o /build/usr/local/lib/libIOTCAPIs_ALL.so \
&& tar --strip-components=1 -C /build/usr/local/bin -xf /tmp/ffmpeg.tar.xz --wildcards '*ffmpeg' \
&& rm -rf /tmp/*
COPY wyze_bridge.py supervisord.conf /build/app/
COPY *.py /build/app/

FROM base
ENV PYTHONUNBUFFERED=1 RTSP_PROTOCOLS=tcp RTSP_READTIMEOUT=30s RTSP_READBUFFERCOUNT=2048 RTSP_API=yes
ENV PYTHONUNBUFFERED=1 RTSP_PROTOCOLS=tcp RTSP_READTIMEOUT=30s RTSP_READBUFFERCOUNT=2048 RTSP_LOGLEVEL=warn
COPY --from=builder /build /
CMD [ "supervisord", "-c", "/app/supervisord.conf" ]
CMD [ "python3", "/app/wyze_bridge.py" ]
17 changes: 9 additions & 8 deletions app/Dockerfile.arm
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@ ENV PYTHONUNBUFFERED=1
ARG ARM
ARG TUTK_ARCH=${ARM:+Arm11_BCM2835_4.8.3}
ARG RTSP_ARCH=${ARM:+armv7}
ARG FFMPEG_ARCH=${ARM:+armhf}
ARG FFMPEG_ARCH=${ARM:+armv7l}
RUN apt-get update \
&& apt-get install -y tar xz-utils unzip curl jq g++ \
&& apt-get install -y tar unzip curl jq g++ \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --disable-pip-version-check --prefix=/build/usr/local mintotp requests supervisor https://github.com/mrlt8/wyzecam/archive/refs/heads/main.zip
ADD https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-${FFMPEG_ARCH:-amd64}-static.tar.xz /tmp/ffmpeg.tar.xz
RUN pip3 install --disable-pip-version-check --prefix=/build/usr/local mintotp paho-mqtt requests https://github.com/mrlt8/wyzecam/archive/refs/heads/main.zip
ADD https://github.com/miguelangel-nubla/videoP2Proxy/archive/refs/heads/master.zip /tmp/tutk.zip
RUN mkdir -p /build/app /build/tokens /build/img \
&& curl -L https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-debian-${FFMPEG_ARCH:-x86_64}.tar.gz \
| tar xzf - -C /build \
&& RTSP_TAG=$(curl -s https://api.github.com/repos/aler9/rtsp-simple-server/releases/latest | jq -r .tag_name) \
&& echo -n $RTSP_TAG > /build/RTSP_TAG \
&& curl -L https://github.com/aler9/rtsp-simple-server/releases/download/${RTSP_TAG}/rtsp-simple-server_${RTSP_TAG}_linux_${RTSP_ARCH:-amd64}.tar.gz \
| tar xzf - -C /build/app \
&& unzip -j /tmp/tutk.zip */lib/Linux/${TUTK_ARCH:-x64}/*.a -d /tmp/tutk/ \
&& g++ -fpic -shared -Wl,--whole-archive /tmp/tutk/libAVAPIs.a /tmp/tutk/libIOTCAPIs.a -Wl,--no-whole-archive -o /build/usr/local/lib/libIOTCAPIs_ALL.so \
&& tar --strip-components=1 -C /build/usr/local/bin -xf /tmp/ffmpeg.tar.xz --wildcards '*ffmpeg' \
&& rm -rf /tmp/*
COPY wyze_bridge.py supervisord.conf /build/app/
COPY *.py /build/app/

FROM base
ENV PYTHONUNBUFFERED=1 RTSP_PROTOCOLS=tcp RTSP_READTIMEOUT=30s RTSP_READBUFFERCOUNT=2048 RTSP_API=yes
ENV PYTHONUNBUFFERED=1 RTSP_PROTOCOLS=tcp RTSP_READTIMEOUT=30s RTSP_READBUFFERCOUNT=2048 RTSP_LOGLEVEL=warn
COPY --from=builder /build /
CMD [ "supervisord", "-c", "/app/supervisord.conf" ]
CMD [ "python3", "/app/wyze_bridge.py" ]
6 changes: 3 additions & 3 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[![Docker](https://github.com/mrlt8/docker-wyze-bridge/actions/workflows/docker-image.yml/badge.svg)](https://github.com/mrlt8/docker-wyze-bridge/actions/workflows/docker-image.yml)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/mrlt8/docker-wyze-bridge?logo=github)](https://github.com/mrlt8/docker-wyze-bridge/releases/latest)
[![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/mrlt8/wyze-bridge?sort=semver&logo=docker)](https://hub.docker.com/r/mrlt8/wyze-bridge)
[![Docker Pulls](https://img.shields.io/docker/pulls/mrlt8/wyze-bridge?logo=docker)](https://hub.docker.com/r/mrlt8/wyze-bridge)
[![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/mrlt8/wyze-bridge?sort=semver&logo=docker&logoColor=white)](https://hub.docker.com/r/mrlt8/wyze-bridge)
[![Docker Pulls](https://img.shields.io/docker/pulls/mrlt8/wyze-bridge?logo=docker&logoColor=white)](https://hub.docker.com/r/mrlt8/wyze-bridge)
![GitHub Repo stars](https://img.shields.io/github/stars/mrlt8/docker-wyze-bridge?style=social)

Docker container to expose a local RTMP, RTSP, and HLS stream for all your Wyze cameras including v3. No Third-party or special firmware required.
Expand All @@ -15,7 +15,7 @@ See [https://github.com/mrlt8/docker-wyze-bridge](https://github.com/mrlt8/docke
![Supports armv7 Architecture](https://img.shields.io/badge/armv7-yes-success.svg)
![Supports aarch64 Architecture](https://img.shields.io/badge/aarch64-yes-success.svg)
![Supports amd64 Architecture](https://img.shields.io/badge/amd64-yes-success.svg)
[![Home Assistant Add-on](https://img.shields.io/badge/home_assistant-add--on-blue.svg?logo=homeassistant)](https://github.com/mrlt8/docker-wyze-bridge/wiki/Home-Assistant)
[![Home Assistant Add-on](https://img.shields.io/badge/home_assistant-add--on-blue.svg?logo=homeassistant&logoColor=white)](https://github.com/mrlt8/docker-wyze-bridge/wiki/Home-Assistant)

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

Expand Down
33 changes: 19 additions & 14 deletions app/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"slug": "docker-wyze-bridge",
"url": "http://github.com/mrlt8/docker-wyze-bridge",
"image": "mrlt8/wyze-bridge",
"version": "0.6.10",
"version": "0.7.0",
"arch": [
"armv7",
"aarch64",
Expand All @@ -29,35 +29,40 @@
"map": [
"config:rw"
],
"services": [
"mqtt:want"
],
"options": {
"WYZE_EMAIL": null,
"WYZE_PASSWORD": null,
"LAN_ONLY": true,
"API_THUMB": true
"NET_MODE": "ANY",
"SNAPSHOT": "API",
"MQTT_DTOPIC": "homeassistant"
},
"schema": {
"WYZE_EMAIL": "email",
"WYZE_PASSWORD": "password",
"LAN_ONLY": "bool",
"API_THUMB": "bool",
"RTSP_THUMB": "bool?",
"FRESH_DATA": "bool?",
"IGNORE_OFFLINE": "bool?",
"NET_MODE": "list(LAN|P2P|ANY)",
"SNAPSHOT": "list(API|RTSP|Disable)",
"MQTT_HOST": "str?",
"MQTT_AUTH": "str?",
"MQTT_TOPIC": "str?",
"MQTT_DTOPIC": "str?",
"FILTER_NAMES": "str?",
"FILTER_MODELS": "str?",
"FILTER_MACS": "str?",
"FILTER_BLOCK": "bool?",
"ROTATE_DOOR": "bool?",
"IGNORE_OFFLINE": "bool?",
"FRESH_DATA": "bool?",
"URI_SEPARATOR": "list(-|_|#)?",
"QUALITY": "str?",
"FFMPEG_FLAGS": "str?",
"FFMPEG_CMD": "str?",
"QUALITY": "str?",
"DEBUG_FRAMES": "bool?",
"DEBUG_FFMPEG": "bool?",
"URI_SEPARATOR": "list(-|_|#)?",
"DEBUG_LEVEL": "list(debug|info|warning|error)?",
"RTSP_LOGLEVEL": "list(debug|info|warn)?",
"RTSP_RTSPDISABLE": "list(yes|no)?",
"RTSP_RTMPDISABLE": "list(yes|no)?",
"RTSP_HLSDISABLE": "list(yes|no)?"
},
"legacy": true
}
}
17 changes: 9 additions & 8 deletions app/multi-arch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,27 @@ ENV PYTHONUNBUFFERED=1
ARG ARM
ARG TUTK_ARCH=${ARM:+Arm11_BCM2835_4.8.3}
ARG RTSP_ARCH=${ARM:+armv7}
ARG FFMPEG_ARCH=${ARM:+armhf}
ARG FFMPEG_ARCH=${ARM:+armv7l}
RUN apt-get update \
&& apt-get install -y tar xz-utils unzip curl jq g++ \
&& apt-get install -y tar unzip curl jq g++ \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --disable-pip-version-check --prefix=/build/usr/local mintotp requests supervisor https://github.com/mrlt8/wyzecam/archive/refs/heads/main.zip
ADD https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-${FFMPEG_ARCH:-amd64}-static.tar.xz /tmp/ffmpeg.tar.xz
RUN pip3 install --disable-pip-version-check --prefix=/build/usr/local mintotp paho-mqtt requests https://github.com/mrlt8/wyzecam/archive/refs/heads/main.zip
ADD https://github.com/miguelangel-nubla/videoP2Proxy/archive/refs/heads/master.zip /tmp/tutk.zip
RUN mkdir -p /build/app /build/tokens /build/img \
&& curl -L https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-debian-${FFMPEG_ARCH:-x86_64}.tar.gz \
| tar xzf - -C /build \
&& RTSP_TAG=$(curl -s https://api.github.com/repos/aler9/rtsp-simple-server/releases/latest | jq -r .tag_name) \
&& echo -n $RTSP_TAG > /build/RTSP_TAG \
&& curl -L https://github.com/aler9/rtsp-simple-server/releases/download/${RTSP_TAG}/rtsp-simple-server_${RTSP_TAG}_linux_${RTSP_ARCH:-amd64}.tar.gz \
| tar xzf - -C /build/app \
&& unzip -j /tmp/tutk.zip */lib/Linux/${TUTK_ARCH:-x64}/*.a -d /tmp/tutk/ \
&& g++ -fpic -shared -Wl,--whole-archive /tmp/tutk/libAVAPIs.a /tmp/tutk/libIOTCAPIs.a -Wl,--no-whole-archive -o /build/usr/local/lib/libIOTCAPIs_ALL.so \
&& tar --strip-components=1 -C /build/usr/local/bin -xf /tmp/ffmpeg.tar.xz --wildcards '*ffmpeg' \
&& rm -rf /tmp/*
COPY wyze_bridge.py supervisord.conf /build/app/
COPY *.py /build/app/

FROM base_$TARGETARCH
ENV PYTHONUNBUFFERED=1 RTSP_PROTOCOLS=tcp RTSP_READTIMEOUT=30s RTSP_READBUFFERCOUNT=2048 RTSP_API=yes
ENV PYTHONUNBUFFERED=1 RTSP_PROTOCOLS=tcp RTSP_READTIMEOUT=30s RTSP_READBUFFERCOUNT=2048 RTSP_LOGLEVEL=warn
COPY --from=builder /build /
CMD [ "supervisord", "-c", "/app/supervisord.conf" ]
CMD [ "python3", "/app/wyze_bridge.py" ]
Loading

0 comments on commit b1ec5cd

Please sign in to comment.