Difference between revisions of "Zwave Object"

From Hubitat Documentation
Jump to: navigation, search
(getCommand)
 
Line 1: Line 1:
==Description==
+
<big>'''We're moving!''' Please visit http://docs2.hubitat.com for the latest documentation.</big>
Description goes here
 
  
==Methods==
+
<big>
 
+
This document is available at: http://docs2.hubitat.com/en/developer/zwave-object
=== <code>getCommand</code> ===
+
</big>
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}"
 
    }
 
}
 

Latest revision as of 20:32, 25 September 2022

We're moving! Please visit http://docs2.hubitat.com for the latest documentation.

This document is available at: http://docs2.hubitat.com/en/developer/zwave-object