Giter Club home page Giter Club logo

docker-wyze-bridge's Introduction

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 modifications, 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!

Important

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.

Wyze Cam V1 Wyze Cam V2 Wyze Cam V3 Wyze Cam V3 Pro Wyze Cam V4 Wyze Cam Floodlight Wyze Cam Floodlight V2 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 V2

See the supported cameras section for additional information.

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

  • Fix video lag introduced in v2.7.0
  • Add aac_eld audio support for V4 cams (HL_CAM4).
  • Add 2k resolution support for Floodlight V2 cams (HL_CFL2).
  • Fix version number

Home Assistant:

  • Add dev and previous builds (v2.6.0) to the repo.
  • Note: you may need to re-add the repo if you cannot see the latest updates.

View previous changes

FAQ

  • How does this work?
    • It uses the same SDK as the app to communicate directly with the cameras. See kroo/wyzecam for details.
  • Does it use internet bandwidth when streaming?
    • Not in most cases. The bridge will attempt to stream locally if possible but will fallback to streaming over the internet if you're trying to stream from a different location or from a shared camera. See the wiki for more details.
  • Can this work offline/can I block all wyze services?
    • No. Streaming should continue to work without an active internet connection, but will probably stop working after some time as the cameras were not designed to be used without the cloud. Some camera commands also depend on the cloud and may not function without an active connection. See wz_mini_hacks for firmware level modification to run the camera offline.
  • Why aren't all wyze cams supported yet (OG/Doorbell Pro)?
    • These cameras are using a different SDK and will require a different method to connect and stream.

Compatibility

Supports arm32v7 Architecture Supports arm64v8 Architecture Supports amd64 Architecture Supports Apple Silicon Architecture

Home Assistant Add-on Homebridge Portainer stack Unraid Community App

Should work on most x64 systems as well as on most modern arm-based systems like the Raspberry Pi 3/4/5 or Apple Silicon M1/M2/M3.

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

Note

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

Supported Cameras

Important

Some newer camera firmware versions may cause issues with remote access via P2P. Local "LAN" access seems unaffected at this time.

Camera Model Tutk Support Latest FW
Wyze Cam v1 [HD only] WYZEC1 3.9.4.x
Wyze Cam V2 WYZEC1-JZ 4.9.9.x
Wyze Cam V3 WYZE_CAKP2JFUS 4.36.11.x
Wyze Cam V4 [2K] HL_CAM4 4.52.3.x
Wyze Cam Floodlight WYZE_CAKP2JFUS 4.36.11.x
Wyze Cam Floodlight V2 [2k] HL_CFL2 4.53.2.x
Wyze Cam V3 Pro [2K] HL_CAM3P 4.58.11.x
Wyze Cam Pan WYZECP1_JEF 4.10.9.x
Wyze Cam Pan v2 HL_PAN2 4.49.11.x
Wyze Cam Pan v3 HL_PAN3 4.50.4.x
Wyze Cam Pan Pro [2K] HL_PANP -
Wyze Cam Outdoor WVOD1 4.17.4.x
Wyze Cam Outdoor v2 HL_WCO2 4.48.4.x
Wyze Cam Doorbell WYZEDB3 4.25.1.x
Wyze Cam Doorbell v2 [2K] HL_DB2 4.51.1.x
Wyze Cam Doorbell Pro 2 AN_RDB1 -
Wyze Battery Cam Pro AN_RSCW ⚠️ -
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 ⚠️ -

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.

Caution

If your credentials have special characters, you must escape them or leave your credentials blank and use the webUI to login.

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

All environment variables are optional.

Other Wyze Projects

docker-wyze-bridge's People

Contributors

avbentem avatar cturra avatar dsheehan avatar dtterastar avatar github-actions[bot] avatar gusmann avatar jack5mikemotown avatar jhansche avatar koush avatar kristof-mattei avatar mrlt8 avatar ofadam avatar yeahme49 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-wyze-bridge's Issues

Feature Request: MQTT Status

Would it be possible to add MQTT status for each camera, connected status, open, connections, and maybe even a way for restarting the connection to the cameras as well?

MFA

Im stuck trying to figure out MFA
in the logs I can see MFA is required, I set the key using the echo command but I'm unsure of how I add the key into /tokens/
Id assume I have to mount the volume but have no clue how

Support for v1 Cams?

Hello! Thank you for all of your work, this is amazing.

I have 4 cameras; 1 pan, 1 v2, 2 v1. When I start the container, the logs say "STARTING ALL 4 CAMERAS" but it only actually opens the non-v1 cams. For one of the v1 cams, the logs only mentions it once, with "[Play Room] AV_ER_TIMEOUT". Nothing is ever shown for the other v1 cam. When going to their respective URLs, it shows "Err: no on is publishing to path 'play-room'". Are v1 cams supported? I mean... it does say "all your cams" 😀

Not an issue but a question on how to install the new v0.4

few days ago i setup docker-wyze-bridge, not sure where i found and landed but i ended by creating a docker-comple.yaml like this:

`version: '3.6'
services:
rtsp-server:
container_name: rtsp-server
image: aler9/rtsp-simple-server
restart: always
environment:
- RTSP_PROTOCOLS=tcp
ports:
- 1935:1935
- 8554:8554
- 8888:8888
volumes:
- ./app/rtsp-simple-server.yml:/rtsp-simple-server.yml

wyze-bridge:
container_name: wyze-bridge
restart: always
build:
context: ./app
environment:
- WYZE_EMAIL=***
- WYZE_PASSWORD=***
- FILTER_NAMES=v3 outdoor, reef
`

As you can see there are two containers, one for rtsp and other for wyze-bridge. Today I noticed v0.4 is out and it says rtsp-server is built-in, as you can see my wyze-bridge container does not contain a line for image so i wonder how i would go with the new version, can anyone help me with the docker-comple.yaml that i would need to get this running. thank you.

1 working out of 2 cameras.

Just installed the docker-wyze-bridge, no errors all seem to run fine.
I have 3 cameras on wyze app, 1 is offline for now, two are working.
from vlc i can open the rtsp and it works fine for 1 camera, but not for the second one, it throws error "unable to open MRL" from vlc.

camera 'v3-outdoor' works fine, camera 'front-door-cam' not working and its wyzecam pan with rtsp firmware on it.

Thanks.

Here is the log from wyze-bridge:

STARTING DOCKER-WYZE-BRIDGE v0.3.2.1
Could not find local cache for user
Could not find local cache for auth
Fetching auth from wyze api...
Saving auth to local cache...
Fetching user from wyze api...
Saving user to local cache...
Could not find local cache for cameras
Fetching cameras from wyze api...
Saving cameras to local cache...
STARTING ALL 3 CAMERAS
2021/07/15 21:24:10 [V3 outdoor] Starting HD 120kb/s Stream for WyzeCam V3 (WYZE_CAKP2JFUS) running FW: 4.36.1.4 from 192.168.99.140 (WiFi Quality: 88%)...
2021/07/15 21:24:11 [Reef] IOTC_ER_CAN_NOT_FIND_DEVICE
2021/07/15 21:24:11 [Reef] Camera offline? Sleeping for 10s.
2021/07/15 21:24:11 [Front Door Cam] Starting HD 120kb/s Stream for WyzeCam PAN (WYZECP1_JEF) running FW: 4.29.4.41 from 192.168.99.40 (WiFi Quality: 62%)...
2021/07/15 21:24:11 [Front Door Cam] 'type'
2021/07/15 21:24:23 [Front Door Cam] Starting HD 120kb/s Stream for WyzeCam PAN (WYZECP1_JEF) running FW: 4.29.4.41 from 192.168.99.40 (WiFi Quality: 67%)...
2021/07/15 21:24:23 [Front Door Cam] 'type'

... the last two lines keep repeating every 10s. don't know why

HERE IS THE LOG FROM rtsp-server:

2021/07/15 21:29:24 I [0/0] rtsp-simple-server v0.16.4
2021/07/15 21:29:24 I [0/0] [RTSP] TCP listener opened on :8554
2021/07/15 21:29:24 I [0/0] [RTMP] listener opened on :1935
2021/07/15 21:29:24 I [0/0] [HLS] listener opened on :8888
2021/07/15 21:29:43 I [0/0] [RTSP] [conn 172.19.0.3:60462] opened
2021/07/15 21:29:43 I [0/0] [RTSP] [session 2226935621] opened by 172.19.0.3:60462
2021/07/15 21:29:43 I [1/0] [RTSP] [session 2226935621] is publishing to path 'v3-outdoor', 1 track with TCP

... i see publishing for v3-outdoor, but not for 'front-door-cam'

High bandwidth/data usage

When I have the wyze-bridge up, I see my router has traffic going out Port 10001 UDP from my 3 Wyze Cams. I believe it is all coming right back to the machine that I have the wyze-bridge running. As far as I can tell these are related to Wyze's servers. So is this "bridge" simply acting like a Wyze app that can stream all the cameras simultaneously? I was hoping it was more of a local connection only bypassing Wyze servers completely (except for the initial API hit to get camera listing and IPs).

If that is not the case, then there should be a disclaimer stating so in case people have bandwidth caps from their ISP. My 3 cameras alone are probably chewing up close to 3 GB an hour. That's 504 GB a week, a typical cable ISP in the US has a 1.2TB data cap. Using this bridge would burn through that in a little over 2 weeks!

MFA No token provided

Attempting to complete multi-factor authentication but no code is provided in the log
From what I understand it will provide a auth code that needs to be echo'd to tokens

Log:
2021/08/04 00:04:33 I [0/0] rtsp-simple-server v0.16.4
2021/08/04 00:04:33 I [0/0] [RTSP] TCP listener opened on :8554
2021/08/04 00:04:33 I [0/0] [RTMP] listener opened on :1935
2021/08/04 00:04:33 I [0/0] [HLS] listener opened on :8888
STARTING DOCKER-WYZE-BRIDGE v0.5.0
Could not find local cache for user
Could not find local cache for auth
Fetching auth from wyze api...
MFA Token Required
Add token to /tokens/mfa_token

Yaml:
version: '3.8'
services:
wyze-bridge:
container_name: wyzebridge
restart: always
# network_mode: host
image: mrlt8/wyze-bridge:latest
ports:
- 1935:1935
- 8554:8554
- 8555:8555
# build:
# context: ./app
# dockerfile: Dockerfile.arm
environment:
- WYZE_EMAIL=*******
- WYZE_PASSWORD=******
- LAN_ONLY=True
- RTSP_PROTOCOLS=tcp

wyze-bridge will only start 1 camera

I have two cameras: WyzeCam301 and WyzeCam302

Wyze-Bridge appears to be working, but it will not start my first camera (301). It starts the second camera (302) fine. Is the program looping through and only creating stream for the last camera it finds?

rtsp-server | 2021/06/27 19:53:30 I [0/0] rtsp-simple-server v0.16.3
rtsp-server | 2021/06/27 19:53:30 I [0/0] [RTSP] UDP/RTP listener opened on :8000
rtsp-server | 2021/06/27 19:53:30 I [0/0] [RTSP] UDP/RTCP listener opened on :8001
rtsp-server | 2021/06/27 19:53:30 I [0/0] [RTSP] TCP listener opened on :8554
rtsp-server | 2021/06/27 19:53:30 I [0/0] [RTMP] listener opened on :1935
rtsp-server | 2021/06/27 19:53:30 I [0/0] [HLS] listener opened on :8888
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/wyzecam-to-rtmp.py", line 42, in
wyze-bridge | main()
wyze-bridge | File "/opt/wyzecam/wyzecam-to-rtmp.py", line 18, in main
wyze-bridge | auth_info = login(user, password)
wyze-bridge | File "/usr/local/lib/python3.8/site-packages/wyzecam/api.py", line 47, in login
wyze-bridge | resp.raise_for_status()
wyze-bridge | File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
wyze-bridge | raise HTTPError(http_error_msg, response=self)
wyze-bridge | requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://auth-prod.api.wyze.com/user/login
wyze-bridge | ffmpeg version 4.1.6-1deb10u1 Copyright (c) 2000-2020 the FFmpeg developers
wyze-bridge | built with gcc 8 (Debian 8.3.0-6)
wyze-bridge | configuration: --prefix=/usr --extra-version='1
deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
wyze-bridge | libavutil 56. 22.100 / 56. 22.100
wyze-bridge | libavcodec 58. 35.100 / 58. 35.100
wyze-bridge | libavformat 58. 20.100 / 58. 20.100
wyze-bridge | libavdevice 58. 5.100 / 58. 5.100
wyze-bridge | libavfilter 7. 40.101 / 7. 40.101
wyze-bridge | libavresample 4. 0. 0 / 4. 0. 0
wyze-bridge | libswscale 5. 3.100 / 5. 3.100
wyze-bridge | libswresample 3. 3.100 / 3. 3.100
wyze-bridge | libpostproc 55. 3.100 / 55. 3.100
wyze-bridge | Input #0, h264, from 'pipe:':
wyze-bridge | Duration: N/A, bitrate: N/A
wyze-bridge | Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1920x1080, 20 fps, 20 tbr, 1200k tbn, 40 tbc
rtsp-server | 2021/06/27 19:53:48 I [0/0] [RTMP] [conn 172.18.0.2:43860] opened
wyze-bridge | Output #0, flv, to 'rtmp://rtsp-server:1935/wyzecam302':
wyze-bridge | Metadata:
wyze-bridge | encoder : Lavf58.20.100
rtsp-server | 2021/06/27 19:53:48 I [1/0] [RTMP] [conn 172.18.0.2:43860] is publishing to path 'wyzecam302', 1 track
wyze-bridge | Stream #0:0: Video: h264 (Main) ([7][0][0][0] / 0x0007), yuv420p(tv, bt709, progressive), 1920x1080, q=2-31, 20 fps, 20 tbr, 1k tbn, 1200k tbc
wyze-bridge | Stream mapping:
wyze-bridge | Stream #0:0 -> #0:0 (copy)
wyze-bridge | [flv @ 0x559918d50280] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
rtsp-server | 2021/06/27 19:54:08 I [1/0] [RTSP] [conn 192.168.1.69:64069] opened
rtsp-server | 2021/06/27 19:54:08 I [1/0] [RTSP] [conn 192.168.1.69:64069] ERR: no one is publishing to path 'wyzecam301'
rtsp-server | 2021/06/27 19:54:08 I [1/0] [RTSP] [conn 192.168.1.69:64069] closed
rtsp-server | 2021/06/27 19:54:13 I [1/0] [RTSP] [conn 192.168.1.69:64070] opened
rtsp-server | 2021/06/27 19:54:13 I [1/0] [RTSP] [session 2575826756] opened by 192.168.1.69:64070
rtsp-server | 2021/06/27 19:54:13 I [1/1] [RTSP] [session 2575826756] is reading from path 'wyzecam302', 1 track with TCP
rtsp-server | 2021/06/27 19:55:08 I [1/1] [RTSP] [conn 192.168.1.69:50625] opened
rtsp-server | 2021/06/27 19:55:08 I [1/1] [RTSP] [conn 192.168.1.69:50625] ERR: no one is publishing to path 'wyzecam301'
rtsp-server | 2021/06/27 19:55:08 I [1/1] [RTSP] [conn 192.168.1.69:50625] closed

Unraid setup

*Not an issue, just seeking help
Has anyone successfully set this up in Unraid?

EDIT: was not able to get going in portainer but had to correct my timezone and then just used docker compose in command line and added -d argument on install and it worked.

0.4.2 ARG error docker-compose

I get the following error when entering docker-compose up with the latest Dockerfile.
Dockerfile parse error line 6: ARG requires exactly one argument

0.4.0 works OK

On demand streaming from cameras

In an effort to not saturate limited Wi-Fi bandwidth, is there a way to trigger wyze-bridge to only pull from a camera on demand via any of the resulting URIs?

Streams go offline at least once a day

I have two cameras that will just go offline, both have a strong connection and are connected on LAN mode. A restart fixes the issue but having to restart the container is a pain. The log is flooded with RTSP no one is publishing to path errors so its hard to find whats wrong.

Outdoor cam does not work

When trying to stream my outdor cam feed I get this error in the log

Unexpected mode for connect challenge response (10001): 6
2021/08/07 22:59:14 [Front Porch] 'NoneType' object has no attribute 'encode'

and then a lot of these
2021/08/07 22:59:16 [Front Porch] AV_ER_EXCEED_MAX_CHANNEL

'NoneType' object has no attribute 'encode'

I've been trying this but getting piles of errors when I run it. I have 15 cameras and when I start this up it seems to spit out errors. I'm not even sure where to start on debugging this one.

The most common error appears to be:
'NoneType' object has no attribute 'encode'

An entire run from start-up to stop can be found here, I was able to get "Dog Door" camera player open in a browser but the video from it never played:

https://pastebin.com/raw/V9teq8ic

docker-wyze-bridge network only listening on IPV6 on Ubuntu based environment.. my env is set for IPV4 only

The docker app composed ok and runs however I can't connect to the IPV6 streams using vlc... I don't have IPV6 connections allowed.
ex: rtsp://localhost:9554/my_cam_name << vlc error: VLC is unable to open the MRL 'rtsp://localhost:9554/my_cam_name >>
ex: rtsp://::1:9554/my_cam_name << vlc error: VLC is unable to open the MRL 'rtsp://::1:9554/wyzev3'. >>

I changed the rtsp outside port ->9554 in the yml file since I am already using that port on my system... how do I force the docker-wyze-bridge_default network to use IPV6 only and is this possible?

$ sudo netstat -antulp | grep docker
tcp6 0 0 :::9000 :::* LISTEN 3864/docker-proxy
tcp6 0 0 :::1935 :::* LISTEN 30600/docker-proxy
tcp6 0 0 :::9554 :::* LISTEN 30587/docker-proxy
tcp6 0 0 :::8888 :::* LISTEN 30574/docker-proxy
tcp6 0 0 :::8000 :::* LISTEN 3878/docker-proxy

Lan Mode - RTSP Stream

I tried to enable LAN mode on a Synology DSM. The container started up and all the streams were published, however I was unable to connect to the streams with motioneye.

What should the RTSP stream be when in LAN mode as all the ports are being commented out?

3rd Camera throws frame errors

Added a 3rd camera, WyzeCam303. Same settings as other two (as far as I can tell). Still have to run wyze-to-rtmp manually, but now it won't connect at all, throwing these types of errors:

[h264 @ 0x55b333591e40] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. ([email protected])
[h264 @ 0x55b333591e40] no frame!
[h264 @ 0x55b333591e40] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

[h264 @ 0x55b333591e40] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. ([email protected])
[h264 @ 0x55b333591e40] no frame!
[h264 @ 0x55b333590640] decoding for stream 0 failed
[h264 @ 0x55b333590640] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, h264, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264, none, 25 fps, 25 tbr, 1200k tbn, 50 tbc
[flv @ 0x55b333595b00] dimensions not set
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Last message repeated 1 times
Reconnect
Reconnect
Reconnect
Reconnect
Reconnect
Reconnect
/home/ron/wyze-to-rtmp/lib/python3.8/site-packages/wyzecam/iotc.py:367: UserWarning: Lost frame
warnings.warn("Lost frame")
/home/ron/wyze-to-rtmp/lib/python3.8/site-packages/wyzecam/iotc.py:364: UserWarning: Received incomplete frame
warnings.warn("Received incomplete frame")
Reconnect

Any suggestions for correction?

Stops working when authentication servers have a hiccup

2021/07/05 11:10:43 [cam] requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://auth-prod.api.wyze.com/user/login
It would be nice if it auto-retries every certain amount of time. So I wouldn't have to restart the container.

V3 show up but not V2 (w/ RTSP firmware)

I am able to view my V3 but not V2 camera streams.

My V2 camera is named 'garage' but I cannot view that particular stream.
Any suggestions?

`
kyle@monster:~$ sudo systemctl status wyzebridge.service
● wyzebridge.service - Wyze bridge
Loaded: loaded (/lib/systemd/system/wyzebridge.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-07-16 14:15:55 EDT; 18min ago
Process: 17173 ExecStartPre=/usr/bin/docker-compose stop (code=exited, status=0/SUCCESS)
Process: 17180 ExecStartPre=/usr/bin/docker-compose pull (code=exited, status=0/SUCCESS)
Main PID: 17189 (docker-compose)
Tasks: 7 (limit: 4915)
Memory: 37.5M
CGroup: /system.slice/wyzebridge.service
└─17189 /usr/bin/python3 /usr/bin/docker-compose up

Jul 16 14:33:39 monster docker-compose[17189]: wyze-bridge | 2021/07/16 18:33:39 [garage] 'type'
Jul 16 14:33:50 monster docker-compose[17189]: wyze-bridge | 2021/07/16 18:33:50 [garage] Starting HD 120kb/s Stream for WyzeCam V2 (WYZEC1-JZ) running FW: 4.
Jul 16 14:33:50 monster docker-compose[17189]: wyze-bridge | 2021/07/16 18:33:50 [garage] 'type'
Jul 16 14:34:02 monster docker-compose[17189]: wyze-bridge | 2021/07/16 18:34:02 [garage] Starting HD 120kb/s Stream for WyzeCam V2 (WYZEC1-JZ) running FW: 4.
Jul 16 14:34:02 monster docker-compose[17189]: wyze-bridge | 2021/07/16 18:34:02 [garage] 'type'
Jul 16 14:34:07 monster docker-compose[17189]: rtsp-server | 2021/07/16 18:34:07 I [3/2] [RTSP] [conn 192.168.86.50:60088] opened
Jul 16 14:34:07 monster docker-compose[17189]: rtsp-server | 2021/07/16 18:34:07 I [3/2] [RTSP] [conn 192.168.86.50:60088] ERR: no one is publishing to path '
Jul 16 14:34:07 monster docker-compose[17189]: rtsp-server | 2021/07/16 18:34:07 I [3/2] [RTSP] [conn 192.168.86.50:60088] closed
Jul 16 14:34:14 monster docker-compose[17189]: wyze-bridge | 2021/07/16 18:34:14 [garage] Starting HD 120kb/s Stream for WyzeCam V2 (WYZEC1-JZ) running FW: 4.
Jul 16 14:34:14 monster docker-compose[17189]: wyze-bridge | 2021/07/16 18:34:14 [garage] 'type'
`

Camera Name

For those that can't read code, the camera name in the stream URL has spaces replaced with dashes and is converted to lowercase. The URL is also case sensitive.

So if your camera in The Wyze app is named "Back Yard". The stream URL would be:
rtmp://localhost/stream/back-yard

Or for HLS:
http://localhost:8080/live/back-yard.m3u8

V3 cam gives error [SOLVED]

Got 2 cameras, the V2 works good, the V3 keeps giving me the error " [FFMPEG] [Errno 32] Broken pipe", these are the logs:

today at 09:06:33 2021/07/22 07:06:33 I [1/1] [HLS] [conn 192.168.1.179:62596] GET /lieke/ today at 09:06:33 2021/07/22 07:06:33 I [1/1] [HLS] [converter lieke] opened today at 09:06:33 2021/07/22 07:06:33 I [1/1] [HLS] [converter lieke] ERR: no one is publishing to path 'lieke' today at 09:06:33 2021/07/22 07:06:33 I [1/1] [HLS] [converter lieke] closed today at 09:06:39 2021/07/22 07:06:39 AV Client Start: chan_id=0 expected_chan=0 today at 09:06:39 2021/07/22 07:06:39 Now listening on channel id 0 today at 09:06:41 2021/07/22 07:06:41 No longer listening on channel id 0 today at 09:06:41 2021/07/22 07:06:41 [Lieke] Starting HD 120kb/s Stream for WyzeCam V3 (WYZE_CAKP2JFUS) running FW: 4.36.2.5 from 192.168.3.83 "Relay mode" (WiFi Quality: 77%)... today at 09:06:52 2021/07/22 07:06:52 [Lieke] [FFMPEG] [Errno 32] Broken pipe today at 09:06:52 2021/07/22 07:06:52 [Lieke] Cleaning up FFmpeg... today at 09:07:01 2021/07/22 07:07:01 AV Client Start: chan_id=0 expected_chan=0 today at 09:07:01 2021/07/22 07:07:01 Now listening on channel id 0 today at 09:07:04 2021/07/22 07:07:04 No longer listening on channel id 0 today at 09:07:04 2021/07/22 07:07:04 [Lieke] Starting HD 120kb/s Stream for WyzeCam V3 (WYZE_CAKP2JFUS) running FW: 4.36.2.5 from 192.168.3.83 "Relay mode" (WiFi Quality: 78%)... today at 09:07:15 2021/07/22 07:07:15 [Lieke] [FFMPEG] [Errno 32] Broken pipe today at 09:07:15 2021/07/22 07:07:15 [Lieke] Cleaning up FFmpeg...

Error connecting to cam from Raspberry Pi 4 container

I'm building the image on a RP 4. Everything seems to go as expected. When the container starts I get the error below after 60 seconds and the error repeats every 60 seconds.

image

Open VPN is running on this RPI which forced me to add some network configuration to the docker-compose.yml to get it to build. I've tried killing the VPN to see if that was the problem and it didn't make any difference.

Initially, I tried running the 'docker run' command and I got the same error. I assumed it was something to do with not using the ARM library. I removed that image and used docker-compose, modifying docker-compose.yml to use docker.arm per the instructions.

The cam is using Firmware Version 4.9.7.798 and the cam is working normally from the app.

IOTC_ER_CAN_NOT_FIND_DEVICE

v0.5.3 stopped working

When I try to connect to my V3 stream I get this error

2021/08/08 14:05:24 I [1/0] [RTSP] [conn 10.0.0.49:56188] ERR: path must end with a slash (back-yard-cam)

if I add a slash to the path I get this

2021/08/08 14:07:02 I [1/0] [RTSP] [conn 10.0.0.49:49845] ERR: invalid path name: can't end with a slash (back-yard-cam/)

here is the full log session when starting the container

2021/08/08 14:08:53 [Back Yard Cam] Starting 1080p 120kb/s Stream for WyzeCam V3 (WYZE_CAKP2JFUS) in "LAN mode" FW: 4.36.2.5 IP: 10.0.0.59 WiFi: 83%
2021/08/08 14:08:58 I [0/0] [RTSP] [conn 127.0.0.1:49210] opened
2021/08/08 14:08:58 I [0/0] [RTSP] [session 257817575] opened by 127.0.0.1:49210
2021/08/08 14:08:58 I [0/0] [path back_yard_cam] created
2021/08/08 14:08:58 I [1/0] [RTSP] [session 257817575] is publishing to path 'back_yard_cam', 1 track with UDP
2021/08/08 14:09:03 I [1/0] [RTSP] [conn 10.0.0.49:63140] opened
2021/08/08 14:09:03 I [1/0] [path back-yard-cam] created
2021/08/08 14:09:03 I [1/0] [RTSP] [conn 10.0.0.49:63140] ERR: no one is publishing to path 'back-yard-cam'
2021/08/08 14:09:03 I [1/0] [RTSP] [conn 10.0.0.49:63140] closed
2021/08/08 14:09:03 I [1/0] [RTSP] [conn 10.0.0.49:63141] opened
2021/08/08 14:09:03 I [1/0] [RTSP] [session 145956398] opened by 10.0.0.49:63141
2021/08/08 14:09:03 I [1/0] [RTSP] [conn 10.0.0.49:63141] ERR: path must end with a slash (back-yard-cam)
2021/08/08 14:09:03 I [1/0] [RTSP] [conn 10.0.0.49:63141] closed
2021/08/08 14:09:03 I [1/0] [RTSP] [session 145956398] closed
2021/08/08 14:09:03 I [1/0] [RTSP] [conn 10.0.0.49:63142] opened
2021/08/08 14:09:04 I [1/0] [RTSP] [conn 10.0.0.49:63142] closed

need a way to reconnect

When a camera disconnects from stream for any reason, the wyze-to-rtmp (wyze-bridge) also disconnects and prints to screen the message "Reconnect".

How can we develop a method for the bridge to re-connect itself to the stream that disconnected?

old wyze camera names showing up in bridge?

I recently renamed my wyze cameras in the app... however, the old names are still showing up in the wyze bridge. Is there a way to refresh this or might it just take some time. thanks!

Can't connect to the stream through any of the protocols

I believe the program is running normally:

wyze-bridge_1  | STARTING 1 OF 4 CAMERAS
wyze-bridge_1  | 2021/08/03 04:11:15 [Backyard] Starting HD 120kb/s Stream for WyzeCam V3 in "Relay mode" FW: 4.36.0.280 IP: 192.168.0.103 WiFi: 83%
wyze-bridge_1  | 2021/08/03 04:11:21 I [0/0] [RTSP] [conn 127.0.0.1:34826] opened
wyze-bridge_1  | 2021/08/03 04:11:21 I [0/0] [RTSP] [session 2616752053] opened by 127.0.0.1:34826
wyze-bridge_1  | 2021/08/03 04:11:21 I [1/0] [RTSP] [session 2616752053] is publishing to path 'backyard', 1 track with UDP

RTSP, RTMP, or HLS won't connect when I enter their corresponding URLs.

Install Guide Typo

There is a line that says

docker-composer up --build

It should be:

docker-compose up --build

Failing step 3/9

Hi, I am receiving this error. Running docker on a synology nas.

Step 3/9 : RUN apt-get update && apt-get install ffmpeg unzip g++ -y && apt-get clean && rm -rf /var/lib/apt/lists/*
 ---> Running in ffb6acc2f8f6
Err:1 http://deb.debian.org/debian buster InRelease
  Temporary failure resolving 'deb.debian.org'
Err:2 http://security.debian.org/debian-security buster/updates InRelease
  Temporary failure resolving 'security.debian.org'
Err:3 http://deb.debian.org/debian buster-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease  Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

HTTP Stream shows black banner on top and bottom of image

I'm using my streams in Magic Mirror using MMM-iFrame-ping module... works great, except there's a black banner on top of the stream I can't get rid of. When I check the HTTP stream in my browser its the same thing, showing the top and bottom black bar.

How can I remove that? Is it some code in the docker image files that's rendering the stream with the top/bottom banner?

Thanks!

image
image

rtsp-simple-server Authentication

I wanted to make my RTSP require authentication. I tried what I though I understood from the section, but it does nothing. Also, I do not see rtsp-simple-server when I run [docker container stats]. Not sure what I am doing wrong.

I tried both:

        - RTSP_PUBLISHUSER=***
        - RTSP_PUBLISHPASS=***

and

        - RTSP_READUSER=***
        - RTSP_READPASS=***

with variations of '=', '=:', and ':'

Timestamp oddness, frames out of order?

I've been trying to work why my timestamps (and I guess frames) are getting out of order, see video here.

Anybody else seeing this? I don't get it with my wyze rtsp feeds or in wyze app.

Maybe pipe to stdin doesn't gaurantee order?

Remove special characters from cameras

I have a few cameras with an ' in the name, like "Person's Deck Camera". However, I get invalid path name errors when I use them with Wyze-bridge. I would love it if those characters could automatically be removed!

VLAN Isolation and LAN_ONLY

I've got my cameras on a separate VLAN. My primary VLAN has full access to the IOT VLAN, and I've got my firewall configured to allow established and related connections back. I added the LAN_ONLY flag to my config, but with it enabled, connection doesn't work because apparently it's establishing using "Relay Mode". Do you know enough about the underlying TUTK/IOTC stuff (this issue seems to fall into that domain, but correct me if I'm wrong) to know why that would be? Eg, does the camera try to ICMP Ping to [host on which docker-wyze-bridge is running] to determine if LAN mode works? Does it just check that the subnets match?

Btw, thanks for this! I was so happy when I found that somebody else had already written it! 8D

Feature Request: Stream HTTP Video as MJPEG

So far, no issues with the app. It currently outputs two http streams: one hls and the other straight http to browser. I have tested both, and both work.

I was wondering if it would be too much trouble to add a 3rd http stream: mjpeg?

I've been trying to do this myself with ffmpeg for days now with no success.

My nvr ContaCam only supports http streams encoded as mjpeg. It won't recognize either http stream currently supported by socker-wyze-bridge. The load on the computer processor (ContaCam only runs on Windows) is far less for http streams than rtsp. Right now, I have to stream some of my cameras to a PC running VLC, then use VLC to trasncode the rtsp streams to http mjpeg streams for ContaCam to read in. If I sent all the streams to this master as rtsp, it would crash. I basically have to do some fancy load balancing to get the streams into my master PC without overloading it. If the docker-wyze-bridge could stream mjpeg, I could eliminate a couple of PCs (one in house, one in garage) and stream everything (9 cameras) directly to the master.

I have tried, without success, to install both Shinobi and Zoneminder for this task. I get them both installed, but all the post-install config requirements to actually get them to run is driving me nuts. I don't even want to use them to monitor. I just want to capture the wyze streams and transcode them to mjpeg.

Anyway, if it could be easily added, great! If not, no problem.

Still Image

I did not see an option in the docs for a still image, is there a workaround for this?

v0.3.0 doesn't like FILTER_NAMES

Blew away my old install this morning and started fresh. If I leave FILTER_NAMES out of the wyze-bridge envs, it starts fine and tries to publish to the rtsp-server....

But, if I include the FILTER_NAMES option, it does this:

Starting wyze-bridge ... done
Starting rtsp-server ... done
Attaching to wyze-bridge, rtsp-server
rtsp-server | 2021/07/08 16:37:42 I [0/0] rtsp-simple-server v0.16.4
rtsp-server | 2021/07/08 16:37:42 I [0/0] [RTSP] TCP listener opened on :8554
rtsp-server | 2021/07/08 16:37:42 I [0/0] [RTMP] listener opened on :1935
rtsp-server | 2021/07/08 16:37:42 I [0/0] [HLS] listener opened on :8888
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
rtsp-server | 2021/07/08 16:37:43 I [0/0] [RTSP] [conn 192.168.1.109:56636] opened
rtsp-server | 2021/07/08 16:37:43 I [0/0] [RTSP] [conn 192.168.1.109:56636] ERR: no one is publishing to path 'front-porch-cam'
rtsp-server | 2021/07/08 16:37:43 I [0/0] [RTSP] [conn 192.168.1.109:56636] closed
rtsp-server | 2021/07/08 16:37:44 I [0/0] [RTSP] [conn 192.168.1.109:56637] opened
rtsp-server | 2021/07/08 16:37:44 I [0/0] [RTSP] [conn 192.168.1.109:56637] ERR: no one is publishing to path 'gate-cam'
rtsp-server | 2021/07/08 16:37:44 I [0/0] [RTSP] [conn 192.168.1.109:56637] closed
rtsp-server | 2021/07/08 16:37:44 I [0/0] [RTSP] [conn 192.168.1.109:56633] opened
rtsp-server | 2021/07/08 16:37:44 I [0/0] [RTSP] [conn 192.168.1.109:56633] ERR: no one is publishing to path 'drive-cam'
rtsp-server | 2021/07/08 16:37:44 I [0/0] [RTSP] [conn 192.168.1.109:56633] closed
wyze-bridge exited with code 1
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching auth data from local cache...
wyze-bridge | Fetching auth data from wyze...
wyze-bridge | Fetching user data from wyze...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Fetching cameras data from wyze...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given
wyze-bridge | STARTING DOCKER-WYZE-BRIDGE v0.3.0
wyze-bridge | Fetching user data from local cache...
wyze-bridge | Fetching cameras data from local cache...
wyze-bridge | Traceback (most recent call last):
wyze-bridge | File "/opt/wyzecam/cameras.py", line 115, in
wyze-bridge | wyze_bridge().run()
wyze-bridge | File "/opt/wyzecam/cameras.py", line 111, in run
wyze-bridge | for camera in self.filtered_cameras():
wyze-bridge | File "/opt/wyzecam/cameras.py", line 50, in filtered_cameras
wyze-bridge | filtered = list(filter(self.env_filter,cams))
wyze-bridge | File "/opt/wyzecam/cameras.py", line 16, in env_filter
wyze-bridge | return True if cam.nickname.upper() in self.get_env('FILTER_NAMES') or cam.mac in self.get_env('FILTER_MACS') or cam.product_model in self.get_env('FILTER_MODEL') or self.model_names.get(cam.product_model) in self.get_env('FILTER_MODEL') else False
wyze-bridge | TypeError: get_env() takes 1 positional argument but 2 were given

Until I stop it. Thoughts?

Windows Docker Setup

My test of a Windows based Docker setup finally seems to be running. But I can not connect to any streams. I have disabled Windows Firewall completely. Any suggestions?


STARTING DOCKER-WYZE-BRIDGE v0.5.1
Could not find local cache for user
Could not find local cache for auth
Fetching auth from wyze api...
Saving auth to local cache...
Fetching user from wyze api...
Saving user to local cache...
Could not find local cache for cameras
Fetching cameras from wyze api...
Saving cameras to local cache...
WHITELIST MODE ON
STARTING 1 OF 23 CAMERAS
2021/08/06 22:59:37 [CAM Front] Starting 1080p 120kb/s Stream for WyzeCam V3 (WYZE_CAKP2JFUS) in "LAN mode" FW: 4.36.2.5 IP: 192.168.1.111 WiFi: 75%
2021/08/06 22:59:41 I [0/0] [RTSP] [conn 127.0.0.1:42912] opened
2021/08/06 22:59:41 I [0/0] [RTSP] [session 3588204670] opened by 127.0.0.1:42912
2021/08/06 22:59:41 I [1/0] [RTSP] [session 3588204670] is publishing to path 'cam-front', 1 track with UDP

Trouble building image

This may be due to my limited knowledge with Docker, but after attempting to build an image with docker-compose build swiftly after downloading the most recent release and removing .sample, I got this error:

 > [builder 6/6] RUN mkdir -p /app &&    unzip /tmp/tutk.zip Lib/Linux/x64/*.a -d /tmp/tutk/ &&    cd /tmp/tutk/Lib/Linux/x64/ &&    g++ -fpic -shared -Wl,--whole-archive libAVAPIs.a libIOTCAPIs.a -Wl,--no-whole-archive -o /build/lib/libIOTCAPIs_ALL.so &&    tar -xzf /tmp/rtsp.tar.gz -C /app &&    tar --strip-components=1 -C /build/bin -xf /tmp/ffmpeg.tar.xz --wildcards '*ffmpeg' &&    rm -rf /tmp/*:     
#13 0.233 Archive:  /tmp/tutk.zip                                                                                                                                                                           
#13 0.236   inflating: /tmp/tutk/Lib/Linux/x64/libAVAPIs.a                                                                                                                                                  
#13 0.237   inflating: /tmp/tutk/Lib/Linux/x64/libAVAPIsT.a                                                                                                                                                 
#13 0.238   inflating: /tmp/tutk/Lib/Linux/x64/libIOTCAPIs.a  
#13 0.239   inflating: /tmp/tutk/Lib/Linux/x64/libIOTCAPIsT.a  
#13 0.242   inflating: /tmp/tutk/Lib/Linux/x64/libP2PTunnelAPIs.a  
#13 0.243   inflating: /tmp/tutk/Lib/Linux/x64/libP2PTunnelAPIsT.a  
#13 0.243   inflating: /tmp/tutk/Lib/Linux/x64/libRDTAPIs.a  
#13 0.244   inflating: /tmp/tutk/Lib/Linux/x64/libRDTAPIsT.a  
#13 0.262 /usr/bin/ld: libAVAPIs.a(AVAPIs.o): Relocations in generic ELF (EM: 62)
#13 0.262 /usr/bin/ld: libAVAPIs.a(AVAPIs.o): Relocations in generic ELF (EM: 62)
#13 0.262 /usr/bin/ld: libAVAPIs.a(AVAPIs.o): Relocations in generic ELF (EM: 62)
#13 0.262 /usr/bin/ld: libAVAPIs.a(AVAPIs.o): Relocations in generic ELF (EM: 62)
#13 0.262 /usr/bin/ld: libAVAPIs.a(AVAPIs.o): error adding symbols: file in wrong format
#13 0.262 collect2: error: ld returned 1 exit status
executor failed running [/bin/sh -c mkdir -p /app &&    unzip /tmp/tutk.zip Lib/Linux/${TUTK_ARCH:-x64}/*.a -d /tmp/tutk/ &&    cd /tmp/tutk/Lib/Linux/${TUTK_ARCH:-x64}/ &&    g++ -fpic -shared -Wl,--whole-archive libAVAPIs.a libIOTCAPIs.a -Wl,--no-whole-archive -o /build/lib/libIOTCAPIs_ALL.so &&    tar -xzf /tmp/rtsp.tar.gz -C /app &&    tar --strip-components=1 -C /build/bin -xf /tmp/ffmpeg.tar.xz --wildcards '*ffmpeg' &&    rm -rf /tmp/*]: exit code: 1
ERROR: Service 'wyze-bridge' failed to build : Build failed

yaml:

version: '3.8'
services:
    wyze-bridge:
        restart: always
        network_mode: host
        ports:
            - 1935:1935
            - 8554:8554
            - 8888:8888
        # image: mrlt8/wyze-bridge:latest
        build: 
            context: ./app
            # dockerfile: Dockerfile.arm
        environment:
            - WYZE_EMAIL=
            - WYZE_PASSWORD=
            - LAN_ONLY=True

Whys it failing?

Service 'wyzecam-bridge' failed to build av - Failed building wheel for av

Fired up a new Ubuntu system, installed docker, docker-compose. git cloned wyze-bridge. Ran:

docker-compose up
also tried:
docker-compose up -d

It fails to build with error:

The command '/bin/sh -c pip3 install requests opencv-python av wyzecam' returned a non-zero code: 1

Also "Failed to build av"

Some steps I took to try and correct:

PyAV-Org/PyAV#599
apt install ffmpeg

It was already installed the last time I installed wyze-bridge under Ubuntu

PyAV-Org/PyAV#491
apt install libavdevice-dev libavfilter-dev

Same error.

Collecting typing-extensions>=3.7.4.3
Downloading typing_extensions-3.10.0.0-py3-none-any.whl (26 kB)
Building wheels for collected packages: av, xxtea
Building wheel for av (setup.py): started
Building wheel for av (setup.py): finished with status 'error'

The following is what ends up mostly in red:

ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6ky4u2vd/av_07c572dcd644453d866be3cec4659c83/setup.py'"'"'; file='"'"'/tmp/pip-install-6ky4u2vd/av_07c572dcd644453d866be3cec4659c83/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-y_dz4yv7
cwd: /tmp/pip-install-6ky4u2vd/av_07c572dcd644453d866be3cec4659c83/
Complete output (29 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/av
copying av/main.py -> build/lib.linux-aarch64-3.8/av
copying av/deprecation.py -> build/lib.linux-aarch64-3.8/av
copying av/datasets.py -> build/lib.linux-aarch64-3.8/av
copying av/init.py -> build/lib.linux-aarch64-3.8/av
creating build/lib.linux-aarch64-3.8/av/sidedata
copying av/sidedata/init.py -> build/lib.linux-aarch64-3.8/av/sidedata
creating build/lib.linux-aarch64-3.8/av/audio
copying av/audio/init.py -> build/lib.linux-aarch64-3.8/av/audio
creating build/lib.linux-aarch64-3.8/av/codec
copying av/codec/init.py -> build/lib.linux-aarch64-3.8/av/codec
creating build/lib.linux-aarch64-3.8/av/video
copying av/video/init.py -> build/lib.linux-aarch64-3.8/av/video
creating build/lib.linux-aarch64-3.8/av/container
copying av/container/init.py -> build/lib.linux-aarch64-3.8/av/container
creating build/lib.linux-aarch64-3.8/av/subtitles
copying av/subtitles/init.py -> build/lib.linux-aarch64-3.8/av/subtitles
creating build/lib.linux-aarch64-3.8/av/filter
copying av/filter/init.py -> build/lib.linux-aarch64-3.8/av/filter
creating build/lib.linux-aarch64-3.8/av/data
copying av/data/init.py -> build/lib.linux-aarch64-3.8/av/data
running build_ext
running config
pkg-config is required for building PyAV

ERROR: Failed building wheel for av
Running setup.py clean for av
Building wheel for xxtea (setup.py): started
Building wheel for xxtea (setup.py): finished with status 'done'
Created wheel for xxtea: filename=xxtea-2.0.0.post0-cp38-cp38-linux_aarch64.whl size=9780 sha256=102fe0b43f239d48461d0f442875ec0d2efaf90a186b38a09eaf6fbdf3653d8b
Stored in directory: /root/.cache/pip/wheels/70/15/83/b38311486594aa7da569537839becbbd9245a49fb68b26be85
Successfully built xxtea
Failed to build av
Installing collected packages: typing-extensions, xxtea, urllib3, pydantic, numpy, idna, chardet, certifi, wyzecam, requests, opencv-python, av
Running setup.py install for av: started
Running setup.py install for av: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6ky4u2vd/av_07c572dcd644453d866be3cec4659c83/setup.py'"'"'; file='"'"'/tmp/pip-install-6ky4u2vd/av_07c572dcd644453d866be3cec4659c83/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hvfyu92d/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/av
cwd: /tmp/pip-install-6ky4u2vd/av_07c572dcd644453d866be3cec4659c83/
Complete output (29 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/av
copying av/main.py -> build/lib.linux-aarch64-3.8/av
copying av/deprecation.py -> build/lib.linux-aarch64-3.8/av
copying av/datasets.py -> build/lib.linux-aarch64-3.8/av
copying av/init.py -> build/lib.linux-aarch64-3.8/av
creating build/lib.linux-aarch64-3.8/av/sidedata
copying av/sidedata/init.py -> build/lib.linux-aarch64-3.8/av/sidedata
creating build/lib.linux-aarch64-3.8/av/audio
copying av/audio/init.py -> build/lib.linux-aarch64-3.8/av/audio
creating build/lib.linux-aarch64-3.8/av/codec
copying av/codec/init.py -> build/lib.linux-aarch64-3.8/av/codec
creating build/lib.linux-aarch64-3.8/av/video
copying av/video/init.py -> build/lib.linux-aarch64-3.8/av/video
creating build/lib.linux-aarch64-3.8/av/container
copying av/container/init.py -> build/lib.linux-aarch64-3.8/av/container
creating build/lib.linux-aarch64-3.8/av/subtitles
copying av/subtitles/init.py -> build/lib.linux-aarch64-3.8/av/subtitles
creating build/lib.linux-aarch64-3.8/av/filter
copying av/filter/init.py -> build/lib.linux-aarch64-3.8/av/filter
creating build/lib.linux-aarch64-3.8/av/data
copying av/data/init.py -> build/lib.linux-aarch64-3.8/av/data
running build_ext
running config
pkg-config is required for building PyAV
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"

Then tried reinstall:

git reset --hard HEAD
git pull
docker-compose up --build --force-recreate --remove-orphans

Same errors.

What am I missing?

Distributor ID: Ubuntu
Description: Ubuntu 21.04
Release: 21.04
Codename: hirsute
Running on Raspberry P1 4

Was trying to build a wyze-bridge box!

OS and System compatibility

Curious to see what OS and system specs people are using to get at least one stream up.

Would appreciate if you could post the OS and cpu/ram of the system you're using to run the container, as well as the number of cams you're able to get up.
thanks!

Getting RTMP stream into frigate

I know this has more to do with Frigate, but figure I might get an answer here:
Has anyone been able to open the RTMP stream within frigate? I can get the RTSP stream working with default settings but can't get the RTMP stream working with either the default RTMP input_args settings or the Reolink settings here:
https://blakeblackshear.github.io/frigate/configuration/cameras/#reolink-410520-possibly-others

I am getting the following errors in Frigate:
frigate.video INFO : Driveway: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video INFO : Driveway: ffmpeg process is not running. exiting capture thread...
ffmpeg.Driveway.detect ERROR : [tcp @ 0x5649bd46e540] Connection to tcp://192.168.1.3:1935 failed: No route to host
ffmpeg.Driveway.detect ERROR : [rtmp @ 0x5649bd46dc80] Cannot open connection tcp://192.168.1.3:1935
ffmpeg.Driveway.detect ERROR : rtmp://192.168.1.3:1935/driveway-cam: No route to host

I can open the RTMP stream directly in home assistant

HLS Stream on iOS

Can't seem to get the HLS stream working on iOS.

On a MacBook, in Safari, going to: http://192.168.0.196:8888/camera/ works and streams perfectly.
On iOS Safari, I get the video player, but it never streams.

Anyone else have this issue?

Invalid credentials?

I had a randomly generated Wyze account password with a $ in it. It didn't seem to work with the bridge, when trying to connect I just got generic "Invalid credentials?" errors.

I generated a new random account password without special characters and it worked fine.

Are there special requirements for passwords with special characters to work with this program?

Audio possible?

Thanks so much for this.

Do you know of any way I can get audio to come through?

Rotate just one camera?

I see the option to edit ffmpeg, but is there a way to rotate the doorbell camera by 90°? From reading the documentation editing ffmpeg will change all cameras.

Issues with keeping streams

I'm fairly confident in my *nix skills but I'm running into issues keeping the two services continuing to serve up my streams.
I've got 11 cameras (10 are setup and powered on, WCO is sitting on my desk), a mix of v2, v3 and a doorbell. A few of the v2s have the RTSP firmware from Wyze. Both servers seem to start up fine, but I can't keep any streams going.

image

I had two of the cameras set up in Blue Iris, (backdoor-camera and front-porch) and initially the streams came through, but stopped, and that's why the "no one is publishing..." error messages are there.

Am I doing something obviously wrong with this, or what can I do to troubleshoot? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.