Announcement

Collapse
No announcement yet.

Associating 3-way switch - howto

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

  • #31
    A newer zWave BETA says it does this already for scene controllers. Not sure why they haven't fixed this known issue! Maybe submit a bugzilla?

    Changed in version 3.0.1.37 (Beta)

    * Added dimming ramp rate settings for GE
    Jim
    ----
    Plugins:Z Wave 3.0.1.55, HS3 Pro 3.0.0.208, HS3Touch, HS3Touch IOS, Z-Net, SceneMaster, XBMC, Sonos, Media Controller, Envisalink (52 Virtual nodes), JowiHue, EasyTrigger, Liftmaster MyQ, BLBackup, BLLAN, BLRadar, Pushover

    Devices:Cooper RF9540, Cooper Scene, Yale Locks, Sonos, Phillips Hue and Lux, DSC, Somfy Blinds

    Comment


    • #32
      Originally posted by denisl View Post
      If I make a change to any switch then all 4 will be updated but once they get updated won't they kick off the script to check the other 3 and on and on it would go?
      The script checks if the values are different. If the value is the same between the devices, it won't update them, and further events should not trigger.

      Cheers
      Al
      HS 3.0.0.548: 1990 Devices 1172 Events
      Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

      Comment


      • #33
        Quick follow up - a combination of the script and setting up proper events is handling my 3 and 4 switch 3-way circuits. Hopefully this post will help the next person trying to get these coopers to sync with multiple accessories.

        Below is the script and events to sync a 3 switch 3-way. A 4 switch 3-way would just need another event and in each event you run the syncscript for each additional switch that needs to be updated.

        Works great. Thanks sparkman and csullivan for your help.

        Code:
        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 1 to 98
                                        ' Device 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 99
                                        ' Device ON, set it to on
                                        hs.CAPIControlHandler(hs.CAPIGetSingleControl(targetDev2, false, "On", false, false))
                                        If Debug Then hs.writelog(logName,CStr(targetDev2) & " Set to On")
                                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
        Attached Files

        Comment


        • #34
          Need help with association staus

          Originally Posted by Arve
          Hi Al,

          is see here on the forums a lot about the cooper rf switches not syncing the status of the switches. I have the same problem here, btw. I'm new to homeseer.
          I see you have scripts that will sync the status? How do I implement this setting/script in my homeseer setup?

          Where can I download/copy this script in the previous post?
          thanks

          Arve

          Comment


          • #35
            Originally posted by Arve View Post
            Hi Al,

            is see here on the forums a lot about the cooper rf switches not syncing the status of the switches. I have the same problem here, btw. I'm new to homeseer.
            I see you have scripts that will sync the status? How do I implement this setting/script in my homeseer setup?

            thanks

            Arve
            Hi Arve, welcome to HS! Take the code in post #21 and paste it into a text editor such as Notepad. Then save it as switchsync.vb in the scripts sub-directory in your HS3 install. Next, you'll need to create events similar to the ones shown in post #31. Do you have your Cooper switches added to HS already? If so, go to the Device Management page to figure out the reference ID for each of the switches you want to keep in sync. Click on them in the Device MAnagement page and then go to the Advanced tab and the device reference id is shown there. You then need to use the reference IDs when calling the script. In the example in post 33, the reference ids are 94, 95 and 98 so substitute those with your values.

            Cheers
            Al
            HS 3.0.0.548: 1990 Devices 1172 Events
            Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

            Comment


            • #36
              Adding script

              Hi Al,

              thanks for the info, I already had the coopers up and running in HS3.
              I saved the script now and added the events. But I'm having trouble figuring out how the add the "calling method MAIN with parameters" and add my device ID's..
              how many times do I run the script? I only have a master switch with ID=291 and a aux switch with ID=292


              thanks

              Arve

              Comment


              • #37
                Originally posted by Arve View Post
                Hi Al,

                thanks for the info, I already had the coopers up and running in HS3.
                I saved the script now and added the events. But I'm having trouble figuring out how the add the "calling method MAIN with parameters" and add my device ID's..
                how many times do I run the script? I only have a master switch with ID=291 and a aux switch with ID=292


                thanks

                Arve
                Hi Arve, you'll only need to run it once. After you've selected "Run a script or script command", you should see a red airplane icon. Click on it and you'll see the additional fields you need (sub or function, and parameters). The icon is supposed to represent advanced options, although it's not very intuitive.

                Cheers
                Al
                HS 3.0.0.548: 1990 Devices 1172 Events
                Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                Comment


                • #38
                  Hi Al,

                  I got MAIN and my id's in there now, still not syncing. Right now I have the same event twice, once for the master switch, and once for the accessory switch. What else am I missing??



                  thanks

                  Arve
                  Attached Files

                  Comment


                  • #39
                    Originally posted by Arve View Post
                    Hi Al,

                    I got MAIN and my id's in there now, still not syncing. Right now I have the same event twice, once for the master switch, and once for the accessory switch. What else am I missing??



                    thanks

                    Arve
                    Hi Arve, can you post entries from the log when you are toggling the switches? The only thing that I see that may be wrong is that "MAIN" might need to be changed to "Main", and the output of the log would confirm that.

                    Cheers
                    Al
                    HS 3.0.0.548: 1990 Devices 1172 Events
                    Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                    Comment


                    • #40
                      Hi Al,

                      here is my log, looks like some error with the MAIN like you said.

                      Jan-24 6:45:57 PM HSTouch Server Debug 06:45:57:9844 ~ Value change ref:292 Address:E7D70CEE-033 NewVal: 0OldVal: 99

                      Jan-24 6:45:57 PM Error 3 Running script C:\Program Files\HomeSeer HS3\scripts\switchsync.vb :Object reference not set to an instance of an object.->Does entry point MAIN exist in script? at A.c17b105f989efe61e5979e67bec1ef734.cffd66cb0782c50126727e3f a75582d7a()

                      Jan-24 6:45:57 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/switchsync.vb("MAIN","291,292")

                      Jan-24 6:45:57 PM Event Event Trigger "Switchsync Outside Lights Access"

                      Jan-24 6:45:57 PM Z-Wave Device: DOWNSTAIRS Frontyard Outside Lights Aux Set to 0

                      Jan-24 6:45:57 PM Device Control Device: DOWNSTAIRS Frontyard Outside Lights Aux to Off (0) by/from: CAPI Control Handler

                      Jan-24 6:45:55 PM HSTouch Server Debug 06:45:55:6873 ~ Value change ref:228 Address:E7D70CEE-019-Q8 NewVal: 7.506OldVal: 15.248

                      Jan-24 6:45:55 PM Z-Wave Device: DOWNSTAIRS Laundry Room kWH Dryer Set to 7.506 (7.506 kW Hours)

                      Jan-24 6:45:55 PM HSTouch Server Debug 06:45:55:2833 ~ Value change ref:228 Address:E7D70CEE-019-Q8 NewVal: 15.248OldVal: 7.506

                      Jan-24 6:45:55 PM Z-Wave Device: DOWNSTAIRS Laundry Room kWH Dryer Set to 15.248 (15.248 kW Hours)

                      Jan-24 6:45:54 PM HSTouch Server Debug 06:45:54:3842 ~ Value change ref:292 Address:E7D70CEE-033 NewVal: 99OldVal: 0

                      Jan-24 6:45:54 PM Error 3 Running script C:\Program Files\HomeSeer HS3\scripts\switchsync.vb :Object reference not set to an instance of an object.->Does entry point MAIN exist in script? at A.c17b105f989efe61e5979e67bec1ef734.cffd66cb0782c50126727e3f a75582d7a()

                      Jan-24 6:45:54 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/switchsync.vb("MAIN","291,292")

                      Jan-24 6:45:54 PM Event Event Trigger "Switchsync Outside Lights Access"

                      Jan-24 6:45:54 PM Z-Wave Device: DOWNSTAIRS Frontyard Outside Lights Aux Set to 99

                      Jan-24 6:45:54 PM Device Control Device: DOWNSTAIRS Frontyard Outside Lights Aux to On (99) by/from: CAPI Control Handler

                      Jan-24 6:45:51 PM HSTouch Server Debug 06:45:51:4280 ~ Value change ref:291 Address:E7D70CEE-032 NewVal: 0OldVal: 99

                      Jan-24 6:45:51 PM Error 3 Running script C:\Program Files\HomeSeer HS3\scripts\switchsync.vb :Object reference not set to an instance of an object.->Does entry point MAIN exist in script? at A.c17b105f989efe61e5979e67bec1ef734.cffd66cb0782c50126727e3f a75582d7a()

                      Jan-24 6:45:51 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/switchsync.vb("MAIN","292,291")

                      Jan-24 6:45:51 PM Event Event Trigger "Switchsync Outside Ligths Master"

                      Jan-24 6:45:51 PM Z-Wave Device: DOWNSTAIRS Frontyard Outside Lights Set to 0

                      Jan-24 6:45:51 PM Device Control Device: DOWNSTAIRS Frontyard Outside Lights to Off (0) by/from: CAPI Control Handler

                      Jan-24 6:45:45 PM HSTouch Server Debug 06:45:45:6927 ~ Value change ref:228 Address:E7D70CEE-019-Q8 NewVal: 7.506OldVal: 15.248

                      Jan-24 6:45:45 PM Z-Wave Device: DOWNSTAIRS Laundry Room kWH Dryer Set to 7.506 (7.506 kW Hours)

                      Jan-24 6:45:45 PM HSTouch Server Debug 06:45:45:2967 ~ Value change ref:228 Address:E7D70CEE-019-Q8 NewVal: 15.248OldVal: 7.506

                      Jan-24 6:45:45 PM Z-Wave Device: DOWNSTAIRS Laundry Room kWH Dryer Set to 15.248 (15.248 kW Hours)

                      Jan-24 6:45:44 PM Error 3 Running script C:\Program Files\HomeSeer HS3\scripts\switchsync.vb :Object reference not set to an instance of an object.->Does entry point MAIN exist in script? at A.c17b105f989efe61e5979e67bec1ef734.cffd66cb0782c50126727e3f a75582d7a()

                      Jan-24 6:45:44 PM HSTouch Server Debug 06:45:44:1446 ~ Value change ref:291 Address:E7D70CEE-032 NewVal: 99OldVal: 0

                      Jan-24 6:45:44 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/switchsync.vb("MAIN","292,291")

                      Jan-24 6:45:44 PM Event Event Trigger "Switchsync Outside Ligths Master"

                      Jan-24 6:45:44 PM Z-Wave Device: DOWNSTAIRS Frontyard Outside Lights Set to 99

                      Jan-24 6:45:44 PM Device Control Device: DOWNSTAIRS Frontyard Outside Lights to On (99) by/from: CAPI Control Handler

                      Comment


                      • #41
                        Yes, looks like it needs to be "Main".

                        Cheers
                        Al
                        HS 3.0.0.548: 1990 Devices 1172 Events
                        Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                        Comment


                        • #42
                          Hi Al,

                          I changed the MAIN to Main, I don't get the error in my log anymore.
                          But now when I toggle the master switch from HS, the lights just come on for a split second and the log reads the following:

                          Jan-24 7:07:25 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/switchsync.vb("Main","292,291")

                          Jan-24 7:07:25 PM Event Event Trigger "Switchsync Outside Ligths Master"

                          Jan-24 7:07:25 PM Z-Wave Device: DOWNSTAIRS Frontyard Outside Lights Set to 99

                          Jan-24 7:07:25 PM Device Control Device: DOWNSTAIRS Frontyard Outside Lights to On (99) by/from: CAPI Control Handler

                          Jan-24 7:07:21 PM HSTouch Server Debug 07:07:21:5218 ~ Value change ref:292 Address:E7D70CEE-033 NewVal: 0OldVal: 99

                          Jan-24 7:07:21 PM Dim Follower Devices are at same value already

                          Jan-24 7:07:21 PM Dim Follower 291:0

                          Jan-24 7:07:21 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/switchsync.vb("Main","291,292")

                          Jan-24 7:07:21 PM Event Event Trigger "Switchsync Outside Lights Access"

                          Jan-24 7:07:21 PM Z-Wave Device: DOWNSTAIRS Frontyard Outside Lights Aux Set to 0

                          Jan-24 7:07:21 PM Dim Follower 292 Set to Off

                          Jan-24 7:07:21 PM Device Control Device: DOWNSTAIRS Frontyard Outside Lights Aux to Off (0) by/from: CAPI Control Handler

                          Jan-24 7:07:21 PM HSTouch Server Debug 07:07:21:4798 ~ Value change ref:292 Address:E7D70CEE-033 NewVal: 99OldVal: 0

                          Jan-24 7:07:21 PM Dim Follower 291:0

                          Jan-24 7:07:21 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/switchsync.vb("Main","291,292")

                          Jan-24 7:07:21 PM Event Event Trigger "Switchsync Outside Lights Access"

                          Jan-24 7:07:21 PM Z-Wave Device: DOWNSTAIRS Frontyard Outside Lights Aux Set to 99

                          Jan-24 7:07:21 PM Device Control Device: DOWNSTAIRS Frontyard Outside Lights Aux to On (99) by/from: CAPI Control Handler

                          Jan-24 7:07:16 PM HSTouch Server Debug 07:07:16:1375 ~ Value change ref:291 Address:E7D70CEE-032 NewVal: 0OldVal: 99

                          Jan-24 7:07:16 PM Dim Follower Devices are at same value already

                          Jan-24 7:07:16 PM Dim Follower 292:0

                          Jan-24 7:07:16 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/switchsync.vb("Main","292,291")

                          Jan-24 7:07:16 PM Event Event Trigger "Switchsync Outside Ligths Master"

                          Jan-24 7:07:16 PM Z-Wave Device: DOWNSTAIRS Frontyard Outside Lights Set to 0

                          Jan-24 7:07:16 PM Dim Follower 291 Set to Off

                          Jan-24 7:07:16 PM Device Control Device: DOWNSTAIRS Frontyard Outside Lights to Off (0) by/from: CAPI Control Handler

                          Jan-24 7:07:16 PM HSTouch Server Debug 07:07:16:0695 ~ Value change ref:291 Address:E7D70CEE-032 NewVal: 99OldVal: 0

                          Jan-24 7:07:16 PM Dim Follower 292:0

                          Jan-24 7:07:16 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/switchsync.vb("Main","292,291")

                          Jan-24 7:07:16 PM Event Event Trigger "Switchsync Outside Ligths Master"

                          Jan-24 7:07:16 PM Z-Wave Device: DOWNSTAIRS Frontyard Outside Lights Set to 99

                          Comment


                          • #43
                            Looks like you have the order of the parameters reversed. Try switching the order of the 292 and 291 in both events.

                            Cheers
                            Al
                            HS 3.0.0.548: 1990 Devices 1172 Events
                            Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                            Comment


                            • #44
                              Hi Al,

                              You are the best, it works 100% now. Thanks for spending time on your Sunday evening to help a new guy. Been trying to figure this out for 3 weeks now. I have 3 other 3-way setups that I can fix now, thanks again....

                              Arve

                              Comment


                              • #45
                                Originally posted by Arve View Post
                                Hi Al,

                                You are the best, it works 100% now. Thanks for spending time on your Sunday evening to help a new guy. Been trying to figure this out for 3 weeks now. I have 3 other 3-way setups that I can fix now, thanks again....

                                Arve
                                Great, glad it's working. Was checking posts while watching the football games.

                                Cheers
                                Al
                                HS 3.0.0.548: 1990 Devices 1172 Events
                                Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                                Comment

                                Working...
                                X