Hubaction GET and how to get a space in the query

(Martin Verbeek) #1

Using a sendhubaction that needs to have space in the arguments, normally i would expect it gets translated with a %20, but it shows up in the debug as a +. Below the part that goes into the “query :” of the hubAction. It is related to the “Set Level”…

qQueries = [type: "command", param: "switchlight", switchcmd: "Set Level", level : "${level}", idx: ${getIDXAddress()}"]

def hubActionDomoticz = new physicalgraph.device.HubAction( 
    	method: "GET", 
    	headers: [HOST: "${getHostAddress()}"], 
        path: rooPath, 
        query: qQueries)

I am just starting with this platform, so it probably will be something simple, but i cannot find a topic quickly that has a solution…