I’m developing a RESTful service to run on my tablet pc (which is mounted on the wall) so that I can control it from SmartThings. Primarily, I want to ensure i can turn the screen on / off within the rules of SmartThings.
I have my REST service running, but was just wondering if I am actually able to speak to services inside my local network, or if calls are made externally, and so I would need to forward appropriate ports and use my public IP to speak to the API.
You can interface with it locally, but what @Greblys is referring to is that the commands have to go through the ST servers before being sent from the hub so even though it is connected to your local network, if your internet goes down, it won’t work during the outage
You’ll be using the hubAction command to pass commands to the device. Check out the Generic Camera Device type for an example of how to use this function (it’s kind of tricky):
Just as a note; Setting your Device Network ID (DNI) as the devices IP:PORT in Hex is very important. Also, you need to return the hubAction command if you are using it within another function.
Thanks, i’ve got my device up and running via local http POST / GET commands. Cuts out a massive security hole in the system! The API docs are not very clear, but I got there in the end thanks to the community!