Device type sendhubcmd

how would i change this to sendhubcmd to send command via wifi instead of from ST cloud?

def sendCmd(apiCall)
{
httpGet(“http://${settings.host}:${settings.port}/${apiCall}”) {response ->
def content = response.data
log.debug content
}
}

@geko’s [radio thermostat][1] is a great example of calling http via LAN
[1]:https://github.com/statusbits/radiothermostat

thanks, i looked into it and it looks great, however i’m not a developer, more like a hack it together kinda person. i realize there are a million ways to do it, but i’m not the type of person who can throw it together like most on this forum.

could i simply replace sendcmd with sendhubcmd and the device will send the apicall via hex ip/port? so then i’ll need to convert the ip and port to hex or use the devicetype to do that for me also?

i’ve still had no luck converting this from ST Cloud -> LAN to ST Hub -> LAN.