Interacting with Rooms

Is there any interface available (or planned) to allow a SmartApp to interact with the rooms? For example, can I get a list of rooms, or limit my device selection to things in a specific room.


And/Or even a SmartApp method to find out what Room a Device is in?

(Funny… I was just talking about this with @625alex last night.).

1 Like

Guessing there is, given the resolution of: "groovy.lang.MissingPropertyException: No such property: type for class:
Possible solutions: name"
in the IDE

1 Like

Nice, how did you get that? I tried .Room on a device, but that gives me

java.lang.IllegalArgumentException: Property 'Room' is not supported for devices

It would probably still be called “.group”, but Groups/Rooms are actually an associative Object, I think, and we haven’t been given the API… At least, not documented.

Ha, didn’t say I knew hot to access it!
Clearly it exists since it’s being used in the new app. As @tgauchat mentioned, we don’t know the calls for it yet.

There are a lot of client API calls available to the mobile App and web pages that are not available or not published for use in SmartApps or Device Handlers… And may never be.

But I do speculate that “Room” is not a new Object… It is really just “Group”, though it may have been extended for the new App. Doesn’t help us, though, because we never had access to the Group ID.

1 Like

We need this.

With people grouping devices into rooms, they are using names that are relative to that room instead of relative to the whole house. ‘Bedroom floor lamp’ becomes ‘floor lamp’ in the bedroom room.

We need this for organization and identification in the rule builder apps, but also for things like the Amazon Echo. Now that I have 3 devices named ‘floor lamp’, Alexa can’t figure it out.

1 Like

Looked through a bunch of threads discussing this, how is such a basic feature missing from the API? I’d expect, at the very least, a way to query for the label of a room/group by it’s id, instead I have to set this up as a hardcoded map or some convoluted preference?

I mean really, I have 50+ devices, how is that manageable without some grouping/room support. It would be really nice to have a way to query for app allowed devices by room instead of capability. Who actually wants to see a list of 30 lights, instead show me a list of 6 rooms with the lights in each room? ( Just an example ).

The samsung official app can do this, why not surface functionality to the developers?

1 Like

this will get groupId and assumes a device is only in one group::

def logDeviceInfo() {
    settings.each { k, v ->
        settings.get(k).each {
            log.debug "id: ${}, name: ${}, groupId: ${it.device.groupId}"


group name is not available via smartapp. there’s this page which has a user’s groups, but it only works when the user is logged in:

this thread has more info: Accessing group within a SmartApp

Thanks @djkrite I’m using something like this ( what I meant by hard coded mapping, groupId to human readable label. ) This works fine for me but not really for a platform that should be getting way more serious by now about supporting their developer ecosystem to foster integrations. Anyways, I do appreciate the reply :slight_smile:

i agree. group name should be available. i figure this is more of a business decision than a technology decision. i ended up writing a method to find the highest occurring word in the devices assigned to a group and then use that word as the group name. the method excludes words like: room, light, switch, etc…

1 Like

I’m going to resurrect this old topic to check whether the rooms ever got exposed via the API. Anyone have any updates on this?


I’d like to bump this again. Can anyone with knowledge of future plans for the API share anything?