View testEffectCap.txt
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": [] |
View snippet.js
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", |
View groovySmartApp.groovy
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 | |
* |
View EvohomeSmartApp.groovy
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 |
View server.js
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()); |
View connector.js
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'); |
View capability.jsonc
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", |
View rule.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
{ | |
"name": "Automation w custom capabilities", | |
"actions": [ | |
{ | |
"if": { | |
"greaterThan": { | |
"left": { | |
"device": { | |
"devices": [ | |
"device-id" |
View server.js
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()); |
View device_config.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