I'm using app settings to store API URL etc against each of our hubitat apps. I'd like to store this once in a hub variable and then access the hub variable from each of my groovy apps.
Can someone share a bit of code on how to read a hub variable from app code.
I've asked, and there is currently no API that makes hub variables accessible to apps. I hope this changes some day, though I understand that they do not, at least in their current implementation (and perhaps never) generate events, so they are not useful for "waking" apps or using their values in every context--but it could certainly have its use (something that just needs to be read at the time of execution, for example--a color temperature or level to set a light to, a number of minutes to wait, a volume level, or whatnot).
So, the connector workaround above is what we'll have to use for now. Note that the specific attribute you're looking for will depend on the type of connector you (or the user) actually created.