Announcement
Collapse
No announcement yet.
Alert Lights
Collapse
X
-
I would use scripts to do this. There's an example I posted here: https://forums.homeseer.com/showthread.php?p=1288685 that allows you to store the original device value and at the end of your flashing, read the values back and set the devices based on that.
Cheers
AlHS 4.2.8.0: 2134 Devices 1252 Events
Z-Wave 3.0.10.0: 133 Nodes on one Z-Net
-
You want to be able to toggle the light.
I know of two ways to do this. One is the EasyTrigger Plug-in. It has a lot of nice features, toggle included.
The other method is a script. I have attached the one I use which was posted by one of the HS guys sometime back.
Code:Sub Main(ByVal Parms As Object) Dim DvRef As Integer = Parms 'Dim DvSet As String Select Case IsOnCapi(DvRef) Case TRUE CallCAPI(DvRef, "Off") Case FALSE CallCAPI(DvRef, "On") End Select End Sub 'Control Device Function CallCAPI(ByVal intDevRef As Integer, ByVal strDevCmd As String) As CAPIControlResponse CallCAPI = CAPIControlResponse.Indeterminate For Each objCAPIControl As CAPIControl In hs.CAPIGetControl(intDevRef) If LCase(objCAPIControl.Label) = LCase(strDevCmd) Then CallCAPI = hs.CAPIControlHandler(objCAPIControl) Exit For End If Next End Function 'IsOn Function IsOnCAPI(ByVal intDevRef As Integer) As Boolean Dim intValue = hs.DeviceValueEx(intDevRef) IsOnCAPI = False For Each objCAPIControl As CAPIControl In hs.CAPIGetControl(intDevRef) If intValue = objCAPIControl.ControlValue Then If LCase(objCAPIControl.Label) = "on" Then IsOnCAPI = True End If Exit For End If Next End Function 'IsOff Function IsOffCAPI(ByVal intDevRef As Integer) As Boolean Dim intValue = hs.DeviceValueEx(intDevRef) IsOffCAPI = False For Each objCAPIControl As CAPIControl In hs.CAPIGetControl(intDevRef) If intValue = objCAPIControl.ControlValue Then If LCase(objCAPIControl.Label) = "off" Then IsOffCAPI = True End If Exit For End If Next End Function
Comment
Comment