I cut/pasted the code into my hubitat and saw the same error. I looks like the " (quotes) were converted to left and right quotes as it was copied(paste as text). “alarm” vs “alarm”…
/**
*/
metadata {
definition (name: “Konnected Beep/Blink”, namespace: “konnected-io”, author: “konnected.io”, mnmn: “SmartThings”, vid: “generic-switch”) {
capability “Alarm”
capability “Switch”
capability “Actuator”
capability “Momentary”
capability “Tone”
}
preferences {
input name: “invertTrigger”, type: “bool”, title: “Low Level Trigger”,
description: “Select if the attached device or relay uses a low-level trigger. Default is high-level trigger”
// settings for momentary beep
input name: "beepDuration", type: "number", title: "Beep Pulse (ms)",
description: "Each beep or blink duration", range: "10..*"
input name: "beepPause", type: "number", title: "Beep Pause (ms)",
description: "Pause between beeps/blinks in milliseconds", range: "10..*"
input name: "beepRepeat", type: "number", title: "Beep Repeat",
description: "Times to repeat the pulse", range: "1..*"
// settings for infinately repeating alarm
input name: "alarmDuration", type: "number", title: "Alarm Pulse (ms)",
description: "Tone duration in alarm", range: "10..*"
input name: "alarmPause", type: "number", title: "Alarm Pause (ms)",
description: "Pause between tones in alarm", range: "10..*"
}
}
def updated() {
parent.updateSettingsOnDevice()
}
def updatePinState(Integer state) {
if (state == -1) { // represents an infinate alarm activated
sendEvent(name: “alarm”, value: “siren”)
} else if (state == triggerLevel()) {
sendEvent(name: “switch”, value: “on”, isStateChange: true, display: false)
sendEvent(name: “switch”, value: “off”, isStateChange: true, display: false)
} else {
sendEvent(name: “alarm”, value: “off”)
}
}
def off() {
def val = invertTrigger ? 1 : 0
parent.deviceUpdateDeviceState(device.deviceNetworkId, val)
}
def on() {
beep2()
}
def push() {
beep()
}
def beep() {
parent.deviceUpdateDeviceState(device.deviceNetworkId, triggerLevel(), [
momentary : beepDuration ?: 150,
pause : beepPause ?: 150,
times : beepRepeat ?: 1
])
}
def beep2() {
parent.deviceUpdateDeviceState(device.deviceNetworkId, triggerLevel(), [
momentary : beepDuration ?: 150,
pause : beepPause ?: 100,
times : beepRepeat ?:2
])
}
def siren() {
parent.deviceUpdateDeviceState(device.deviceNetworkId, triggerLevel(), [
momentary : alarmDuration ?: 55,
pause : alarmPause ?: 45,
times : -1
])
}
def both() {
siren()
}
def triggerLevel() {
return invertTrigger ? 0 : 1
}
def currentBinaryValue() {
invertTrigger ? 1 : 0
}