Proper way to set the value of a variable from wedCoRE endpoint?

Hopefully this will be an easy one to answer.

I would like to use the end function in webcore to change an (integer) variable.

Can someone help me with this process?

I would need to know what the URL needs to be and what the piston should look like.

Thank you very much!

What is the variable? For example, a hub variable on Hubitat?

It's a variable that let's me know what millisecond time that the credits roll in Plex

It's a webcore global URL because that's the only way this can happen without involving too many working parts.

I don't think webCoRE supports setting a global variable via an HTTP endpoint directly, but any piston can be "triggerd" via an HTTP endpoint, and you can optionally pass data to it as URL query string or body data.

To get that endpoint, look at Settings > Integrations > Executing pistons in the webCoRE dasbhoard.

An action like this in your piston could set the variable based on the data in that call:

You'd call the endpoint and pass paramName or whatever you want to call it as a URL parameter, something like this (based on your piston ID and the URL you'll find above):

https://cloud.hubitat.com/api/<hubId>/apps/<appId>/execute/:<pistonId>:?access_token=<token>&paramName=<value>

Where <value> is the actual value you want to set. This can be done over HTTP GET, as can easily be tested in a browser URL baqr, though third-party services often offer the ability to make these calls as well, which it sounds like you're doing.

You can just change that Global variable in Webcore to be a hub variable. Any hub variable you create in Hubitat becomes a Webcore global variable with @@ in front instead of just @, but they are still accessed the same as any other Webcore global variable in Webcore, but you get the advantage of having it accessible in Hubitat as well.

Make it a connector variable and then you can use MakerAPI to set it as a device variable attribute.

Thanks, I was snooping. :slight_smile:
That went straight to the WebCore keeper notes.
I've never had to do this but now I want to find something external to send me more data - that I don't need. WAF.
:rofl: