Terry just replied to you ![]()
You need to âreach outâ to the developer of the âCrestronAPI SmartThings integrationâ. Who wrote it?
I am in contact with the person that created the CrestronAPI. His name is Jay Basen. He was saying that it may be something with my account that is causing the issue.
This is interesting. Hereâs the thread from Jay going back to 2016.
I am having the same issue he was having, I get the authentication but not I canât can the token access to work for me.
Iâm betting that yâall may not be processing the âgetting the endpointâ step properly.
It is tricky (and, yes, SmartThings may be at fault and returning nonsense). Hand-parse the returned JSON to see if the values make sense.
If you donât get an endpoint reference to âap04â, then ⌠the developer is probably doing it wrong; or the Account / Location is messed up and needs to be fixed by Support@SmartThings.com
I didnât write the CrestronAPI. It was originally written by someone else. I ran into the problems referenced by my 2016 thread and was able to fix the problems with the code after getting help from the community.
The original author then handed the code off to me to post on my github for other people to use. So, I guess you could say I inherited it. The code has been working fine for me and others since 2016. JohnnyCashAV is the one person I havenât been able to help resolve his problems. I only say it may be an account problem because I canât see what else might cause the problems he is seeing when the code is working fine for other people. Thanks
Jay
Well⌠Indeed, itâs not unusual for âAccount problemsâ to exist, but novice error is more likely.
- Is the SmartApp loaded and self-published on the correct Shard (especially since he just learned what a Shard is and how to determine it)?
- Does it have a Client ID and Secret?
- etc�
Jay is helping me with everything he can, I passed the program to him so he can take a look and the account for ST to determine if I made any mistake. But it seems that everything I did is correct, Like you were saying before , âI donât choose my shard, itâs done automatically according to my locationâ.
When I Published it I simply went to CrestronAPI and Publish- For Me, nothing hard to do here, I even was able to do the authorization and the communication with the device but only the Turn Off part was working, it wouldnt turn on.
I was not complaining about Jay, you asked me who wrote the code and I just wanted to mention him because he is a co-owner with someone else and he is helping to resolve this issue and we can benefit from that and be able to help others as well going along the road.
@tgauchat thank you for some clarification too.
The shard you are assigned by SmartThings just has to do with when your account is created. The only time where you live makes a difference is if you are in a region with different privacy laws.
So all UK accounts will be assigned to a UK shard.
US accounts are assigned to shards simply based on the point in time at which the current SmartThings space on a shard gets full and smartthings (not the individual customer) signs up for more space on a different shard.
So it started out with everybody being on na02-East1, then there came a calendar date when new North American accounts started getting assigned to Na04-east2 etc. (ânaâ means north America)
So if you signed up for a SmartThings account in 2015, whether you live in New York or Los Angeles, you were assigned to na02.
If you signed up for SmartThings account in late 2017, again whether you live in New York or Los Angeles, you were assigned to NA04.
Most companies, and smartthings appears to be among them, donât try to assign their customers to Amazon servers based on what city they live in. Amazon does a good enough job for most use cases of delivering service everywhere within one region.
The legality issues involving privacy laws are an entirely separate issue, and do require being on a different shard. 
btw, I have no idea what happens to people who have Samsung accounts instead of SmartThings accounts, or what will happen once everybodyâs migrated to the new app.
That brings up a good point. I canât recall now what happened being in the Account Migration Beta. I believe that my original ST account was on na04. As part of the migration process, we manually created a Samsung account (this was probably assigned na02-useast1 at this time). Then the actual migration script moved everything we had on our ST account over to the Samsung account which ultimately has me now on na02.
Iâm not sure how the final shakeout of that script will affect the general public when they roll it out, but if the process is the same as we performed, I am going to assume people are going to end up on a different shard when creating the new Samsung account.
I wish this were true; but I still think it is geographic except for NA02 which is currently being made the preferred Shard over NA01 (the original) for load balancing reasons.
A growing problem right now: Customers in Australia are landing on AP02 (Asia Pacific) and thatâs causing trouble when they try to install ActionTiles because we are not deployed to that Shard yet.
Itâs been established by many previous posts in the forum that itâs not geographic for North American accounts. People from all over the US are in the same shard, whether itâs na02 or na04.
People in other countries definitely do have geography as a factor because, as mentioned, there are different privacy laws and they have to be assigned to a shard which uses the same legal structure for data storage.
So, i register when i was in US but now im in Europe, ST still works but on NA04, should i transfer all the data to the EU server? It is faster?
Thanks!