Webcore and rule machine

I assume the local endpoint is a hub URL? If so, try port 8080 instead of the default (80). There could be issues with using the same port for both sides of this call, and port 8080 is an alternate on the hub for port 80, so the result should be the same if it works.

1 Like

YES! We have a winner. I added ":8080" to the GET URL and it worked perfectly. Makes sense, too, but I worry most users will not know to make such a modification.

I'd almost advise the WebCoRE dev to include a 3rd URL type -- call it "Hub URL" or something to distinguish it from calls from other network devices -- that includes the port 8080 stipulation.

THANKS for the suggestion. I honestly would never have thought to try that.

TCP/IP doesn't work that way. The outgoing port is chosen randomly and rarely matters. The incoming port matters because a listening socket must specify which port it listens on.

1 Like

It does. The Webcore UI only shows the external URL, perhaps because pistons cannot execute locally on SmartThings.

In HE under apps in the webCoRE section, click on the piston you want to run locally. Then click the "Test run this piston" button. Besides testing the piston, the resulting screen will also display the cloud and local endpoints to execute the piston.

1 Like

Can RM call my piston locally and not on the cloud?

There is a local execution point

HE console -> apps -> select your piston -> "Test run this piston"

the resulting display shows you both cloud and local endpoints for that piston

There is a groovy way also: You can also send a location event to the piston, using the portion of the above URL

after /execute

http://192.168.86.209/apps/api/XXX/execute/:82f5a05ade2e5605f968218685e41cd0:?access_token=xxxxxxx

ie the :82xxxxx:" stuff

2 Likes

Cool old thread.

BOTH webCoRE and RM run local on the Hubitat hub.

  • webCoRE is much better (and faster) on Hubitat than SmartThings
  • webCoRE UI configuration tool is more feature rich than RM
  • webCoRE source code is available for community feature additions and inspection

or

  • RM is native solution, so you will have support from Hubitat
  • RM continues to 'get better' with new features

IMHO:
If you did webCoRE on SmartThings, you probably will be happy (or more) using it on Hubitat.
If you are brand new to this subject, RM is probably your starter solution.

I have been using webcore for many years now :slight_smile:
In fact, webcore is the reason that I switched from ST to HE since webcore is going away on ST. BUT, there are so many other advantages to HE over ST that have become obvious since my switch.

I copied the local endpoint for my piston, but I cannot get the rule to run it. It works from my browser.
http://192.168.0.41/apps/api/7/execute/:cf06a61e955a30559aee08fab7fead6f:?access_token=xxxxxxxxxxxxxxxx

Try it with port 8080. i.e. http://192.168.0.41:8080/....

1 Like

That worked. Thank you sir !

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.