I have a SmartApp which has to do a HTTP GET, using sendHubCommand, to get the temperature of a sensor. The REST servers returns the temperature, and only the temperature… Nothing about which device it is for.
So my issue is identifying which sensor that value is for. Is there anyway I can access the HTTP request headers from the response?
If you’re building this in a device type, isn’t the response relatively 1:1? Meaning that all the requests for that SmartThings device will be going to the same sensor device? Or does the temperature sensor endpoint have multiple device/sensor values available?
Can you provide more information on the device you are making the call to? Maybe it’s possible to load up the request in a way that the response body or response headers include some identifying information?
I am calling an API which returns temperature values for multiple thermostats. Each temp has it’s own endpoint call (GET path), and each api call returns only a temperature value. So the only way I can know which temp I’ve received data for is by being able to access the GET path in parse()