Variables and WebCoRE

It might be at this point. The device driver was originally rounding to an integer when setting the value which I’ve corrected in the latest driver.

I’m not intimately familiar with WebCoRE, but I just tried setting up a piston and it seems to be setting my local variable as expected:

I changed the thermostat value to 20.5 in SharpTools…

image

Then over in WebCoRE, it looks like the Piston was triggered and the variable was updated as expected (as shown in the logs and in the variable section in the bottom right of the page:

1 Like

Thanks, Josh. So that proves it’s definitely something at my end. When I created the variable, I created it as an integer and then changed it. I can set it manually to x.5 in WebCoRE but maybe there’s something funny if you change the variable type. I’m going to delete the variable and add a new one with a different name.

1 Like

Well, that’s a bug!

Just added a new variable a decimal. Updated my piston and, as you can see, it’s now showing 20.5.

2 Likes

@andy, just wanted to let you know that we have released the Variables feature today, and it should support this scenario pretty well. You can define a number variable to be used in the rule for setting the temperature or as a trigger. This variable can also be added to the dashboard so its value can be adjusted by tapping the tile. See the post below fore details, and let me know if you have any questions.

bah, myjson is dead. been looking for a way to display a webcore variable, which would be awesome. But apparently not so simple. =/

I just discovered using the $.get(“https://graph-na02-useast1.api.smartthings…”) hyperlink tile to call a WebCoRE piston instead of using a momentary button. Works great, even though there’s a few-seconds popup of HTTP GET FAILED!

Which is odd since the piston ran correctly.

Don’t know why I’m only discovering this now. LOL

The “HTTP GET Failed” message is because the SmartThings / WebCoRE endpoint doesn’t properly support CORS. You can work around it by using the special proxy flag:

There’s some other neat tips in the linked thread as well:

:link: How To: Call REST API from Hyperlink Tiles (Syntax)

2 Likes

Someone else found a service called jsonbin which seems to do the same thing. You can find some notes on it in the following thread:

1 Like