3

I have the following code in my SmartThings app:

def result = new physicalgraph.device.HubAction (
             method: ‘GET’,
             path: “/api/alarm/${url}”,
             headers: [
                HOST: “${settings.ip}:${settings.port}”
             ]
            )
sendHubCommand(result)

How could I pass a hostname (instead of ${settings.ip}) to HubAction? Or is there a way to resolve a hostname to an IP address and pass it (can't seem to use InetAddress)? I saw some posts about using dns.google.com but I need to resolve a hostname on my LAN.

Denis
  • 11,796
  • 16
  • 88
  • 150

0 Answers0