Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream Component and base_url #22252

Closed
kdanthony opened this issue Mar 21, 2019 · 9 comments
Closed

Stream Component and base_url #22252

kdanthony opened this issue Mar 21, 2019 · 9 comments
Assignees
Labels
integration: stream stale workaround available A workaround/mitigation is available while the root cause is resolved

Comments

@kdanthony
Copy link
Contributor

Home Assistant release with the issue: 0.90

Last working Home Assistant release (if known): N/A

Operating environment (Hass.io/Docker/Windows/etc.): Ubuntu 16.04

Component/platform: stream

Description of problem:

My Home Assistant is accessed at https://ha.mydomain.com:8443 (NGINX proxy) both externally and internally. This is split DNS in that externally a public IP is resolved and within my network it is resolved to the local IP of the Home Assistant VM.

Streaming to Google Home Hubs does not work with the base_url set to this hostname as the Google devices appear to use their own DNS and resolve it to the external IP. It connects to the device and it makes the 'connection sound' but the media never actually plays, it just stays spinning on loading.
If I modify my configuration base_url to be the internal IP directly to http://192.168.1.x:8123 it works just fine streaming.

This problem exists in the tts component as well when streaming tts to Google Homes / Home Hubs and there is a base_url parameter specifically to override within the component to point to my internal IP only. Implementing this here would solve the problem I suspect.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Broken with public resolvable base_url:

http:
  base_url: https://ha.mydomain.com:8443

Working:

http:
  base_url: http://192.168.1.x:8123

Camera I am streaming:

- platform: generic
  name: "Front Door"
  still_image_url: "http://192.168.1.x/image/frontdoor"
  stream_source: "http://192.168.1.x/h264/frontdoor/temp.m3u8"

Traceback (if applicable):


Additional information:

@hunterjm
Copy link
Member

Thanks for the report. I'll take a look at adding an optional override in the stream: config section.

@kdanthony
Copy link
Contributor Author

Thanks, the component is awesome so eager to use it more!

@hunterjm
Copy link
Member

One option until then is to block Google's DNS servers on your network (8.8.8.8 and 8.8.4.4) to force Google to use the DNS servers coming from your DHCP.

@kdanthony
Copy link
Contributor Author

Just to confirm that work around is working fine for now. Thanks.

@hunterjm hunterjm self-assigned this Mar 25, 2019
@hunterjm hunterjm added workaround available A workaround/mitigation is available while the root cause is resolved integration: stream labels Mar 25, 2019
@DPAmes
Copy link

DPAmes commented May 9, 2019

This issue has implications for anyone with a router that does not support loopback NAT. Apparently the Google TTS component uses the specified base_url and fails when the Home Assistant server is on a LAN where the router does not support access to the WAN address from the LAN side (also known as loopback NAT). That includes my Netgear router.

@gavinwoolley
Copy link

I also have this issue. Is there any progress on it please.

@Martinvdm
Copy link

still the same use. To bad i can't use the stream component from the first day. I do not have the possibility to block google DNS.
@hunterjm is there any progress on the override?

@mkono87
Copy link

mkono87 commented Sep 5, 2019

I think this is the issue im having. Once i disabled base_url it started working. But im on pfsense which supports lookback

@stale
Copy link

stale bot commented Dec 4, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 4, 2019
@stale stale bot closed this as completed Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: stream stale workaround available A workaround/mitigation is available while the root cause is resolved
Projects
None yet
Development

No branches or pull requests

6 participants