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": "Sample for precondition", | |
"actions": [ | |
{ | |
"if":{ | |
"equals": { | |
"left":{ | |
"string": "pushed" | |
}, | |
"right":{ |
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 SmartApp = require('@smartthings/smartapp'); | |
const deviceStates = {switch: 'off'}//1-10 | |
module.exports = new SmartApp() | |
.appId('smartApp connector') | |
.disableCustomDisplayName(true) | |
.permissions(['w:devices:*', 'r:locations:*','x:devices:*', 'i:deviceprofiles:*', 'r:devices:*']) | |
.page('mainPage', (ctx, page, configData) => { | |
page.section('Device label:', section => { |
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 express = require('express'); | |
const bodyParser = require('body-parser'); | |
const SmartApp = require('@smartthings/smartapp'); | |
const { json } = require('body-parser'); | |
require('dotenv').config(); | |
const server = module.exports = express(); | |
server.use(bodyParser.json()); | |
const app = new SmartApp() |
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()); | |
const deviceStates = {switch: 'off'}//1-10 |
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
/** | |
* Test DTH for custom capabilities >>>> waterFlowHighestRate | |
*/ | |
metadata { | |
definition (name: "testwaterFlowHighestRate2", vid:"4a5086e4-393f-39e1-9d28-1ca0df09729b", mnmn: "SmartThingsCommunity", author: "Nayely") { | |
capability "schoolwater29967.waterFlowHighestRate" | |
} | |
simulator {} |
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
'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
/** | |
* Z-Wave Lock | |
* | |
* Copyright 2015 SmartThings | |
* | |
* 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
{ | |
"dashboard": { | |
"states": [ | |
{ | |
"component": "main", | |
"capability": "temperatureMeasurement", | |
"version": 1, | |
"values": [], | |
"patch": [] | |
} |