SmartApp / DeviceType :"From Code" and "From Template"

I’m loving the new “From Code” and “From Template” options when creating a new SmartApp / DeviceType.
Users don’t have to be instructed to fill out bogus information and then replace the resulting code with code anymore.

The new instructions are:

  1. Login at http://graph.api.smartthings.com
  2. Go to “My SmartApps” or “My DeviceTypes” and click on the “+ New SmartApp” or " + New SmartDevice" button on the right.
  3. On the “New SmartApp” or “New SmartDevice” page, Select the Tab “From Code” , Copy the xxxxx source code from GitHub and paste it into the IDE editor window.
  4. Click the “Create” button at the bottom.
  5. Click the blue “Save” button above the editor window.
  6. Click the “Publish” button next to it and select “For Me”. You have now self-published your SmartApp or SmartDevice.
  7. Open SmartThings mobile app and go to the Dashboard.

(For SmartApps):
8. Tap on the round “+” button and navigate to “My Apps” section by swiping the menu ribbon all the way to the left.
9. xxxxx app should be available in the list of SmartApps that appears below the menu ribbon. Tap it.

Thanks SmartThings!!

9 Likes

Brian,

This is an awesome step-by-step! :slight_smile: Thanks! I’ve pinned this to share with people.

Cheers!

2 Likes

Time for a subcategory FAQ in this category? :blush:

1 Like

I use “Light Turn On Motion” Smartapp, but I can’t find it from template at IDE.
Where is it ?

I thought when there’s a Smartapp by Smartthings, the code is available at IDE

I don’t have a Smart Apps section in my IDE. Is this something I enable somehow?

It should be located in the banner at the top after logging into https://graph.api.smartthings.com

Screenshot:

1 Like

Thanks. It wasn’t there and I contacted support today. They enabled it from their end.

I followed the directions and got the following error?

Groovy.lang.MissingMethodException: No signature of method: script14328368657352066097587.page() is applicable for argument types: (java.util.LinkedHashMap) values: [[name:pageSetup]] Possible solutions: path(java.lang.Object), wait(), any(), wait(long), main(java.lang.String), main(java.util.List)

Thanks,

David

This is an error in the code of the SmartApp that you are trying to install. It appears to be calling a page() function which either does not exist or has errors and cannot be analyzed/executed.

Where sould I see the newly created device type?

how do i find the smart device and block it from the other smart device it thinks that it is

I think what you are wanting to do is change the device type to something different than SmartThings detected it as when you installed it. To do this:

  1. Go to https://graph.api.smartthings.com
  2. Login with your SmartThings account.
  3. Go to My Devices
  4. Locate and click on the device in question
  5. Scroll to the bottom and click Edit
  6. Go down to “Type *” and change it to the desired compatible type for the device.

I had a contact sensor that was detected as something else and this resolved it for me.
I hope this helps and sorry for the delayed response.

hello i dont see my apps or my device types on the banner pleas help i have the UK version

Contact support and ask them to enable it in your account. I believe it’s something they have to do in their end.

Yea, it doesn’t look like your account has developer mode enabled.

Thanx i already contacted smartthings mustr wait til the enable it