Google Home Notifier

I got it to work using the internal IP by modifying this section of the CoRE code. The if (internal) part starts at line 7620. The current published CoRE code always sends variables as a query appended to the end of the URL regardless of the method, and does not send a request body, which is where the variables should be sent in a POST request. I added the line so the content type is defined in the request header, added a section for Body, and made the query dependent on the method. Most of this is just copypasta from the external request section.

if (internal) {
	try {
		debug "Sending internal web request to: $uri", null, "info"
		sendHubCommand(new physicalgraph.device.HubAction(
			method: method,
			path: (uri.indexOf("/") > 0) ? uri.substring(uri.indexOf("/")) : "",
			headers: [
				HOST: (uri.indexOf("/") > 0) ? uri.substring(0, uri.indexOf("/")) : uri,
                "Content-Type": (method != "GET") && (contentType == "JSON") ? "application/json" : "application/x-www-form-urlencoded" //added by chris
			],
			//query: data ?: null,
            query: method == "GET" ? data : null, //added by chris
			body: method != "GET" ? data : null //added by chris

		))
	} catch (all) {
		debug "Error executing internal web request: $all", null, "error"
	}
}