Skip to content

Commit

Permalink
v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlt8 committed Sep 4, 2021
1 parent 35f82d0 commit 7a53f62
Show file tree
Hide file tree
Showing 9 changed files with 294 additions and 326 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ docker-compose.yml
*.pickle
*.env
mfa_token
totp
.vscode
tokens/
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ Docker container to expose a local RTMP, RTSP, and HLS stream for all your Wyze

Based on [@noelhibbard's script](https://gist.github.com/noelhibbard/03703f551298c6460f2fd0bfdbc328bd#file-readme-md) with [kroo/wyzecam](https://github.com/kroo/wyzecam), and [aler9/rtsp-simple-server](https://github.com/aler9/rtsp-simple-server).

## Changes in v0.5.18
## Changes in v0.6.0

- New: `API_THUMB` ENV parameter to save a thumbnail from the Wyze API
- New: Show warnings on frame drops
- 🏠 Home Assistant: Improved config option compatibility

## Changes in v0.5.17

- ARM Only: Switch to debian buster base image to avoid libseccomp2 related issues
- Fix: Additional checks for stale data
- 🏠 Home Assistant: Force refresh of cameras from wyze api to pull new thumbnails
- 🏠 Home Assistant: Add hass.io labels to docker image
- 🏠 Home Assistant: Add schema for *some* config options
- 💥 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, caching, and other other code refactoring
- ✨ NEW: 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

[View older changes](https://github.com/mrlt8/docker-wyze-bridge/releases)

Expand Down Expand Up @@ -155,13 +152,13 @@ environment:
- Blacklisting:
You can reverse any of these whitelists into blacklists by adding _block, blacklist, exclude, ignore, or reverse_ to `FILTER_MODE`.
You can reverse any of these whitelists into blacklists by setting `FILTER_BLOCK`.

```yaml
environment:
..
- FILTER_NAMES=Bedroom
- FILTER_MODE=BLOCK
- FILTER_BLOCK=true
```

## Multi-Factor Authentication
Expand Down Expand Up @@ -248,6 +245,10 @@ Additional info:
- SD - HD60
- HD - HD120

## Still Image

If you require a still image from the stream, you can configure the `API_THUMB` ENV option to grab a thumbnail from the wyze api which will be save to `/img/cam-name.jpg` on standard docker installs or `/config/www/cam-name.jpg` in Home Assistant mode.

## Custom FFmpeg Commands

You can pass a custom [command](https://ffmpeg.org/ffmpeg.html) to FFmpeg by using `FFMPEG_CMD` in your docker-compose.yml:
Expand Down
21 changes: 9 additions & 12 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# Changes in v0.5.18
## Changes in v0.6.0

- New: `API_THUMB` ENV parameter to save a thumbnail from the Wyze API
- New: Show warnings on frame drops
- 🏠 Home Assistant: Improved config option compatibility

# Changes in v0.5.17

- ARM Only: Switch to debian buster base image to avoid libseccomp2 related issues
- Fix: Additional checks for stale data
- 🏠 Home Assistant: Force refresh of cameras from wyze api to pull new thumbnails
- 🏠 Home Assistant: Add hass.io labels to docker image
- 🏠 Home Assistant: Add schema for *some* config options
- 💥 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
30 changes: 30 additions & 0 deletions app/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,34 @@

(coming soon)

## URIs

`camera-nickname` is the name of the camera set in the Wyze app and are converted to lower case with hyphens in place of spaces.

e.g. 'Front Door' would be `/front-door`

- RTMP:

```
rtmp://homeassistant.local:1935/camera-nickname
```

- RTSP:

```
rtsp://homeassistant.local:8554/camera-nickname
```

- HLS:

```
http://homeassistant.local:8888/camera-nickname/stream.m3u8
```

- HLS can also be viewed in the browser using:

```
http://homeassistant.local:8888/camera-nickname
```

Please visit [github.com/mrlt8/docker-wyze-bridge](https://github.com/mrlt8/docker-wyze-bridge) for additional information.
4 changes: 2 additions & 2 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG ARM
ARG ARCH=${ARM:+arm32v7}
FROM ${ARCH:-amd64}/python:3.9-slim as base
FROM ${ARCH:-amd64}/python:3.9-slim-buster as base

FROM base as builder
ENV PYTHONUNBUFFERED=1
Expand All @@ -13,7 +13,7 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --disable-pip-version-check --prefix=/build/usr/local requests supervisor https://github.com/mrlt8/wyzecam/archive/refs/heads/main.zip
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
ADD https://github.com/miguelangel-nubla/videoP2Proxy/archive/refs/heads/master.zip /tmp/tutk.zip
RUN mkdir -p /build/app /build/tokens /build/img \
Expand Down
6 changes: 3 additions & 3 deletions app/Dockerfile.arm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG ARM=1
ARG ARCH=${ARM:+arm32v7}
FROM ${ARCH:-amd64}/python:3.9-slim as base
FROM ${ARCH:-amd64}/python:3.9-slim-buster as base

FROM base as builder
ENV PYTHONUNBUFFERED=1
Expand All @@ -13,7 +13,7 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --disable-pip-version-check --prefix=/build/usr/local requests supervisor https://github.com/mrlt8/wyzecam/archive/refs/heads/main.zip
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
ADD https://github.com/miguelangel-nubla/videoP2Proxy/archive/refs/heads/master.zip /tmp/tutk.zip
RUN mkdir -p /build/app /build/tokens /build/img \
Expand All @@ -27,6 +27,6 @@ RUN mkdir -p /build/app /build/tokens /build/img \
COPY wyze_bridge.py supervisord.conf /build/app/

FROM base
ENV PYTHONUNBUFFERED=1 RTSP_PROTOCOLS=tcp RTSP_READTIMEOUT=60s
ENV PYTHONUNBUFFERED=1 RTSP_PROTOCOLS=tcp RTSP_READTIMEOUT=30s RTSP_READBUFFERCOUNT=2048
COPY --from=builder /build /
CMD [ "supervisord", "-c", "/app/supervisord.conf" ]
7 changes: 4 additions & 3 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.5.18",
"version": "0.6.0",
"arch": [
"armv7",
"aarch64",
Expand Down Expand Up @@ -43,12 +43,13 @@
"FRESH_DATA": "bool?",
"IGNORE_OFFLINE": "bool?",
"FILTER_NAMES": "str?",
"FILTER_MODEL": "str?",
"FILTER_MODELS": "str?",
"FILTER_MACS": "str?",
"FILTER_MODE": "list(Include|Exclude)?",
"FILTER_BLOCK": "bool?",
"FFMPEG_FLAGS": "str?",
"FFMPEG_CMD": "str?",
"QUALITY": "str?",
"DEBUG_FRAMES": "bool?",
"DEBUG_FFMPEG": "bool?",
"URI_SEPARATOR": "list(-|_|#)?",
"DEBUG_LEVEL": "list(debug|info|warning|error)?",
Expand Down
8 changes: 3 additions & 5 deletions app/multi-arch.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM amd64/python:3.9-slim as base_amd64
FROM amd64/python:3.9-slim-buster as base_amd64
FROM arm32v7/python:3.9-slim-buster as base_arm
ARG ARM=1
FROM arm32v7/python:3.9-slim as base_arm64
ARG ARM=1
#FROM base_arm AS base_arm64
FROM base_arm AS base_arm64

FROM base_$TARGETARCH as builder
ENV PYTHONUNBUFFERED=1
Expand All @@ -16,7 +14,7 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --disable-pip-version-check --prefix=/build/usr/local requests supervisor https://github.com/mrlt8/wyzecam/archive/refs/heads/main.zip
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
ADD https://github.com/miguelangel-nubla/videoP2Proxy/archive/refs/heads/master.zip /tmp/tutk.zip
RUN mkdir -p /build/app /build/tokens /build/img \
Expand Down
Loading

0 comments on commit 7a53f62

Please sign in to comment.