J. Nick Koston
5a609c34bb
Fix blocking I/O in the event loop when loading timezones ( #117721 )
2024-05-20 11:06:03 +02:00
Sid
b456d97e65
Replace pylint protected-access with Ruff SLF001 ( #115735 )
2024-05-06 20:33:26 +02:00
Sid
6587ee20db
Enable Ruff TRY300 ( #114437 )
...
* Enable Ruff TRY300
* Update validation.py
* Address review comments
2024-03-30 10:37:59 +01:00
Sid
f7b7f74d10
Enable Ruff TRY201 ( #114269 )
...
* Enable Ruff TRY201
* remove redundant rules
2024-03-28 10:18:07 +01: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
Sid
82a60fe8ad
Enable Ruff RSE ( #113695 )
2024-03-18 00:40:38 +01:00
Joost Lekkerkerker
f86119aec7
Remove entity description mixin in Onvif ( #112912 )
2024-03-11 12:03:50 +01:00
Marc Mueller
2c06d4fcb9
Add empty line after module docstring (2) [components] ( #112736 )
2024-03-08 19:15:59 +01:00
Marc Mueller
988c71ecc5
Add empty line after module docstring [n-q] ( #112702 )
2024-03-08 15:04:07 +01:00
Joost Lekkerkerker
0f71e45fe2
Add entity and icon translations to Onvif ( #111991 )
...
* Add icon translations to Onvif
* Add icon translations to Onvif
* Update homeassistant/components/onvif/strings.json
2024-03-02 10:30:48 +01:00
Erik Montnemery
e0c1feb22c
Migrate integrations n-r to generic flowhandler ( #111864 )
2024-02-29 20:09:01 +01:00
Marc Mueller
438d3b01b9
Use builtin TimeoutError [o-s] ( #109682 )
2024-02-05 12:14:37 +01:00
J. Nick Koston
9ee8832367
Use new config entry update/abort helper in onvif ( #108680 )
...
Use new config entry update/abort helper in onvif
uses the new helper from https://github.com/home-assistant/core/pull/108034
2024-01-22 23:01:08 +01:00
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions ( #105984 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
c0ffeeca7
7ae6343b25
Obihai to OpenGarage: add host field description ( #104858 )
...
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-12-04 09:13:48 +01:00
Aarni Koskela
706add4a57
Switch formatting from black to ruff-format ( #102893 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Joost Lekkerkerker
4a73ccb7db
Create function to extract onvif message ( #101036 )
...
Create extract message function
2023-09-28 10:17:07 +02:00
Joost Lekkerkerker
089f87c45b
Fix onvif creating a new entity for every new event ( #101035 )
...
Use topic value as topic
2023-09-28 09:13:33 +02:00
J. Nick Koston
9631c0ba2b
Use short hand attributes in onvif camera ( #100319 )
...
see #95315
2023-09-13 20:19:01 +02:00
Erik Montnemery
d495208995
Remove unnecessary block use of pylint disable in onvif ( #100194 )
2023-09-12 09:19:26 -05:00
uvjustin
407aa31adc
Generate Stream snapshots using next keyframe ( #96991 )
...
* Add wait_for_next_keyframe option to stream images
Add STREAM_SNAPSHOT to CameraEntityFeature
Use wait_for_next_keyframe option for snapshots using stream
* Update stream test comments
* Add generic camera snapshot test
* Get stream still images directly in camera
Remove getting stream images from generic, nest, and ONVIF
Refactor camera preferences
Add use_stream_for_stills setting to camera
Update tests
* Only attempt to get stream image if integration supports stream
* Use property instead of entity registry setting
* Split out getting stream prerequisites from stream_source in nest
* Use cached_property for rtsp live stream trait
* Make rtsp live stream trait NestCamera attribute
* Update homeassistant/components/nest/camera.py
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Change usage of async_timeout
* Change import formatting in generic/test_camera
* Simplify Nest camera property initialization
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com>
2023-08-26 10:39:40 -07:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry ( #98149 )
...
* Move DeviceInfo from entity to device registry
* Update integrations
2023-08-10 22:04:26 -04:00
J. Nick Koston
d4cdb0453f
Guard expensive debug formatting with calls with isEnabledFor ( #97073 )
2023-07-23 10:54:25 +02:00
J. Nick Koston
38630f7898
Always try PullPoint with ONVIF ( #96377 )
2023-07-14 15:23:00 -10:00
J. Nick Koston
7da8e0295e
Bump onvif-zeep-async to 3.1.12 ( #96560 )
2023-07-14 14:49:20 -10:00
Erik Montnemery
7539cf25be
Don't require passing identifiers to DeviceRegistry.async_get_device ( #96479 )
...
* Require keyword arguments to DeviceRegistry.async_get_device
* Update tests
* Update tests
* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Franck Nijhof
90d839724c
Migrate integration services (N-P) to support translations ( #96376 )
2023-07-12 00:33:37 +02:00
J. Nick Koston
0ca53eccb8
Bump python-onvif-zeep to 3.1.9 ( #93930 )
2023-06-01 19:15:16 +02:00
J. Nick Koston
240372b45d
Fix onvif cameras that use basic auth with no password ( #93928 )
2023-06-01 19:14:03 +02:00
J. Nick Koston
6cc5bee960
Fix onvif setup failing when unable to parse camera time ( #93677 )
2023-05-29 20:53:52 +02:00
J. Nick Koston
db931132a8
Fix thread leak in onvif discovery ( #93742 )
2023-05-29 17:06:13 +02:00
J. Nick Koston
5f5951e71c
Add hardware model to onvif config flow discovery ( #93676 )
2023-05-27 19:47:13 -05:00
J. Nick Koston
45b1ad36b1
Bump onvif-zeep-async to 3.1.8 ( #93464 )
2023-05-24 15:38:54 -05:00
J. Nick Koston
2eef2ed911
Add option to disable webhooks in ONVIF ( #93186 )
2023-05-18 10:34:09 -05:00
J. Nick Koston
00b600bfa8
Fix ONVIF cameras that change the xaddr for the pull point service ( #93104 )
2023-05-17 13:14:31 +02:00
J. Nick Koston
ef887e529f
Fix onvif cameras that cannot parse relative time ( #92711 )
...
* Fix onvif cameras that cannot parse relative time
The spec requires that the camera can parse relative or absolute timestamps
However there are many cameras that cannot parse time correctly.
Much of the event code has been offloaded to the library and
support to determine if the camera has broken time and switch
to absolute timestamps is now built into the library
* adjust verison
* fixes
* bump
* bump
* bump
* more fixes
* preen
* fix resume
* one more fix
* fix race in webhook setup
* bump to 3.1.3 which has more fixes for broken camera firmwares
* bump 3.1.4 for more fixes
* fix
* fix comment
* bump
* fix url limit
* bump
* more fixes
* old hik uses -s
2023-05-14 16:08:39 -04:00
J. Nick Koston
8b57d31eba
Add ONVIF services to diagnostics ( #92878 )
2023-05-11 17:03:31 +09:00
J. Nick Koston
c624e50b60
Update onvif error checking to use explict None check ( #92642 )
2023-05-07 00:47:15 +02:00
J. Nick Koston
d05724a42a
Fix onvif reauth when device returns a http 401/403 error ( #92690 )
2023-05-07 00:12:24 +02:00
J. Nick Koston
bcbc8539a6
Fix missing ONVIF events when switching from PullPoint to webhooks ( #92627 )
...
We now let the PullPoint subscription expire instead of explicitly
unsubscribing when pausing the subscription. We will still unsubscribe
it if Home Assistant is shutdown or the integration is reloaded
Some cameras will cancel ALL subscriptions when we do an unsubscribe
so we want to let the PullPoint subscription expire instead
of explicitly cancelling it.
2023-05-05 14:38:36 -04:00
J. Nick Koston
c8c1466c06
Fix duplicate ONVIF sensors ( #92629 )
...
Some cameras do not configure the video source correctly
when using webhooks but work fine with PullPoint which
results in duplicate sensors
2023-05-05 14:32:55 -04:00
J. Nick Koston
9a589a3a54
Improve reliability of ONVIF subscription renewals ( #92551 )
...
* Improve reliablity of onvif subscription renewals
upstream changelog: https://github.com/hunterjm/python-onvif-zeep-async/compare/v2.0.0...v2.1.0
* ```
Traceback (most recent call last):
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/onvif/client.py", line 75, in _async_wrap_connection_error_retry
return await func(*args, **kwargs)
File "/Users/bdraco/home-assistant/homeassistant/components/onvif/event.py", line 441, in _async_call_pullpoint_subscription_renew
await self._pullpoint_subscription.Renew(SUBSCRIPTION_RELATIVE_TIME)
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
return await self._proxy._binding.send_async(
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
response = await client.transport.post_xml(
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/transports.py", line 235, in post_xml
response = await self.post(address, message, headers)
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/zeep/transports.py", line 220, in post
response = await self.client.post(
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1845, in post
return await self.request(
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1530, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1617, in send
response = await self._send_handling_auth(
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ReadTimeout
```
* adjust timeouts for slower tplink cameras
* tweak
* more debug
* tweak
* adjust message
* tweak
* Revert "tweak"
This reverts commit 10ee2a8de7
.
* give time in seconds
* revert
* revert
* Update homeassistant/components/onvif/event.py
* Update homeassistant/components/onvif/event.py
2023-05-05 14:26:58 -04:00
J. Nick Koston
7987b00d89
Fix blocking I/O in the event loop when starting ONVIF ( #92518 )
2023-05-04 12:05:29 -05:00
J. Nick Koston
41515249a0
Fix onvif cameras with invalid encodings in device info ( #92450 )
...
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-04 06:48:13 -05:00
J. Nick Koston
322c5152be
Fix onvif setup when time set service is not functional ( #92447 )
2023-05-04 11:50:12 +02:00
J. Nick Koston
20942ab26f
Handle webhook URL rejection in onvif ( #92405 )
2023-05-03 15:46:53 +02:00
J. Nick Koston
a9d992c2de
Add support for visitor detections to onvif ( #92350 )
2023-05-02 12:19:27 +02:00
J. Nick Koston
c0fa078b0b
Start onvif events later ( #92354 )
2023-05-02 12:17:01 +02:00
J. Nick Koston
324df197d1
Avoid starting ONVIF PullPoint if the camera reports its unsupported ( #92333 )
2023-05-01 18:33:52 +02:00
J. Nick Koston
30dd8b9f3a
Retry onvif setup when it is unexpectedly cancelled ( #92313 )
...
* Retry onvif setup when it is unexpectedly cancelled
fixes #92308
* Retry onvif setup when it is unexpectedly cancelled
fixes #92308
2023-04-30 23:12:01 -04:00