• Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    C
  • License
    Other
  • Created about 5 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SmartThings SDK for Direct Connected Devices for C

SmartThings SDK for Direct Connected Devices for C

License

The SmartThings SDK for Direct Connected Devices for C is the IoT core device library that allow device applications to securely connect to the SmartThings Cloud. To facilitate the development of device application in your original chipset SDK that installed before, we provide this core device library as a separate repository. You may simply link it to develop a device application in your existing development environment.

We also provide examples so that so that you can refer to how this core device library can be linked in existing original chipset SDKs and device applications can be developed.

It is distributed in source form and written in C99 for the purpose of portability to most platforms.

Main features

This core device library provides the following features :

  • Customized MQTT in order to reduce memory consumption and enhance stability
  • Easy and efficient APIs
    • Connection APIs : You can do onboarding & MQTT connection by just calling only a few these APIs.
    • Capability APIs : More than hundred different capabilities can be implemented as only a few APIs.

How to get started?

This core device library includes platform-dependent parts that should be built in a specific toolchain or SDK. That is, if you do NOT use the pre-porting environment, you must first port them to the appropriate environment.

After porting, you can use this library completely under the specific environment. For more information on detailed workflow below, please refer to the Getting Started. Maybe, we think it's more helpful to you

  • Register a Device on Developer Workspace
  • Develop a Device Application

Porting SmartThings SDK for Direct Connected Devices for C

This core device library has platform-dependent directories. In current SDK version, those that must be ported are present in src/port/bsp, src/port/net and src/port/os. By default, we have already provided several implementations based on some operating systems(e.g. FreeRTOS, LINUX) and chipsets(e.g. ESPRESSIF, REALTEK, Raspberry Pi). These porting examples in those directories make it easier for you to port to additional chipsets and operating systems.

For instructions on how to port this SDK, please see the Porting Guide.

Building SmartThings SDK for Direct Connected Devices for C

This core device library should be built according to the chipset development environment to be applied. If this environment is not ready yet, you can build it in the POSIX environment based on Ubuntu as shown below.

But, unlike the resource limited MCU devices, you can NOT check the onboarding process in the POSIX environment because it does not support a SoftAP function by default. Therefore, as a starting point of this SDK, we strongly recommend that you build one of the MCU device examples provided in example directory to use all features without limitations.

Prerequisites

Basically, you can build this core device library through cmake in the Ubuntu.

  • sudo apt-get install libssl-dev libpthread-stubs0-dev

Build

  1. Clone the source code.

    • Download the source code via git clone.

      $ git clone https://github.com/SmartThingsCommunity/st-device-sdk-c.git
  2. Build a POSIX example application.

    • Go to a example directory and then build.

      $ cd st-device-sdk-c/example/posix
      $ cmake -B build
      $ cd build
      $ make

Learn more

For more information, please review the following documents:

  • Getting Started : It covers the overall workflow and detailed steps for starters to work with SDK.
  • API References : It provide all API reference that SDK offers.
  • Commercialization Guide : It provides guide for ones who consider commercializing their IoT products with SDK.
  • Capabilities Reference : This page serves as a reference for the supported capabilities.
  • Developer Workspace : It provides functions related to device information registration and device integration in the SmartThings cloud.

Contact

If you have any issue, or want to commercialize your IoT devices using this SDK, please contact [email protected] or open new issue.

License

This library is licensed under the Apache License Ver2.0.

More Repositories

1

SmartThingsPublic

SmartThings open-source DeviceType Handlers and SmartApps code
Groovy
2,556
star
2

SmartThingsEdgeDrivers

Lua
256
star
3

smartthings-cli

Command-line Interface for the SmartThings APIs.
TypeScript
233
star
4

smartapp-sdk-nodejs

Javascript/NodeJS SDK to create SmartThings SmartApps
JavaScript
142
star
5

st-device-sdk-c-ref

SmartThings SDK Reference for Direct Connected Devices for C
C
124
star
6

smartthings-core-sdk

SDK for calling the SmartThings API from JavaScript and TypeScript applications
TypeScript
113
star
7

Code

DEPRECATED A collection of code examples from the SmartThings team, and the community
Groovy
81
star
8

weather-color-light-smartapp-nodejs

This SmartApp sets the color of a light based on the weather forecast.
JavaScript
56
star
9

smartapp-sdk-java

A collection of consumer-oriented Java (JVM) libraries for creating SmartApps and using the public API
Java
50
star
10

cli-example-nodejs

An example CLI to interact with SmartThings-connected devices, written in Node.js
JavaScript
37
star
11

st-schema-nodejs

ST Schema helper library for NodeJS
JavaScript
36
star
12

app-examples

JavaScript
12
star
13

example-lifx-nodejs-web-connector

LIFX C2C connector implementation as NodeJS web service
JavaScript
12
star
14

st-schema-connectors

Example connectors written for ST Schema
JavaScript
10
star
15

api-app-subscription-example-js

Example API Access SmartApp that shows the state and allows control of devices
JavaScript
9
star
16

api-app-minimal-example-js

Simple API Access integration that allows scenes to be executed
JavaScript
8
star
17

st-schema-oauth-example

Compete ST Schema connector example including OAuth server and virtual device web app
JavaScript
8
star
18

dynamodb-context-store-nodejs

Stores SmartApp configuration and auth tokens for use in app-initiated calls
JavaScript
7
star
19

acme-control-panel-example

Example SmartApp that creates C2C devices as well as providing scene and device control
JavaScript
7
star
20

generator-smartthings

Yeoman generator to bootstrap a SmartThings Cloud SDK-based app
JavaScript
6
star
21

MyCloudToCloudSchemaConnection

JavaScript
5
star
22

homebrew-smartthings

Ruby
4
star
23

smartapp-example-no-devices-nodejs-lambda

Give Lambda SmartApps a try without any physical devices.
JavaScript
4
star
24

smartapp-example-open-close-nodets

The Typescript version of the Open/Close example SmartApp.
TypeScript
3
star
25

example-lifx-lambda-connector

Imports LIFX devices into SmartThings
JavaScript
3
star
26

edge-cli-plugin

TypeScript
3
star
27

st-schema-simple-example-js

Very simple ST-Schema connector that creates one device
JavaScript
2
star
28

smartapp-example-every-setting-nodejs

This SmartApp has multiple configuration pages that contain examples of all setting types.
JavaScript
2
star
29

firestore-context-store-nodejs

Stores SmartApp configuration and auth tokens for use in app-initiated calls
JavaScript
2
star
30

github-actions

A library of reusable workflows
2
star
31

st-schema-callback-example-js

ST Schema virtual device example with proactive state updates
JavaScript
2
star
32

file-context-store-nodejs

File-based context store for SmartApps
JavaScript
1
star
33

device-scene-example-nodejs

Example SmartApp that stores installed app context makes callback to the SmartThings platform
JavaScript
1
star
34

slack-nodejs-workshop

JavaScript
1
star
35

smartapp-example-open-close-nodejs

This SmartApp turns on and off a light when something opens and closes.
JavaScript
1
star
36

drlc-prototype

JavaScript
1
star
37

dummy-oauth-server

OAuth2 server intended for testing clients, especially ST Schema connectors
1
star