Confusion regarding command structure

I am moving from VeraPlus to HE. However I'm finding Zwave groovy is kicking my butt. Part of the problem is the lack of or my inability to find specific documentation. Before I ramble on too much I have a question. In the below code (two examples).

  1. the method or function "delayBetween" is this some sort of concatenation or shortcut? I was not able to find any reference to it on the internet and samsung and groovy.

I can deduce the syntax is:

delayBetween([zwave cmd1, zwave cmd2....... zwave cmdn)], delay in ms)

where if the delay is left our there is a default delay of ???

Am I on the right track?

Thanks
John

def on() {
delayBetween([
	zwave.basicV1.basicSet(value: 0xFF).format(),
	zwave.switchMultilevelV1.switchMultilevelGet().format()
], 5000)
}

/ / On command implementation for a Z-Wave switch
def on() {
delayBetween([
zwave.basicV1.basicSet(value: 0xFF).format(),
zwave.switchBinaryV1.switchBinaryGet().format()
])
}

Yes, if you leave off the second parameter, the default delay is 100 ms.

@chuck.schwer

Thanks, but where did delayBetween come from? I could not find any documentation for such a command.

John

It is a built in helper method for Drivers to use, it allows you to build the string of commands more easily. We are working on providing developer documentation for all of our built in methods.

1 Like

@chuck.schwer

Two thoughts:

  1. I Offer to help with the documentation. You would have to provide at least some crude list or info of some sort.

  2. Did not SmartThings use these same "helper Methods"? Are they / some documented in ST?

John