This is a simple library to make declaring Smart App lifecycle handlers as Spring components easy.
- Java 1.8+
- Spring 4+
- smartapp-core
- SmartThings developer account
Include the smartapp-core
Maven dependency:
<dependency>
<groupId>com.smartthings.sdk</groupId>
<artifactId>smartapp-spring</artifactId>
<version>0.0.4-PREVIEW</version>
</dependency>
If you're using Gradle:
dependencies {
compile 'com.smartthings.sdk:smartapp-spring:0.0.4-PREVIEW'
}
If you do not use Maven or Gradle, jars can be downloaded from the central Maven repository.
This simple library adds to smartapp-core by giving you the ability to create a SmartAppDefinition
using handlers defined as components. To do this, you simply call SpringSmartAppDefinition.of
and give it your ApplicationContext
.
SmartAppDefinition smartAppDefinition = SpringSmartAppDefinition.of(applicationContext);
For a complete example, see Java Spring Boot example SmartApp.
If you are not familiar with SmartThings, we have extensive on-line documentation.
To create and manage your services and devices on SmartThings, create an account in the developer workspace.
The SmartThings Community is a good place share and ask questions.
There is also a SmartThings reddit community where you can read and share information.
Licensed under the Apache License, Version 2.0
Copyright 2019 SmartThings, Inc.