Update neo coolcam outlet
Ignore negative values DHT cleanup
This commit is contained in:
parent
a1f2b5a877
commit
e915eace80
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Neo Coolcam Outlet", namespace: "pgrondek", author: "Przemysław Grondek", ocfDeviceType: "oic.d.switch", runLocally: true, minHubCoreVersion: '000.017.0012', executeCommandsLocally: false, genericHandler: "Z-Wave") {
|
definition (name: "Neo Coolcam Outlet", namespace: "pgrondek", author: "Przemysław Grondek", ocfDeviceType: "oic.d.switch", /* runLocally: false, minHubCoreVersion: '000.017.0012', executeCommandsLocally: false, genericHandler: "Z-Wave" */) {
|
||||||
capability "Energy Meter"
|
capability "Energy Meter"
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Switch"
|
capability "Switch"
|
||||||
@ -87,18 +87,11 @@ def installed() {
|
|||||||
log.debug "installed()"
|
log.debug "installed()"
|
||||||
// Device-Watch simply pings if no device events received for 32min(checkInterval)
|
// Device-Watch simply pings if no device events received for 32min(checkInterval)
|
||||||
initialize()
|
initialize()
|
||||||
if (zwaveInfo?.mfr?.equals("0063") || zwaveInfo?.mfr?.equals("014F")) { // These old GE devices have to be polled. GoControl Plug refresh status every 15 min.
|
|
||||||
runEvery15Minutes("poll", [forceForLocallyExecuting: true])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def updated() {
|
def updated() {
|
||||||
// Device-Watch simply pings if no device events received for 32min(checkInterval)
|
// Device-Watch simply pings if no device events received for 32min(checkInterval)
|
||||||
initialize()
|
initialize()
|
||||||
if (zwaveInfo?.mfr?.equals("0063") || zwaveInfo?.mfr?.equals("014F")) { // These old GE devices have to be polled. GoControl Plug refresh status every 15 min.
|
|
||||||
unschedule("poll", [forceForLocallyExecuting: true])
|
|
||||||
runEvery15Minutes("poll", [forceForLocallyExecuting: true])
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
if (!state.MSR) {
|
if (!state.MSR) {
|
||||||
response(zwave.manufacturerSpecificV2.manufacturerSpecificGet().format())
|
response(zwave.manufacturerSpecificV2.manufacturerSpecificGet().format())
|
||||||
@ -139,7 +132,9 @@ def parse(String description) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def handleMeterReport(cmd){
|
def handleMeterReport(cmd){
|
||||||
|
log.debug("handleMeterReport")
|
||||||
if (cmd.meterType == 1) {
|
if (cmd.meterType == 1) {
|
||||||
|
if(cmd.scaledMeterValue >= 0 ){
|
||||||
if (cmd.scale == 0) {
|
if (cmd.scale == 0) {
|
||||||
createEvent(name: "energy", value: cmd.scaledMeterValue, unit: "kWh")
|
createEvent(name: "energy", value: cmd.scaledMeterValue, unit: "kWh")
|
||||||
} else if (cmd.scale == 1) {
|
} else if (cmd.scale == 1) {
|
||||||
@ -148,6 +143,7 @@ def handleMeterReport(cmd){
|
|||||||
createEvent(name: "power", value: Math.round(cmd.scaledMeterValue), unit: "W")
|
createEvent(name: "power", value: Math.round(cmd.scaledMeterValue), unit: "W")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd) {
|
||||||
|
Loading…
Reference in New Issue
Block a user