Skip to content

Instantly share code, notes, and snippets.

View nayelyzarazua-bluetrail's full-sized avatar

Nayely Zarazua nayelyzarazua-bluetrail

View GitHub Profile
/**
* roomsList
*
* 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
*
### Keybase proof
I hereby claim:
* I am nayelyzarazua-bluetrail on github.
* I am nayelyzbluetrail (https://keybase.io/nayelyzbluetrail) on keybase.
* I have a public key ASD8C01qYVtsgqO7q_4YyJ7tvDN5OWn8qW06h2ZXAoyFoAo
To claim this, I am signing this object:
@nayelyzarazua-bluetrail
nayelyzarazua-bluetrail / device_config.json
Created January 29, 2021 17:27
DashboardView_stateAction_2capabilities
{
"dashboard": {
"states": [
{
"component": "main",
"capability": "temperatureMeasurement",
"version": 1,
"values": [],
"patch": []
}
{
"name": "customThermostatMode",
"attributes": {
"thermostatMode": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string"
}
@nayelyzarazua-bluetrail
nayelyzarazua-bluetrail / child_switch.groovy
Last active February 16, 2021 15:10
CompositeDevice_MultiSwitch
/*
* VIRTUAL SWITCH - CHILD DEVICE OF multipleSwitchDev
*/
metadata
{
definition( name: 'Virtual Switch', namespace: 'nayelyz', author: 'Nayely',deviceTypeId:'Switch',ocfDeviceType:'oic.d.switch', mnmn: 'SmartThingsCommunity', vid: '30ad6f88-acb3-3e11-8186-5b7f804b0c71' )
{
capability 'Switch'
capability 'Health Check'
{
"dashboard": {
"states": [
{
"component": "main",
"capability": "temperatureMeasurement",
"version": 1,
"values": [],
"patch": []
}
@nayelyzarazua-bluetrail
nayelyzarazua-bluetrail / smartapp.js
Created February 25, 2021 01:34
SmartApp_DynamicInputsPersistance
'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());
@nayelyzarazua-bluetrail
nayelyzarazua-bluetrail / DynamicInputsDelete.js
Created March 2, 2021 21:28
SmartApp_DynamicInputsDelete
'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());
/**
* Test DTH for custom capabilities >>>> waterFlowHighestRate
*/
metadata {
definition (name: "testwaterFlowHighestRate2", vid:"4a5086e4-393f-39e1-9d28-1ca0df09729b", mnmn: "SmartThingsCommunity", author: "Nayely") {
capability "schoolwater29967.waterFlowHighestRate"
}
simulator {}
@nayelyzarazua-bluetrail
nayelyzarazua-bluetrail / server.js
Last active April 1, 2021 18:23
SmartAppConnector-sample
'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