How to use the amcrest.Http function in amcrest

To help you get started, we’ve selected a few amcrest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github home-assistant / home-assistant / homeassistant / components / amcrest / View on Github external
            vol.Optional(CONF_SWITCHES): vol.All(cv.ensure_list, [vol.In(SWITCHES)]),
            vol.Optional(CONF_CONTROL_LIGHT, default=True): cv.boolean,

CONFIG_SCHEMA = vol.Schema(
    {DOMAIN: vol.All(cv.ensure_list, [AMCREST_SCHEMA], _has_unique_names)},

# pylint: disable=too-many-ancestors
class AmcrestChecker(Http):
    """amcrest.Http wrapper for catching errors."""

    def __init__(self, hass, name, host, port, user, password):
        self._hass = hass
        self._wrap_name = name
        self._wrap_errors = 0
        self._wrap_lock = threading.Lock()
        self._unsub_recheck = None
            host, port, user, password, retries_connection=1, timeout_protocol=3.05

    def available(self):
        """Return if camera's API is responding."""


Python wrapper implementation for Amcrest cameras.

Latest version published 17 days ago

Package Health Score

78 / 100
Full package analysis