Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
-
- Dual Relay Driver
- chat_bubble_outline
- more_vert
- Dashboards
- Devices
- Apps
- Settings
- Advanced
- codeApps Code
- codeDrivers Code
- System Events
- Logs
- Dual Relay Driver Import HelpDeleteSave
- 1
- /*
- 2
- * Monoprice/Vision Dual Relay Parent Driver
- 3
- */
- 4
- metadata {
- 5
- definition (name: "Dual Relay Driver", namespace: "hubitat", author: "hubitat") {
- 6
- capability "Refresh"
- 7
- capability "Actuator"
- 8
- 9
- command "childOn"
- 10
- command "childOff"
- 11
- command "recreateChildDevices"
- 12
- command "deleteChildren"
- 13
-
- 14
- //fingerprint manufacturer: "015D", prod: "0651", model: "F51C", deviceJoinName: "Zooz ZEN20 Power Strip"
- 15
- //fingerprint deviceId: "0x1004", inClusters: "0x5E,0x85,0x59,0x5A,0x72,0x60,0x8E,0x73,0x27,0x25,0x86"
- 16
- }
- 17
- }
- 18
-
- 19
- def installed() {
- 20
- log.debug "installed"
- 21
- createChildDevices()
- 22
- configure()
- 23
- }
- 24
-
- 25
- def updated() {
- 26
- log.debug "updated"
- 27
- 28
- if (!childDevices) {
- 29
- createChildDevices()
- 30
- }
- 31
- else if (device.label != state.oldLabel) {
- 32
- childDevices.each {
- 33
- def newLabel = "$device.displayName (CH${channelNumber(it.deviceNetworkId)})"
- 34
- it.setLabel(newLabel)
- 35
- }
- 36
- 37
- state.oldLabel = device.label
- 38
- }
- 39
-
- 40
- configure()
- 41
- }
- 42
-
- 43
- def configure() {
- 44
- log.debug "configure"
- 45
- def cmds = [
- 46
- zwave.versionV1.versionGet().format(),
- 47
- zwave.manufacturerSpecificV2.manufacturerSpecificGet().format(),
- Terms of Service
- Documentation
- Community
- Support
- Copyright 2018 Hubitat, Inc.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement