コード例 #1
0
    def __init__(self, url, port, user, passw):
        self.cam = hikvision.HikCamera(url, port, user, passw)

        self._name = self.cam.get_name
        self.motion = self.cam.current_motion_detection_state

        self.cam.start_stream()

        self._event_states = self.cam.current_event_states
        self._id = self.cam.get_id

        logger = logging.getLogger(__name__)
        logger.info('NAME: {}'.format(self._name))
        logger.info('ID: {}'.format(self._id))
        logger.info('{}'.format(self._event_states))
        logger.info('Motion Dectect State: {}'.format(self.motion))
コード例 #2
0
ファイル: basic_usage.py プロジェクト: yangbo1979/pyHik
    def __init__(self, url, port, user, passw):
        """initalize camera"""

        # Establish camera
        self.cam = hikvision.HikCamera(url, port, user, passw)

        self._name = self.cam.get_name
        self.motion = self.cam.current_motion_detection_state

        # Start event stream
        self.cam.start_stream()

        self._event_states = self.cam.current_event_states
        self._id = self.cam.get_id

        print('NAME: {}'.format(self._name))
        print('ID: {}'.format(self._id))
        print('{}'.format(self._event_states))
        print('Motion Dectect State: {}'.format(self.motion))