Echo and Multiple SmartThings Locations (Hubs)

amazon'alexa'echo

(Scott Alexander) #1

I’ve logged a request with support, but curious if anyone else has multiple locations where they’d like to use the echo. I have two properties that each have echos and a v1 hub. Both echos are on the same amazon account and both v1 hubs are on the same SmartThings account. The issue appears to be that when linking my SmartThings account with echo in the amazon app, I can only select 1 SmartThings location and then authorize its devices for echo control. Ideally I’d like to be able to authorize devices at both of my SmartThings locations for echo control.

I could see this becoming more of a problem for users as the v2 hubs ship and people start migrating devices off of v1 and onto v2. Presumably, users in the middle of that migration would be in a similar scenario. Anyways I was just curious if anyone else has hit this and logged the issue to support or if they have alternative workarounds.


Status of Echo/Alexa fix for multiple Smartthings locations?
Migration to V2 - Hurdles and Best Practices
PSA: If two locations/hubs both have Alexa + Smartthings integration - Alexa will only be able to control devices from one of them
Smartthings/Arlo Can't integrate 2 accounts
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

Following this, because I’d like to learn more, in general, about how SmartThings handles multiple Locations and/or Hubs under one Account.

A single Location can have multiple Hubs – yes? no?


(Scott Alexander) #3

Its my understanding that a single SmartThings Location has one and only one hub. However, I want to say I’ve seen some threads where @pstuart has mentioned being able to manually connect an additional hub to a SmartThings location. I’m not finding that thread now that I look for it though, so maybe I’m wrong…


#4

Officially only one hub per ST “location.”

https://support.smartthings.com/hc/en-us/articles/203064530-Can-I-use-two-hubs-in-one-location-

You can have two hubs on the same Ethernet network if they’re assigned to different locations in your account.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #5

Thanks!

Well… pretty much every object in your Account then, belongs (relates) to a specific Location.
i.e., at the moment, a SmartApp cannot refer to multiple Locations in its preferences. A SmartApp must be installed to each Location to be used.

That makes external access to multiple Locations difficult, as consolidating attributes (such as Devices) across Locations is then fully the responsibility of the external application.

i.e., the JSON object for a SmartApp contains a single “location_id” attribute, even though the JSON record for a Device contains both a “location_id” and a “hub_id”, because, someday, a Location could have multiple Hubs and the Device has to belong to a specific Hub.

Of course, the object for SmartApp could / should also have a “hub_id”, as then it could run on a specific Hub. The system wasn’t designed for this originally because SmartApps actually don’t didn’t run on Hubs (until Hub V2).


(Scott Alexander) #6

So what is the echo corollary to installing multiple copies of a SmartApp in both of my locations? I do that today with various SmartApps and it works fine, but not seeing a comparable option with the echo integration.

If the device object contains a location_id shouldn’t the echo be able to link to my account, see that I have x number of devices across all my locations and that the combination of location_id, device_id presents a unique identifier with which to authorize and then control that device in SmartThings? It seems like the process would simply be that echo tells the cloud to turn on the device with device_id=x and location_id=y and then the cloud sends the appropriate command to the hub residing within location_id=y.

I’m pretty sure if I go back to the hue emulator hack I can control both locations’ devices as my single emulator hub will simply call the appropriate location’s OAUTH url. I’m just really liking the native integration as its faster and lacks the need to keep an additional emulator device online.

Thinking out loud, I haven’t looked too closely at zpriddy’s skills yet, but maybe I could set one location up for that and one location with native integration. I’m not in love with the “tell the house” language, but I might try that if I start to get the feeling that native support for two locations isn’t going to make the roadmap.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #7

The “native” integration for Echo has probably hardcoded a one-to-one relationship between your Echo and SmartThings.

In other words: Echo only supports 1 “SmartThings Authenticated URI” = 1 “SmartThings Account” + 1 “SmartThings Location”.

Ideally, they should have supported multiple “SmartThings Authenticated URIs”. Maybe someday they will.


Quite possibly they only support one Wink Hub and one Hue Bridge too; though they may have internally used different keys for the devices exposed by those.


(Micheal ) #8

I assume the ultimate solution to this is to have 2 Amazon (Echo) accounts so you can use the devices at two locations within the SmartThings app. In the same situation with two locations and the desire to put Echo’s in each of them.


#9

I think migration would be a different issue because most people would be trying to use the same echo at two “locations” at the same time. Assuming it worked to set up one hub is one location and the other hub as another location, which I don’t think we know yet if that works with V2.

In your situation, as I understand it, there are two separate physical buildings, and each building has one smartthings hub and one Echo. So in your case, you want the echo to control a subset of the devices, wow in the migration case someone might hope that the echo could control a superset of the devices (although I don’t think it will be able to).

For those who don’t know why you might want Multiple echoes, each in a different physical building, to draw from the same Amazon account most obvious reason would be so that they could share the music library, that would make sense if it was the same person going between the two buildings, such as home and office. They would also be authorized to buy from the same Amazon account, which could be a good thing or a bad thing.

Other than that at the present time, I agree with the suggestion that just putting each echo on a separate Amazon account would probably make the most sense. But the music library could be an issue, a lot of people have quite a bit invested in those.

This may be one of those things where that has to be addressed on both sides: echo may have to provide the capability to assign individual echoes to individual device subsets, while at the same time smartthings has to provide the ability to present Echo with one smartthings “location” At a time.

My guess is that eventually echo will have the ability to know its own location signifier, because that would be useful even with echoes in one house. Right now with the echo remote you can speak into the remote in one room and have your voice come out on the echo in another room. But you can’t hear what the person says back.

It would be really cool if echo added an intercom mode, where you could speak into the echo in one room and tell it to play that on an echo in another room. And then the person in that room could do the reverse to respond to you. All hands-free if you had two echoes.

We’ll just have to see what happens.


(Scott Alexander) #10

At this point I’m not asking for a specific echo to control specific devices. While that would be nice, I’m not expecting that level of granular device authorization since its not even available to SmartThings natively (Thanks @625alex and SmartTiles!). What I was hoping to achieve with my request to support was for the superset of all devices to be added to my amazon account under which multiple echos exist. Thus I’d be responsible for uniquely naming devices across my two SmartThings Locations (eventually 4 with v2)/Physical Properties.

The reason I see the migration as being a similar obstacle is that to SmartThings that fact that I have a one to one relationship between physical properties/echos/smartthings locations is unknown. Presumably all they know is that I have multiple hubs(locations). That’s why I see the v2 migration scenario as facing similar issues. I assume once you remove a device from v1 and add it in to the new v2 location you have to create, that device will no longer be authorized for echo control. Maybe I’m wrong but I was hoping to leverage that use case to support my own :smile: . I’d love for @ben to possibly jump in and clarify. I haven’t badgered support too much yet as I know its probably a non-trivial problem, but eventually I’ll need to know what the roadmap is so I can make other plans (likely using hue emulator for one of my locations) if neccessary.

And yes the reason I probably won’t be using an alternative involving two amazon accounts (though thank you Michael for the suggestion) is indeed for music library reasons.

So to keep the issue straight, I’ll restate, at this time I’m not asking for granular echo/device authorization. Authorizing all devices in my SmartThings account (all locations) to my Alexa app whereby any echo can control any device is the current goal. Interestingly enough I know this works for the hue emulator method as A few weeks ago I was at property b with some guests while my wife was property a. One of my guests asked Alexa b to turn on the living room fan, and soon after my wife texts me about SmartThings going crazy again and turning on the fan :smile:. I’m honestly not sure how that worked if Alexa b told Alexa a to tell the emulator running at property a which in turn used the OAuth URL, or if Alexa b knew the networked IP of emulator at a and connected directly to it over the WAN. Either way it was kinda cool…


(Scott Alexander) #11

Just FYI for anyone interested. Support got back to me with the bad news that dev teams have declared that the one location per account for 3rd party integration is a core platform limitation and there is no time table (not even “a few weeks” :stuck_out_tongue: ) for enhancement. They did mention that the issue would be further discussed…Obviously that’s disappointing for my case, but I’m guessing I’m in the minority having two distinct properties/locations…

I do think even for single location accounts, it will present yet another hassle during v1 to v2 migrations depending on how quickly you migrate to your new v2 location but I guess we’ll see. Perhaps the popularity of v2 will be enough to get @alex an additional location that will need SmartThings and its 3rd party integration. That might help push along the pending discussion :slight_smile:


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #12

Amazon Support or SmartThings Support???

SmartThings has a limitation that a SmartApp instance is attached to a single Location and can only use Devices attached to that Location.

There is nothing preventing 3rd parties from running multiple SmartApp instances, one per Location.

I’m working on an application that will do exactly that as a feature, actually.


(Scott Alexander) #13

SmartThings support. Amazon currently still has my ticket open. I know you keep talking about SmartApp instance and I’m sure these native integrations are just SmartApps behind the scenes but they differ from the SmartApps the community develops in the sense that I can’t install distinct instances per location.

I have multiple instances of community written SmartApps like SmartTiles and Lock Code Manager at both of my locations each controlling that location’s devices no problem. However SmartThings doesn’t seem to support separate instances of the “Echo Integration” SmartApp. I mention it as a generic third party issue because the problem doesn’t appear to be isolated to Echo integration. I have the same problem with IFTTT, SharpTools as I have with the Echo. My third party application appears to only be able to interact with one SmartThings location at a time.

They’re all using the same OAUTH authorization interface as well which makes me think that the limitation is more on the authorization API exposed to third parties rather than something they are limiting themselves. Essentially if you’re a third party and you want to interact with My SmartThings you can only do so with one of my locations (hubs). Which now that I think about it means two amazon accounts wouldn’t help either as they’d both be funneled into my single SmartThings sign-on.

Honestly I’m not sure how I was able to avoid this dilemma with SmartTiles since its using OAUTH as well. Perhaps that is due to an old way @625alex authenticated? If I go to smarttiles.click now and authenticate from there I’m now only able to see one location…

If thats true please do tell what mechanism I should encourage 3rd parties to use and then I can make the request of IFTTT, SharpTools, new SmartTiles, Amazon, etc…


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #14

O.M.G. … Serves me right for making assumptions that SmartThings “works” the way it is “supposed to”. So does it …?

I assumed that the OAuth screen has the “From: Location” pull-down explicitly so that you can select Devices from any of your Locations for that authorized SmartApp; though, agreeably, limited to only Devices at a single Location (i.e., the pulldown should let you select one and only one of your Locations.) Heck, it doesn’t even “default” to any Location.

So I uninstalled the IFTTT SmartApp using the mobile App (I’m not using IFTTT with SmartThings, but had it authorized for a bunch of devices for testing). I created a new Location called “Second Home” with no Hub and a single Virtual Device.

Now when I go to authorized IFTTT I get this:

Looks good, right? I can select from either of my two Locations. So let’s make it simple and choose my Second Home and that Virtual Device.

Indeed… IFTTT is shown as being installed in the Location “Second Home”:

Now how do I connect IFTTT to my other location (i.e., “Home”)?

Well… IFTTT, just like Amazon Echo, is to “dumb” to support multiple connections to the same “Channel / Service” under the same IFTTT Account; so let’s see what happens if I create a second IFTTT Account.

  1. No problem creating the Second IFTTT Account.

  2. Attempt to connect Second IFTTT Account to SmartThings and … whoops! … the “From: Location” dropdown input only shows … “Second Home” and cannot be changed.

  3. Well… let’s make sure I’m logged out of “graph.api.smartthings.com” … doesn’t help.

  4. Let’s try another browser or incognito window in case the authorization left some sort of garbage cookie… Nope, same problem. As soon as the OAuth window connects to SmartThings it detects that an existing instance of the IFTTT web service SmartApp is installed and insists that I use it and I cannot change it.

WTF, right?

This certainly does not seem like “in spec” behavior (or wasn’t the original design intention). There is either an unintentional bug, or a limitation caused by the OAuth SmartApp-ID / Client-ID usage that prevents multiple instances from being initiated.

Your confirmation with Support@SmartThings.com probably is sufficient to confirm this is not just a “bug”.

But, nevertheless, it is very, very wrong IMHO, because it totally messes with the ability to control multiple SmartThings Locations under one Account – something that is fundamental to the Platform.

I suppose we should escalate this and see if it can be called a bug … or missing feature.


In the meantime, a workaround for 3rd Party Connections would require them to somehow have available a list of unique SmartApp / OAuth-Client-IDs; they could arrange this by publishing multiple Master Copies of their SmartApp (e.g., IFTTT1, IFTTT2, …).

The reason that multiple Locations worked with for personal copies of SmartTiles, is that I think you generated unique Client-IDs for each instance…?


SmartTiles Dashboard 5.4.2 - July 13 (www.SmartTiles.click)
V1 Hub after receiving V2 Hub
(Scott Alexander) #15

Yeah I think basically since I have two distinct SmartApps (one is Action Dashboard 4.4 and the other SmartTiles 5.3.3-M) each has their own OAUTH client-id and is thus seen as a distinct integration similar to your IFTTT1, IFTTT2 analogy.

Problem appears to be as you said 3rd Part Connections are currently only using a single client-id which is restricted to accessing only one of my hubs at a given time. I guess given the SmartThings limitation that will be the request I make of Amazon that in my Alexa app it should have “Link with Smart Things 1”, “Link with SmartThings 2”. Those could instantiate distinct OAUTH client-ids which would allow both hubs to be integrated. I doubt they’d ever implement such a request but perhaps it can lead their developers to asking SmartThings developers to rethink this limitation in a way that I cannot…


(Scott Alexander) #16

I know it seems like I’m talking to myself here :slight_smile: but I just wanted to document some more findings in case it helps someone later. Using IFTTT I confirmed multiple 3rd party accounts will not help. I created an additional IFTTT account and re-setup my smartthings channels. However when doing so, I used my wife’s SmartThings user for IFTTT2. Initially I thought this might work since the location drop down displayed both hubs. However to my surprise when I went back into IFTTT1 all my recepies were blanked out and if I reconnecteded my SmartThings channel it took me to the OAUTH page showing the hub that is used by IFTTT2 as well as “Welcome back ${wife’s email}” in the top right…That’s a nice touch since my IFTTT1 account shouldn’t even know my wife’s email exists.

So yeah right now its basically like SmartThings is giving each 3rd party integration SmartApp a single OAUTH client-id per SmartThings Account to use. Regardless of how many 3rd party accounts I have, they all get funneled back into that single SmartThings customer account and thus same OAUTH client-id. Due to further platform restrictions on SmartApp/Location, that client-id can only control a single SmartThings location’s devices. So honestly I’m not seeing a way around this other than having each of my SmartThings locations be under a unique SmartThings customer account. That makes the mobile app experience less desirable but its integrations like echo/SmartTiles that make me less reliant on the app anywah. Anyone think of any other drawbacks? IE, I’ll have to duplicate custom devicetype code, etc…

I do think this confirms my initial theory about v2 migrations seeing this issue. So you all will at least feel my pain for a little while depending on how quickly you make the total switch over from v1 location to v2 location :slight_smile: .


(Micheal ) #17

I can confirm this…I set up two echos in two different locations…even got to the point of having two Amazon accounts…However, the SmartThings account is thought of as one single point of access…so multiple locations are not supported. Since I am only in one location at a time, it will be me disassociating the Echo at location 1 and re-setting up the location 2…A hassle to be sure, but may be the only way to do it…


(ocpd+adhd+alz+md+hfa+fms+lol=me :)) #18

watching

20 20 20 20


Account Sharing Update
(Robert Nolte) #19

I too have hubs with echos in more than 1 location - 3 in my case. I have added complexity in that my wife and I are frequently in different locations and want to each have full control of all locations with the app and voice control of our local environment with the onsite echo. I would love to see a proper solution for this problem. Has there been any progress.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #20

With the update of the SmartThings Platform a few weeks ago, there is no longer a limitation on the SmartThings side to install a SmartApp (like the Amazon Echo / Alexa Connector) in multiple Locations under the same Account.

Each SmartApp installation, however, is still limited to working only with Devices that are all in that same Location (though there are a few hacks, I wouldn’t count on them).

Still… The problem now lies completely in Amazon’s court (or, well, whoever is responsible for the Amazon Echo / Alexa integration). The SmartThings platform bug is resolved.

SmartTiles for example, can now be installed in each of the Locations under your Account; but, currently, can only display Tiles (Devices) from one Location at a time, though you can link sub-dashboards from one Location to another. Future SmartTiles, someday, will allow you to mix Locations on one Dashboard … something SmartThings’s own app can’t do yet either.