Announcement

Collapse
No announcement yet.

need help with cooper light switches and creating event

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    need help with cooper light switches and creating event

    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!
    Attached Files

    #2
    I would look at adding some delays to make sure HS/zwave finished setting the level on one switch before changing others. I believe HS waits for the zwave ack frame before changing the value. Even a wait before the first action may be appropriate.

    Cheers
    Al
    HS 4.2.8.0: 2134 Devices 1252 Events
    Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

    Comment


      #3
      Another way to keep in sync that works great for me is Spuds EasyTrigger.

      Comment


        #4
        hey

        can you elaborate on how I would use easy trigger for a setup of 2 accessories and one master? I do use the plugin already for other stuff

        thanks
        Chris

        Comment


          #5
          Originally posted by csullivan2005 View Post
          can you elaborate on how I would use easy trigger for a setup of 2 accessories and one master? I do use the plugin already for other stuff

          thanks
          Chris
          I'm not a computer so taking my best guess as to what i did:
          The master always reports properly.
          So, I believe I set events if Master changes, to set Accessory switch to master or some such. Device value to another device value I believe is setting in easytrigger. Same for if accessory changes to set other to it. But never set master as it always knows what it's doing

          If you have trouble I can jpeg my events for you later.

          Comment


            #6
            yes please

            yes jpegs would be very helpful

            Comment


              #7
              help

              Al,

              in events it looks like its not possible to delay an event that runs script...only allows to delay when controlling device
              Am I wrong?

              Comment


                #8
                I have three Cooper dimmers that control my backyard lights. Here is the event using Easy Trigger that syncs them all to the dimmer on the back porch. This is very reliable. No delays needed. With Jasco dimmers, I add a 3 second wait after the trigger, because they are slow to report their actual dim level.

                Click image for larger version

Name:	Capture.jpg
Views:	1
Size:	29.4 KB
ID:	1188139
                HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                Comment


                  #9
                  Originally posted by csullivan2005 View Post
                  Al,

                  in events it looks like its not possible to delay an event that runs script...only allows to delay when controlling device
                  Am I wrong?
                  You have two options, one you could add a "wait" action in your event and put a few seconds in there before running the script after the device status changes or you can add a wait into your script where appropriate with hs.WaitSecs(x).

                  Comment


                    #10
                    Z-Wave Device &quot;Latency&quot; Test

                    Just an FYI:

                    I have been running an "on" then "off" cycle on an unused switch(with a "direct" path to Z-net) every 5 minutes as a test of how well my Zwave system is working.

                    I measure the time(in Milliseconds) from when the instruction(in the event) is sent until the device reports it's new state. In my system, a high performance PC with Z-Net(Cat5 connected), shows significant delays (.5 seconds to > 1seconds) many times per day.

                    Comment

                    Working...
                    X