I am having bit of a problem here. When I log in to my account using ( website 1 https://graph-na04-useast2.api.smartthings.com/ ) I am able to see my HUB. But if I log in to (website 2 https://graph.api.smartthings.com/ )my HUB is not there. The CrestronAPI that I am using is communicating with the second website and because of that I can’t sync the devices to my Crestron program.
Can someone help please?
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
2
Please always read the FAQs first before posting a new question.
Next, determine what Shard your Location is on. It must only be on one Shard; and you cannot change the shard. If your CrestronAPI is not connected to the same Shard as your Location, then your API is wrong.
I’m sorry. I tried looking in FAQ first but I was wording it differently , that’s why it didn’t see it. So, when I first connect my HUB and do the setup in my phone how do I pick my shard? is by selecting the Region/Location I am in?
You don’t get to pick your shard. When you create your account, it assigns your shard then. There is no rhyme or reason to which one you end up on. It’s not done by any specific region or location that I know of.
When you login to https://account.smartthings.com, you are automatically redirected to the shard you belong to (are assigned). You can then use that shard (url) directly moving forward for your account.
Thank you for your reply, just help me understand how this is possible, I am new to the community.
When I login I get directed to https://graph.api.smartthings.com/ but I do not see my HUB listed in there but if I click My Locations and Home I can see the HUB and Devices but it takes me to https://graph-na04-useast2.api.smartthings.com. Is there a reason for that?
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
6
The Shards are likely mapped to Amazon Web Services “Regions”, which are actually related to physical datacenter locations.
e.g., North America legacy, North America west, North American east, European Union west, Asia Pacific, …
“We” just don’t know whether your landing shard is determined by:
Phone geolocation when you add your Hub?
Hub geolocation (i.e., IP address lookup)?
Hub manual location (when you set your home address for the first time)?
Method #2 makes the most sense; but I wouldn’t be surprised if the other methods are used.
Method #2 can be spoofed by routing through a global VPN.
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
7
That’s exactly how it is supposed to work, except that explicitly using “graph.api.smartthings.com” is deprecated unless you actually live on that Shard. Instead, you should use https://account.SmartThings.com which will land you on the correct shard immediately (90% of the time).
Yes for a minority of people, when they initially login through the main url, they are taken to graph.api… Then when you goto Locations, select your Location, you are then ultimately re-re-directed to your actual shard if that makes sense. So you should be able to use the na04-useast2 moving forward.
I am on the west side of the country and I am na02-useast1.
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
10
North America was/is forcefully organized non-geographically because the original NA01 shard (i.e., “graph.api.smartthings.com”) receive all the customers until NA02 was spun up.
I login with 1, and it automatically goes to 4. There are also some brand new users where their actual shard is the graph.api… Actually had a cpl people I was supporting a few days ago with that exact scenario because we thought they were on the incorrect shard knowing that they are a new user (SmartThings account).
So it doesn’t matter if I login using graph.api. smartthings.com/ and I don’t see my devices or the HUB like it shows on my Phone app?
What will count is when I click My Locations - Home and inside there which takes me to graph-na04-u seast2… is where my HUB should belong? So I believe that in the groovy code something has to be changed there right?
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
18
Yup: This is clearly a “bug” in the “account.smartthings” login scheme. It “should” always work correctly but I can think of at least one reason for it to fail: An Account may have many Locations and such Locations could be on different Shards.
The harsh reality here? IDE Shards are not supposed to be used by anyone but developers and super-power-users. The entire IDE system was / is meant to be used by a “handful” of developers and power-users that know the heck what they are doing. Support is not provided for “us”.
1 Like
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
19
The most likely problems:
The OAuth flow in the source code is old and the developer hard-coded it to graph.api…?
There is some other bug that the developer is responsible for diagnosing and fixing.