Commit Graph

190 Commits (c51e644203a0c93a791bc0d342d14a56728078fc)

Author SHA1 Message Date
Nathan Spencer ee37bc476f
Raise HomeAssistantError from camera snapshot service (#137051)
* Raise HomeAssistantError from camera snapshot service

* Improve error message

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-01 13:53:04 +01:00
G Johansson 53f80e9759
Ensure entity platform in camera tests (#135918) 2025-01-19 21:28:50 +01:00
Franck Nijhof 00c052bb22
Revert "Remove deprecated supported features warning in ..." (multiple) (#134933) 2025-01-07 00:08:02 +01:00
epenet 644b07d084
Remove deprecated supported features warning in Camera (#132640) 2024-12-09 08:24:09 +01:00
Robert Resch 28ec8272ee
Remove deprecated camera constants (#131796) 2024-11-28 11:05:45 +01:00
Robert Resch 1c2e86d824
Deprecate async_register_rtsp_to_web_rtc_provider (#131462) 2024-11-24 15:56:05 -08:00
Steven B. 7d1a7b0870
Webrtc use RTCIceCandidateInit messages with frontend (#129879)
* Add sdp m line index to WebRtc Ice Candidates

* Send RTCIceCandidate object in messages

* Update tests

* Update go2rtc to hardcode spdMid to 0 string on receive

* Update for latest webrtc-model changes

* Add error check for mushamuro error

* Remove sdp_line_index from expected fail tests

* Validate and parse message dict

* Catch mashumaro error and raise vol.Invalid

* Revert conftest change

* Use custom validator instead

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-11-23 13:51:26 +01:00
Robert Resch 754cf1fdb4
Deprecate camera async_handle_web_rtc_offer (#131285) 2024-11-22 17:37:56 +01:00
Robert Resch 154282ff5c
Deprecate camera frontend_stream_type (#130932) 2024-11-22 13:42:33 +01:00
Robert Resch 999f3e0d77
Use RTCIceCandidateInit instead of RTCIceCandidate (#130901) 2024-11-18 21:41:50 -05:00
Robert Resch e48857987b
Use camera_capabilities instead frontend_stream_type (#130604) 2024-11-18 20:26:45 +01:00
Robert Resch 46cfe6aa32
Refactor camera WebRTC tests (#130581) 2024-11-14 10:28:04 +01:00
Robert Resch d1dab83f10
Merge both stun server into one as it's the same server only on a different port (#130019)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-11-08 08:22:47 +01:00
Erik Montnemery fe0a822721
Call async_refresh_providers when camera entity feature changes (#129941) 2024-11-06 17:37:23 +01:00
Robert Resch 5679b061d2
Fix native sync WebRTC offer (#129931) 2024-11-06 10:07:10 +01:00
Robert Resch 4729b19dc6
Skip adding providers if the camera has native WebRTC (#129808)
* Skip adding providers if the camera has native WebRTC

* Update homeassistant/components/camera/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Implement suggestion

* Add tests

* Shorten test name

* Fix test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-11-05 14:44:37 +01:00
Robert Resch df796d432e
Remove all ice_servers on native sync WebRTC cameras (#129819) 2024-11-04 18:41:37 +01:00
Robert Resch d75dda0c05
Use RTCIceCandidate instead of str for candidate (#129793) 2024-11-04 10:38:27 +01:00
epenet b41c477f44
Fix flaky camera test (#129576) 2024-11-01 10:15:20 +01:00
Krisjanis Lejejs bf40e77d65
Add Stun server with port 3478 (#129501) 2024-10-30 15:40:23 +01:00
Martin Hjelmare 405a480cae
Create repair issue for legacy webrtc provider (#129334)
* Add repair issue

* Add tests

* Add option to not use builtin go2rtc provider

* Add test

* Add domain to new providers

* Add learn more url

* Update placeholder

* Promote the builtin provider

* Refactor provider storage

* Move check for legacy provider conflict to refresh

* Test provider registration race

* Add test for registering the same legacy provider twice

* Test test_get_not_supported_legacy_provider

* Remove blank line between bullets

* Call it built-in

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Revert "Add option to not use builtin go2rtc provider"

This reverts commit 4e31bad6c0c23d5a1c0935c985351808a46163d6.

* Revert "Add test"

This reverts commit ddf85fd4db2c78b15c1cdc716804b965f3a1f4e3.

* Update issue description

* async_close_session is optional

* Clean up after rebase

* Add required domain property to provider tests

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-30 14:11:17 +01:00
Martin Hjelmare 24829bc44f
Fix webrtc provider interface and tests (#129488)
* Fix webrtc provider tests

* Remove future code

* Add a test of the optional provider interface
2024-10-30 13:24:23 +01:00
Robert Resch 963829712d
Add CameraCapabilities (#128455) 2024-10-29 21:36:30 +01:00
Robert Resch aa855e31c8
Convert async_get_webrtc_client_configuration to a callback (#129329) 2024-10-28 15:47:22 +01:00
Robert Resch 675ee8e813
Add async webrtc offer support (#127981)
* Add async webrtc offer support

* Create dataclass for messages

* Send session ID over websocket

* Fixes

* Rename

* Implement some review findings

* Add WebRTCError and small renames

* Use dedicated function instead of inspec

* Update go2rtc-client to 0.0.1b1

* Improve checking for sync offer

* Revert change as not needed anymore

* Typo

* Fix tests

* Add missing go2rtc tests

* Move webrtc offer tests to test_webrtc file

* Add ws camera/webrtc/candidate tests

* Add missing tests

* Implement suggestions

* Implement review changes

* rename

* Revert test to use ws endpoints

* Change doc string

* Don't import from submodule

* Get type form class name

* Update homeassistant/components/camera/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Adopt tests

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix tests

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2024-10-28 15:46:15 +01:00
Erik Montnemery 3e62c6ae2f
Move core config functionality to its own module (#129065)
* Move core config functionality to its own module

* Adjust test
2024-10-24 13:34:51 +02:00
Erik Montnemery 487593af38
Allow configuring WebRTC stun and turn servers (#128984)
* Allow configuring WebRTC stun and turn servers

* Add tests

* Remove class WebRTCCoreConfiguration
2024-10-23 14:41:45 +02:00
Erik Montnemery 2c79173d20
Refactor camera.webrtc.register_ice_server (#129024)
* Refactor camera.webrtc.register_ice_server

* Apply suggestions from code review

Co-authored-by: Robert Resch <robert@resch.dev>

* Add missing import

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-10-23 11:49:39 +02:00
Krisjanis Lejejs de77751779
Change Stun server port to 80 (#128879) 2024-10-22 14:23:29 +02:00
Erik Montnemery 8e5abcf5c2
Deprecate entity_id template variable in camera services (#128592)
* Deprecate entity_id template variable in camera services

* Update snapshots

* Tiny lang tweak

* Fix translation

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-10-21 19:38:02 +02:00
Erik Montnemery 9d0701a62b
Improve camera tests (#128545) 2024-10-17 16:36:42 +02:00
Robert Resch b56e22d4ee
Use homeassistant STUN server (#127922) 2024-10-08 12:25:20 +02:00
Robert Resch 04860ae1d2
Add go2rtc and extend camera integration for better WebRTC support (#124410) 2024-10-03 09:20:03 +02:00
G Johansson 711e0ee503
Change camera state to an enum (#126558)
* Change camera state to an enum

* copy/paste mistake

* Add test deprecated constants
2024-09-24 12:12:01 +02:00
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
epenet fbaba3753b
Fix root-import pylint warning in components (#119294)
* Fix root-import pylint warning in components

* Adjust

* Adjust
2024-06-10 15:14:49 +02:00
epenet 1ebc1685f7
Improve type hints in camera tests (#119264) 2024-06-10 09:30:00 +02:00
epenet 092cdcfe91
Improve type hints in tests (a-h) (#118379) 2024-05-30 08:46:18 +02:00
J. Nick Koston 0b3627b59e
Add additional cached_property to camera entities (#115075) 2024-04-13 16:50:11 -05:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
J. Nick Koston 9cc0006b92
Ensure TurboJPEG is imported in the executor (#113504)
The import was too late and it eneded up being imported
in the event loop
2024-03-15 12:23:53 +01:00
On Freund b9837a561b
Use friendly name for camera media source (#110882) 2024-03-12 21:20:14 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
On Freund e879ab0eef
Show WebRTC cameras that also support HLS in the media browser (#108796)
* Show WebRTC cameras in the media browser

* Only show webrtc cameras with source in the browser

* Address code review

* Refactor BrowseMediaSource creation

* Refactor

* Address code review
2024-02-18 10:12:08 -08:00
Marc Mueller c82933175d
Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
Erik Montnemery c805ea7b4f
Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
J. Nick Koston 6506a8d511
Camera platform back-compat for custom components without CameraEntityFeature (#106529) 2023-12-29 00:45:35 +01:00
J. Nick Koston abd3c54cbe
Add support for attribute caching to the camera platform (#106256) 2023-12-23 13:01:47 -10:00
Robert Resch 20ba764d92
Deprecate deprecated camera constants (#106095) 2023-12-23 10:46:23 +01:00
Michael 58070e14a7
Add significant Change support for camera (#105866) 2023-12-18 14:40:55 +01:00