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

Develop a general purpose proxy integration #1299

Closed
felipecrs opened this issue Oct 15, 2023 · 8 comments
Closed

Develop a general purpose proxy integration #1299

felipecrs opened this issue Oct 15, 2023 · 8 comments
Labels
feature New feature or request

Comments

@felipecrs
Copy link
Contributor

felipecrs commented Oct 15, 2023

Is your feature request related to a problem? Please describe.
This is a continuation of #1206. I am just opening this issue for tracking and upvoting purposes, and so we can keep the discussion around supporting this centralized.

Another benefit of this feature is to reduce the entry barrier. Setting up TLS, NGINX proxies, domains and everything is a painful process for newcomers.

Describe the solution you'd like
@dermotduffy described it here.

Describe alternatives you've considered
There are three alternatives:

  1. Use Frigate
  2. Expose go2rtc to the world (Allow a non-Frigate go2rtc URL endpoint #1206)
  3. Use WebRTC card instead

Additional context
N/A

@felipecrs felipecrs changed the title Support go2rtc proxied inside Hass so that I don't need to open go2rtc to the world Support go2rtc proxied through HA so that I don't need to open go2rtc to the world Oct 15, 2023
@felipecrs
Copy link
Contributor Author

felipecrs commented Oct 15, 2023

I would like to present a second idea though:

What if we could leverage the existing Hassio Ingress for add-ons for this purpose? I know it is currently not possible for frontend cards to communicate with add-ons through the Hassio Ingress, but in my understanding this is not for technical limitations but instead due to do missing support/implementation from Home Assistant/Supervisor side.

Maybe we could identify such gaps and invest our time there instead. Many people would benefit from that, as I see several people tinkering with that in the forums (like trying to integrate Grafana iframes directly in lovelace).

@felipecrs
Copy link
Contributor Author

felipecrs commented May 30, 2024

@dermotduffy, you once suggested creating a Home Assistant integration for general-purpose proxying. I think this would be a really good idea at this point. By any chance are you considering creating such integration yourself?

@dermotduffy
Copy link
Owner

@dermotduffy, you once suggested creating a Home Assistant integration for general-purpose proxying. I think this would be a really good idea at this point. By any chance are you considering creating such integration yourself?

Hi @felipecrs . Yes, I still think this is a good idea as described in this comment. If such a library existed, I'd immediately move the Frigate integration over to use it, and then a small wrapper integration could be added to HACS to allow arbitrary proxies to be setup.

Do I see myself finding the time to actually do that anytime soon, not really :-( I want to get the next card release out, and even then I'm losing the battle with the feature requests, and in practice that library/integration won't actually unlock many new capabilities for most users, it's kind of a technical hygiene/reusability thing...

If someone else wanted to build such a thing, I'd be all for it. Otherwise, maybe I'd get to it eventually!

@felipecrs
Copy link
Contributor Author

That's fair. Thank you for the clarification and honesty.

Personally, I already use Frigate for object detection and recording, so I get the feature for free through the Frigate integration.

However, for people with lower end PCs or even people running HA in a small board like Raspberry Pi, running Frigate just for go2rtc is overkill and a bit unfeasible, so I understand the need.

Who knows, maybe someday I'll jump into coding this integration too.

@dermotduffy
Copy link
Owner

Who knows, maybe someday I'll jump into coding this integration too.

I was hoping you might say that ;-) If you do, lets chat.

@dermotduffy dermotduffy changed the title Support go2rtc proxied through HA so that I don't need to open go2rtc to the world Develop a general purpose proxy integration that can be used by this card Sep 28, 2024
@dermotduffy dermotduffy added the feature New feature or request label Sep 28, 2024
@dermotduffy dermotduffy changed the title Develop a general purpose proxy integration that can be used by this card Develop a general purpose proxy integration Sep 28, 2024
@dermotduffy
Copy link
Owner

Large steps forward here:

TODO:

@felipecrs
Copy link
Contributor Author

felipecrs commented Nov 6, 2024

This is awesome! Can't believe it's happening. And you have really gone big, it's a full-fledged library and integration.

I wonder whether it would be possible to leverage this to have iframe card to display pages or content running in add-ons, but in a HA dashboard.

@dermotduffy
Copy link
Owner

I wonder whether it would be possible to leverage this to have iframe card to display pages or content running in add-ons, but in a HA dashboard.

The issue would be that the request would need to be signed by the active Home Assistant session, and if you just use a simple iframe the request would not be signed by default. It really needs JS smarts (e.g. something like Frigate Card) that know to sign the request, OR be okay with unauthenticated access.

This is currently working quite well in for reolink and motioneye cameras with Frigate card, so I'm going to close this and we can use additional issues as they arise. There's some basic documentation for how to configure it for Frigate Card.

The only remaining work for the proxy is to add to HACS default.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants