Hey everyone looking for some help in regards to my cooper RF and zwave aspire light switches
I have attached two pictures representing an event I have created to have (3) three way switches sync up with the master and the two accessories. I do the same thing for (2) three way switches the master and accessory but obviously one less step.
Also this is the script it calls for:
Sub Main(ByVal Parms as String)
Dim ParmArray() as String
ParmArray = Parms.tostring.split(",")
dim targetDev1 as Double = CDbl(ParmArray(0)) 'reference ID of the device to use for existing value
dim targetDev2 as Double = CDbl(ParmArray(1)) 'reference ID of the device to set based on value of targetDev1
dim Debug as Boolean = False
Dim logName = "Dim Follower" 'set log name for HS log
Dim dev1Value,dev2Value As Double
dev1Value = hs.DeviceValue(targetDev1)
dev2Value = hs.DeviceValue(targetDev2)
If Debug Then hs.writelog(logName,CStr(targetDev1) & ":" & CStr(dev1Value))
If dev1Value <> dev2Value Then
Select Case dev1Value
Case Is > 0
' Device ON or DIM, set its current dim level
hs.CAPIControlHandler(hs.CAPIGetSingleControl(targetDev2, false, CStr(dev1Value), false, true))
If Debug Then hs.writelog(logName,CStr(targetDev2) & ":" & CStr(dev1Value))
Case 0
' Device OFF, set it to off
hs.CAPIControlHandler(hs.CAPIGetSingleControl(targetDev2, false, "Off", false, true))
If Debug Then hs.writelog(logName,CStr(targetDev2) & " Set to Off")
End Select
Else
If Debug Then hs.writelog(logName,"Devices are at same value already")
End If
End Sub
My issue sometimes is they go into crazy mode where its almost like a panic mode. This doesn't happen very often. Only way to resolve it is to restart homeseer. Sometimes it is caused by an event that just occurred involving the light switches and then manually pressing the switch soon after. But again doesn't happen very often and trying to figure out what exactly is happening.
Also I would love to be Able to create an event in homeseer that during 4am to 8am when u press any of the three light switches manually they go automatically to a certain dim level. Currently now when I try this again the lights all go in a kinda panic flashing mode. this happens everytime.
I will also note in order to get this event to work with script I had to change the on value of each device to 98 not 99. and the dim range is 1 to 98
any thoughts and suggestions. let me know if need more info
Thanks!
I have attached two pictures representing an event I have created to have (3) three way switches sync up with the master and the two accessories. I do the same thing for (2) three way switches the master and accessory but obviously one less step.
Also this is the script it calls for:
Sub Main(ByVal Parms as String)
Dim ParmArray() as String
ParmArray = Parms.tostring.split(",")
dim targetDev1 as Double = CDbl(ParmArray(0)) 'reference ID of the device to use for existing value
dim targetDev2 as Double = CDbl(ParmArray(1)) 'reference ID of the device to set based on value of targetDev1
dim Debug as Boolean = False
Dim logName = "Dim Follower" 'set log name for HS log
Dim dev1Value,dev2Value As Double
dev1Value = hs.DeviceValue(targetDev1)
dev2Value = hs.DeviceValue(targetDev2)
If Debug Then hs.writelog(logName,CStr(targetDev1) & ":" & CStr(dev1Value))
If dev1Value <> dev2Value Then
Select Case dev1Value
Case Is > 0
' Device ON or DIM, set its current dim level
hs.CAPIControlHandler(hs.CAPIGetSingleControl(targetDev2, false, CStr(dev1Value), false, true))
If Debug Then hs.writelog(logName,CStr(targetDev2) & ":" & CStr(dev1Value))
Case 0
' Device OFF, set it to off
hs.CAPIControlHandler(hs.CAPIGetSingleControl(targetDev2, false, "Off", false, true))
If Debug Then hs.writelog(logName,CStr(targetDev2) & " Set to Off")
End Select
Else
If Debug Then hs.writelog(logName,"Devices are at same value already")
End If
End Sub
My issue sometimes is they go into crazy mode where its almost like a panic mode. This doesn't happen very often. Only way to resolve it is to restart homeseer. Sometimes it is caused by an event that just occurred involving the light switches and then manually pressing the switch soon after. But again doesn't happen very often and trying to figure out what exactly is happening.
Also I would love to be Able to create an event in homeseer that during 4am to 8am when u press any of the three light switches manually they go automatically to a certain dim level. Currently now when I try this again the lights all go in a kinda panic flashing mode. this happens everytime.
I will also note in order to get this event to work with script I had to change the on value of each device to 98 not 99. and the dim range is 1 to 98
any thoughts and suggestions. let me know if need more info
Thanks!
Comment