code: def get_motion_detection(self):
          
          url = ('%s/ISAPI/System/Video/inputs/'
                 'channels/1/motionDetection') % self.root_url
  
          try:
              response = self.hik_request.get(url, timeout=CONNECT_TIMEOUT)
          except (requests.exceptions.RequestException,
                  requests.exceptions.ConnectionError) as err:
              _LOGGING.error('Unable to fetch MotionDetection, error: %s', err)
              self.motion_detection = None
              return self.motion_detection
  
          if response.status_code == requests.codes.unauthorized:
              _LOGGING.error('Authentication failed')
              self.motion_detection = None
              return self.motion_detection
  
          if response.status_code != requests.codes.ok:
              # If we didn't receive 200, abort
              _LOGGING.debug('Unable to fetch motion detection.')
              self.motion_detection = None
              return self.motion_detection
  
          try:
              tree = ET.fromstring(response.text)
              ET.register_namespace("", self.namespace)
              enabled = tree.find(self.element_query('enabled'))
  
              if enabled is not None:
                  self._motion_detection_xml = tree
              self.motion_detection = {'true': True, 'false': False}[enabled.text]
              return self.motion_detection
  
          except AttributeError as err:
              _LOGGING.error('Entire response: %s', response.text)
              _LOGGING.error('There was a problem: %s', err)
              self.motion_detection = None
              return self.motion_detection
docs: Fetch current motion state from camera