Execute a piston with a local URL


#1

1) Give a description of the problem
I’m trying to call a piston locally, as opposed to using my pistons external URL. My primary concern is speed. I’ve done a considerable amount of digging trying to find an answer, my guess is it’s not possible. (I’m new btw to webCoRE entirely).

2) What is the expected behaviour?
I execute a piston by making a request locally, as opposed to using the external URL.


#2

Hi,

Your pistons do not run locally, they are cloud based, along with some of the device handlers you may be using. There should be no additional performance issues using the external URL.

If you really want to run locally, you could take a look at the hubitat hub, this runs everything locally and is compatible. Having said that, I’m still not sure you can trigger a piston on there with a local URL, you’d need to ask someone whos using hubitat.


#3

Hi Paul,

How is webCoRE able to make local HTTP requests but is unable to receive them. I apologize up front for my lack of understanding.


#4

Hi,

I’m not sure how all the webcore/smartthings infrastructure works. I would love to see a document explaining it all. I assume when you make a local HTTP request from webcore, it passes it to your hub to execute. I’d guess that to handle local requests, there would nee to be some code on the hub which would call out to the cloud service running the piston.

I don’t really see any advantages if you could call a local address, as the code is running in the cloud anyway. Are you seeing a specific problem, or just curious how it all works?


#5

You make a valid point that the local request wouldn’t be necessary as it’s being ran in the cloud anyway. I’ll stick to using the external piston URL.

Just curious how it all works. Thanks for your help.


#6

It recognises the local IP address and makes the request via the hub.