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.58k stars 158 forks source link

Custom domain breaks Docker Wyze Bridge #810

Open stevland opened 1 year ago

stevland commented 1 year ago

Home Assistant 2023.5.3 Supervisor 2023.04.1 Operating System 10.1 (VirtualBox on Ubuntu) Frontend 20230503.3 - latest Docker Wyze Bridge 2.1.7 (current)

Using as a Home Assistant Add-On

Docker Wyze Bridge was working perfectly. Thanks to everyone who contributes to this project, I love it.

But then I added a domain name and a letsencrypt cert to my homeassistant.

Everything else works fine but Wyze Bridge is somewhat broken.

The app dashboard page still detects and displays stills from my 2 cameras.

But when I try to pull up a stream (https://home.MYDOMAIN.com:8889/front-exterior-cam/ OR https://MYIP:8889/front-exterior-cam/) I get no love.

FF says: SSL_ERROR_RX_RECORD_TOO_LONG

Chrome says: ERR_SSL_PROTOCOL_ERROR

If I try to pull up the same stream over an unencrypted (http) connection I just get a blank screen with a non-working play button at the bottom.

The error logs don't seem to contain any useful information.

I have tried uninstalling and reinstalling, no change.

I have Allowed Net Modes set to ANY.

No specific camera settings.

No custom ports, mods or configurations.

JA16122000 commented 1 year ago

Overhere, there is no problem with my domein: http://j-mulderij.nl:8889/voortuin/

mrlt8 commented 1 year ago

Does enabling LLHLS help?

You may also need to specify your custom domain/port using:

  - WB_RTSP_URL=rtsp://my-hostname-or-ip:1234/
  - WB_RTMP_URL=rtmp://my-hostname-or-ip:5678/
  - WB_HLS_URL=http://my-hostname-or-ip:9090/
  - WB_WEBRTC_URL=http://my-hostname-or-ip:9091/

The HA add-on should be able to pickup the SSL certificates, but you may need to specify them if not:

- MTX_HLSSERVERKEY=/path/to/server.key
- MTX_HLSSERVERCERT=/path/to/server.crt
stevland commented 1 year ago

You are using a custom domain (http://j-mulderij.nl/) but you're not using SSL (https).

Here's what one of my cameras look like:

[nevermind! it's working now!]

stevland commented 1 year ago

@mrlt8

I tried enabling LLHLS last night and I could have sworn that it made things worse.

I dunno, maybe I was too tired.

Anyway, I've added the following

LLHLS: true MTX_HLSSERVERKEY: /ssl/privkey.pem MTX_HLSSERVERCERT: /ssl/fullchain.pem

WebRTC still doesn't work. But the other 3 protocols do!

Adding the URL for WebRTC didn't help. But 75% is amazing, more than enough. And super fast to load.

Thank you so much for this repo and for your blazingly fast support.

stevland commented 10 months ago

@mrlt8

BTW I ended up finding these in my logs:

23-10-23 15:01:09 WARNING (MainThread) [supervisor.addons.options] Option 'MTX_HLSSERVERKEY' does not exist in the schema for Docker Wyze Bridge (7094bb28_docker_wyze_bridge)
23-10-23 15:01:09 WARNING (MainThread) [supervisor.addons.options] Option 'MTX_HLSSERVERCERT' does not exist in the schema for Docker Wyze Bridge (7094bb28_docker_wyze_bridge)

If I try Googling MTX_HLSSERVERKEY the only hit is this page. Which makes me wonder if you have a typo or something.

I'm not sure if it really matters or not... the keys are in the default location and you said Docker Wyze should pick them up automatically.

But I'm still having weird SSL issues. Some pages will load securely, others will not. For example, the Web UI will only load over HTTP. I can view an HLS stream over HTTPS, but an WebRTC stream will only load over HTTP.