0
Discuss

Accessing ST variable ?

Stuart Tavener 3 months ago in Things & Capabilities / CoRE and webCoRE updated by BrianP 2 months ago 3

I have a Webcore piston querying my energy providers electric tarrif price (it changes every 30mins) and Webcore sets a global variable and a tile to show me the current price (p/kw). 


I would like to get this variable/price into Actiontiles... how can i do that ?

Discuss

Stuart, there's no direct way of doing that.


However, you could possibly do that by setting value of some virtual device and then display it in ActionTiles.

ok, so i asked on the ST forum and got told.....
You’d probably get your best answer by asking over on the actiontiles forum. :sunglasses:
https://support.actiontiles.com/communities/12-actiontiles-forum 1

- so back to the Actiontiles community.... anyone else know of a suitable device type (virtual?0 where i can set a number on ST/Webcore and then read the value to display on a tile in Actiontiles ?

i tried the Virtual thermostat - but its not working and im not sure how to modify it for my use.

It would be nice to know of a device type where a string/number could be set and that displayed as an AT tile value to leverage all the complex logic in Webcore and the great visual/controls in AT.

Go to this page: Simulated Power Meter

Copy digital_janitor's code and create a new device handler using it, and then create your own device from the new device handler.  Once you have this you can update the virtual power meter using setPower(). Below is something that I created to pull the power from multiple devices into one virtual device so I only needed one tile in ActionTiles to see to total power.  With that being said, the tile delay in ActionTiles can be frustrating for Power tiles, as they only have it changed based on percentage...and even then I've seen where it doesn't always catch the percent change and it's out of sync with SmartThings.  It works for the most part though.  Good luck.