@geko, do you have a working example of this? I"m trying to do a GET command but get the following error in my device type.
groovy.lang.MissingMethodException: No signature of method: script1409823233728390831521.sendHubCommand() is applicable for argument types: (physicalgraph.device.HubAction) values: [GET / HTTP/1.1
Accept: */*
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 192.168.111
]
My code:
...
private getReading() {
def httpRequest = [
method: "GET",
path: "/",
headers: [HOST: "192.168.111:80",
Accept: "*/*"
]
]
def hubAction = new physicalgraph.device.HubAction(httpRequest)
sendHubCommand(hubAction)
}