mrlt8 / docker-wyze-bridge

WebRTC/RTSP/RTMP/LL-HLS bridge for Wyze cams in a docker container
GNU Affero General Public License v3.0
2.67k stars 170 forks source link

Issues trying to get the Wyze Doorbell Cam working #133

Closed mrlt8 closed 2 years ago

mrlt8 commented 3 years ago

Moving the Doorbell/WYZEDB3 related discussion over to a new issue.

Originally posted by @tbrausch in https://github.com/mrlt8/docker-wyze-bridge/discussions/68#discussioncomment-1332804

mrlt8 commented 3 years ago

Hey @tbrausch, I created a repo for Home Assistant that should pull the latest edge image: https://github.com/mrlt8/edge-repo. Could you try running it and see if it runs as is, and then try setting BAD_FRAMES: 50 by increments of 50 ?

If that still doesn't work, could you try setting FRAME_SIZE: 0 and then try 1, 3, and 4 to see if any of those work?

Thanks!

terryhonn commented 3 years ago

@mrlt8, I installed the edge repo, and saw no change initially. I set BAD_FRAMES: 50 and then 100, no change. But once I set FRAME_SIZE: 4, I'm getting a good feed from my doorbell cam. Let me know if you want me to try anything else.

tbrausch commented 3 years ago

I am trying to test this remotely, and I will try some more when I get home. But none of these solutions seemed to work. I also tried FRAME_SIZE: 4 and this also did not work on my system.

snake575 commented 3 years ago

I have it working on edge with FRAME_SIZE: 4 and BAD_FRAMES: 100.

Earlier today it was working on 0.6.6 with no flags though, then it stopped working after a container restart ๐Ÿคทโ€โ™‚๏ธ

mrlt8 commented 3 years ago

Thanks for testing everyone! Anyone able to get it working with FRAME_SIZE: 0? I believe 0 or 3 should be HD. Otherwise, we'll have to default to frame_size 4 which I believe is SD?

Could I get some feedback with:

IGNORE_RES: true
FRAME_SIZE: 0

and also test 1 and 3 in FRAME_SIZE

tbrausch commented 3 years ago

I tried IGNORE_RES: true with FRAME_SIZE: 0 and got similar results to what I mentioned before. I get a good stable image in a picture entity card, VLC reported an error trying to stream in RTSP, and VLC displayed the RTMP stream, but like WebRTC they both display a pixelated mess (for all cameras).

mrlt8 commented 3 years ago

Ok, pushed another edge release that should default to frame size 4.

Would appreciate it if I could get some people to confirm it works with just the basic vanilla configs.

Would also like to see if anyone can get it working with FRAME_SIZE: 3

@snake575, was the resolution of FRAME_SIZE: 4 different than what you got with the v0.6.6 release?

terryhonn commented 3 years ago

Ok, pushed another edge release that should default to frame size 4.

Is that reported as v0.6.7?

Would also like to see if anyone can get it working with FRAME_SIZE: 3

As long as I have IGNORE_RES: true, mine is working with any of the FRAME_SIZE values.

WIthout IGNORE_RES: true, I can only get a stream with FRAME_SIZE: 4

mrlt8 commented 3 years ago

Thanks @terryhonn! Does the actual resolution of the video change with the different values or does it always remain the same? Latest image should report v0.6.7 beta 2

terryhonn commented 3 years ago

Ok, I'm on v0.6.7.beta 2 now, and as near as I can tell, the resolution stays the same regardless of the value. Also, if I don't have IGNORE_RES: true, I don't get a feed and log continually reports


2021/09/18 10:39:12 [Front Doorbell] [FFMPEG] Wrong resolution: 4
2021/09/18 10:39:12 [Front Doorbell] ๐Ÿงน Cleaning up FFMPEG...
mrlt8 commented 3 years ago

Thanks for the confirmation!

Main release should now be working with the doorbells by always defaulting to frame_size 4.

snake575 commented 3 years ago

Hi @mrlt8, same as @terryhonn as long as I have IGNORE_RES: true it works with any FRAME_SIZE. Values 3 and 4 output the same resolution (maybe because IGNORE_RES flag). I couldn't get it to work without IGNORE_RES on v0.6.7.

I also noticed that when the bridge connects to the camera, the app changes to 480p.

I don't know what was the FRAME_SIZE that worked on v0.6.6, It may have been the default one. It did output a better resolution though.

mrlt8 commented 3 years ago

Thanks for the info @snake575!

The FRAME_SIZE in v0.6.6 should have defaulted to a value of 0.

I pushed a new edge update (v0.6.8 beta 1) that should try to request frame size 0 while checking for a return frame size of 3.

Would appreciate if some people could test it out and try with QUALITY SD120 and HD120

bdfrost commented 3 years ago

Using HD60 worked for me and gave me 480x640 in VLC. HD120 also gave me 480x640 in VLC until I added IGNORE_RES: true then I started getting 1728x1296. I get a 90 degree off image in both of these and HA seems to hate it and gives me a weird video that I can kinda make out but the resolution is off (and still 90 degrees rotated). One interesting note is that VLC says that my "buffer dimension" is 1728x1314. I tried setting the WIDTH to that in Frigate but it didnt love that and got more distorted.

I hope that this helps. I am on 0.6.7

bdfrost commented 3 years ago

BTW -- I ran the BAD_FRAMES up to 325 before quitting but it always shows that the "[FFMPEG] Wrong resolution: 3"

mrlt8 commented 3 years ago

Thank @bdfrost! Any chance FRAME_SIZE 3 works and gives you the higher res?

bdfrost commented 3 years ago

I trimmed the yaml to: WYZE_EMAIL: STUFF WYZE_PASSWORD: STUFF LAN_ONLY: true API_THUMB: true FRAME_SIZE: 3

and I get: 2021/09/20 22:05:27 [Front Doorbell] [FFMPEG] Wrong resolution: 4

snake575 commented 3 years ago

I'm on v0.6.8 beta 1, it works but still outputs SD video.

Stream #0:0: Video: h264, yuv420p(tv, unknown/bt709/unknown, progressive), 480x640 [SAR 1:1 DAR 3:4], q=2-31, 20 fps, 90k tbn

LAN_ONLY: True
IGNORE_RES: True
FRAME_SIZE: 3
QUALITY: HD120

Without IGNORE_RES I also get:

[FFMPEG] Wrong resolution: 4

Btw thanks for your effort @mrlt8! we'll get there ๐Ÿ˜

bdfrost commented 3 years ago

With the following settings, I see that it is using 640x480 instead of 480x640. I want the higher res but it is interesting that it isn't using the 3:4 ratio...

LAN_ONLY: true API_THUMB: true IGNORE_RES: true QUALITY: HD120

[h264 @ 0x69e1000] Reinit context to 640x480, pix_fmt: yuv420p ... Input #0, h264, from 'pipe:': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, unknown/bt709/unknown, progressive, left), 640x480 [SAR 1:1 DAR 4:3], 21.50 fps, 20 tbr, 1200k tbn ... Output #0, rtsp, to 'rtsp://0.0.0.0:8554/front-doorbell': Metadata: encoder : Lavf59.5.100 Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p(tv, unknown/bt709/unknown, progressive, left), 640x480 (0x0) [SAR 1:1 DAR 4:3], q=2-31, 21.50 fps, 20 tbr, 90k tbn

mrlt8 commented 3 years ago

Thanks for the data points!

This seems like it could be a bug in the upstream wyzecam SDK.

While we can get the correct "SD" frame_size 4, it looks like the "HD" frame_size 3 is broken and sets to size 4.

bdfrost commented 3 years ago

BTW -- thank you for building this out for the community.

Your generosity is certainly appreciated.

mrlt8 commented 3 years ago

Getting ready to push a new version and was curious to see if we should leave things as they are in v0.6.9 or revert back and lock the resolution to frame_size 4?

ItherNiT commented 3 years ago

How do I set the IGNORE_RES: true on the home assistant build?

mrlt8 commented 3 years ago

HI @ItherNiT you should be able to add custom configs to your add-on by going to the wyze bridge Configuration > Edit in YAML yaml

bdfrost commented 3 years ago

FYI -- I am semi-successfully using the following:

LAN_ONLY: true API_THUMB: true QUALITY: HD120 IGNORE_RES: true

then in frigate.yml height: 1296 width: 1728

and I get a nice image that is rotated by 90 degrees

image

mrlt8 commented 3 years ago

Thanks, @bdfrost! What error do you get without ignore res? I want to have it auto ignore the wrong res on the doorbells.

bdfrost commented 3 years ago

2021/09/27 19:52:34 [Front Doorbell] ๐ŸŽ‰ Starting 1080p 120kb/s Stream for WyzeCam DOORBELL in "LAN mode" FW: 4.25.0.244 IP: 192.168.100.109 WiFi: 88% 2021/09/27 19:52:35 [Front Doorbell] [FFMPEG] Wrong resolution: 4 2021/09/27 19:52:35 [Front Doorbell] ๐Ÿงน Cleaning up FFMPEG...

mrlt8 commented 3 years ago

Ok, v0.6.10 should expect res 4 for HD. Could you also see if SD still works?

bdfrost commented 3 years ago

I am getting the following with HD60:

2021/09/27 20:47:46 [Front Doorbell] ๐ŸŽ‰ Starting 1080p 60kb/s Stream for WyzeCam DOORBELL in "LAN mode" FW: 4.25.0.244 IP: 192.168.100.109 WiFi: 85%

bdfrost commented 3 years ago

Is there a good way to rotate the camera by 90 degrees to get my image straightened out?

mrlt8 commented 3 years ago

Temporary solution to rotate the camera would be something like this where FRONT_DOOR is the name of the cam:

- FFMPEG_CMD_FRONT_DOOR=ffmpeg -loglevel fatal -f h264 -i - -vcodec libx264 -vf transpose=2 -f rtsp rtsp://0.0.0.0:8554/
mrlt8 commented 3 years ago

I added ROTATE_DOOR to the dev branch which should also be available in the edge repo. This should do the same as the FFMPEG command above.

bdfrost commented 3 years ago

awesome -- I checked out the dev branch but not sure how to get homeassistant to use the branch rather than master since there isn't a configuration for it in repository.json. I could fork it but I think that I will just wait for the 0.7.0 branch to get merged :)

snake575 commented 3 years ago

Hi, I'm getting this with v0.7.0

2021/09/29 02:57:27 [Front Doorbell] [FFMPEG] Wrong resolution: 3

Config:

NET_MODE: LAN
ROTATE_DOOR: True
mrlt8 commented 3 years ago

Could you add the edge-repo and see if the dev branch works?

mrlt8 commented 3 years ago

Hey @snake575, please let me know if v0.7.1 fixes the issue! Thanks!

bdfrost commented 3 years ago

I get: 2021/09/29 11:23:17 [DOORBELL] ๐ŸŽ‰ Starting HD 120kb/s Stream for WyzeCam DOORBELL in "LAN mode" FW: 4.25.0.244 IP: 192.168.100.109 WiFi: 75% 2021/09/29 11:23:18 [DOORBELL] [FFMPEG] Wrong resolution: 4 2021/09/29 11:23:18 [DOORBELL] ๐Ÿงน Cleaning up FFMPEG...

With: NET_MODE: LAN SNAPSHOT: API MQTT_DTOPIC: homeassistant LAN_ONLY: true API_THUMB: true QUALITY: HD120 ROTATE_DOOR: true

I get the same without "ROTATE_DOOR: true", too.

thanks

mrlt8 commented 3 years ago

Hmm, was 0.7.0 working for you?

snake575 commented 3 years ago

Hi @mrlt8, testing edge with v0.7.2 ๐Ÿค”

๐Ÿš€ STARTING DOCKER-WYZE-BRIDGE v0.7.2

2021/09/30 00:03:40 [WyzeBridge] ๐Ÿ“š Using 'user' from local cache...
2021/09/30 00:03:40 [WyzeBridge] ๐Ÿ“š Using 'cameras' from local cache...

๐ŸŽฌ STARTING ALL 1 CAMERAS
2021/09/30 00:03:40 [WyzeBridge] Starting rtsp-simple-server v0.17.3
2021/09/30 00:03:43 [Front Doorbell] ๐ŸŽ‰ Starting HD 120kb/s Stream for WyzeCam DOORBELL in "LAN mode" FW: 4.25.0.244 IP: X.X.X.X WiFi: 95%
2021/09/30 00:03:46 [Front Doorbell] [FFMPEG] Wrong resolution: 3
2021/09/30 00:03:46 [Front Doorbell] ๐Ÿงน Cleaning up FFMPEG...

Config:

NET_MODE: LAN
ROTATE_DOOR: True
Maraklov commented 3 years ago

If we're testing, do you want the ffmpeg/rtsp_ debug=info level logs? I'm not sure if you've said in the past if you had the Doorbell h/w to test against.

I was able to get it to work in the earlier versions with QUALITY=SD30 and going to it in the app to select 480P, then it would say "stream is UP!". I'm not sure if there is some fighting w/ the Wyze API between the iOS apps (have 2 iPhones on the same account that use it pretty often), as the quality selector ping-pongs around between HD/SD/480P any time I open it on either phone. Nothing seems to change on the V3 or V2s when I was using them at HD120/SD60/etc.

Currently with latest 0.7.2 I get wrong resolution as well. Can provide more logs if you want.

mrlt8 commented 3 years ago

Thanks @Maraklov, but it seems to be more of a wyze/tutk issue.

As you noticed, the problem is that all the wyze cams seem to produce just one stream for everything - SD recording/app streaming/cloud notification/etc - so a change in any of those seems to affect them all. We could ignore all resolution changes which is what v0.6.x attempted to do but that broke the HLS and RTMP streams and caused some issues on the RTSP stream. So what the bridge now tries to do is reestablish the connection with the requested frame_size if it is not what was requested (480P/1080p - SD is actually HD with a lower bitrate). The doorbell is a little tricker as the requested and returned frame_sizes don't seem to match up.

I just pushed some changes in v0.7.3 which should try to accept whatever frame_size the bridge receives on connection to the camera. Would appreciate if I could get some feedback on these changes.

Something that would be helpful to have is the videoParm that the camera returns which can be obtained with debug=info and would look something like this line: [videoParm] {'type': 'H264', 'bitRate': '120', 'resolution': '1', 'fps': '15', 'horizontalFlip': '1', 'verticalFlip': '1', 'logo': '1', 'time': '1'}

Edit: fixed some typos. Please use v0.7.4.

Maraklov commented 3 years ago
๐Ÿš€ STARTING DOCKER-WYZE-BRIDGE v0.7.3

2021/09/30 14:17:20 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'user'
2021/09/30 14:17:20 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'auth'
2021/09/30 14:17:20 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'auth' from the Wyze API...
2021/09/30 14:17:21 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'auth' to local cache...
2021/09/30 14:17:21 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'user' from the Wyze API...
2021/09/30 14:17:21 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'user' to local cache...
2021/09/30 14:17:21 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'cameras'
2021/09/30 14:17:21 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'cameras' from the Wyze API...
2021/09/30 14:17:23 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'cameras' to local cache...
๐Ÿช„ WHITELIST MODE ON

๐ŸŽฌ STARTING 1 OF 5 CAMERAS
2021/09/30 14:17:23 [wyze_bridge][INFO][WyzeBridge] Starting rtsp-simple-server v0.17.3
2021/09/30 14:17:23 I [0/0] rtsp-simple-server v0.17.3
2021/09/30 14:17:23 I [0/0] [path front-door] created
2021/09/30 14:17:23 I [0/0] [RTSP] TCP listener opened on :8554
2021/09/30 14:17:23 I [0/0] [RTMP] listener opened on :1935
2021/09/30 14:17:23 I [0/0] [HLS] listener opened on :8888
2021/09/30 14:17:24 [wyzecam.iotc][INFO][Front Door] AV Client Start: chan_id=0 expected_chan=0
2021/09/30 14:17:24 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] Now listening on channel id 0
2021/09/30 14:17:26 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] No longer listening on channel id 0
2021/09/30 14:17:26 [wyze_bridge][INFO][Front Door] [videoParm] {'type': 'H264', 'bitRate': '120', 'resolution': '3', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1'}
2021/09/30 14:17:26 [wyze_bridge][INFO][Front Door] local variable 'res' referenced before assignment
2021/09/30 14:17:26 [wyzecam.iotc][INFO][Front Door] AV Client Start: chan_id=0 expected_chan=0
2021/09/30 14:17:26 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-2] Now listening on channel id 0
2021/09/30 14:17:27 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-2] No longer listening on channel id 0
2021/09/30 14:17:27 [wyze_bridge][INFO][Front Door] [videoParm] {'type': 'H264', 'bitRate': '120', 'resolution': '3', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1'}
2021/09/30 14:17:27 [wyze_bridge][INFO][Front Door] local variable 'res' referenced before assignment
2021/09/30 14:17:28 [wyzecam.iotc][INFO][Front Door] AV Client Start: chan_id=0 expected_chan=0
2021/09/30 14:17:28 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-3] Now listening on channel id 0
2021/09/30 14:17:29 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-3] No longer listening on channel id 0
2021/09/30 14:17:29 [wyze_bridge][INFO][Front Door] [videoParm] {'type': 'H264', 'bitRate': '120', 'resolution': '3', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1'}
2021/09/30 14:17:29 [wyze_bridge][INFO][Front Door] local variable 'res' referenced before assignment
2021/09/30 14:17:29 [wyzecam.iotc][INFO][Front Door] AV Client Start: chan_id=0 expected_chan=0
2021/09/30 14:17:29 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-4] Now listening on channel id 0

Thanks for the clarification. Here is log with only the defaults (other than RTSP user/passwd stuff) with only Front Door Doorbell h/w whitelisted. Seems to get this loop repeating. With V3 whitelisted, the V3 continues on to start stream, this keeps repeating in between V3 stream status updates.

Let me know if you want logs with any particular setting change-- I'll be playing around with them when I have time.

nwhistler commented 3 years ago

This is what I get with v0.7.4


wyze-bridge    | 2021/09/30 15:58:40 [wyze_bridge][INFO][FrontDoorbell] ๐Ÿงน Cleaning up FFMPEG...
wyze-bridge    | 2021/09/30 15:58:40 [wyze_bridge][DEBUG][FrontDoorbell] โŒ›๏ธ Connecting to cam..
wyze-bridge    | 2021/09/30 15:58:41 [wyzecam.iotc][INFO][FrontDoorbell] AV Client Start: chan_id=2 expected_chan=0
wyze-bridge    | 2021/09/30 15:58:41 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-7] Now listening on channel id 2
wyze-bridge    | 2021/09/30 15:58:41 [wyzecam.tutk.tutk_ioctl_mux][DEBUG][FrontDoorbell] SEND <K10000ConnectRequest code=10000 resp_code=10001> <TutkWyzeProtocolHeader prefix=b'HL' protocol=1 code=10000 txt_len=0> b''
wyze-bridge    | 2021/09/30 15:58:41 [wyzecam.tutk.tutk_ioctl_mux][DEBUG][Thread-7] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=11 code=10001 txt_len=17>: b'\x03\xd1w?\xf4\x11n]\x13\x84w\x1d\xd5\xccp\xecO'
wyze-bridge    | 2021/09/30 15:58:41 [wyzecam.tutk.tutk_protocol][DEBUG][FrontDoorbell] Sending response: <K10002ConnectAuth code=10002 resp_code=10003>
wyze-bridge    | 2021/09/30 15:58:41 [wyzecam.tutk.tutk_ioctl_mux][DEBUG][FrontDoorbell] SEND <K10002ConnectAuth code=10002 resp_code=10003> <TutkWyzeProtocolHeader prefix=b'HL' protocol=1 code=10002 txt_len=22> b'K>RL.%L\xe7\xe4\xea\r\x0b\xf2b\xa7\x0f2CAA\x01\x01'
wyze-bridge    | 2021/09/30 15:58:41 [wyzecam.tutk.tutk_ioctl_mux][DEBUG][Thread-7] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=11 code=10003 txt_len=651>: b'{"connectionRes":"1","cameraInfo":{"videoParm":{"type":"H264","bitRate":"120","resolution":"3","fps":"20","horizontalFlip":"1","verticalFlip":"1"},"settingParm":{"stateVision":"1","nightVision":"3","osd":"1","logSd":"1","logUdisk":"1", "telnet":"2","tz":"-7"},"basicInfo":{"firmware":"4.25.0.267","type":"Camera","hardware":"P00A0000","model":"WYZEDB3","mac":"-","wifidb":"63"},"channelResquestResult":{"video":"1","audio":"1"},"recordType":{"type":"1"},"sdParm":{"status":"2","capacity":"0","free":"0"},"uDiskParm":{"status":"2","capacity":"0","free":"0"},"apartalarmParm":{"type":"0","startX":"0","longX":"0","startY":"0","heightY":"0"}}}'
wyze-bridge    | 2021/09/30 15:58:41 [wyzecam.tutk.tutk_ioctl_mux][DEBUG][FrontDoorbell] SEND <K10052DBSetResolvingBit code=10052 resp_code=10053> <TutkWyzeProtocolHeader prefix=b'HL' protocol=1 code=10052 txt_len=6> b'x\x00\x01\x00\x00\x00'
wyze-bridge    | 2021/09/30 15:58:41 [wyzecam.tutk.tutk_ioctl_mux][DEBUG][Thread-7] RECV <TutkWyzeProtocolHeader prefix=b'HL' protocol=11 code=10053 txt_len=1>: b'\x01'
wyze-bridge    | 2021/09/30 15:58:42 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-7] No longer listening on channel id 2
wyze-bridge    | 2021/09/30 15:58:42 [wyze_bridge][INFO][FrontDoorbell] [videoParm] {'type': 'H264', 'bitRate': '120', 'resolution': '3', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1'}```
Maraklov commented 3 years ago

From v0.7.4 - all default settings

๐Ÿš€ STARTING DOCKER-WYZE-BRIDGE v0.7.4

2021/09/30 16:12:15 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'user'
2021/09/30 16:12:15 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'auth'
2021/09/30 16:12:15 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'auth' from the Wyze API...
2021/09/30 16:12:16 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'auth' to local cache...
2021/09/30 16:12:16 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'user' from the Wyze API...
2021/09/30 16:12:16 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'user' to local cache...
2021/09/30 16:12:16 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'cameras'
2021/09/30 16:12:16 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'cameras' from the Wyze API...
2021/09/30 16:12:17 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'cameras' to local cache...
๐Ÿช„ WHITELIST MODE ON

๐ŸŽฌ STARTING 1 OF 5 CAMERAS
2021/09/30 16:12:17 [wyze_bridge][INFO][WyzeBridge] Starting rtsp-simple-server v0.17.3
2021/09/30 16:12:17 I [0/0] rtsp-simple-server v0.17.3
2021/09/30 16:12:17 I [0/0] [path front-door] created
2021/09/30 16:12:17 I [0/0] [RTSP] TCP listener opened on :8554
2021/09/30 16:12:17 I [0/0] [RTMP] listener opened on :1935
2021/09/30 16:12:17 I [0/0] [HLS] listener opened on :8888
2021/09/30 16:12:19 [wyzecam.iotc][INFO][Front Door] AV Client Start: chan_id=0 expected_chan=0
2021/09/30 16:12:19 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] Now listening on channel id 0
2021/09/30 16:12:20 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] No longer listening on channel id 0
2021/09/30 16:12:20 [wyze_bridge][INFO][Front Door] [videoParm] {'type': 'H264', 'bitRate': '120', 'resolution': '3', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1'}
2021/09/30 16:12:20 [wyze_bridge][INFO][Front Door] ๐ŸŽ‰ Starting HD 120kb/s Stream for WyzeCam DOORBELL in "LAN mode" FW: 4.25.0.244 IP: 10.0.0.84 WiFi: 100%
2021/09/30 16:12:20 [wyze_bridge][INFO][Front Door] [FFMPEG_CMD] ffmpeg -loglevel verbose -i - -vcodec copy -rtsp_transport tcp -f rtsp rtsp://0.0.0.0:8554
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
2021/09/30 16:12:24 [wyze_bridge][INFO][Front Door] [FFMPEG] Wrong resolution: 4
2021/09/30 16:12:24 [wyze_bridge][INFO][Front Door] ๐Ÿงน Cleaning up FFMPEG...
2021/09/30 16:12:24 [wyzecam.iotc][INFO][Front Door] AV Client Start: chan_id=0 expected_chan=0
...
mrlt8 commented 3 years ago

Thanks everyone! I've updated the script in v0.7.5 to take the resolution from videoParm and add one to that value.

I'm still not sure why @snake575 was getting Wrong resolution: 3 while everyone else gets Wrong resolution: 4

nwhistler commented 3 years ago

I let this run probably longer than it needed to so apologize for the redundancy. debug.txt

snake575 commented 3 years ago

From v0.7.5:

๐Ÿš€ STARTING DOCKER-WYZE-BRIDGE v0.7.5

2021/09/30 22:56:05 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'user'
2021/09/30 22:56:05 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'auth'
2021/09/30 22:56:05 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'auth' from the Wyze API...
2021/09/30 22:56:06 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'auth' to local cache...
2021/09/30 22:56:06 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'user' from the Wyze API...
2021/09/30 22:56:08 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'user' to local cache...
2021/09/30 22:56:08 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'cameras'
2021/09/30 22:56:08 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'cameras' from the Wyze API...
2021/09/30 22:56:09 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'cameras' to local cache...

๐ŸŽฌ STARTING ALL 1 CAMERAS
2021/09/30 22:56:09 [wyze_bridge][INFO][WyzeBridge] Starting rtsp-simple-server v0.17.3
2021/09/30 22:56:11 [wyzecam.iotc][INFO][Front Doorbell] AV Client Start: chan_id=0 expected_chan=0
2021/09/30 22:56:11 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] Now listening on channel id 0
2021/09/30 22:56:11 [wyzecam.iotc][INFO][Front Doorbell] AV Client Start: chan_id=0 expected_chan=0
2021/09/30 22:56:11 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] Now listening on channel id 0
2021/09/30 22:56:12 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] No longer listening on channel id 0
2021/09/30 22:56:12 [wyze_bridge][INFO][Front Doorbell] [videoParm] {'type': 'H264', 'bitRate': '180', 'resolution': '3', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1'}
2021/09/30 22:56:12 [wyze_bridge][INFO][Front Doorbell] ๐ŸŽ‰ Starting HD 120kb/s Stream for WyzeCam DOORBELL in "LAN mode" FW: 4.25.0.244 IP: 10.0.1.23 WiFi: 88%
2021/09/30 22:56:15 [wyze_bridge][INFO][Front Doorbell] [FFMPEG] Wrong resolution: 3
2021/09/30 22:56:15 [wyze_bridge][INFO][Front Doorbell] ๐Ÿงน Cleaning up FFMPEG...

@nwhistler seems to be getting Wrong resolution: 3 as well ๐Ÿค”

mrlt8 commented 3 years ago

Thanks, @nwhistler @snake575! I added a couple of debugging options to v0.7.6.

nwhistler commented 3 years ago

Ok, with:

            - IGNORE_RES=3
            - DOOR_SIZE=4
            - ROTATE_DOOR=true

I got all the cameras working. Thank you so much for all the effort you've put in tweaking things. It is really appreciated!!

snake575 commented 3 years ago

Got it working as well, thanks! ๐Ÿ˜ƒ

NET_MODE: LAN
ROTATE_DOOR: True
IGNORE_RES: 3
DOOR_SIZE: 4
๐Ÿš€ STARTING DOCKER-WYZE-BRIDGE v0.7.6

2021/10/01 01:15:49 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'user'
2021/10/01 01:15:49 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'auth'
2021/10/01 01:15:49 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'auth' from the Wyze API...
2021/10/01 01:15:49 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'auth' to local cache...
2021/10/01 01:15:49 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'user' from the Wyze API...
2021/10/01 01:15:51 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'user' to local cache...
2021/10/01 01:15:51 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ” Could not find local cache for 'cameras'
2021/10/01 01:15:51 [wyze_bridge][INFO][WyzeBridge] โ˜๏ธ Fetching 'cameras' from the Wyze API...
2021/10/01 01:15:51 [wyze_bridge][INFO][WyzeBridge] ๐Ÿ’พ Saving 'cameras' to local cache...

๐ŸŽฌ STARTING ALL 1 CAMERAS
2021/10/01 01:15:51 [wyze_bridge][INFO][WyzeBridge] Starting rtsp-simple-server v0.17.3
2021/10/01 01:15:54 [wyzecam.iotc][INFO][Front Doorbell] AV Client Start: chan_id=0 expected_chan=0
2021/10/01 01:15:54 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] Now listening on channel id 0
2021/10/01 01:15:54 [wyzecam.iotc][INFO][Front Doorbell] AV Client Start: chan_id=0 expected_chan=0
2021/10/01 01:15:54 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] Now listening on channel id 0
2021/10/01 01:15:55 [wyzecam.tutk.tutk_ioctl_mux][INFO][Thread-1] No longer listening on channel id 0
2021/10/01 01:15:55 [wyze_bridge][INFO][Front Doorbell] [videoParm] {'type': 'H264', 'bitRate': '120', 'resolution': '3', 'fps': '20', 'horizontalFlip': '1', 'verticalFlip': '1'}
2021/10/01 01:15:55 [wyze_bridge][INFO][Front Doorbell] ๐ŸŽ‰ Starting HD 120kb/s Stream for WyzeCam DOORBELL in "LAN mode" FW: 4.25.0.244 IP: 10.0.1.23 WiFi: 94%
2021/10/01 01:16:01 [RTSP][FRONT-DOORBELL] โœ… '/front-doorbell' stream is UP!