Commit graph

23 commits

Author SHA1 Message Date
starkillerOG
051d631504
Poll Reolink motion when ONVIF not available (#92837)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-12 18:48:32 +02:00
starkillerOG
88bde2a914
Reolink ONVIF move read to primary callback (#91478)
* Move read to primary callback

* fix styling

* Do not raise on ConnectionResetError

* Split request.text() to .read() and decode("utf-8")
2023-04-16 22:48:39 -10:00
starkillerOG
adc8a13f93
Reolink prevent ONVIF push being lost due to ConnectionResetError (#91070)
* Make "Connection lost" error less likely

* Handle connection loss during ONVIF event reading

* tweak

* fix styling

* catch asyncio.CancelledError from request.text()

* missing ()

* re-raise cancelation for proper cleanup

* Simplify

* Also set webhook_reachable if connection lost

* fix styntax

* Send HTTP_OK directly after data read done

* protect agains garbage collection

* Protect shielded task (inner) not shielded future (outer)

* fix black

* Make sure exceptions are logged

* fix spelling

* fix black

* fix spelling

* Simplify using hass.async_create_task

* clarify comment

* Eleborate comment

* Update homeassistant/components/reolink/host.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Apply suggestions from bdraco

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-14 21:05:22 -04:00
starkillerOG
b47ac524ea
Use async_timeout instead of asyncio.wait_for (#90496)
* Use async_timeout instead of asyncio.wait_for

* fix imports

* fix imports

* break out Event.wait patch

* Update tests/components/reolink/conftest.py

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

* Simplify

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-01 17:47:31 +02:00
starkillerOG
d427c35c87
Reolink improve config flow login (#90036) 2023-03-29 14:41:38 +02:00
starkillerOG
e9925f6062
Check webhook url is reachable in Reolink (#89585)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-28 22:46:59 +02:00
starkillerOG
939fce4607
Shield Reolink webhook callback from cancelation (#89798)
* shield Reolink webhook callback from cancelation

* Update homeassistant/components/reolink/host.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* fix styling

* fix black

* Revert to using asyncio.shield

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-03-19 23:35:16 -04:00
starkillerOG
4eee626770
Reolink check firmware (#88903) 2023-03-15 18:54:28 +01:00
starkillerOG
6e10cd81dd
Use repair issue when port enable fails in Reolink (#89591)
* Reolink use repair issue for disabled ports

* fix styling

* Add port repair issue tests

* Update homeassistant/components/reolink/strings.json

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-13 11:43:41 +01:00
epenet
4a3c0cd0a8
Adjust docstrings for ruff D404 (#89077) 2023-03-03 11:26:13 +01:00
starkillerOG
bcf8cf4d8b
Add reolink https webhook warning (#87332)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
fixes undefined
2023-02-09 09:24:18 +01:00
starkillerOG
17aee5e3a3
Bump reolink-aio to 0.4.0 (#87733)
bump reolink-aio to 0.4.0
2023-02-08 22:52:23 +01:00
starkillerOG
5e214f2e43
Reolink unregistered webhook on unexpected error (#87538) 2023-02-08 12:23:27 +01:00
starkillerOG
f439a94a0d
Reolink unsubscribe webhook when first refresh fails (#87147)
* catch ValueError on webhook async_register

* add ONVIF to webhook_id

* Unsubscribe webhook when ConfigEntryNotReady for async_config_entry_first_refresh

* Revert catching ValueError
2023-02-02 15:21:41 -05:00
starkillerOG
d017214d8b
Bump reolink-aio to 0.3.2 (#87121) 2023-02-02 11:24:06 +01:00
starkillerOG
7e51aeb916
Reolink add binary sensors (#85654)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-01-20 22:27:59 +01:00
starkillerOG
3c4455c696
Bump reolink-aio to 0.3.0 (#86259)
* Bump reolink-aio to 0.3.0

* fix typo

* ReolinkException
2023-01-20 08:05:43 +01:00
starkillerOG
476de319ea
Bump reolink-aio to 0.2.3 (#85871) 2023-01-15 13:07:15 +01:00
starkillerOG
5f67e79ad9
Bump reolink-aio to 0.2.2 (#85848) 2023-01-14 02:25:22 +01:00
starkillerOG
b2b6ae417d
Reolink check for admin (#85570)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
fixes undefined
2023-01-13 20:07:09 +01:00
starkillerOG
c4a5d12df4
Switch to reolink-aio (#85014)
* switch to reolink-aio

* fix imports
2023-01-02 20:49:55 -05:00
starkillerOG
c0d5ceb18c
Process late feedback for Reolink (#84884)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-01 23:32:17 +01:00
starkillerOG
a06b1eaf69
Add reolink IP NVR/Camera integration (#84081)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-12-27 10:15:53 -10:00