-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Add rtsptowebrtc
integration
#59660
Add rtsptowebrtc
integration
#59660
Conversation
One other thought I had was to make this even more independent of |
return self.async_abort(reason="single_instance_allowed") | ||
|
||
if user_input is not None: | ||
await self.async_set_unique_id(DOMAIN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other thought here is to do some kind of url validation or health checking of this backend at this point when not using discovery.
webrtc
internal integrationrtsptowebrtc
integration
Are there plans to make an addon that runs the https://github.com/deepch/RTSPtoWebRTC server? Right now its a big ask for users to figure out how to build/install it |
Yes, that is definitely part of the plan. My assumption is we can add discovery for it as well to make this nice and simple to setup.
Great point, I would love your advice here. Here are my current thoughts:
|
Maybe a single connect and make sure the |
I am proposing to hit We have a couple exception types: "Can't talk to the server" vs "server returned a response that was a failure". etc |
fee61eb
to
073d44f
Compare
I've updated this so this health check happens in the config flow and on startup. There are no ongoing checks after startup however. |
Seems fine to me. I think thats enough for the user to figure out what went wrong even if they have to restart |
checks seem to work ok |
Add the webrtc integration. This integration proxies the signal 'offer' from the client to a RTSPtoWebRTCP server that returns an 'answer'. The RTSPtoWebRTC server is a go binary based on pion, and this is what is currently used by the WebRTC custom_component: https://github.com/AlexxIT/WebRTC https://github.com/deepch/RTSPtoWebRTC
This is to reflect naming as one type of approach to webrtc since other webrtc integrations would look very different.
Co-authored-by: J. Nick Koston <nick@koston.org>
Update rtsptowebrtc to use new API added in home-assistant#62962
e81d954
to
b376cd7
Compare
Proposed change
Add a new integration
rtsptowebrtc
which is an integration similar to stream, that supports other integrations. Unlike stream, however, this relies on an external server for decoding the stream contents and the integration itself acts as a passthrough for initiating the stream only. This effectively pulls the custom component https://github.com/AlexxIT/WebRTC into core. See home-assistant/architecture#658 for detailed proposal. This is the initial integration that supports a config flow based configuration for an external RTSPtoWebRTC server.The
rtsptowebrtc
integration. does not expose entities or devices itself, but instead offers API methods for other integrations to call: Namely, given an sdpoffer
and an RTSP URL, get back an sdpanswer
. This is integration can easily interoperate with the API added as part of home-assistant/architecture#640 used by nest battery cameras. There is also an additional method for determining if a stream source is supported based on checking its prefix.There are other possible future additions that can happen in followup PRs, depending on additional feedback from the architecture discussion:
camera
as proposed in the architecture discussion, if we think that is usefulcamera
integration is not desired, this can be used by individual camera implementations likenest
that could offer webrtc support for older cameras.Integration has
100%
test coverage, and static typing support from the start.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: