- Java Development Kit (JDK)
To install the appropriate JDK version for your Ubuntu system, go to the Ubuntu Web site and follow the detailed instructions for installing the Oracle® JDK version 8. - Package requirements for developing applications in Ubuntu
You must install the webkitgtk package. At the terminal prompt, enter the following command:$ sudo apt-get install libwebkitgtk-1.0-0
To install the Tizen Studio for RT:
- Accept the software license.
- Configure the installation directory.
- Install the Tizen Studio for RT.
- Install additional tools.
- Run the Tizen Studio for RT.
More details can find at Guide page.
You can create a new SmartThings project from remote Git repositories as well as local templates. To create a new project:
- When creating a project from a template, click the Check if you want Smart Things functionality check box when selecting a template:
- When importing a project from a Git repository, click the Check if you want Smart Things functionality check box:
You can use the Device/Resource Model Manager to select a device model for interworking with the SmartThings service.
With the Model Manager, you can:
- Check device, resource, and property information
- Select, add, and restore resources
- Import and export device models
- Generate stub code
The Model Manager is displayed while creating a new project with SmartThings functionality. If you want to access the Model Manager later again, in the Project Explorer view, right-click the project and select Manage ST-Things Resource.
To access information:
- Select a device model in the Device Name list of the Device/Platform section to see device, platform, and resource information.
- Select a resource in the left panel of the Resource/Property section to see the its description and property information.
- Select a property in the right panel of the Resource/Property section to see its description.
- Input your MNID assigned by SmartThings website. Refer to here.
You can select, add, and restore resources:
- To select all resources, click the checkbox on the Resource/Property toolbar.
- To add a new resource:
- To restore the resources, click Restore default. This restores the initial resource state of the device, deleting all changes that have been made.
To import a device model:
- Click Import on the Device/Platform toolbar.
- Select the JSON file containing the device model to be imported and click OK.
- The imported device shows up in the device list with the Custom type.
To export a device model:
- Select the model to be exported and click Export on the Device/Platform toolbar.
- The device model is exported ad a JSON file. Enter a file name for the exported model and click OK.
When you click Finish in the Model Manager, the code for processing the resource is automatically created for the selected device.
When the project is created, template code for the selected device and resources is automatically generated and opened for editing:
<common_handlers.c>
- Reset, ownership transfer, and status change handlers
- You need to write additional code for the functionality you want.
<resource_<uri>.c>
- Get and set handlers for a resource
- You need to write additional code for the functionality you want.
- Refet to annotation or TODO in the resource file.
<Makefile> and <Make.defs>
- Makefile for building the project
<st_things_main.c>, <things.c>, <things.h>
- Project initialization, handler registration, and main loop
If you edit the SmartThings resources in your project later on, the Model Manager automatically backs the existing source files with a .bak extension.
You must build your project before flashing or debugging it.
You can build a Tizen RT project in 2 ways: using a batch build or build project command.
To build your project using the batch build command:
- Select the project in the Project Explorer view.
- To build the selected project, use 1 of the following:
In the Tizen Studio for RT menu, select Project > Batch Build Project.
In the Tizen Studio for RT toolbar, click the Build TizenRT Project icon.
- In the Build TizenRT Project Wizard, select the board - artik053 - and build option - st_things - for building your project, and click OK.
You can check the build logs in the Console view.
To build your project using the build project command:
- In the Project Explorer view, select the project.
- In the Tizen Studio for RT toolbar, click the arrow next to the Build TizenRT Project icon and select Select Board.
- In the Select Board and PreDefine Option window, select the board - artik053 - and build option - st_things - for building your project, and click OK.
- In the Tizen Studio for RT toolbar, build the project by selecting Project > Build Project.
You can check the build logs in the Console view.