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.6k stars 159 forks source link

Doorbell on 2.8.3, IOTC_ER_TIMEOUT, no stream, old thumbnails #1162

Closed mgrimace closed 4 months ago

mgrimace commented 5 months ago

Update: issue appears to be that the OG Doorbell is not working on 2.8.1-2.8.3, revert to 2.6.0 as a temporary workaround.

Hello,

I'm using Docker Wyze Bridge in Home Assistant OS, v2.81. I have an original doorbell, and a floodlight v1 (v3 wyze cam). They are not streaming, and seem to default to 'old' snapshots. I have attempted removing/readding the cameras to the Wyze app. I use the Wyze API already in my config. The main error now seems to be IOTC_ER_TIMEOUT.

Here are the logs:

πŸš€ DOCKER-WYZE-BRIDGE v2.8.1 X86_64

[WyzeBridge] ♻️ Clearing local cache...
[WyzeBridge] πŸ” Could not find local cache for 'auth'
[WyzeBridge] ☁️ Fetching 'auth' from the Wyze API...
 * Serving Flask app 'frontend'
 * Debug mode: off
[WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://[redacted]
[WyzeBridge] Press CTRL+C to quit
[WyzeBridge] πŸ’Ύ Saving 'auth' to local cache...
[WyzeBridge] πŸ” Could not find local cache for 'user'
[WyzeBridge] ☁️ Fetching 'user' from the Wyze API...
[WyzeBridge] πŸ’Ύ Saving 'user' to local cache...
[WyzeBridge] πŸ” Could not find local cache for 'cameras'
[WyzeBridge] ☁️ Fetching 'cameras' from the Wyze API...
[WyzeBridge] [API] Fetched [2] cameras
[WyzeBridge] πŸ’Ύ Saving 'cameras' to local cache...
[WyzeBridge] [+] Adding Wyze Doorbell [WYZEDB3]
[WyzeBridge] [+] Adding Back Yard Cam [WYZE_CAKP2JFUS]
[WyzeBridge] starting MediaMTX 1.1.1
[WyzeBridge] 🎬 2 streams enabled
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:29:21] "GET / HTTP/1.1" 200 -
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:29:22] "GET /api/sse_status HTTP/1.1" 200 -
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:29:22] "GET /img/wyze-doorbell.jpg HTTP/1.1" 200 -
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[WyzeBridge] ☁️ Pulling "wyze-doorbell" thumbnail to /media/wyze/img/wyze-doorbell.jpg
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:29:33] "GET /snapshot/wyze-doorbell.jpg?1714073373880= HTTP/1.1" 200 -
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:29:36] "GET /snapshot/wyze-doorbell.jpg?1714073377964= HTTP/1.1" 200 -
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:29:41] "GET /snapshot/back-yard-cam.jpg?1714073382437= HTTP/1.1" 200 -
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:30:48] "GET / HTTP/1.1" 200 -
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:30:48] "GET /api/sse_status HTTP/1.1" 200 -
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:30:52] "GET /snapshot/wyze-doorbell.jpg?1714073453507= HTTP/1.1" 200 -
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] ☁️ Fetching 'cameras' from the Wyze API...
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:31:28] "GET / HTTP/1.1" 200 -
[WyzeBridge] 172.30.32.2 - - [25/Apr/2024 15:31:28] "GET /api/sse_status HTTP/1.1" 200 -
[WyzeBridge] [API] Fetched [2] cameras
[WyzeBridge] πŸ’Ύ Saving 'cameras' to local cache...
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] ⏰ Timed out connecting to Back Yard Cam.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Back Yard Cam.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] ☁️ Fetching 'cameras' from the Wyze API...
[WyzeBridge] [API] Fetched [2] cameras
[WyzeBridge] πŸ’Ύ Saving 'cameras' to local cache...
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116
[back-yard-cam] [-13] IOTC_ER_TIMEOUT
[WyzeBridge] ⏰ Timed out connecting to Wyze Doorbell.
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam Doorbell - Wyze Doorbell on 192.168.0.126
[WyzeBridge] πŸŽ‰ Connecting to WyzeCam V3 - Back Yard Cam on 192.168.0.116

My config is as follows:

WYZE_EMAIL: [redacted]
WYZE_PASSWORD: [redacted]
NET_MODE: ANY
SNAPSHOT: RTSP
MQTT_DTOPIC: homeassistant
ENABLE_AUDIO: true
MOTION_API: false
ON_DEMAND: true
SUBSTREAM: false
CAM_OPTIONS: []
API_ID: [redacted]
API_KEY: [redacted]
ROTATE_DOOR: true

I also tried adding FRESH_DATA: true and tried setting ON_DEMAND: true - both options didn't work.

mgrimace commented 5 months ago

Screenshot 2024-04-25 155415 +14d (left), +5h (right).

Additional troubleshooting steps taken:

mgrimace commented 5 months ago

Debug logs mostly showing some variation of this over and over:

18:57:41 [DEBUG][wyze-doorbell] [video] slow gap=4.621805191040039
[back-yard-cam] [video] slow gap=0.909020185470581
18:57:41 [DEBUG][back-yard-cam] [video] slow gap=0.909020185470581
[back-yard-cam] [video] slow gap=0.8606345653533936
mrlt8 commented 5 months ago

Are the cameras on the same LAN? There's an issue with some of the firmware from 2024 causing issues with remote connections.

mgrimace commented 5 months ago

Are the cameras on the same LAN? There's an issue with some of the firmware from 2024 causing issues with remote connections.

same network, and interestingly I can get the backyard cam (flood light v1, wyze cam v3) to work, but the doorbell (v1 original) has the delay and no stream. I basically tried enabling/disabling different combinations of things, config below.

My ultimate goal is to get the cams into Homekit via Scrypted, and backyard is now working with:

WYZE_EMAIL: redacted
WYZE_PASSWORD: redacted
NET_MODE: ANY
SNAPSHOT: RTSP
MQTT_DTOPIC: homeassistant
ENABLE_AUDIO: false
MOTION_API: false
ON_DEMAND: true
SUBSTREAM: false
CAM_OPTIONS: []
API_ID: redacted
API_KEY: redacted
WYZE_BETA_API: false
ROTATE_DOOR: true
mgrimace commented 5 months ago

Other troubleshooting steps:

Account: Removing the API, and clearing cache and reconnecting would never prompt for an MFA code and give me a user error. Possibly unrelated. Changed my Wyze password just in case, and DWB only connects using the API. I tried removing/uninstalling the DWB addon a few times. Not sure if there’s an additional data cache that needs to also be removed to fully clear β€˜stale’ data.

Network: I attempted to rebuild my home network just in case it was something DNS/network or wifi related (basically reset the router back to default and reconnected things). The IPs of the camera have changed, and the wifi password. Cams are on dedicated 2.4 ghz and work in the Wyze app. For a while D-W-B kept connecting to the old IPs of the cams in the logs. Could be a Wyze api thing, and perhaps it takes some time to propagate back? I don’t know, wildly speculating.

mgrimace commented 5 months ago

It seems to be primarily the original doorbell that's the issue. The backyard cam works with the right settings.

mgrimace commented 5 months ago

update: downgrade to 2.6 appears to work for original doorbell camera. Going to keep testing but that may be a temporary workaround

vschembari commented 4 months ago

I also have a WYZEDB3 OG Doorbell and the latest update (2.8.3) seems to have broken my stream. Downgrading to 2.6.0-hw allows my stream to work as expected.

mgrimace commented 4 months ago

Appears resolved in 2.91,

Migrating from 2.60 working to 2.91 required a few minor changes:

Config/Env vars

      ACCESS_TOKEN: "${ACCESS_TOKEN}"
      WYZE_EMAIL: "${WYZE_EMAIL}"
      WYZE_PASSWORD: "${WYZE_PASSWORD}"
      API_ID: "${API_ID}"
      API_KEY: "${API_KEY}"
      NET_MODE: ANY
      SNAPSHOT: RTSP
      MQTT_DTOPIC: homeassistant
      ENABLE_AUDIO: false
      ROTATE_DOOR: true
      WB_API: "${WB_API}"
      WB_USERNAME: "${WYZE_EMAIL}"
      WB_PASSWORD: "${WYZE_PASSWORD}"