Vera - Smarter Home Control Forum

General => Lighting & Load Control => Topic started by: shallowearth on February 28, 2015, 01:31:00 pm

Title: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on February 28, 2015, 01:31:00 pm
Wanted thanks folks who had been helping me out with my Cooper Switch Associations with a bit of help on how to keep your Master/Accessory Switch always in sync and functioning with Instant Status --
These instructions are for Cooper RF 9540/9542 dimmers and 9501/9517 binary switches

Updated with new parameter fix for dimmers and switches (thanks to Wholm for this awesome undocumented hack!)

First you must associate the switches or dimmers to each other, using group 1.  Make sure Master and all Aux have associations to all other Aux/master in the circuit.

Problem... LEDs don't stay in in sync on the AUX Switch
After you associate your Master and Accessory switch they work great when you manually push the button, but if you try to use Vera, Vera scenes, phone App, etc to turn on or off your Master Switch, the LED on your Accessory Switch does not stay sync, meaning you might have to double tap it later to get it work.


Solution...
Add the following to the Master Switch Only

On device options tab add
Parameter 10 using 1 Byte hex and set to 1

This will ensure both the on/off LED and Dimmer Level LED stays in sync for all scenarios.

Problem... Instant Status seems flaky or not working:
If your Instant Status is not working properly (this is usually caused by having a secondary controller or scene controller in your network that controls your lights and it eats your instant status).  So if you have a Minimote you are using, or in-wall scene controller you might see this behavior.

Solution....
Add an association in Group 255 from the Master switch, back to the Vera (Device ID 1, which is listed as "ZWAVE" in the device list in unassigned, should be at the very bottom of the list in the UI).


Problem... your LEDs on your AUX switches are still not staying in sync sometimes.
Unfortunately I have found that sometimes parameter 10 doesn't work quite reliably (if the connection between the switches is weak particularly for the On command), if you try to use it, and only the off command will sync or neither.  You can use Scenes instead or in addition to using parameter 10 try the following:

Solution....
Create two scenes to control the two (or more) switches together using the Advanced Scene editor, one scene to turn the LED on, and one to turn the LED off, using the Master Switch (on or off) as the trigger for the scene.

Don't know how to get the advanced Scene Editor?  Just start out by creating a  manually triggered scene to turn your master switch on, near the end of the process in step three you will see Advanced Editor, click on it.  From there add an Action, you can now select the Accessory Switch, and Set the Target to True (1) to match the Master Switch.  If you have more that one Accessory switch add it as well.
Now make sure you set the trigger to be the off or on state of the master switch.  Save your Scene and repeat but create an Off Scene.

Note: if the SetTarget is not available in the advanced editor for your Aux switch, give it a few minutes it take several minutes for it to be available after you first add it to Vera.


If you have an old Dimmer switch that does not support parameter 10 for some reason you can use the two scene method above then add the following to your "on"  scene to sync the dimmer level.  Note that since just changing the dimmer level on the master will not trigger instant status you aux will still be a little out of sync at times but this will catch them up the next time the master is turned on.


Now you need to add a little LUUP code to your Scenes to fix your blue LED --
Use below code:
Where light_main should be set to your master dimmer
light_aux should be set to your accessory dimmer
Note the 3 in the call_delay command you be equal to or higher than the ramp speed on your dimmer.  The default on the coopers is 3.  If you ramp speed is slower you need to set that to match (otherwise it sync the led mid ramp..which is wrong).
You should also add this LUUP code to any scene where you are setting the dimmer level on your master switch as purely changing the dimmer level (with out turning the switch on/off) via the UI or a scene does not trigger the on/off scene to sync the blue LED, you need the cal the LUUP code any time there is a change that only the load level is changing and not the power state.

function delaysync()
local light_dstat = "0"
local light_main = 34
local light_aux = 35
light_dstat = luup.variable_get("urn:upnp-org:serviceId:Dimming1", "LoadLevelStatus", light_main)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = light_dstat},  light_aux)
end

luup.call_delay("delaysync",3,"")


Lastly if you have scenes that change the dimming level of the master, you can add advance scene edits for the AUX dimmers by setting their SetLoadLevelTarget to the same value you are setting the Master in your scene.

The only way now your dimmer levels will get out of sync is when you directly change the master dimmer level from web/app with out turning it off/on.


Hope this helps folks!
Enjoy!
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 12, 2015, 11:09:10 pm
A couple other tips for keeping your Cooper Light and Aux switch in sync --

If you like using the light controls in the Vera UI or Vera Mobile Apps

Create a scene for each light switch, that is triggered by the Master Switch.  When the Master Switch is on, trigger the Aux Switch on (using the Advance settings in the Scene).  Then Create a second Scene for Off on the Master Switch.
Since the Cooper Light switchs support instance status this trigger the scene (usually in 1 second or less, to sync the light on the Aux Switch).

Here is a little cleaned up code for the sync.  What I do, is setup a scene that triggers any time the master switch is turned on or off, then run this LUUP code:

local light_stat = 0
local light_main = 6
local light_aux1= 7

light_stat = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", light_main)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = light_stat}, light_aux1)
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on April 15, 2015, 11:54:15 am
What Cooper switches are you using? Dimmers?
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 15, 2015, 03:29:43 pm
I am using both:
Dimmer Master (RF9540) and Dimmer Aux (RF9542)
Switch Master (RF9501) and Switch Aux (RF9517)

It takes a while for the "GetTarget" and "SetTarget" options to show up for the Aux switch (they don't show initially on enrollment).  I believe on one of my older Aux switches with older firmware I may have had to set the Category ID from 14 to 3 temporarily in the advanced settings and then some toggle commands to it, in order to trick Vera into offering the Get/SetTarget Commands for the device.  Otherwise all you get the "Toggle" command which is much more tricky to get to sync up correctly.

I also have a couple of battery powered dimmers/switches that I use, but they don't have to be kept in sync as they don't have a LED, and use a different command when interacting with switches so don't get out of sync.  Love these by the way... excellent battery powered switch.  (RF9500)  - note they cannot be used as scene controllers I don't think (I briefly tried that but could never get it to work), but they work great if you use to associate to the switch in question.
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on April 15, 2015, 04:18:08 pm
I agree 9500 are great. I have three of them. My real question is as follows: If you are looking at your Vera UI and you turn on a 9540 switch does the Vera report the on status instantly as on? Then when you turn it off does it instantly show it as off?
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 15, 2015, 11:27:33 pm
OK here are some things I have learned about the various Cooper Switches I am using:
First off, the Auxiliary switches... they don't support instant status (as they aren't truly a light switch).  And if you use them to Associate to your Master Switch, the Master Switch will not send instant status back to the Vera that it's state changed, so the UI in the Vera will not be updated, and you cannot trigger a scene from the Aux button being pressed if you need it to trigger right away (because the trigger has to be built on the Master which is not sending an update status in that case).

If you press the Master Switch, it does support instant status, and the UI will update accordingly.
Further, if I use the Vera UI to turn On/Off the Master device it will trigger scenes that look at the status master switch instantly (not sure if this is because of instant status or because of the Vera doing some magic on its own).
In addition if I use a scene to turn on the Master Switch it will Trigger another Scene if it s looking for a Trigger on the Master Switch.

I have one dimmer that is too far away from the Vera and so the instant status update pretty much never makes it back to the Vera so the UI is always behind.

So you are out of luck if you are looking to trigger a scene based on the Master Switch if it is too far away from the Vera, or the Aux switch is pressed.  In most other cases you should be good.

If all you are trying to do is keep the LEDs in Sync, you should be in shape as long as you master switches are in range of the Vera for the instant status to make it.
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 18, 2015, 01:16:38 pm
jquincy.... I can't tell if my messages are getting through so thought I would just put a few things here...

One of my dimmers that is farther away is a little flakey about the instant status... it does better after I did a network heal.  But still isn't 100%.  I have noticed that it is pretty accurate about telling Vera it is on, but the dimmer level updates get lost.  Sometime when I turn it off (from 100%) and what it will show on the UI it will got from 100% to 50ish% to 11% and then get lost and stay at 11% (instead of ending on off), it won't go to off until it is polled again.

Since it is a dimmer that is giving you trouble --
You may just have a bad dimmer but I would try some of the following --
Since you said you were using CFL bulbs... try turning on kickstart:
Set parameter 8 to 1 (1 byte dec) in the Device Options tab  (default is 0)
That might help particularly with On status.
You might also need to mess with the minimum dimming floor (since most CFLs can't go all the way to lowest dimming.  That is parameter 11.  If when you are dimming from the switch your bulbs, they go off before the switch is actually off, you need to raise the number (default is 4).  that might also be messing with the instant status.

If you need accurate dimmer status, you might also try fiddling with the ramp speed.
This is parameter 7, the default is 3 seconds, you might try 0 to eliminate ramp updates that get lost.  I noticed my dimmer tends to send one update per second, so if not fully off... it gets stuck at 11 or 12% in the UI when turning off.  Or may not show 100% when fully turning on.

If none of that works... maybe your switch is just bad, since your dimmer is so close to the Vera.


Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 18, 2015, 01:28:54 pm
One more post on how to keep your Cooper RF Master Dimmer and Accessory Switch in Sync

If you use the method I described early about using a Scene with a Trigger, that will keep the Yellow LED light in sync (switch on or off) but may not keep the dimming level (the blue LED) in sync.

So first create a Scene with a Trigger of Master Dimmer On, and add an advanced option (with no delay), and selected the Accessory Switch, select command Service: urn:upnp-org:serviceId:SwitchPower1 SetTarget, and set to True (1).

Create a second scene with a Trigger of Master Dimmer Off but set the SetTarget of the Accessory Switch to False (0)

That will fix the Yellow LED.

Now you need to add a little LUUP code to your Scenes to fix your blue LED --
Use below code:
Where light_main should be set to your master dimmer
light_aux should be set to your accessory dimmer
Note the 3 in the call_delay command you be equal to or higher than the ramp speed on your dimmer.  The default on the coopers is 3.  If you ramp speed is slower you need to set that to match (otherwise it sync the led mid ramp..which is wrong).
You should also add this LUUP code to any scene where you are setting the dimmer level on your master switch as purely changing the dimmer level (with out turning the switch on/off) via the UI or a scene does not trigger the on/off scene to sync the blue LED, you need the cal the LUUP code any time there is a change that only the load level is changing and not the power state.

function delaysync()
local light_dstat = "0"
local light_main = 34
local light_aux = 35
light_dstat = luup.variable_get("urn:upnp-org:serviceId:Dimming1", "LoadLevelStatus", light_main)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = light_dstat},  light_aux)
end

luup.call_delay("delaysync",3,"")
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on April 20, 2015, 01:36:10 pm
Shallowearth.....Ok I think I have learned a lot about these switches. I have moved the 3 dimmers from the bathroom to different bedrooms since I couldn't figure out how to change the 4 second delay when they turn off. 

Another problem is when PLEG turns on a master light in the Hallway. I have to press the auxiliary switches 2 to 3 times to get them to turn off the master. I have written a scene according to your recommendation. Please look at this and see if I am doing it right
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 20, 2015, 02:32:31 pm
Have you Associated the Aux Switches to the Master using Group 1.

If so, they may be too far away from the Master to reliably change the state on the master and other AUX switches.  Associations do not use the routing mesh, the two switches have to talk directly to each other so must be close enough to talk to each other directly.  In your configuration you need to associate the Master to all 3 Aux.  Then you need to associate each Aux to the Master and to the 2 other Aux switches, and repeat for the other 2 Aux switches.

How to debug this... if the LED light it in sync (aka Master is on, and the LED on the AUX are on) and you press the AUX and the light doesn't go out, they are probably to far away or not associated correctly.

Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on April 20, 2015, 03:12:13 pm
Have you Associated the Aux Switches to the Master using Group 1.

Yes all three Auxiliary switches are in group ! and all paired to each other along with master

If so, they may be too far away from the Master to reliably change the state on the master and other AUX switches.  Associations do not use the routing mesh, the two switches have to talk directly to each other so must be close enough to talk to each other directly.  In your configuration you need to associate the Master to all 3 Aux.  Then you need to associate each Aux to the Master and to the 2 other Aux switches, and repeat for the other 2 Aux switches.


All switches are in the same hallway which is 30 ft long. Vera is in a closet in the middle of the hallway

How to debug this... if the LED light it in sync (aka Master is on, and the LED on the AUX are on) and you press the AUX and the light doesn't go out, they are probably to far away or not associated correctly.


Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 21, 2015, 11:45:09 am
Is the Master switch the same dimmer you were having trouble with before?  Maybe one of your switches is just bad/flakey.
Try shutting your Vera off (the association commands should still work with the Vera off) and test the heck out of the Master and Aux switches, when you turn one on... all the LEDs go on, when you turn one off all the LEDs go off.  My guess is something is is bad there.

If they all work flawlessly with the Vera Off, then turn the Vera on, and start debugging your Scenes.  You might have mis-setup something.

I know I mine.  I accidentally had one of my triggers to sync my LEDs to the Off state was resetting the master.. not the Aux switch.  So one of my switches was falling out of sync after running a specific scene.



Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on April 21, 2015, 01:09:08 pm
Is the Master switch the same dimmer you were having trouble with before?  Maybe one of your switches is just bad/flakey.

Nope they were in the bathroom. I couldn't figure out how to get them to instantly go off vs fading out over 4 seconds.

I will turn off the vera tonight and test the associations.

Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 21, 2015, 02:26:15 pm
Cool...
Here is the specific instructions for changing the ramp time on your cooper dimmers....

Go to the Dimmer Device page in the Vera UI (by clicking on Devices then the Dimmer in Question)
Click on "Device Options" near the bottom of the page.
Click on "Add configuration settings" button (a line is added under Configuration settings, and a popup says a line was added, hit OK)
For the Variable change it from 1 to 7
For Data Size change it to 1 byte dec
For the Desired Value set it to 0

Note: the desired value is 0 to 127 in seconds for how long you want the ramp to be.  If you want longer than 127 seconds than you use a negative number, -1 would be 128 seconds, through -127 which would be 254 seconds.  The Ramp is for both On and Off, sorry.. they don't split them out.  You may not need to go to 0, you might find that 1 seconds does the trick if you don't like instant on and off effect. I believe the default is 3 seconds.

Then select "Save Changes"

Note: if Save Changes does not through a popup that says "Data saved" with an OK button, you are not on the latest UI7 firmware which has a bug in it.  Go back and update your Vera firmware.

After saving the changes hit the "Back"button near the top.

Then go back into "Device Options" and see if the Desired Value and Current Value are the same.  If they are not hit the "Back" button.
Go to "Advanced"
Click on "Commands"
Click on Configure node right now.

Then go back and check the device options again.

Now try out your switch and see how the ramp time is working. I have attached the full table of behaviors you can set on the cooper dimmer below if you want to try trimming the minimum dimming level or using the Kickstart feature.  Note that Delayed OFF time is a feature of the dimmer where if you hold the button down for 2-3 second (while the light is on) it will wait to turn off the switch for that many seconds.  It is not the dimmer ramp time which is parameter 7.





Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on April 24, 2015, 07:07:25 pm

Since it is a dimmer that is giving you trouble --
You may just have a bad dimmer but I would try some of the following --
Since you said you were using CFL bulbs... try turning on kickstart:
Set parameter 8 to 1 (1 byte dec) in the Device Options tab  (default is 0)
That might help particularly with On status.



I have played a lot with this these settings on two different dimmers both Cooper 9540. Setting variable 7 to 0 made lights go off instantly. When I set variable 8 to 1 ,I get Failed at: Setting user configuration. Any ideas on that?

If I am on the Vera Ui I can click on and off lights and they are instant. When I turn them on or off manually the Vera takes 2 to 20 seconds to record the status change.  Weird still
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 26, 2015, 12:47:48 pm
Not sure your devices don't seem to be quite working up to par..

What version is the firm ware on your dimmer?
I have two that are 3,3,52,1,0  and one that is 3,3,67,1,1

One of my 3,3,52,1,0 dimmers is slightly less reliable then the other two on instant status.

You can find this on the advanced variables tab for the device, VersionInfo

Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on April 26, 2015, 02:25:31 pm
So I took out the dimmers and replaced them with Cooer 9501  Version on all of them is  3,3,52,3,15.

Same situation. When I manually turn off the switches it can take 3 seconds or 20 minutes to register on the UI.

Very confused. When I turn them on or off from the UI they  are instant. But when I manually turn them off I get the delay. Aggravating since I can't set up Pleg conditions with them if the do not register off or on properly
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on April 26, 2015, 05:24:18 pm
Yeah, something is amiss, I assume you have done a network heal, maybe try Vera support, seems like the Vera itself is having trouble with instant status.

All my coopers instant status works fine except for that one dimmer.  It is too suspicious that even switching things up with a non-dimmer still is having problems, unless your networks it just so busy crazy that the instant status it just not routing back to the vera.

I would do a network heal, and then double check that you don't have any run away scenes or devices that are flooding your mesh commands.

Cindy
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on May 20, 2015, 01:46:39 pm
Before I totally give up on these Cooper dimmers I would like to try your solution above. I have tried Solution 1 and they still get out of sync.



Solution 2...
Switch still getting out sync (may you have a button that doesn't support scenes that is turning on/off your master switch).
Create a Scene that runs every so often (every few minutes?), to sync up your Accessory switch.
You want to create a scene that all it does is run some LUUP code (maybe there is a smarter way to trigger the scene... this was just the easiest way I found).


 To do that you have to start by creating a scene that turns on the Master Switch, than use the advanced editor to actually delete that action (scene should have no actions, don't know how else to get there... yes, the UI is wierd).

You state to set up the master switch to go on and then under Advanced Editor you turn it off? Think I am confused here.

Then go into the Also, execute the following Luup code, and click on No Luup Code Defined
And add the following code there but
replace 6 with your Master Switch and
7 with your Accessory Switch.

Where do I find Also to add the Lua code?


Should work for keeping all acceossory switches in sync you can add a new line for each accessory switch (between the then and else, or the else and end statement).

if ( luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", 6) == "1") then
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"}, 7) else
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "0"}, 7)
end




Since I have 3 Auxiliary switches do I need 3 lines of code between then & else and also between else & end?

Thanks




Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on May 20, 2015, 02:59:07 pm
First lets understand what is causing your switches to get out of sync?
I assume that you have all your associations set correctly so that no press of any of the switches (master or Aux) causes an out of sync scenario.

Assuming that is all working....

Is it Vera scene that is running and causing it to get out of sync?  That is super easy to fix using the advanced editor.

Or is it that you are using the Vera UI, the Vera App for Ipad/Android or other 3rd party app to control the master switch that is causing the Aux switches to get out of sync?




Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on May 20, 2015, 03:13:08 pm
All switches are associated properly. I am operating them under Vera UI 15. They seem to get out of sync when the master switch is activated by a PLEG scene or turned off via minimote scene
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on May 20, 2015, 04:21:47 pm
OK, are the Aux switches on/off or dimmers?

My scene shots are going to be from UI7 but should be clear enough to get you going....

To keep just the on/off status in sync For your PLEG scenes. 
Any time you have an action that turns on or off the Master switch, also turn on or off the Aux Switches.
Attached is the screen shot of the Action portion of my PLT (same syntax as PLEG) that is turning off my master light plus my two aux switches.
Note that sometimes the Aux Switch will not have the urn:upnp-org:serviceId:SwitchPower1 options listed, if not, use the urn:micasaverde-com:serviceId:HaDevice1 ToggleState command.  and trigger your PLEG.  When you have called ToggleState once or twice Vera should detect the extra capabilities of the Aux Switch and add the urn:upnp-org:serviceId:SwitchPower1 Set Target Option that you need to discretely control the LED on the AUX switch.

For Scenes, do the same thing.  When you are setting the Master switch in a scene, go into the advanced editor and add the Aux Switches to do the same action the Master switch is doing.  The Aux Switches in UI7 will only be an option for a device you can control in a scene in the advance editor, I am assuming UI5 has something similar.  Again if you don't see the SetTarget Option on your AUX switches, use the ToggleState command once or twice to get the Vera to add the additional functionality then edit the scene to use the SetTarget option.

If those don't work, or you are dealing with dimmers aux switches let me know and I can send you the more advance LUA method.  But the above is the most simple if you remember to build your scenes so that everytime to update the master you update the aux switches.

Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on May 20, 2015, 04:28:16 pm
I am dealing with dimmers. I had done similar to what you had stated and set the newTargetValue: 100 for the on scene and 0 for off. So I am ready for Plan B
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on May 20, 2015, 05:04:28 pm
OH, that is your problem. 

NewTargetValue on the AUX just sets the Blue LED light level (the light level it will return to when you use the AUX button to turn on the light), it does not set the Orange on off LED.  And is probably doing something screwy when you sent it to 0, as there is no such thing as a 0 level dim setting to return to.

You need to use SetTarget instead to control the Orange LED, 1 for On 0 for Off.  You don't need to mess with the Blue LED light level (just yet).

You can probably go back to Method one (just create an "On" Scene that triggers on Master Switch Turned On, and set each AUX switch to SetTarget 1, then create an "Off" Scene that for Turned Off)  I am betting it will work when you change to using SetTarget instead.

Get the above stuff working first and if you really want the Blue Light Level to also be 100% in sync let me know.  There are two methods...

The easy but less accurate method:
If you do have a scene that is specifically changing the Dimmer level on the Master, then you can additionally add actions on the scene to set the NewTargetValue on the Aux to keep the Blue LED in sync but is way less critical in my opinion, the dim/brighten button will continue to work on the AUX even if slightly out of sync with the Master. 

So the Ground rules, if you are turning the Master switch on either by calling SetTarget and/or NewTargetValue... set Aux Set Target to 1, and optionally set NewTargetValue to the same value you set the Master to.
If you are turning the Master switch off either by calling SetTarget or NewTargetValue... set Aux Target to 0, DO NOT set NewTargetValue.
Never attempt to set the Blue LED to 0 on off, just leave NewTargetValue alone on Off scenes.

The more accurate method involved using some LUA code on a delay to deal with the RAMP issues if you need 100% accuracy.
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on May 20, 2015, 05:23:09 pm



If you are turning the Master switch off either by calling SetTarget or NewTargetValue... set Aux Target to 0, DO NOT set NewTargetValue.
Never attempt to set the Blue LED to 0 on off, just leave NewTargetValue alone on Off scenes.



Here is what I have. When I add a auxiliary in advanced and go to SetTarget the NewTargetValue automatically populates

So I am not sure what I am doing wrong
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on May 20, 2015, 05:40:05 pm
Sorry my bad, I thought you were saying you were using SetLoadLevelTarget... that is what sets the Blue LED.

One error, you have the Master Switch in your Off Scene, that might be causing a weird loop if it is being triggered by the Master Switch turning Off.

When you trigger those scene's manually do they work (turn the orange LEDs on/off)?
Looks right to me.  Was this the switch that instant status wasn't working on?  If so it might take like 30 seconds for the LEDs to sync up once the Vera polls the Master switch.

If the scene can't manually turn the LEDs on/off maybe it doesn't work with UI5, if that is the case, no amount of scripting is going to fix it.



Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on May 21, 2015, 11:07:40 am
So first... verify you can modify the Orange LED using your existing scenes by running them manually?

If your Scenes are never triggering here is some code you can use to do it instead.
Create a Scene that runs every Minute or what ever your tolerance level is for the switches being out of sync.
You add this to the "run LUA" portion of your scene, and I not 100% where that is located in UI5.
Note that if you are triggers a scene from the on/off command of the master you need a three second delay in the script to allow the ramp to complete.


local light_stat = 0
local light_dstat = "100"
--light_main is master switch update the ID below
local light_main = 6
--light_aux1, 2, 3 are your Aux switches update the IDs below
local light_aux1= 7
local light_aux2 = 8
local light_aux3 = 9

--code below will upate the orange on/off LED to the master switch on the Aux switches
light_stat = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", light_main)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = light_stat}, light_aux1)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = light_stat}, light_aux2)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = light_stat}, light_aux3)

--if you want to also update the blue light level LEDs on the Aux switches include the below
light_dstat = luup.variable_get("urn:upnp-org:serviceId:Dimming1", "LoadLevelStatus", light_main)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = light_dstat},  light_aux1)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = light_dstat},  light_aux2)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = light_dstat},  light_aux3)



Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on May 21, 2015, 11:16:59 am


One error, you have the Master Switch in your Off Scene, that might be causing a weird loop if it is being triggered by the Master Switch turning Off.


I just fixed the obvious error. I'll have to wait until I get home to see if that makes a difference.


When you trigger those scene's manually do they work (turn the orange LEDs on/off)?
Looks right to me.  Was this the switch that instant status wasn't working on?  If so it might take like 30 seconds for the LEDs to sync up once the Vera polls the Master switch.

If the scene can't manually turn the LEDs on/off maybe it doesn't work with UI5, if that is the case, no amount of scripting is going to fix it.

All three of the Auxiliary switches have syncing problems. Not 100 % of the time. Just hate to double or triple press a switch to turn a light off or on. Anyway I will see what happens when I get home tonight.

Thank you very much for your help
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on June 24, 2016, 01:26:54 pm
Added some addition solutions to the original post for Parameter 10 usage for keeping switches in sync.  And using Group 255 to keep instant status working if it stops working due to using a secondary controller or scene controller on your network.
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: jquincy on June 25, 2016, 09:01:32 am
I gave up on them and switched them to Lutron Caseta.
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: tchen001 on June 10, 2018, 09:45:02 am
I?ve read with great interest the 2 threads on how to keep Cooper Aspire Master and Accessory switches in sync (?Cooper Aspire RF Master/Accessory Association?, which links to ?Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync?).  The good news is that my 2 devices stay in sync 95% of the time.  The bad news is that the Accessory switch loses sync about 5% of the time, mostly not syncing when the Master is turned off, and on rare occasion when the Master is turned on.

My setup:
--VeraPlus controller, up to do date with firmware revision, UI7
--I have about 20 Z-wave devices in my network
--Cooper Aspire 9501 Master switch ? located about 10 feet from my Vera controller
--Cooper Aspire 9517 Accessory switch ? located about 10 feet from the 9501 switch, and 15 feet from the Vera controller
--Both Cooper switches purchased within the last year

Cooper Aspire RF 9501 switch ? working properly (local push on/off control of the light) and included in my Vera network (on/off control of switch via UI7 and in a scene, and via Vera mobile app)
   Device name: FL3Switch_Basement
   Device #37
   Settings tab - Automatically configure: Yes
   Device options tab
            Associations - Group ID: 1; Set to: FL_Family_Switch (checkbox) --> apply
            Configuration settings ? Variable: 10; Data Size: 1 byte hex; Desired value: 1 --> save
         
Cooper Aspire RF 9517 accessory (slave) switch ? installed and initialized in Vera
   Device name: FL_Family_Switch
   Device #48
   Settings tab ? Automatically configure: Yes
   Device options tab
      Associations ? Group ID: 1; Set to: FL3Switch_Basement (checkbox) --> apply

Then, just for good measure:
Dashboard, Settings, Z-Wave Settings, Advanced, Reload Engine
Dashboard, Settings, Z-Wave Settings, Advanced, Update Neighbor Nodes

Confirmed the following settings
9501 switch (device #37)
   Advanced tab, Variables tab ? AssociationSet: 1,48; AssociationGet: 1,48,; 
9517 accessory switch (device #48)
   Advanced tab, Variables tab ? AssociationSet: 1,37; AssociationGet: 1,37,;

Seems like the next step for me is to create a scene using the Advanced Scene editor ? but that?s where I?m stuck (instructions from ?shallowearth? of Feb 28, April 12, and April 15, 2015).  Specifically, there is 1) no Action that I can add to ?Set the Target to True (1) to match the Master switch? (Feb 28 message), 2) I?m not familiar with LUUP ? and thus don?t know what to do with the suggested LUUP code (April 12), and / or 3) I don't understand how to ?toggle commands? after setting the Category ID from 14 to 3 temporarily on the Accessory switch (April 15) to ?trick Vera into offering the Get/SetTarget Commands for the device?.

Suggestions or instructions? Is there an ?Introduction to LUUP? that I can review to learn what to do with the code? Thanks in advance.
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on June 11, 2018, 03:35:00 pm
Make sure you are scrolling down in the advanced editor list to get to SetTarget, it is listed at the end (or should be, see attached).
If you are sure it is not listed, try selecting ToggleState instead (this will not do what you want and will likely make your syncing problem worse, but try triggering the scene a bunch of times, then go back and delete that command and see if the SetTarget is now available instead).

If your switches are taking a long time to notify Vera of a state change (you mentioned like 2 second+delay),
Add group 255 to your associations and set association for group 255 to "1" which is also called "Vera" in your device list (see attached).  This can assist in the signal getting back faster to the Vera.
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: tchen001 on June 16, 2018, 11:25:46 am
ShallowEarth - thank you for the helpful reply (and your many contributions to this thread).

First the good news.  Curiously, by adding the service ToggleState via the Advanced Editor to the master switch (Cooper 9501, named FL3Switch_Basement) targeting the 9517 accessory switch, named FL_Family_Switch), the 9517 accessory switch has stayed completely in sync for the past week, regardless of how the switch was activated. If it stays this way, I am inclined to just call it mission accomplished.

Now for a few additional queries.

Background: I have 3 sets of floodlights around my house on 3 separate circuits.  My goal is to have the lights act as one set of lights controlled from 4 different locations. Three of the locations each have a 9501 master switch, the fourth location has a 9517 accessory switch linked to one of he 9501 master switches, FL3Switch_Basement.

1. So I am a purist at heart.  In the Advanced Editor there still is no SetTarget option, even after a week of regular use of the switches.  See attached screenshot. Ideas (especially if ToggleState does not do the job long-term)?
2. I have tried to follow your instructions to add group 255 to my associations. But there is no device called "Vera" in my device list. I did add group 255 successfully to the 9501 switches (controlling the floodlights), however this has not fixed the delay problem (where the other switches can take 2+ seconds to respond).

On a related note - I have two 9501 switches in the same junction box (one controlling one of the floodlights, the second to a different circuit).  When I depress the right switch (which is wired to an outlet), the left switch (which goes to one of the floodlights) gets confused and does not seem to send (and will not respond) to z-wave commands for 5-10 seconds.  Thoughts?

Thanks again.  James
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on June 22, 2018, 02:28:02 pm
For Group Associate 255 look at the bottom of the list for "Unassigned devices" and select "ZWave" if it exists -- sorry I mistaken called that "Vera".  In the instructions.

For your AUX switches can you show the screen shot of the Advance->Variables tab in particular the Manufacturerinfo, Capabilities, and VersioninfoMake
On Settings tab Make sure you have Automatically configure to "Use default behavior" set.  Sometimes manually updating the Capabilities string to have switch behavior will get it expose the settings.

If All else fails and you really want the behavior, I believe you can change the device_file to a Light Switch instead and that will force the SetTarget actions to appear (the risk there is that you then end up with it looking like a light switch on the dashboard and turning it On/Off on the dash board does nothing but turn the LED on the switch on and off! it doesn't trigger the association.. fun!).  You may then be-able to turn it back to a Scene controller, if you want, the switch functions properly with either device type (it isn't a true scene controller either).

For your second switch, make sure you don't have something wrong with the neutral wiring, they should all be bundled together for both switches and all lines in the box.  If you have been setting associations on the switch Vera doesn't always keep track of that correctly and you may have a ton of association rules in there that are confusing the switch and making it super slow to do thing.  Unpairing it is the only way to force the association list to be be wiped for sure (Vera makes best effort to track the associations you have setup but doesn't actually have access to what is in the device association table on the device).

Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: tchen001 on June 24, 2018, 10:01:20 am
After another week of normal use, the Cooper 9517 Accessory switch blue LED indicator light has remained in perfect sync with the Cooper 9501 Master switch. To summarize, what I have done:
1. Added Group ID 1 to both switch associations (via Add Group), and set the associations to each other
2. Set parameter 10 on the Master switch
3. Created 2 scenes, when the Master switch turns on (or off), ToggleState (target - Accessory switch) is invoked

I also added Group ID 255 to the Cooper 9501 Master switch Associations, and set the association to ZWave. 
BTW, can Group ID 255 be added to more than 1 device in a network?  I tried to add this to a second device but received the message "device configuration failed".

A screenshot of the Accessory switch variables accompanies this message.

Thanks again for your assistance.
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on June 25, 2018, 02:21:39 pm
Hmm what Vera device (Plus, Secure, etc) and firmware are you using?
Your Variable page doesn't look like mine, maybe Vera changed or broke something with detection of this device.
Also can you past the full capability string from the Variable page?  It is cut off in the picture you posted.


Association group 255 only supports one device and suppose to be your controller.  Group 1 supports 5 (unless you are using 255 also then it only supports 4 in Group 1).

Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: tchen001 on June 30, 2018, 08:05:17 am
ShallowEarth ? in response to your query:

Controller:  VeraPlus
Firmware: 1.7.3831 (latest available)
Accessory Switch Capabilities: 211,156,0,4,18,1,L,R,B,RS,|39,43,44,112,114,115,117,119,133,134,135,

Update:  everything was fine for about 3 weeks of normal usage until I decided to stress test my system (all I did was depress the Accessory switch 4-5 times in rapid succession). As you predicted, the ToggleState action is not the solution ? after the stress test, when I depressed the Accessory switch, the indicator light on the Accessory switch toggled to the state opposite the status of the circuit the Master switch was controlling. (I could still toggle the Accessory switch indicator light by depressing the switch again to get it back in sync with the Master switch). So I deleted the ToggleState action from the Master switch.

Good news: SetTarget has miraculously appeared on the list of available services for the Accessory Switch!  (It only took 3 weeks - see image.)  I added SetTarget = True to two scenes, using the Master switch (on or off) as the trigger for each scene. What I discovered was that SetTarget = True results in the indicator light being turned on. So I edited the Master switch off scene to SetTarget = False. After a day of use, so far so good. In summary, what I have done to get the indicator LED on a Cooper 9517 Accessory switch to remain in sync with a 9501 Master switch:

1. Added Group ID 1 to both Accessory switch and Master switch associations (via Device Options - Add Group), and set the associations to each other
2. Set Parameter 10 using 1 byte hex, and set to 1 (Master switch only)
3. Waited 3 weeks for SetTarget action to become available for the Accessory switch (perhaps depressing it rapidly multiple times is what made the SetTarget action available?)
4. Created a scene triggered when the Master switch is turned on ? and via Advanced Editor Add Action, set the Accessory switch SetTarget to True.
5. Created a scene triggered when the Master switch is turned off ? and via Advanced Editor Add Action, set the Accessory switch SetTarget to False.

Remaining problem: how to instantly sync two Cooper Master 9501 switches.  I have scenes that keep them in sync, but there are frequently 2+ second delays (up to 8-10 seconds) in response time. Ideas?
Title: Re: Solved! -- How to Keep your Cooper RF Master/Accessory Switch always in Sync
Post by: shallowearth on June 30, 2018, 10:47:39 am
Use direct association between the two masters.  Group 1.  Just like you did for the aux.  Will be much faster.  Just set them to also point to each other.  (You can also use parameter ten as needed)

Or try adding group 255 and associates to Zwave (Vera).  For some reason the signal is slow /lost getting back to the Vera so it is waiting for a poll to trigger the scene.