Commit graph

57 commits

Author SHA1 Message Date
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
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
Marc Mueller
988c71ecc5
Add empty line after module docstring [n-q] (#112702) 2024-03-08 15:04:07 +01:00
J. Nick Koston
38630f7898
Always try PullPoint with ONVIF (#96377) 2023-07-14 15:23:00 -10: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
2eef2ed911
Add option to disable webhooks in ONVIF (#93186) 2023-05-18 10:34:09 -05: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
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
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
e25885b943
Improve error reporting in onvif in config flow (#91876) 2023-04-24 15:20:37 +02:00
J. Nick Koston
392a9f32c9
Add fallback to device zone time or no timezone to onvif when setting time fails (#91882) 2023-04-24 14:37:56 +02:00
J. Nick Koston
942a955a77
Handle 404 for media/ptz/image onvif services to allow setup to proceed (#91875) 2023-04-23 01:16:37 +02:00
J. Nick Koston
3beb6e9718
Add webhook support to onvif (#91485) 2023-04-22 17:49:41 +02:00
J. Nick Koston
cb6ffa5b03
Handle a few more transient onvif errors (#91473) 2023-04-16 14:06:30 +02:00
J. Nick Koston
e7373d979b
Fix onvif failing to reload (#91482) 2023-04-16 14:05:10 +02:00
epenet
9327947332
Improve type hints in onvif (#87184) 2023-02-02 16:25:43 -05:00
Nick Touran
d2e75e4f7a
Add Autofocus, IR lamp, and Wiper switches in ONVIF (#84317)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-30 12:08:07 +01:00
Franck Nijhof
baef267f33
String formatting and max line length - Part 3 (#84394) 2022-12-22 13:35:47 +01:00
J. Nick Koston
4239923ea2
Fix memory leak in onvif (#83006)
fixes https://github.com/home-assistant/core/issues/82504
2022-11-30 21:40:59 +01:00
epenet
36f3028ec3
Improve type hint in onvif (#77833) 2022-09-06 10:12:16 +02:00
epenet
debd475a6d
Remove onvif from mypy ignore list (#75162) 2022-07-14 11:55:43 +02:00
Diogo Gomes
4e2de2479a
Add SetSystemDateandTime Button (#66419)
* add SetSystemDateandTime

* fix

* address review

* follow recommendation to set date and time on start

* add set date and time button test
2022-07-07 16:25:44 +02:00
Marvin ROGER
1cb00cbb79
Fix timezone issue on onvif integration (#70473) 2022-05-12 07:23:18 -07:00
Jason Hunter
62b6d03321
Log which device has the time discrepancy (#69595) 2022-04-07 18:04:09 +02:00
Tim Niemueller
0c1c1f7845
Fix Onvif PTZ for Imou cameras (#56592) 2021-09-30 11:36:49 +02:00
Jason Hunter
61a7ce173c
close connection on connection retry, bump onvif lib (#55363) 2021-08-27 17:34:32 -07:00
Pawel
abbd4d1d16
Fix Onvif get_time_zone from device (#51620)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-08 20:01:36 +02:00
Xuefer
a7eedeeaba
onvif: more debug info (#49658)
Signed-off-by: Xuefer <xuefer@gmail.com>
2021-05-24 15:24:56 -04:00
Maciej Bieniek
f212049fc2
Add constructor return type in integrations O-S (#50896) 2021-05-20 15:58:17 +02:00
Franck Nijhof
6932cf9534
Use contextlib.suppress where possible (#48189) 2021-03-23 14:36:43 +01:00
J. Nick Koston
c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
Marc Mueller
3d2b81a401
Update typing 11 (#48072) 2021-03-18 13:21:46 +01:00
olijouve
8256acb8ef
Fix onvif ConnectionResetError (#45899)
Fix "ConnectionResetError: Cannot write to closing transport" error we can have on lots of chinese cams(like Goke GK7102 based IP cameras)
Those non full onvif compliant cams can "crash" when calling non implemented functions like events or ptz and they are likely react by closing transport, leaving the request in a uncatched error state.

My camera used to fail on setup, and now it run nicely with that simple fix.
2021-02-04 09:25:35 +01:00
Ville Skyttä
cab186d28f
Add ONVIF PTZ Stop support (#39734) 2020-11-20 22:59:11 +01:00
Brett T. Warden
ab5e34a49f
Fix error strings for PTZ operations (#42231)
PTZ error strings for unsupported move operations were copied/pasted
from ContinuousMove. Fix the strings for AbsoluteMove and RelativeMove.
2020-10-25 14:52:32 +01:00
Rihan9
d01a96d1ce
Fix onvif sensor detection and onvif stop service call (#41949)
* Fix stop service call after movement, add new parser for topic: tns1:RuleEngine/MotionRegionDetector/Motion

* Fix PullMessages call and formatting Stop call

* Fix timeout on pullmessages call

* Fix black and flake8 detected issues

* add SetSynchronizationPoint with try/except block
2020-10-19 13:01:34 -04:00
Jason Hunter
5a397312e7
Update ONVIF to Zeep 4.0/httpx (#42020)
* convert to httpx and zeep 4.0

* fix tests

* add onvif-zeep-async to manifest

* pin zeep to fool CI cache

* address review comments
2020-10-18 23:29:53 -04:00
Ville Skyttä
f828cdcaef
Fix setup of ONVIF devices without snapshot capability (#39723)
* Fix setup of ONVIF devices without snapshot capability

* Unrelated debug message typo fix
2020-09-06 16:52:06 -04:00
Diefferson Koderer Môro
804cae02ee
Fix get profiles checking if has ptz capabilities (#37176) 2020-07-10 10:13:16 -04:00
Jason Hunter
eb95c5cd2e
update renew logic to work better with cameras responding with invalid termination times by extending the duration (#36393) 2020-06-03 09:51:57 -06:00
Diefferson Koderer Môro
0e2e39a5f2
Fix Method GetNetworkInterfaces not implemented (#36243) 2020-06-02 19:45:20 -07:00
Jason Hunter
cb2821b512
Fix empty preset element in ONVIF response (#36182) 2020-05-26 21:16:15 -07:00
Minims
2375e00029
Fix onvif snapshot for Sricam SP009 (#36095) 2020-05-25 14:02:21 +02:00
Jason Hunter
5dfae0eb7c
fix preset warning (#36110) 2020-05-25 13:38:57 +02:00
Jason Hunter
bd8848e57a
Fix ONVIF config entry unique ID (#36008)
* fallback to device serial number if no mac available

* make password optional to fix #35904

* update tests to reflect new flow

* fix snake case and AsyncMock

* add comments around why weird things are being done
2020-05-24 21:50:50 +02:00
Jason Hunter
0514960bda
Fix ONVIF PTZ and profile encoding issues (#36006)
* allow lib to create AsyncTransport

* fix transport close issue

* fix zoom only cameras without PTZ presets

* catch profiles without encoding configuration

* also catch ServerDisconnectedError for ptz
2020-05-22 21:11:30 -04:00