Update: 9-29-14 - Zwave isn't supported on HDx20 and newer series
Originally from ticket.
I found Lyndon mentioned having an script that controls a zwave device, is there any way I could obtain this script?
I've attached a document on the zwave object. Below are also two functions I wrote that I added to an older brightauthor autorun so the zwave functions could be used in brightauthor. One initializes zwave and adds it to BSP object for playlist playback, and the second takes in an integer brightness value and sends that birghtness level to the zwave module.
The attached doc has a simple standalone script.
' *********************************************
' * Sub CreateZwave
' *
Sub CreateZwave()
m.zwave = CreateObject("roZWave")
if type(m.zwave) <> "roZWave" then print "Error creating Zwave object"
m.zparams = CreateObject("roAssociativeArray")
m.zparams[ "class" ] = "SwitchAll"
m.zparams[ "action" ] = "On"
if type(m.zwave) = "roZWave" then
'these four next lines are new for build 63
' we only care about the SwitchAll & SwitchMultiLevel classes
classes = CreateObject("roArray", 0, True)
classes.Push(&h26)
classes.Push(&h27)
m.zwave.SetRequiredClasses(classes)
m.zwave.Startup()
m.zwave.SetNodeCount(1)
m.zwave.ExecuteAction(m.zparams)
endif
return
End Sub
Sub FadeLights(newBrightness% as Integer)
'if newBrightness% > 88 then
' print newBrightness%
'else
if type(m.zwave) <> "roZWave" then
m.CreateZwave()
endif
tmpBrightnessLevel$ = mid(str(newBrightness%),2)
tmpParamLevel$ = "Level="+tmpBrightnessLevel$
m.zparams["class"] = "SwitchMultiLevel"
m.zparams["action"] = tmpParamLevel$
if type(m.zwave) = "roZWave" and m.zwave.IsReady() then m.zwave.ExecuteAction(m.zparams)
'endif
end Sub
roZWave.docx