FAQ: An Overview of Using Custom Code in SmartThings (SmartThings Classic)

Click on the “community” link at the top of this page and then look for the “developer documentation” link at the top right.

Follow-up questions can be asked in the developer section of this forum:

https://community.smartthings.com/c/developers
1 Like

Thank you JD! I’ve been “playing around” with my Smartthings system for about 2 years. And with the help of your tutorial, I just successfully “copied/used”, my first custom SmartApp & Device Type. A BloomSky weather camera.

Now I have 3 other things to attempt.

The hardest part was finding & figuring out that “Developers” site. I wish ST’s would make all of this “stuff” easier.

Many Thanks,
Murray

1 Like

I totally agree. Although new to ST, I find working w/ SmartApps and DTHs to be extremely painful. I have read blogs that mention apps, only to search without any success in finding them. If it takes 2 YEARS to learn enough to complete the first app, then ST is going back to the store. What happened to the IFTTT feature? That’s never spoken of!

ST is very extensible. Admittedly kind of misleading when people look at what you can do versus what’s available without learning a few things. You either live within the walls, find and use the community (requires some learning), or outright learn how to code. Personally, I love the flexibility. If you’re not a coder, checkout CoRE. If you are, it’s not that tough.

SmartThings is very versatile, but definitely lacks discoverability. A lot of that is made up for by this community, which I have found to be very helpful and very active, and which can get you a quick response to most questions. :sunglasses:

The following might also be of interest:

The official blog is always interesting, but unfortunately they don’t go back and update it as things change, and things change often.

Thx JD for the link to the article. While it definitely helps to understand the v2 app, I find ST lacks overall instruction and guidance. Connection was easy and quick which excited me. All my IRIS devices linked without issue BUT the keypad. My wife wants a simple chime to sound when a door is opened and a simple interface for arming. Since I am not a Java (or Groovy) programmer, I started with searching written DTHs to support devices and Apps to integrate actions. I tried to integrate Iris Keypad (which has a lot of discussion in the commune) but there appears to be no official app to support it. I tried one from Mitch ?? that partially works. Then I hear about CoRe and unlock manager and … but cannot find the apps within the smartapps due to poor organization and search tools. This has really frustrated me with a deadline to get done by Friday. Can anyone provide simple step by step directions and links to everything needed to make an IRIS keypad activate an alarm mode and chime with door openings?

1 Like

Thanks John. I agree it takes learning more than a few things, especially the community. I have seen several blogs re CoRE but have yet to find the app. Can you provide the link?

Here you go:

CoRE and Piston Rules Engine, first design steps

If you use the magnifying glass in the upper right, you can search this thread or any thread.

EDIT: Here’s the GitHub (it’s in the thread above; https://github.com/ady624/CoRE)

@khill
That project would be off topic for this particular thread, but I have started a new thread for you and hopefully people will be able to answer your questions about door chimes there.

3 posts were merged into an existing topic: Use Iris Keypad to trigger alarm and Door Chime?

So what does it mean if there is no create button?

As long as you’re working with a Device Handler, not a SmartApp, there should be a create button at the bottom of the “from code” form.

So check to make sure you’re in the correct section of the IDE.

If you are, and you don’t see the blue button, contact support.

@JDRoberts, can you link to how to add a custom device handler or SmartApp from GitHub. I’d rather not copy/paste, but use GitHub Integration to make it easier to get notifications and update it when there is an update.
Thanks.

Good idea! Someone else can add it if they like, either here or in the community created wiki. :sunglasses: I rely on text-to-speech software, so I can’t really do anything with Github.

The authors of most of the very popular code have generally put installation instructions in their author threads which would cover the github piece. They still refer people over to this thread to get an explanation of the concepts, but the specific installation process may be somewhat different.

I think somebody did a thread on github integration, but I don’t remember where that is. Again I can’t read most of those posts. @tgauchat or @jody.albritton might know if there’s a write up somewhere.

JDRoberts, how do I remove a custom device handler created in error?

  1. make sure there are no devices assigned to that device type handler

  2. choose My Device Handlers and click on the details button to the left of the device type handler that you want to delete. This will bring up its details page.


3) there will be a delete button at the bottom of the details page

1 Like

So I copied the DTH code and published it to my library. When I go the to device in the IDE and edit it, I don’t see anywhere to link the device to the handler. First time using any of this, so thanks in advance for the help.

The process for steps DTH five and six has changed slightly since this was written and I can no longer edit the first post.

DTH5a) Select “My Devices.” This will show the list of your devices.

DTH5b) click on the display name of the device that you want to assign to your new device type handler. This will open up its details page.

DTH5c) click on the “edit” button at the bottom left of the details page.

Now you can complete DTH6) and edit the device details so that it uses your new device type handler.

3 Likes

Thanks @JDRoberts.
I didn’t realize the new DTH was at the bottom of the list. I thought I was changing the device itself under the type* scroll box. Then I saw the new codes name at the bottom. Much appreciated.

1 Like

How do you “Edit the Device so that it uses that device type handler”. I have created the DTH and published it. When I select the device that should use it I don’t see a way to specify the DTH.