How to use the pyhik.constants.DEFAULT_PORT function in pyHik

To help you get started, we’ve selected a few pyHik 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 mezz64 / pyHik / pyhik / hikvision.py View on Github external
    def __init__(self, host=None, port=DEFAULT_PORT,
                 usr=None, pwd=None):
        """Initialize device."""

        _LOGGING.debug("pyHik %s initializing new hikvision device at: %s",
                       __version__, host)

        self.event_states = {}

        self.watchdog = Watchdog(300.0, self.watchdog_handler)

        self.namespace = XML_NAMESPACE
        self.temp_namespace = None

        if not host:
            _LOGGING.error('Host not specified! Cannot continue.')
            return