def _do_call(self, method_name_int, **kwargs):
        method = self._get_method(method_name_int)
        args   = self._get_arguments(method, kwargs)

        self.logger.debug("CALL: %s ARGS: %r", method["NAME"], args)
        #import traceback
        #stack = "" #("".join(traceback.format_stack()[:-1])).encode("utf-8")
        #print(b"".join(traceback.format_stack()[:-1]))
        #self.logger.debug("  Callstack: %s\n" % stack)

        json_data = json.dumps({
            "method": method["NAME"],
            "params": args,
        })
        url = "%s/api/homematic.cgi" % self._address

        try:
            self.logger.debug("  URL: %s DATA: %s", url, json_data)
            request = Request(url, data=json_data.encode("utf-8"))

            if self._http_auth:
                base64string = base64.encodestring('%s:%s' % self._http_auth).replace('\n', '')
                request.add_header("Authorization", "Basic %s" % base64string)

            handle = urlopen(request, timeout=self._connect_timeout)
        except Exception as e:
            if isinstance(e, URLError):
                msg = e.reason
            elif isinstance(e, BadStatusLine):
                msg = "Request terminated. Is the device rebooting?"
            else:
                msg = e
            raise PMConnectionError("Unable to open \"%s\" [%s]: %s" % (url, type(e).__name__, msg))

        response_txt = ""
        for line in handle.readlines():
            response_txt += line.decode("utf-8")

        http_status = handle.getcode()

        self.logger.debug("  HTTP-STATUS: %d", http_status)
        if http_status != 200:
            raise PMException("Error %d opening \"%s\" occured: %s" %
                                    (http_status, url, response_txt))

        self.logger.debug("  RESPONSE: %s", response_txt)
        return self._parse_api_response(method_name_int, kwargs, response_txt)