Difference between revisions of "Zwave Object"
Mike.maxwell (talk | contribs) (→getCommand) |
Mike.maxwell (talk | contribs) (→getCommand) |
||
Line 20: | Line 20: | ||
'''Example''' | '''Example''' | ||
− | def zwaveEvent(hubitat.zwave.commands.crc16encapv1.Crc16Encap cmd) { | + | def zwaveEvent(hubitat.zwave.commands.crc16encapv1.Crc16Encap cmd) { |
def encapsulatedCommand = zwave.getCommand(cmd.commandClass, cmd.command, cmd.data,1) | def encapsulatedCommand = zwave.getCommand(cmd.commandClass, cmd.command, cmd.data,1) | ||
if (encapsulatedCommand) { | if (encapsulatedCommand) { | ||
Line 27: | Line 27: | ||
log.warn "Unable to extract CRC16 command from ${cmd}" | log.warn "Unable to extract CRC16 command from ${cmd}" | ||
} | } | ||
− | } | + | } |
Revision as of 17:38, 11 January 2019
Description
Description goes here
Methods
getCommand
Returns a zwave object given the commandClass, command and an optional version.
Signature
Command getCommand(Short commandClass, Short command, List<Short> payload, Integer version = null)
Parameters
commandClass - TODO TODO
Returns
Command - TODO
Example
def zwaveEvent(hubitat.zwave.commands.crc16encapv1.Crc16Encap cmd) { def encapsulatedCommand = zwave.getCommand(cmd.commandClass, cmd.command, cmd.data,1) if (encapsulatedCommand) { zwaveEvent(encapsulatedCommand) } else { log.warn "Unable to extract CRC16 command from ${cmd}" } }