The end goal for sharing is going to be publication. In the old groovy world, one had to pass around code. We are hoping to eliminate that for the average user.
Thanks for your feedback, @jody.albritton. Iām sure SmartThings team is working on this. Canāt wait to see this public sharing feature to be supported in near future.
im having the same problem lol, im not super tech savvy so theres gotta be something im missing. ive done everything in this tutorial step by step just wondering what ive missed. i guess i need to keep doing my research. i had no problem installing smartapps using the ide and copying code, this seems a little tricky, but i will learn before its all said and done lol
Yeah I was having the same problem, here is how I got around it. If you go to your glitch project where you can actually edit code, there is a pop up menu on the bottom left when you click ātoolsā . Click on it and then click into āLogsā.
A log window will appear at the bottom with any HTTP requests sent to your application, they should look like this.
2020-08-25T12:06:24.071Z info: CONFIRMATION request for app WHATEVER-YOUR-TOKEN-IS, to enable events visit https://api.smartthings.com/apps/WHATEVER-YOUR-TOKEN-IS/confirm-registration?token=CONFIRMATION-TOKEN
All you have to do is paste the https://api.smartthings.com/apps/WHATEVER-YOUR-TOKEN-IS/confirm-registration?token=CONFIRMATION-TOKEN
portion from your log into a browser and then when you go back and check the your app on the Samsung developers website it should be verified.
Hope this helps!
@jody.albritton Just finish our workflow on using your SmartApp SDK for creating a custom API Access app type. Well done, sir. Canāt expect more from an SDK. Thank you for your great work!
Developer Mode and App is not available on IOS?!
While works on the same account in Android.
Hi Andrew,
If you go to the SmartThings iOS app, click on settings and then hold down the āAbout SmartThingsā button for 5 seconds. There will be no pop up to reset the app and enter developer mode as on this page (well there wasnāt for me). If you close the app completely, on iPhone double clicking the home button then swiping up. Renter the app and head to settings you should see something like the screen below at the very bottom of settings to enable developer mode.
Just went through the video tutorial and like others was able to successful complete my first SmartApp using this new API. Thanks @Warren1 for clearing up the one issue.
A problem that I am having is with the live logging. I donāt see anything. Everything works, just no live logging. Is there something Iām missing?
I was hoping I could get some help with a webhook app Iām working on. I have node.js running on my own server, with a javascript program to response to calls, but I cannot seem to get SmartThings to verify app registration. I confirmed that my server is responding to POST and GET commands, but it never receives anything from SmartThings when I attempt to verify the app.
Anyone else having such a problem?
Have you registered your app through the Developer Portal for OAuth?
You need to fill out this form to register with SmartThings also if you want to link it back to your own server. It will let you set up an OAuth project then.
Iām receiving correctly the request for verification. Make sure you are passing the request to the appās handler handleHttpCallback
.
const app = new SmartApp()
server.post('/', async (req, res) => {
app.handleHttpCallback(req, res);
});
I have that line in my code to respond to POST requests. I have it listening on port 3001, so I donāt know if this could be a problem.
Testing POST and GET requests to my server works from outside my LAN. But it does not receive any requests for verification from smartthings. Could it be that I doesnāt work with a port not set to 443 for https requests for verification?
So I found out my problem. Using cURL, I would get a certificate error, but couldnāt figure out why, as using online tools everything worked from the browser. It appears that the certificates for my server were the issue. Placing the contents of the certificate chain into the cert file allowed it to work with cURL. I then attempted to verify the app with smartthings, and BINGO, it works!
Awesome! Thanks for sharing your solution.
When I try to follow above, I couldnāt find the SmartApp on my Galaxy note10 mobile. With that I think itās been 2 years from this. Is it still available to follow the instructions above?
Well, I could see a SmartApp as my example in routine of SmartThings menu.
Does SmartApp have to be used only for routine having condition and action?
To see your custom SmartApps you need to:
- In the ST app, go to Automations
- Select add (+) and tap on āAdd routineā
- Go to āDiscoverā. Scroll down the page and youāll find the SmartAppās list at the bottom.
Please, let me know if you found it.
No. As you will discover the Automations tab of the mobile app lists three sorts of Automations. First Scenes, then Routines (which used to also be called Automations but were sensibly renamed) and then your installed SmartApps. The + menu used to have an option to add SmartApps but that was moved into the Discover tab of āAdd routineā below the Routine templates. It didnāt make much sense when Routines were still called Automations and makes even less now.
Thanks for your swift answer, I found it as you explained.
I have nodeJS SmartApps Iām running on a Raspberry Pi using ngrok. Because I have the free tier version of ngrok, I get only one URL to use, so I have to use the same one for multiple SmartApps I may want to be running. So far this hasnāt been a problem, as I can simply key off of the appId when a POST message is received to direct the message to the right SmartApp instance.
However, I have run up against an issue with the language support: I have these lines in my SmartApp instantiation for each of two SmartApps:
.configure 18n({prefix: āapp1_ā})
.configureI18n({prefix: āapp2_ā})
This allows me (presumably) to keep the en.json files separate for each SmartApp, at least that was the intentā¦
The problem is that this doesnāt work. It seems that the SDK is not keeping the two I18n instances separate. Only the .configureI18n for the second SmartApp that is loaded (via nodeJS require) seems to honored. The first SmartApp to load is missing all its text in the mobile app; the second one is fine. If I copy all of the app1ās json into app2ās json file (app2_en.json), then they both work ok. This leads me to believe that invoking .configureI18n uniquely for different SmartApps doesnāt work properly in the SDK.
Is there some other way I can accomplish this? I donāt see any other way of providing a specific file name to .configureI18n, but if the SDK isnāt keeping them separate across SmartApps, then it may be impossible without a fix to the SDK.
Hi, Todd!
Please, allow me to check with the engineering team and Iāll get back to you as soon as I can.
Update:
@TAustin, the workaround youāre using is the best bet. The team mentioned it is due to the way the i18n
package is handled by the SDK.
So, please open an āissueā directly in the Github repo so they can analyze it further and see if it can be supported.