Register Your Device
After configuring your programming environment, the next step is to register your Device in the Developer Workspace. Direct Connected Device registration includes defining the Device Profile, providing Device onboarding instructions, naming the Device, and provisioning the Device Identity.
Create a project
Log in to the Developer Workspace with your Samsung account. Create a new Direct Connected Device integration by selecting New Project -> Device Integration -> Direct Connected.
You must be enrolled in an organization to publish a Direct-connected device. As a member of an organization, be sure you have switched from your private workspace to your organization's workspace (see the pulldown in the upper right corner of the Developer Workspace banner).
After creating your new project, you will be taken to an overview of your project in the Developer Workspace. The Overview page guides you through the steps of creating a Direct-connected device integration. Remember, your project is a one-to-one relationship with your device.
Your project can be in one of four states:
- Develop - the state of your project when it is created. You are defining the device features and other information that will allow the device to onboard to SmartThings.
- Deployed to Test - the state of your project after you have provided the minimum information for catalog, device and onboarding profiles. You are able to test your device under developer mode in the SmartThings app.
- Publish Request - once your device is ready for wider release and you have submitted a request to be WWST certified.
- Published - the device has been certified and is available to the public in the SmartThings app.
Add a Device Profile
Next, you will need to define a Device Profile for your Device using the Developer Workspace. A Device Profile defines a Device and its features on the SmartThings platform. It contains the components (which contain Device Capabilities) and metadata (ID, name, ownership, and more) of a Device, defining how a Device on the SmartThings platform behaves.
In the Developer Workspace, click Define Device Profile -> Create a Device Profile. The Workspace will guide you as you enter the basic info for your Device, select the Capabilities of the main component of your Device, and define the presentation of your Device.
The Health Check
Capability will be automatically added to your Device Profile. We strongly recommend leaving this Capability in your Profile.
Define the Device Onboarding Process
The steps and instructions for how users will onboard your device to SmartThings are defined in the onboarding profile. Device ownership validation is also defined during this stage.
To add your Device onboarding information, click Device Onboarding in the Developer Workspace.
Customize the images and text to guide your customers' experience when connecting the Device. You can also localize the text for any languages appropriate for where your Device is distributed. English is the default language.
Add Product Info
Basic product information is required as a placeholder for your Device in the SmartThings catalog and as a link to the the Device identities that are registered. You can define your Device's category and regional availability. By default, your device is set to be available only in the United States. You can make changes to your Device's availability before publishing.
Deploy to Test
Begin testing by deploying your Device to test by selecting Test -> Test Devices in the Developer Workspace. Deploy to Test privately publishes your device so that it becomes visible in the SmartThings app when the app is in developer mode. Now is a good time to download the test cases for your device to know what tests your device must pass for WWST certification. Additionally, download and review the security and certification application under the Publish menu. Use the information in these documents to test and ensure that your device will meet SmartThings functional and security requirements.
Register Your Test Device
Direct Connected Devices, including test devices, must be known to SmartThings before they can successfully connect to the cloud. Register devices by providing the device serial number and public key (ED25519).
You may have created credentials using the keygen included in the STDK as part of the environment setup. Test devices have a predetermined format for the serial number as "STDK"+"Organization Identifier (MNID)"+"8 char string". You can register a limited number of test devices in the Developer Workspace under Test Devices.
Create an ED25519 key pair with the SDK
The key generator utility keygen.py
is located at st-iot-device-sdk-c-reference/iot-core/tools/keygen/
or st-device-sdk-c/tools/keygen/
. The serial number for testing your Device is randomly generated by this tool in the format of STDK + 12-digit alphanumberic number
.
$ cd ~/st-device-sdk-c-ref/iot-core/tools/keygen/
$ python3 stdk-keygen.py --firmware switch_example_001
Use following serial number and public key
for the identity of your device in Developer Workspace.
Serial Number:
STDK**E90W***uCX
Public Key:
nFN5x***uQusQ****ZHoBSFaAoP9***kNdLnjDJRew=
Copy STDK**E90W***uCX
from the keygen output and paste it into the Device serial number field on the Register A Test Device Workspace page. Copy the public key string from the keygen output (nFN5x***uQusQ****ZHoBSFaAoP9***kNdLnjDJRew=
in this example) and paste it into the Device Public Key field.
(Optional) Generate Your Device QR Code
An onboarding QR code is mandatory for all devices seeking WWST certification. Visit the Publish section for complete QR code details for devices seeking certification.
A Device QR code can assist users with onboarding your device. Your QR code should contain the following information:
{Your mnId}
: 4-digit alphanumeric mnId of your account{Device onboardingId}
: 3-digit number of your Onboarding ID, located in your Developer Workspace project -> “Device Onboarding” -> “Other Info”{Device serialNumber}
: Device serial number that is registered with your Developer Workspace project
https://qr.samsungiots.com/?m={Your mnId}&s={Device onboardingId}&r={Device serialNumber}
You can generate a QR code using the python3 script below:
import qrcode
mnid = 'FFFF' # "FFFF" is an example. you should replace it with yours
onboardingId = '111' # "111" is an example. you should replace it with yours
serialNumber = 'STDKtest0001' # "STDKtest0001" is an example. you should replace it with yours
qrUrl = 'https://qr.samsungiots.com/?m=' + mnid + '&s=' + onboardingId + '&r=' + serialNumber
qrcode.QRCode(box_size=10, border=4)
img = qrcode.make(qrUrl)
img.save(serialNumber + '.png')
Download Your Onboarding Profile
Your device must have an onboarding_config.json
file before connecting to SmartThings. This file is generated automatically once requirements for Deploy to Test have been met and deployment is complete. You can download the file from the Overview page in the Developer Workspace and install the file on your device to proceed with testing.
If using a sample Device application from the examples Git repo, download your onboarding_config.json
and replace the sample config file found in the main
directory of the sample device.
After completing all registration steps and making any necessary changes to your device integration, you are now ready to test your Device .