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.).
Guessing there is, given the resolution of: "groovy.lang.MissingPropertyException: No such property: type for class: physicalgraph.group.cassandra.Room
Possible solutions: name"
in the IDE
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 graph.api.smartthings.com 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.
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.
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?
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: ${it.id}, name: ${it.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: https://graph.api.smartthings.com/api/groups
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
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ā¦
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?