Accessing State Variable from Another SmartApp, Possible?

Yeah, maybe a set “bucket” of variables tied to location might do it, but realistically, need a way to update these.

The security across smartapps doesn’t float with me, they are all behind my username, why can’t they talk to each other? What is the risk?

Also, all of this extra work just to share data across smartApps seems to put increased load on the servers, when they are already unstable to begin with.

It’s been on the “wish list” for ages… The ability for one SmartApp to call another. The closest we got is Hello Home phrases.

The “scope” of a SmartThings environment should be at the Account level at least, but currently the most global directly accessible object is Location (e.g. location.mode). Hub is the next level down (a Location can have many Hubs).

Regardless, the “sandboxed” Groovy environment doesn’t allow any custom Object creation, even at the individual SmartApp or Smart Device Type level, right? We can create methods, but not Objects, and thus rely on “state.*”.

It seems feasible to give us some Account, Location, and Hub level namesspaces (ie “near globals”), ideally with the ability to create first class objects; but at least Maps and Methods…

More internal architecture info would help, though, in understanding what is possible and why / why not implemented.

On the Roadmap?

1 Like

I’d sure prefer it to come from an app, rather than be global to the location.

Ummm… It’s hard to have our cake and eat it, no?

Either we get global namespaces (of various scopes…), or some sort of nesting of SmartApps is required (a Super SmartApp scope?)…

Either way, I doubt this is very high priority for ST, unless a particular paradigm fits the architecture easily, or if a major platform overhaul puts consideration of this on the table. The seamless integration of Hub V2 to form a cloud + local hybrid is quite consuming, I assume.

Yes, and considering how much can be done without it, hard to see it happening…

There exists child smartApps, though the implementation details haven’t been released to the peanut gallery as of yet…

2 Likes