Compare commits

...

2 Commits

Author SHA1 Message Date
kathiresan
f3dbc37d96 Modifying 'NetworkScan' 2015-12-08 04:59:23 -06:00
kathiresan
48b5d0703e MSA-700: NetworkScanner Device Discovery 2015-11-24 03:43:53 -06:00

View File

@@ -0,0 +1,69 @@
/**
* SCANNER SMARTTHINGS APPS
*
* Copyright 2015 kathiresan
*
*/
definition(
name: "SCANNER SMARTTHINGS APPS",
namespace: "NetworkScanner",
author: "kathiresan",
description: "Network Scanner Smartthings Apps",
category: "My Apps",
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png",
iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png",
oauth: true)
preferences {
section("Title") {
// TODO: put inputs here
}
}
def installed() {
log.debug "Installed with settings: ${settings}"
def hub = location.hubs[0]
initialize()
log.debug "id: ${hub.id}"
log.debug "zigbeeId: ${hub.zigbeeId}"
log.debug "zigbeeEui: ${hub.zigbeeEui}"
// PHYSICAL or VIRTUAL
log.debug "type: ${hub.type}"
log.debug "name: ${hub.name}"
log.debug "firmwareVersionString: ${hub.firmwareVersionString}"
log.debug "localIp: ${hub.localIP}"
log.debug "localSrvPortTCP: ${hub.localSrvPortTCP}"
}
def updated() {
log.debug "Updated with settings: ${settings}"
unsubscribe()
initialize()
}
def initialize() {
// TODO: subscribe to attributes, devices, locations, etc.
}
mappings {
path("/HubInfo") {
action: [
GET: "hubInfo"
]
}
}
// returns a list like
// [[name: "kitchen lamp", value: "off"], [name: "bathroom", value: "on"]]
def hubInfo() {
def hub = location.hubs[0]
return "localIp: ${hub.localIP}"
}
// TODO: implement event handlers