SmartThings SDK

SmartThings SDK allows you to define a plugin for the SmartThings app to monitor and control direct-connected devices. The SmartThings SDK includes CLI, device plugin simulator, and virtual device.

How to install

Prerequisites

Before you can use SmartThings SDK, you must have all of the following installed:

  • Node.js
  • Java SE
  • Google Chrome Browser

Review this page for details.

Node.js

Node.js provides a JavaScript engine as well as a web server framework for the CLI. You need Node.js version 6.0 or later. To check if you have right version installed, use the command:

C:\> node –v
v6.11.2

If you don’t already have the right version of Node.js:

  1. Download the software from the Node.js download site.
  2. Set the PATH variable to include the executable folder, for example, C:\Program Files\nodejs.

Java SE

To install and use SmartThings SDK, you need Java SE v1.8 or later. To check if you have the right version installed, use the command:

C:\> java –version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

If you don’t already have the right version of Java:

  1. Download the software from the Oracle Java SE download site.
  2. Set the PATH variable to include the executable folders, for example, C:\Program Files\Java\jdk1.8.0_92\bin and C:\Program Files\Java\jre1.8.0_92\bin.

Google Chrome browser

The simulators are launched as browser popups using the localhost port number 5680. To enable the popups, either:

  • Allow all popups: In Chrome Settings > Advanced > Privacy & Security > Content Settings > Popups > Move the slider to the Allowed position.

  • Whitelist popups from port 5680: In Chrome Settings > Advanced > Privacy & Security > Content Settings > Popups > next to Allow, click Add and enter localhost:5680.

Download the SDK package

To download SmartThings SDK:

  1. Go to the Developer Workspace.
  2. In the upper right corner, click Log in and sign in using your Samsung Account.
  3. Go to Tools > Downloading the SDK.
  4. Select Windows or Mac as OS and download the SDK package that includes Atom plugin, CLI (Command Line Interface), virtual device, and device plugin simulator. If you do not need SmartThings SDK, you can download the basic SmartThings CLI only.

Install SmartThings SDK

Windows

To install SmartThings SDK on Windows, proceed as follows:

  1. Double-click to launch the .exe file.
  2. Follow the setup wizard in SmartThings SDK and install the SDK packages.
  3. SmartThings SDK is installed by default in C:\Users\%user%\.iotcloud\tools.

MacOS

To install SmartThings SDK on MacOS, proceed as follows:

  1. Double-click to launch the .pkg file.
  2. Drag and drop SmartThings from the .pkg popup window to your /Applications folder.
  3. Link the executables to your computer’s program folder.

Uninstall SmartThings SDK

Remove the following folder.

  • Windows: C:\Users\%user%\.iotcloud\tools
  • MacOS: /usr/local/share/iotcloud

To re-install SmartThings SDK, see Install SmartThings SDK.