I’m trying to create a SmartApp that displays text on my Amcrest ProHD 1080P (1920TVL) video feed. To do this, I need to send a HTTP GET to the camera that’s on the same local network as my Smartthings hub. I’ve tested in the browser by setting the address and it works, though from ST it’s not returning anything.
Can someone point out what I’m missing with the following?
As you can see, the sendHubCommand actually causes the data to be sent. The callback is the function that will receive and parse the return. In basic form, the callback is also called the hubActionResponse. Since I do not know the format of the return data, a good example of what you are trying to do is not easy. see this example:
Above, i extract the cmdResponse from the ‘response’ received - particularly the header field “cmdResponse”. data could also be in response.body or other fields.