ady624 / webCoRE

webCoRE is a web version of CoRE
GNU General Public License v3.0
251 stars 984 forks source link

Added endpoint & randomUUID system #88

Open bloodtick opened 4 years ago

bloodtick commented 4 years ago

See discussion here: https://community.webcore.co/t/piston-external-url-value-available-to-self/13983

idpaterson commented 4 years ago

Thanks! I noticed that parent.state is not used elsewhere and found documentation from SmartThings suggesting that it may not always be safe to access directly. Would you please add a public method to the webCoRE smart app to return state.endpoint, similar to how isInstalled() works?

bloodtick commented 4 years ago

Will look at it. Shouldn't be a problem to do that later today.

bloodtick commented 4 years ago

All yours. State and Atomic are strange birds in ST land.

idpaterson commented 4 years ago

Is this finished? I wasn't able to trace where rtData.endpoint is meant to originate. I think you would need to provide that in getRunTimeData() for the webCoRE smart app.

bloodtick commented 4 years ago

Yes, it is complete. It is a little tricky they way it is called and took some time to figure out, but it is filled here: private Map getVariable(rtData, name) when the piston calls for endpoint.

It doesn't load on the web interface and shows "null" from the .toString() method. This is expected behavior.