Hi, hope I’m posting this properly. I’m trying to write a device driver. The device is local, with a static IP address. I set the IP in the settings for the device.
I am able to successfully send a get to the device. The device responds, but I don’t seem to get a response.
I send a hubaction with this code
def headers = [:]
headers.put("HOST", destIp+":"+destPort)
headers.put("Content-Type", "application/atom+xml")
def rsult = sendHubCommand (new physicalgraph.device.HubAction(
path: "/index.xml",
method:"GET",
headers: headers ))
log.debug "rsult = "+rsult
rsult
}
where destIp = “192.168.0.5” & destPort = “8080”
The message is sent, my device acts, and returns an xml page:
This is pasted from my browser.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
1
1
Controller
The message logged in my parse routing is this:
def parse(String description) {
def msg = parseLanMessage(description, false)
log.debug "msg = "+msg
msg = [index:01, mac:5CCF7F058CDC, ip:C0A80005, port:1F90, requestId:c00b59ba-f4d8-42a5-bc3a-02a64dcd4371]
No xml, no hex coded xml, no body at all. Anyone have a suggestion?