This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "dth", | |
"dashboard": { | |
"states": [ | |
{ | |
"component": "main", | |
"capability": "switch", | |
"version": 1, | |
"values": [], | |
"patch": [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const RESTrequest = require('request'); | |
/* | |
* Create Subscription Request | |
*/ | |
let subscription = { | |
"sourceType": "CAPABILITY", | |
"capability": { | |
"locationId": "xxxxx-xxxx-xxxx-xxxx", | |
"capability": "switch", | |
"attribute": "switch", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* largeTextSolution | |
* | |
* Copyright 2020 Smart Things | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2016 David Lomas (codersaur) | |
* | |
* Name: Evohome (Connect) | |
* | |
* Author: David Lomas (codersaur) | |
* | |
* Date: 2016-04-05 | |
* | |
* Version: 0.08 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const SmartApp = require('@smartthings/smartapp'); | |
require('dotenv').config(); | |
const server = module.exports = express(); | |
server.use(bodyParser.json()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {SchemaConnector, DeviceErrorTypes} = require('st-schema'); | |
const deviceStates = { switch: 'off',switch2: 'off', temperature: 40, humidity:80, healthStatus:'online', healthStatus2:'online',listElement:'monthFlow'}//1-10 | |
const connector = new SchemaConnector() | |
.enableEventLogging(2) | |
.discoveryHandler((accessToken, response) => { | |
const d = response.addDevice('st-schema-component', 'st-schema-component', 'e0c682fd-46d9-4fee-8bdd-9edc5da7e053') | |
//Device manufacturer | |
d.manufacturerName('xxxx'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
//definition | |
{ | |
"id": "xxxx.customlock", | |
"version": 1, | |
"status": "proposed", | |
"name": "customlock", | |
"attributes": { | |
"lockstate": { | |
"schema": { | |
"type": "object", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Automation w custom capabilities", | |
"actions": [ | |
{ | |
"if": { | |
"greaterThan": { | |
"left": { | |
"device": { | |
"devices": [ | |
"device-id" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const SmartApp = require('@smartthings/smartapp'); | |
require('dotenv').config(); | |
const server = module.exports = express(); | |
server.use(bodyParser.json()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "dth", | |
"dashboard": { | |
"states": [ | |
{ | |
"component": "main", | |
"capability": "temperatureMeasurement", | |
"version": 1, | |
"values": [], | |
"patch": [] |
OlderNewer