Has anyone made an Iris/Linear Garage door opener work with Hubitat yet? I tried the generic Garage door opener drive and it does not want to work.
here is the code that works in ST any help would be appreciated.
/**
* Z-Wave Garage Door Opener
* Z-Wave Garage Door Opener Modified for GD00Z by @Garyd, Copied and modifed by @Ron
*
* Copyright 2014 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
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
*
*
*
*
* Sample Battery Cmd Message ?
* cmd=NotificationReport(event: 74, eventParameter: [1], eventParametersLength: 1, notificationStatus: 255,
* notificationType: 6, reserved61: 0, sequence: false, v1AlarmLevel: 0,
* v1AlarmType: 0, zensorNetSourceNodeId: 0)
*/
preferences {
input name: "enableSwitch", type: "enum", title: "Enable Switch Capability?", options: ["Disabled","On=Open","On=Close"], description: "Enable Switch Capability?", required: false
}
metadata {
definition(name: "RG Linear GD00Z Garage Door Opener - V2", namespace: "gouldner", author: "Ronald Gouldner") {
capability "Actuator"
capability "Door Control"
capability "Contact Sensor"
capability "Refresh"
capability "Sensor"
capability "Polling"
capability "Switch"
capability "Momentary"
capability "Relay Switch"
capability "Garage Door Control"
capability "Battery"
attribute "lastBatteryStatus", "STRING"
//attribute "batteryStatus", "STRING"
command "batteryReset"
fingerprint deviceId:"0x4007", inClusters:"0x72 0x98 0x5A"
}
simulator {
status "closed": "command: 9881, payload: 00 66 03 00"
status "opening": "command: 9881, payload: 00 66 03 FE"
status "open": "command: 9881, payload: 00 66 03 FF"
status "closing": "command: 9881, payload: 00 66 03 FC"
status "unknown": "command: 9881, payload: 00 66 03 FD"
reply "988100660100": "command: 9881, payload: 00 66 03 FC"
reply "9881006601FF": "command: 9881, payload: 00 66 03 FE"
}
tiles {
standardTile("toggle", "device.door", width: 2, height: 2) {
state("unknown", label: '${name}', action: "refresh.refresh", icon: "st.doors.garage.garage-open", backgroundColor: "#ffa81e")
state("closed", label: '${name}', action: "door control.open", icon: "st.doors.garage.garage-closed", backgroundColor: "#79b821", nextState: "opening")
state("open", label: '${name}', action: "door control.close", icon: "st.doors.garage.garage-open", backgroundColor: "#ffa81e", nextState: "closing")
state("opening", label: '${name}', icon: "st.doors.garage.garage-opening", backgroundColor: "#ffe71e")
state("closing", label: '${name}', icon: "st.doors.garage.garage-closing", backgroundColor: "#ffe71e")
}
/* Display only tile no longer needed in V2 APP, Keeping tile in case they change the app again and I want it back
standardTile("displayOnly", "device.door", width: 1, height: 1) {
state("unknown", label: '${name}', icon: "st.doors.garage.garage-open", backgroundColor: "#ffa81e")
state("closed", label: '${name}', icon: "st.doors.garage.garage-closed", backgroundColor: "#79b821")
state("open", label: '${name}', icon: "st.doors.garage.garage-open", backgroundColor: "#ffa81e")
state("opening", label: '${name}', icon: "st.doors.garage.garage-opening", backgroundColor: "#ffe71e")
state("closing", label: '${name}', icon: "st.doors.garage.garage-closing", backgroundColor: "#ffe71e")
}
*/
standardTile("open", "device.door", inactiveLabel: false, decoration: "flat") {
state "default", label: 'open', action: "door control.open", icon: "st.doors.garage.garage-opening"
}
standardTile("close", "device.door", inactiveLabel: false, decoration: "flat") {
state "default", label: 'close', action: "door control.close", icon: "st.doors.garage.garage-closing"
}
standardTile("refresh", "device.door", inactiveLabel: false, decoration: "flat") {
state "default", label: '', action: "refresh.refresh", icon: "st.secondary.refresh"
}
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat") {
state "battery", label: 'Battery ${currentValue}%', unit: "%"
}
// Last lastBatteryStatus Tile
valueTile("lastBatteryStatus", "device.lastBatteryStatus", inactiveLabel: false, decoration: "flat") {
state "lastBatteryStatus", label:'${currentValue}', unit:""
}
valueTile("batteryReset", "device.battery", inactiveLabel: false, decoration: "flat") {
state "default", label: 'Battery\nReset', action: "batteryReset"
}
standardTile("button", "device.switch", width: 1, height: 1, canChangeIcon: true) {
state "off", label: 'Off', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff", nextState: "on"
state "on", label: 'On', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#79b821", nextState: "off"
}
standardTile("version", "device.version", inactiveLabel: false, decoration: "flat") {
state "version", label: 'v2.2'
}
main(["toggle"])
details(["toggle", "open", "close", "lastBatteryStatus", "battery", "batteryReset", "button", "refresh","version"])
}
}
import physicalgraph.zwave.commands.barrieroperatorv1.*
def parse(String description) {
def result = null
if (description.startsWith("Err")) {
if (state.sec) {
result = createEvent(descriptionText: description, displayed: false)
} else {
result = createEvent(
descriptionText: "This device failed to complete the network security key exchange. If you are unable to control it via SmartThings, you must remove it from your network and add it again.",
eventType: "ALERT",
name: "secureInclusion",
value: "failed",
displayed: true,
)
}
} else {
def cmd = zwave.parse(description, [0x98: 1, 0x72: 2])
if (cmd) {
result = zwaveEvent(cmd)
}
}
log.debug "\"$description\" parsed to ${result.inspect()}"
result
}
def zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation cmd) {
def encapsulatedCommand = cmd.encapsulatedCommand([0x71: 3, 0x80: 1, 0x85: 2, 0x63: 1, 0x98: 1])
log.debug "encapsulated: $encapsulatedCommand"
if (encapsulatedCommand) {
zwaveEvent(encapsulatedCommand)
}
}
def zwaveEvent(physicalgraph.zwave.commands.securityv1.NetworkKeyVerify cmd) {
createEvent(name: "secureInclusion", value: "success", descriptionText: "Secure inclusion was successful")
}
def zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityCommandsSupportedReport cmd) {
state.sec = cmd.commandClassSupport.collect { String.format("%02X ", it) }.join()
if (cmd.commandClassControl) {
state.secCon = cmd.commandClassControl.collect { String.format("%02X ", it) }.join()
}
log.debug "Security command classes: $state.sec"
createEvent(name: "secureInclusion", value: "success", descriptionText: "$device.displayText is securely included")
}
def zwaveEvent(BarrierOperatorReport cmd) {
def result = []
def map = [name: "door"]
def switchMap = [name: "switch"]
switch (cmd.barrierState) {
case BarrierOperatorReport.BARRIER_STATE_CLOSED:
map.value = "closed"
result << createEvent(name: "contact", value: "closed", displayed: false)
result << createEvent(name: "switch", value: "off", displayed: false)
break
case BarrierOperatorReport.BARRIER_STATE_UNKNOWN_POSITION_MOVING_TO_CLOSE:
map.value = "closing"
break
case BarrierOperatorReport.BARRIER_STATE_UNKNOWN_POSITION_STOPPED:
map.descriptionText = "$device.displayName door state is unknown"
map.value = "unknown"
break
case BarrierOperatorReport.BARRIER_STATE_UNKNOWN_POSITION_MOVING_TO_OPEN:
map.value = "opening"
break
case BarrierOperatorReport.BARRIER_STATE_OPEN:
map.value = "open"
result << createEvent(name: "contact", value: "open", displayed: false)
result << createEvent(name: "switch", value: "on", displayed: false)
break
}
result + createEvent(map)
}
def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cmd) {
log.debug "Aquiring Notification Report cmd=$cmd"
def result = []
def map = [:]
if (cmd.notificationType == 6) {
map.displayed = true
switch (cmd.event) {
case 0x40:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName performing initialization process"
} else {
map.descriptionText = "$device.displayName initialization process complete"
}
break
case 0x41:
map.descriptionText = "$device.displayName door operation force has been exceeded"
break
case 0x42:
map.descriptionText = "$device.displayName motor has exceeded operational time limit"
break
case 0x43:
map.descriptionText = "$device.displayName has exceeded physical mechanical limits"
break
case 0x44:
map.descriptionText = "$device.displayName unable to perform requested operation (UL requirement)"
break
case 0x45:
map.descriptionText = "$device.displayName remote operation disabled (UL requirement)"
break
case 0x46:
map.descriptionText = "$device.displayName failed to perform operation due to device malfunction"
break
case 0x47:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName vacation mode enabled"
} else {
map.descriptionText = "$device.displayName vacation mode disabled"
}
break
case 0x48:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName safety beam obstructed"
} else {
map.descriptionText = "$device.displayName safety beam obstruction cleared"
}
break
case 0x49:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName door sensor ${cmd.eventParameter[0]} not detected"
} else {
map.descriptionText = "$device.displayName door sensor not detected"
}
break
case 0x4A:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName door sensor ${cmd.eventParameter[0]} has a low battery"
} else {
map.descriptionText = "$device.displayName door sensor has a low battery"
}
result << createEvent(name: "battery", value: 1, descriptionText: map.descriptionText)
def now=new Date()
def tz = location.timeZone
def nowString = "Low:" + now.format("MMM/dd HH:mm",tz)
result << createEvent(name:"lastBatteryStatus", value:nowString, descriptionText: map.descriptionText)
break
case 0x4B:
map.descriptionText = "$device.displayName detected a short in wall station wires"
break
case 0x4C:
map.descriptionText = "$device.displayName is associated with non-Z-Wave remote control"
break
default:
map.descriptionText = "$device.displayName: access control alarm $cmd.event"
map.displayed = false
break
}
} else if (cmd.notificationType == 7) {
switch (cmd.event) {
case 1:
case 2:
map.descriptionText = "$device.displayName detected intrusion"
break
case 3:
map.descriptionText = "$device.displayName tampering detected: product cover removed"
break
case 4:
map.descriptionText = "$device.displayName tampering detected: incorrect code"
break
case 7:
case 8:
map.descriptionText = "$device.displayName detected motion"
break
default:
map.descriptionText = "$device.displayName: security alarm $cmd.event"
map.displayed = false
}
} else if (cmd.notificationType) {
map.descriptionText = "$device.displayName: alarm type $cmd.notificationType event $cmd.event"
} else {
map.descriptionText = "$device.displayName: alarm $cmd.v1AlarmType is ${cmd.v1AlarmLevel == 255 ? 'active' : cmd.v1AlarmLevel ?: 'inactive'}"
}
result ? [createEvent(map), *result] : createEvent(map)
}
// RRG 1/8/2016
// This never gets called, I am pretty sure Linear doesn't support betteryGet
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
log.debug "Battery Reporting cmd=$cmd"
def map = [name: "battery", unit: "%"]
if (cmd.batteryLevel == 0xFF) {
map.value = 1
log.debug "Battery Level=low=1"
map.descriptionText = "$device.displayName has a low battery"
} else {
log.debug "Battery Level=cmd.batteryLevel"
map.value = cmd.batteryLevel
}
state.lastbatt = new Date().time
createEvent(map)
}
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
def result = []
def msr = String.format("%04X-%04X-%04X", cmd.manufacturerId, cmd.productTypeId, cmd.productId)
log.debug "msr: $msr"
updateDataValue("MSR", msr)
result << createEvent(descriptionText: "$device.displayName MSR: $msr", isStateChange: false)
result
}
def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd) {
log.debug "cmd:$cmd"
def fw = "${cmd.applicationVersion}.${cmd.applicationSubVersion}"
updateDataValue("fw", fw)
def text = "$device.displayName: firmware version: $fw, Z-Wave version: ${cmd.zWaveProtocolVersion}.${cmd.zWaveProtocolSubVersion}"
createEvent(descriptionText: text, isStateChange: false)
}
def zwaveEvent(physicalgraph.zwave.commands.applicationstatusv1.ApplicationBusy cmd) {
def msg = cmd.status == 0 ? "try again later" :
cmd.status == 1 ? "try again in $cmd.waitTime seconds" :
cmd.status == 2 ? "request queued" : "sorry"
createEvent(displayed: true, descriptionText: "$device.displayName is busy, $msg")
}
def zwaveEvent(physicalgraph.zwave.commands.powerlevelv1.PowerlevelReport cmd) {
log.debug "Power Level Report cmd=$cmd"
createEvent(displayed: true, descriptionText: "$device.displayName rejected the last request")
}
def zwaveEvent(physicalgraph.zwave.commands.applicationstatusv1.ApplicationRejectedRequest cmd) {
createEvent(displayed: true, descriptionText: "$device.displayName rejected the last request")
}
def zwaveEvent(physicalgraph.zwave.commands.applicationcapabilityv1.CommandCommandClassNotSupported cmd) {
log.debug "Command Class Not Supported cmd:$cmd"
}
def zwaveEvent(physicalgraph.zwave.Command cmd) {
createEvent(displayed: false, descriptionText: "$device.displayName: $cmd")
}
def open() {
secure(zwave.barrierOperatorV1.barrierOperatorSet(requestedBarrierState: BarrierOperatorSet.REQUESTED_BARRIER_STATE_OPEN))
}
def close() {
secure(zwave.barrierOperatorV1.barrierOperatorSet(requestedBarrierState: BarrierOperatorSet.REQUESTED_BARRIER_STATE_CLOSE))
}
def on() {
log.debug "on() was called treat this like Open"
open()
}
def off() {
log.debug "off() was called treat like Close"
close()
}
def refresh() {
//secure(zwave.barrierOperatorV1.barrierOperatorGet())
/* BatteryGet and NotificationGet not working */
log.debug "Issuing Refresh (barrier state, and version report to log)"
log.debug "Preferences are set as follows"
log.debug "enableSwitch:$enableSwitch"
secureSequence([
zwave.barrierOperatorV1.barrierOperatorGet()
,zwave.versionV1.versionGet()
//,zwave.batteryV1.batteryGet()
//,zwave.powerlevelV1.powerlevelGet()
,zwave.notificationV3.notificationGet()
//,zwave.notificationV3.notificationSupportedGet()
], 4200)
/* */
}
def poll() {
secure(zwave.barrierOperatorV1.barrierOperatorGet())
}
def batteryReset() {
log.debug "Battery Reset"
def now=new Date()
def tz = location.timeZone
def nowString = "RESET:" + now.format("MMM/dd HH:mm",tz)
sendEvent("name": "battery", "value":100, "descriptionText":"Battery Reset to OK")
sendEvent("name":"lastBatteryStatus", "value":nowString)
}
def push() {
// get the current "door" attribute value
//
// For some reason, I can't use "device.doorState" or just "doorState". Not sure why not.
def lastValue = device.latestValue("door");
// if its open, then close the door
if (lastValue == "open") {
return close()
// if its closed, then open the door
} else if (lastValue == "closed") {
return open()
} else {
log.debug "push() called when door state is $lastValue - there's nothing push() can do"
}
}
private secure(physicalgraph.zwave.Command cmd) {
zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd).format()
}
private secureSequence(commands, delay = 200) {
delayBetween(commands.collect { secure(it) }, delay)
}
it also works with the ST Zwave garage door opener DH
/**
* Z-Wave Garage Door Opener
*
* Copyright 2014 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
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
*
*/
metadata {
definition (name: "Z-Wave Garage Door Opener", namespace: "smartthings", author: "SmartThings") {
capability "Actuator"
capability "Door Control"
capability "Garage Door Control"
capability "Health Check"
capability "Contact Sensor"
capability "Refresh"
capability "Sensor"
fingerprint deviceId: "0x4007", inClusters: "0x98"
fingerprint deviceId: "0x4006", inClusters: "0x98"
fingerprint mfr:"014F", prod:"4744", model:"3030", deviceJoinName: "Linear GoControl Garage Door Opener"
}
simulator {
status "closed": "command: 9881, payload: 00 66 03 00"
status "opening": "command: 9881, payload: 00 66 03 FE"
status "open": "command: 9881, payload: 00 66 03 FF"
status "closing": "command: 9881, payload: 00 66 03 FC"
status "unknown": "command: 9881, payload: 00 66 03 FD"
reply "988100660100": "command: 9881, payload: 00 66 03 FC"
reply "9881006601FF": "command: 9881, payload: 00 66 03 FE"
}
tiles {
standardTile("toggle", "device.door", width: 2, height: 2) {
state("unknown", label:'${name}', action:"refresh.refresh", icon:"st.doors.garage.garage-open", backgroundColor:"#ffffff")
state("closed", label:'${name}', action:"door control.open", icon:"st.doors.garage.garage-closed", backgroundColor:"#00a0dc", nextState:"opening")
state("open", label:'${name}', action:"door control.close", icon:"st.doors.garage.garage-open", backgroundColor:"#e86d13", nextState:"closing")
state("opening", label:'${name}', icon:"st.doors.garage.garage-opening", backgroundColor:"#e86d13")
state("closing", label:'${name}', icon:"st.doors.garage.garage-closing", backgroundColor:"#00a0dc")
}
standardTile("open", "device.door", inactiveLabel: false, decoration: "flat") {
state "default", label:'open', action:"door control.open", icon:"st.doors.garage.garage-opening"
}
standardTile("close", "device.door", inactiveLabel: false, decoration: "flat") {
state "default", label:'close', action:"door control.close", icon:"st.doors.garage.garage-closing"
}
standardTile("refresh", "device.door", inactiveLabel: false, decoration: "flat") {
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
}
main "toggle"
details(["toggle", "open", "close", "refresh"])
}
}
import physicalgraph.zwave.commands.barrieroperatorv1.*
def installed(){
// Device-Watch simply pings if no device events received for 32min(checkInterval)
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
}
def updated(){
// Device-Watch simply pings if no device events received for 32min(checkInterval)
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
}
def parse(String description) {
def result = null
if (description.startsWith("Err")) {
if (state.sec) {
result = createEvent(descriptionText:description, displayed:false)
} else {
result = createEvent(
descriptionText: "This device failed to complete the network security key exchange. If you are unable to control it via SmartThings, you must remove it from your network and add it again.",
eventType: "ALERT",
name: "secureInclusion",
value: "failed",
displayed: true,
)
}
} else {
def cmd = zwave.parse(description, [ 0x98: 1, 0x72: 2 ])
if (cmd) {
result = zwaveEvent(cmd)
}
}
log.debug "\"$description\" parsed to ${result.inspect()}"
result
}
def zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation cmd) {
def encapsulatedCommand = cmd.encapsulatedCommand([0x71: 3, 0x80: 1, 0x85: 2, 0x63: 1, 0x98: 1])
log.debug "encapsulated: $encapsulatedCommand"
if (encapsulatedCommand) {
zwaveEvent(encapsulatedCommand)
}
}
def zwaveEvent(physicalgraph.zwave.commands.securityv1.NetworkKeyVerify cmd) {
createEvent(name:"secureInclusion", value:"success", descriptionText:"Secure inclusion was successful")
}
def zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityCommandsSupportedReport cmd) {
state.sec = cmd.commandClassSupport.collect { String.format("%02X ", it) }.join()
if (cmd.commandClassControl) {
state.secCon = cmd.commandClassControl.collect { String.format("%02X ", it) }.join()
}
log.debug "Security command classes: $state.sec"
createEvent(name:"secureInclusion", value:"success", descriptionText:"$device.displayText is securely included")
}
def zwaveEvent(BarrierOperatorReport cmd) {
def result = []
def map = [ name: "door" ]
switch (cmd.barrierState) {
case BarrierOperatorReport.BARRIER_STATE_CLOSED:
map.value = "closed"
result << createEvent(name: "contact", value: "closed", displayed: false)
break
case BarrierOperatorReport.BARRIER_STATE_UNKNOWN_POSITION_MOVING_TO_CLOSE:
map.value = "closing"
break
case BarrierOperatorReport.BARRIER_STATE_UNKNOWN_POSITION_STOPPED:
map.descriptionText = "$device.displayName door state is unknown"
map.value = "unknown"
break
case BarrierOperatorReport.BARRIER_STATE_UNKNOWN_POSITION_MOVING_TO_OPEN:
map.value = "opening"
result << createEvent(name: "contact", value: "open", displayed: false)
break
case BarrierOperatorReport.BARRIER_STATE_OPEN:
map.value = "open"
result << createEvent(name: "contact", value: "open", displayed: false)
break
}
result + createEvent(map)
}
def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cmd) {
def result = []
def map = [:]
if (cmd.notificationType == 6) {
map.displayed = true
switch(cmd.event) {
case 0x40:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName performing initialization process"
} else {
map.descriptionText = "$device.displayName initialization process complete"
}
break
case 0x41:
map.descriptionText = "$device.displayName door operation force has been exceeded"
break
case 0x42:
map.descriptionText = "$device.displayName motor has exceeded operational time limit"
break
case 0x43:
map.descriptionText = "$device.displayName has exceeded physical mechanical limits"
break
case 0x44:
map.descriptionText = "$device.displayName unable to perform requested operation (UL requirement)"
break
case 0x45:
map.descriptionText = "$device.displayName remote operation disabled (UL requirement)"
break
case 0x46:
map.descriptionText = "$device.displayName failed to perform operation due to device malfunction"
break
case 0x47:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName vacation mode enabled"
} else {
map.descriptionText = "$device.displayName vacation mode disabled"
}
break
case 0x48:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName safety beam obstructed"
} else {
map.descriptionText = "$device.displayName safety beam obstruction cleared"
}
break
case 0x49:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName door sensor ${cmd.eventParameter[0]} not detected"
} else {
map.descriptionText = "$device.displayName door sensor not detected"
}
break
case 0x4A:
if (cmd.eventParameter[0]) {
map.descriptionText = "$device.displayName door sensor ${cmd.eventParameter[0]} has a low battery"
} else {
map.descriptionText = "$device.displayName door sensor has a low battery"
}
result << createEvent(name: "battery", value: 1, unit: "%", descriptionText: map.descriptionText)
break
case 0x4B:
map.descriptionText = "$device.displayName detected a short in wall station wires"
break
case 0x4C:
map.descriptionText = "$device.displayName is associated with non-Z-Wave remote control"
break
default:
map.descriptionText = "$device.displayName: access control alarm $cmd.event"
map.displayed = false
break
}
} else if (cmd.notificationType == 7) {
switch (cmd.event) {
case 1:
case 2:
map.descriptionText = "$device.displayName detected intrusion"
break
case 3:
map.descriptionText = "$device.displayName tampering detected: product cover removed"
break
case 4:
map.descriptionText = "$device.displayName tampering detected: incorrect code"
break
case 7:
case 8:
map.descriptionText = "$device.displayName detected motion"
break
default:
map.descriptionText = "$device.displayName: security alarm $cmd.event"
map.displayed = false
}
} else if (cmd.notificationType){
map.descriptionText = "$device.displayName: alarm type $cmd.notificationType event $cmd.event"
} else {
map.descriptionText = "$device.displayName: alarm $cmd.v1AlarmType is ${cmd.v1AlarmLevel == 255 ? 'active' : cmd.v1AlarmLevel ?: 'inactive'}"
}
result ? [createEvent(map), *result] : createEvent(map)
}
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
def map = [ name: "battery", unit: "%" ]
if (cmd.batteryLevel == 0xFF) {
map.value = 1
map.descriptionText = "$device.displayName has a low battery"
} else {
map.value = cmd.batteryLevel
}
state.lastbatt = new Date().time
createEvent(map)
}
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
def result = []
def msr = String.format("%04X-%04X-%04X", cmd.manufacturerId, cmd.productTypeId, cmd.productId)
log.debug "msr: $msr"
updateDataValue("MSR", msr)
result << createEvent(descriptionText: "$device.displayName MSR: $msr", isStateChange: false)
result
}
def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd) {
def fw = "${cmd.applicationVersion}.${cmd.applicationSubVersion}"
updateDataValue("fw", fw)
def text = "$device.displayName: firmware version: $fw, Z-Wave version: ${cmd.zWaveProtocolVersion}.${cmd.zWaveProtocolSubVersion}"
createEvent(descriptionText: text, isStateChange: false)
}
def zwaveEvent(physicalgraph.zwave.commands.applicationstatusv1.ApplicationBusy cmd) {
def msg = cmd.status == 0 ? "try again later" :
cmd.status == 1 ? "try again in $cmd.waitTime seconds" :
cmd.status == 2 ? "request queued" : "sorry"
createEvent(displayed: true, descriptionText: "$device.displayName is busy, $msg")
}
def zwaveEvent(physicalgraph.zwave.commands.applicationstatusv1.ApplicationRejectedRequest cmd) {
createEvent(displayed: true, descriptionText: "$device.displayName rejected the last request")
}
def zwaveEvent(physicalgraph.zwave.Command cmd) {
createEvent(displayed: false, descriptionText: "$device.displayName: $cmd")
}
def open() {
secure(zwave.barrierOperatorV1.barrierOperatorSet(requestedBarrierState: BarrierOperatorSet.REQUESTED_BARRIER_STATE_OPEN))
}
def close() {
secure(zwave.barrierOperatorV1.barrierOperatorSet(requestedBarrierState: BarrierOperatorSet.REQUESTED_BARRIER_STATE_CLOSE))
}
/**
* PING is used by Device-Watch in attempt to reach the Device
* */
def ping() {
refresh()
}
def refresh() {
secure(zwave.barrierOperatorV1.barrierOperatorGet())
}
private secure(physicalgraph.zwave.Command cmd) {
zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd).format()
}
private secureSequence(commands, delay=200) {
delayBetween(commands.collect{ secure(it) }, delay)
}
I plan to work on this myself soon.
In the meantime you can try a simple edit to get this working on your own. Take the code you posted above and do a Find and Replace.
Find "physicalgraph"
Replace with “hubitat”
There’s a good chance that it will work…at least for basic functionality.
I have the Nortek/Linear/GoControl GD00Z-4 and it works fine with the Generic Z-Wave Garage Door Opener driver.
that is the newer version. I have the older Iris GD00Z and it did not work.
Oh bummer.
Does it pair? If so, check RM for custom commans maybe?
Dump the ST code in and modify the physicalgraph references to Hubitat and it should work.
Curious if anyone has gotten battery life to work on the remote door sensor?
Has anyone gotten this to work with the Iris model yet. Just got it to pair but it doesn’t respond to commands.
@keltymd1 any luck?
I did. had to pair mine and exclude it a few times then it worked
What driver did you use. The generic or one of the ones you posted above?
Wow…it took 5 resets and then it didn’t respond to the close command a few times. Does not instill confidence that this will work reliably.
Thanks for the advice…at least I got it communicating now.
mine works after all the adds so glad it worked for you too. I think there may be a bit of an issue with the functions for join and configure on a lot of devices but i could be wrong. I have been fighting an issue where my ZWave does not work at all for transmitting to sensors but it receives data fine. Everything was just working PERFECT for an hour and I clicked configure on a motion sensor now my entire network is down for transmitting to sensors and has been for 30 minutes. I think something is clogging the firmware on the hub but I am no coder so… well as i was typing it all starting working lets see if it stays. Funny it will hand and not send the data to the sensors for a configure command then eventually it sends and everything that should have happened during that time happens all at once.
Wow…sounds like you might need to reach out to support…especially if it’s taking down your whole mesh.
Btw…I’m not sure if you are using the “Other Hub” smartapps and drivers (lets you view and in some cases control your hubitat devices in the ST app i.e. remote control of devices)
If you are, then the first DTH you posted is better than the generic because it lets you control your opener with open/close and on/off commands. Only on/off are supported by “Other Hub” so it lets me control my garage door remotely. Just an FYI.
I have they think it is a bad device on my network causing it but I have removed EVERY powered device and the problem is still there with them removed.
Yeah i have all my devices except my harmony hubs moved over to Hubitat now. When it is nt giving that zwave issue it rocks man I love it.
Loving the responsiveness myself. Still waiting on Hue as well.
Check this out for partial Harmony integration. Going to try this soon myself.
https://community.hubitat.com/t/harmony-hub-integration/184/13?source_topic_id=368looks good but I am not sure what I can run the harmony API server on
Luckily I already have a Raspberry Pi that I used for Lutron picos on the ST platform. Since I no longer need it with Hubitat, I can transfer it’s purpose.