Skip to content

Extract WebRTC integration#157648

Merged
balloob merged 8 commits into
devfrom
claude/extract-webrtc-integration-01AHXVj6dh19FvgdL7rh439P
Dec 4, 2025
Merged

Extract WebRTC integration#157648
balloob merged 8 commits into
devfrom
claude/extract-webrtc-integration-01AHXVj6dh19FvgdL7rh439P

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Dec 1, 2025

Breaking change

Proposed change

Add WebRTC integration.

To standardize this and make available to other integrations.

Will be used for #157489

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copy link
Copy Markdown
Contributor

@home-assistant home-assistant Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @claude

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented Dec 1, 2025

Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration (camera) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of camera can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign camera Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented Dec 1, 2025

Hey there @home-assistant/cloud, mind taking a look at this pull request as it has been labeled with an integration (cloud) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of cloud can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign cloud Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@balloob balloob changed the title Claude/extract webrtc integration 01 ahx vj6dh19 fvgd l7rh439 p Extract WeBRTC integration Dec 1, 2025
@balloob balloob changed the title Extract WeBRTC integration Extract WebRTC integration Dec 1, 2025
@balloob balloob force-pushed the claude/extract-webrtc-integration-01AHXVj6dh19FvgdL7rh439P branch from c229dad to c14b8fa Compare December 1, 2025 20:44
@balloob balloob marked this pull request as ready for review December 1, 2025 20:47
Copilot AI review requested due to automatic review settings December 1, 2025 20:47
@balloob balloob requested a review from a team as a code owner December 1, 2025 20:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extracts WebRTC functionality from the camera component into a new standalone webrtc integration, making it available for use by other integrations. The extraction is part of standardization efforts and will be used by an upcoming PR.

Key changes:

  • Created new WebRTC integration with ICE server registration and retrieval capabilities
  • Updated camera and cloud components to use the new webrtc integration
  • Comprehensive test coverage for the new integration

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
homeassistant/components/webrtc/init.py New WebRTC integration with ICE server registration, retrieval, and WebSocket command handling
homeassistant/components/webrtc/manifest.json Manifest for new WebRTC system integration with internal quality scale
tests/components/webrtc/init.py Test package initialization for WebRTC integration
tests/components/webrtc/test_init.py Comprehensive tests covering setup, custom ICE servers, registration, and WebSocket endpoints
homeassistant/components/camera/init.py Updated to import async_get_ice_servers from webrtc integration and removed duplicate ICE server logic
homeassistant/components/camera/webrtc.py Removed async_register_ice_servers function and DATA_ICE_SERVERS (moved to webrtc integration)
homeassistant/components/camera/manifest.json Added webrtc as a dependency
homeassistant/components/cloud/client.py Updated import to use async_register_ice_servers from webrtc integration
homeassistant/components/cloud/manifest.json Added webrtc as a dependency
tests/components/camera/test_webrtc.py Updated imports to use webrtc integration for ICE server functionality
script/hassfest/quality_scale.py Added webrtc to quality scale exemptions list
script/hassfest/manifest.py Added webrtc to non-scaled quality scale tiers
CODEOWNERS Added codeowners entries for webrtc integration and tests

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @edenhaus should review too if there are more parts that should move, eg the client configuration and the WebRTC message classes.

Comment thread homeassistant/components/web_rtc/__init__.py
Comment thread homeassistant/components/web_rtc/__init__.py Outdated
@MartinHjelmare MartinHjelmare marked this pull request as draft December 2, 2025 08:45
Copy link
Copy Markdown
Contributor

@home-assistant home-assistant Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a merge conflict.

Copy link
Copy Markdown
Contributor

@home-assistant home-assistant Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a merge conflict.

@balloob balloob force-pushed the claude/extract-webrtc-integration-01AHXVj6dh19FvgdL7rh439P branch from d312778 to ffca50a Compare December 3, 2025 02:56
@balloob balloob requested a review from edenhaus December 3, 2025 03:14
@balloob balloob marked this pull request as ready for review December 3, 2025 03:16
@chatgpt-codex-connector

This comment was marked as resolved.

Comment thread homeassistant/components/web_rtc/__init__.py Outdated
@MartinHjelmare MartinHjelmare marked this pull request as draft December 3, 2025 06:54
Comment thread homeassistant/components/web_rtc/__init__.py
Comment thread homeassistant/components/web_rtc/__init__.py
Comment thread homeassistant/components/web_rtc/__init__.py Outdated
Copy link
Copy Markdown
Member

@edenhaus edenhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @balloob 👍

@edenhaus
Copy link
Copy Markdown
Member

edenhaus commented Dec 3, 2025

Fine to merge after merge conflict get resolved :)

@balloob balloob force-pushed the claude/extract-webrtc-integration-01AHXVj6dh19FvgdL7rh439P branch from 0483093 to a294215 Compare December 4, 2025 04:34
@balloob balloob marked this pull request as ready for review December 4, 2025 04:34
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread homeassistant/components/web_rtc/__init__.py
@balloob balloob merged commit 855d7c6 into dev Dec 4, 2025
116 of 118 checks passed
@balloob balloob deleted the claude/extract-webrtc-integration-01AHXVj6dh19FvgdL7rh439P branch December 4, 2025 14:44
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants