Setting up SmartThings Cloud
To develop applications that integrate with the SmartThings Cloud, you must register the function of your device (called a resource or capability in the SmartThings Cloud) and generate a private key and a cloud certificate.
Registering your Device
To register the function of your device:
-
Create a cloud-connected device in the Developer Workspace site (https://smartthings.developer.samsung.com/), by following the instructions on the SmartThings Developers site:
-
Choose the SmartApp Connector type of Cloud Connector
-
-
After the cloud-connected device is created, add a device profile by following the instructions on the SmartThings Developers site
For more information, see Developing Applications with Things SDK API.
Generating Cloud Certificates
SmartThings™ uses OpenSSL for security. To begin development, you need to get certificates for both plugins (PPK) and devices. For instructions on installing OpenSSL, see the OpenSSL documentation.
Generate the IoT certificate and private key using the Certificate Manager:
-
In Tizen Studio menu, open the Certificate Manager by going to Tools > Certificate Manager.
-
In the Tizen Certificate Manager window, select the IoT Cloud Service tab and click + to create a new certificate and key pair.
-
Fill the requested information in the Certificate Generation Dialog and click OK.
-
In the next page of Certificate Generation Dialog, fill the requested Device and Manufacturer information and click OK.
NOTE
“Device Name” must be the same as the “device name”, which you define in
master.json
.
-
Sign in to Samsung account.
-
Once you have signed in successfully, you can see the generated certificate and private key in the Certificate Profile list.
Using the Generated IoT certificate
The IoT certificate and key pair generated in the previous section needs to be copied to the application in a designated directory. This enables the device to connect to the SmartThings cloud using the IoT certificate.
To add the IoT certificate to the application:
-
In Tizen Studio Project Explorer view, right-click the project and select Build Signed Package.
-
The certificate and private key must be copied to the res folder of the application.