[OBSOLETE] FAQ: An Overview of Using Custom Code in SmartThings (SmartThings Classic, Groovy Code)

March 2018 Update

There are now two mobile apps:

"SmartThings classic,ā€ which we are calling the V2 classic app in the forum.

ā€œSmartThings (Samsung connect),ā€ which we are calling the V3 app in the forum.

The process described in this FAQ will only make sense if you are using SmartThings classic.

At the time of this writing, The V3 app will not support custom device type handlers at all.

It will support custom smartapps, but only if you first add them through the SmartThings classic app.

We have not been given a timeline for when custom code will work with The V3 app :disappointed_relieved:

4 Likes

Very useful for understanding custom code, smart app and device handler. I was struggling to configure monoprice zwave motion sensor through my smarthings app. I tried to change the battery and unpair / repair countless of time, but it was always disconnecting randomly. One of my colleague sent me this link and I went through all post and comment. Changed device handler to Go control motion sensor and i didnā€™t have any problem since last 4 daysā€¦ Kudos to you guys and making life little easier.

2 Likes

Where can I find a getting start guide for smartthings?

Unfortunately There isnā€™t really one right now. :disappointed_relieved:

Smartthings is in the middle of going through a big platform architecture transition, But the new stuff isnā€™t yet complete, so right now (June 2018) there are two separate mobile apps, two separate developer platforms, etc. It can get pretty confusing so I would just get in touch with support or search the forums or the community ā€“ created wiki when you have specific questions. Make sure you tell people which version of the app you are using, because the features are very different.

Meanwhile, the official supportbase has a few articles.

And the community ā€“ created wiki has resources for the original version of the app, now called ā€œSmartThings classicā€œ but very little on the new version, which is called ā€œSmartThings (Samsung connect)ā€.

http://thingsthataresmart.wiki/index.php?title=Welcome_FAQ

Please take any follow on questions to other sections of the forum, as this thread is just an FAQ on custom code for the classic app.

(Also, This isnā€™t specifically for you, but just for general information: I donā€™t typically read private messages so thereā€™s no point in sending them to me. Iā€™m just another community member and physically I find opening the private messages very difficult. There are many people in the community who are always glad to help, so publicly posted questions will get the quickest and best responses.)

3 Likes

A Noob Question here, so bear with me - Im trying to add a custom Device handler for the Carrier Infinity Thermostat, but according to instructions the Device needs to be added first.

So the question is- What do I select in the drop-down for Device Type in the create Device page(since Carrier thermostats are not part of the list)? Should I just select an available thermostat on the list and simply use the new custom Device Type later?

Perhaps it is referring to adding the device through the ST app. Do you have a link to the instructions you are using?

I was referring to the instructions given by jdroberts on the very first post of this thread where he has laid out the steps to as new custom device typeā€¦ Here is the section from his post-
"USING A CUSTOM DEVICE TYPE HANDLER

Easy!

These steps assume you have already added the device to your account through the SmartThings mobile appā€¦"

Are these instructions only for switching the device type for an existing device? How do I add the carrier infinity thermostatā€¦ I can get the IP address of course, and fill in details manually, but what should I select for device type? Would I be able to just add and publish the custom device type first and then just choose that when adding the device?

Zigbee and zwave devices can be added through the mobile app first as a generic ā€œthingā€œ as @jkp referenced and then you can change the device type handler assigned to that specific device.

Devices using other protocols or cloud to cloud integrations may have special instructions, which shouldā€™ve been included in the author thread where you got the code for the custom device type handler.

Which custom device type handler are you using and where specifically did you get it?

Has anyone used the new smartthings app? My devices using a custom device handler seem to be in a stuck ā€œChecking statusā€¦ā€

This FAQ is specific to the classic app.

If you read one of the threads on the new app, youā€™ll find the answer to your question:

2 Likes

flagged . . .

2 Likes

Hello, did you solve this?
I have the same problem, I canā€™t get the device pair with SmartThings, I canā€™t add a generic ā€œThingā€ nor in the new version, nor in the classic app.
Thanks.

I am not able to find answer to this any where. Basically I modified the device handler for Garage Door simulator and removed the simulation part and added a command to set the state of the door, the device works in simulation mode. I know want to create a smart app that can add this specific device type and use the custom command I added.

I canā€™t figure out how to look for this specific device type as I have not created a new capability and use the custom command.

Can anyone point me to an example?

Ask your question in the developer section of the forum, and the people who write code should be able to help you there. :sunglasses:

Just start a new thread in the following section:

https://community.smartthings.com/c/developers/writing-device-types

As always, JDRoberts knows the answer. I read that previously but I guess it didnā€™t sink in.

Thanks!

2 Likes

Has any body got step by step instructions on how to install this including using the Smarthings Developer portal? i canā€™t seem to find the ā€˜My Smart Appsā€™ to begin copying code acrossā€¦ When i select Smart Apps it just gives me information on what a Smart App isā€¦ I am obviously doing something incredibly stupid but im totally new to smartthings as of this morning.

You might be looking for IDE at https://account.smartthings.com

There are two sections - My Smartapps and My Device Handlers where you can add code and publish.

1 Like

thank you, ths developer portal I was on didnā€™t have these sections, I found a link in a youtube tutorial to the right page and followed the instructions and it worked. it failed a few times when I was logging in with my hive credentials but I eventually got it.

thanks for the support.

1 Like

@JDRoberts I suggest the first post should be updated to remove the references to ā€œClassic appā€ and ā€œv3 appā€.

And SmartThings should be prefaced with ā€œSamsungā€. As this is no longer the SmartThings we knew, this is now ā€œSamsungā€™s SmartThingsā€.