httpGet timeout in device

Something funny is popping up, when I try to use httpGet in a smart device I get a timeout.

a simple httpGet with a URI gives me:

org.apache.http.conn.ConnectTimeoutException: Connect to timed out @ line 390

but the same URI through a hubAction works just fine and the parse is called. Just that I want to use httpGet to get an immediate response instead of a hubAction delayed response.

@tgauchat @garyd9 tagging you guys incase you’ve seen something similar with devices?

WOW! I just figured out that if I use httpGet on a LAN ip address I get a timeout exception! however the EXACT same command but now with my public IP address it works!

I guess httpGet is executed on the CLOUD and not through the hub hence the timeout if executed with a LAN ipaddress vs a public ip address.

@Jim can you please confirm the expected behaviour of httpGet?

@RBoy, all user device types and smartapps are being executed in the cloud. There’s only a small selection of ST provided types/apps that are being allowed to run locally on the hub at this time.

If YOU (or I) wrote it, it’s running in the cloud. < sarcasm>Apparently, they’d rather have our rogue code take out the entire cloud instead of only our own hubs.< /sarcasm>


@Jim you may want to update the documentation to reflect the above. Looks like hubAction is the only command that runs on the hub for now. That one line would have saved us hours (me and a few other devs) of debugging effort.