|
| None | __init__ (self, HomeAssistant hass, str name, str host, int port, str user, str password) |
| |
| asyncio.Event | async_available_flag (self) |
| |
| httpx.Response | async_command (self, *Any args, **Any kwargs) |
| |
| AsyncIterator[httpx.Response] | async_stream_command (self, *Any args, **Any kwargs) |
| |
| bool | available (self) |
| |
| threading.Event | available_flag (self) |
| |
| Any | command (self, *Any args, **Any kwargs) |
| |
amcrest.ApiWrapper wrapper for catching errors.
Definition at line 132 of file __init__.py.
◆ __init__()
| None homeassistant.components.amcrest.AmcrestChecker.__init__ |
( |
|
self, |
|
|
HomeAssistant |
hass, |
|
|
str |
name, |
|
|
str |
host, |
|
|
int |
port, |
|
|
str |
user, |
|
|
str |
password |
|
) |
| |
◆ _async_command_wrapper()
| AsyncIterator[None] homeassistant.components.amcrest.AmcrestChecker._async_command_wrapper |
( |
|
self | ) |
|
|
private |
◆ _async_handle_error()
| None homeassistant.components.amcrest.AmcrestChecker._async_handle_error |
( |
|
self | ) |
|
|
private |
Handle camera error status from the event loop.
Definition at line 278 of file __init__.py.
◆ _async_handle_offline()
| None homeassistant.components.amcrest.AmcrestChecker._async_handle_offline |
( |
|
self, |
|
|
Exception |
ex |
|
) |
| |
|
private |
◆ _async_set_online()
| None homeassistant.components.amcrest.AmcrestChecker._async_set_online |
( |
|
self | ) |
|
|
private |
Set camera online status from the event loop.
Definition at line 301 of file __init__.py.
◆ _async_signal_online()
| None homeassistant.components.amcrest.AmcrestChecker._async_signal_online |
( |
|
self | ) |
|
|
private |
Signal that camera is back online.
Definition at line 307 of file __init__.py.
◆ _async_start_recovery()
| None homeassistant.components.amcrest.AmcrestChecker._async_start_recovery |
( |
|
self | ) |
|
|
private |
◆ _handle_error()
| None homeassistant.components.amcrest.AmcrestChecker._handle_error |
( |
|
self | ) |
|
|
private |
Handle camera error status from a thread.
Definition at line 271 of file __init__.py.
◆ _handle_error_thread_safe()
| bool homeassistant.components.amcrest.AmcrestChecker._handle_error_thread_safe |
( |
|
self | ) |
|
|
private |
Handle camera error status shared between threads and event loop.
Returns if the camera was online and is now offline as
a bool.
Definition at line 258 of file __init__.py.
◆ _handle_offline()
| None homeassistant.components.amcrest.AmcrestChecker._handle_offline |
( |
|
self, |
|
|
Exception |
ex |
|
) |
| |
|
private |
Handle camera offline status from a thread.
Definition at line 248 of file __init__.py.
◆ _handle_offline_thread_safe()
| bool homeassistant.components.amcrest.AmcrestChecker._handle_offline_thread_safe |
( |
|
self, |
|
|
Exception |
ex |
|
) |
| |
|
private |
Handle camera offline status shared between threads and event loop.
Returns if the camera was online as a bool.
Definition at line 235 of file __init__.py.
◆ _set_online()
| None homeassistant.components.amcrest.AmcrestChecker._set_online |
( |
|
self | ) |
|
|
private |
Set camera online status from a thread.
Definition at line 295 of file __init__.py.
◆ _set_online_thread_safe()
| bool homeassistant.components.amcrest.AmcrestChecker._set_online_thread_safe |
( |
|
self | ) |
|
|
private |
Set camera online status shared between threads and event loop.
Returns if the camera was offline as a bool.
Definition at line 284 of file __init__.py.
◆ _wrap_test_online()
| None homeassistant.components.amcrest.AmcrestChecker._wrap_test_online |
( |
|
self, |
|
|
datetime |
now |
|
) |
| |
|
private |
Test if camera is back online.
Definition at line 319 of file __init__.py.
◆ async_available_flag()
| asyncio.Event homeassistant.components.amcrest.AmcrestChecker.async_available_flag |
( |
|
self | ) |
|
Return event flag that indicates if camera's API is responding.
Definition at line 176 of file __init__.py.
◆ async_command()
| httpx.Response homeassistant.components.amcrest.AmcrestChecker.async_command |
( |
|
self, |
|
|
*Any |
args, |
|
|
**Any |
kwargs |
|
) |
| |
amcrest.ApiWrapper.command wrapper to catch errors.
Definition at line 204 of file __init__.py.
◆ async_stream_command()
| AsyncIterator[httpx.Response] homeassistant.components.amcrest.AmcrestChecker.async_stream_command |
( |
|
self, |
|
|
*Any |
args, |
|
|
**Any
|
kwargs |
|
) |
| |
amcrest.ApiWrapper.command wrapper to catch errors.
Definition at line 210 of file __init__.py.
◆ available()
| bool homeassistant.components.amcrest.AmcrestChecker.available |
( |
|
self | ) |
|
Return if camera's API is responding.
Definition at line 166 of file __init__.py.
◆ available_flag()
| threading.Event homeassistant.components.amcrest.AmcrestChecker.available_flag |
( |
|
self | ) |
|
Return event flag that indicates if camera's API is responding.
Definition at line 171 of file __init__.py.
◆ command()
| Any homeassistant.components.amcrest.AmcrestChecker.command |
( |
|
self, |
|
|
*Any |
args, |
|
|
**Any |
kwargs |
|
) |
| |
amcrest.ApiWrapper.command wrapper to catch errors.
Definition at line 191 of file __init__.py.
◆ _async_wrap_event_flag
| homeassistant.components.amcrest.AmcrestChecker._async_wrap_event_flag |
|
private |
◆ _async_wrap_lock
| homeassistant.components.amcrest.AmcrestChecker._async_wrap_lock |
|
private |
◆ _hass
| homeassistant.components.amcrest.AmcrestChecker._hass |
|
private |
◆ _unsub_recheck
| homeassistant.components.amcrest.AmcrestChecker._unsub_recheck |
|
private |
◆ _wrap_errors
| homeassistant.components.amcrest.AmcrestChecker._wrap_errors |
|
private |
◆ _wrap_event_flag
| homeassistant.components.amcrest.AmcrestChecker._wrap_event_flag |
|
private |
◆ _wrap_lock
| homeassistant.components.amcrest.AmcrestChecker._wrap_lock |
|
private |
◆ _wrap_login_err
| homeassistant.components.amcrest.AmcrestChecker._wrap_login_err |
|
private |
◆ _wrap_name
| homeassistant.components.amcrest.AmcrestChecker._wrap_name |
|
private |
The documentation for this class was generated from the following file: