Cooper RFWC5 - indicators and scene control in OH2 not working

Building on the link that @phinnay provided, I got the RFWC5 working. However, updates are only received when a scene is switched ON, not when it is switched OFF. From the zensys tool, it needed COMMAND_CLASS_ASSOCIATION_V1 executed even though it seems to support COMMAND_CLASS_ASSOCIATION_V2.

@chris Thats so much for your work on OpenHAB and the z-wave binding. OpenHAB is awesome and, in contrast to a supposedly smart commercial system, it actually works. Below is more information on how the RFWC5 scene controller behaves and, at the bottom, a suggestion to support three channels for this device. I would be happy to help implement better support of the device, but would highly appreciate pointers and comments.

@phinnay Thanks for your reply and thanks for pointing out that thread on google groups. That indeed worked.

  1. I have an Enerwave ZWN-SC7 that did not work before, but after applying precisely the commands given in that thread. A Scene Number changed is triggered in openhab2 (once) whenever a button is pressed.
    Zensys tool sees the following when the 1st through 7th button is pressed once:
08:54:44.223: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 01 FF 
08:54:44.236: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 01 FF 
08:54:49.074: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 02 FF 
08:54:49.088: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 02 FF 
08:54:51.054: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 03 FF 
08:54:51.067: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 03 FF 
08:54:53.514: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 04 FF 
08:54:53.527: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 04 FF 
08:54:54.254: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 05 FF 
08:54:54.267: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 05 FF 
08:54:55.124: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 06 FF 
08:54:55.137: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 06 FF 
08:54:56.006: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 07 FF 
08:54:56.018: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 07 FF 
  1. The RFWC5 needed a slightly different command than described in that thread.

manually configure the association groups for the controller using the zensys-tools. Manually sending the following z-wave commands from the “command class” tab:

COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 1, Node ID = [your controller ID]
COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 2, Node ID = [your controller ID]
COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 3, Node ID = [your controller ID]
COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 4, Node ID = [your controller ID]
COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 5, Node ID = [your controller ID]

Now, manually set the scene controller configuration so it sends the scene activation commands to your controller. Again, from the “command class” tab:

COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 1, Scene ID = 1, Dimming duration = 0
COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 2, Scene ID = 2, Dimming duration = 0
COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 3, Scene ID = 3, Dimming duration = 0
COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 4, Scene ID = 4, Dimming duration = 0
COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 5, Scene ID = 5, Dimming duration = 0

Now pressing the first button to switch the scene on and again to switch it off, then them same for buttons 2-5 results in the following data being received by the zensys-tool:

08:44:43.770: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 01 00 
08:44:43.786: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 01 00 
08:44:46.483: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 
08:44:46.498: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 00 
08:44:47.086: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 02 00 
08:44:47.101: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 02 00 
08:44:47.739: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 
08:44:47.754: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 00 
08:44:48.342: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 03 00 
08:44:48.357: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 03 00 
08:44:48.996: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 
08:44:49.011: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 00 
08:44:49.548: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 04 00 
08:44:49.563: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 04 00 
08:44:50.452: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 
08:44:50.467: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 00 
08:44:52.311: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 05 00 
08:44:52.325: Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 05 00 
08:44:53.266: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 
08:44:53.280: Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 00 

That is, while switching on clearly transmits the scene number, the code from switching off a scene seems always to be the same. Openhab2 will forward the switching on of a scene to rules twice, as reported by @phinnay, the switching off is not forwarded.
The right button will send the same “off” code when pressed for a few seconds.

In addition this device supports an indicator and from the zensys tool one can execute

COMMAND_CLASS_INDICATOR_V1/INDICATOR_GET

will result in

08:50:14.036: Received: COMMAND_CLASS_INDICATOR.INDICATOR_REPORT, hex data: 87 03 15 

If scenes 1, 3, and 5 are enabled. The last number is just the bitmask of leds hat are lit, when executed for other states.
Similar, one can send (again tested from zensys tools)

COMMAND_CLASS_INDICATOR_V1/INDICATOR_SET with Value v

where v is the binary bitmask of the scenes to for which the led should be lit.
From this I would assume the device could have three channels: A SceneNumber channel that is updated whenever the device updates the scene number, a SceneIndicatorNumber channel that is polled whenever the controller received the switch off code, and a SceneIndicatorNumber output channel that can be written to and sets the leds (and with them the state of the scenes as maintained by the device).

I would be happy to help improve the support for this device. While I have quite a bit of programming experience, I would highly appreciate pointers on where to look and what to do.

Thanks for digging in to this. This is one of the last devices I need to migrate over from my Vera but I don’t have strong enough programming background to dig in… If you go here - http://www.cd-jackson.com/index.php @chris has instructions on how you can help edit the ZWave database (you have to request access from him), so you can help update the binding configuration settings.

@chris, after I have dug around a bit and thought some more about it, I don’t like my previous suggestion any more. For the user, the scene controller behavior might be clearest, if it would simply update the Scene Number whenever a button is pressed. The Scene Number would be the bitmask of the buttons that are enabled (0-31). The problem is that the device does not send the necessary information. It does, however, send a command when a button is pressed. This is the SCENE_ACTIVATION_SET if the button is being enabled and the BASIC_SET when the button is disabled. This means, after being triggered by receiving a BASIC_SET command or a SCENE_ACTIVATION_SET command one would have to issue a INDICATOR_GET and use the returned value as the scene number. In addition one should also be able to set the Scene Number. To set it, the INDICATOR_SET command has to be issued. This is not as bad as a poll because there is a trigger event. Only after having received one of these would the state have to be requested.
Would you be able to advise of ways to achieve this? Is there a way to hook in a custom zwave command class for this device? Are there better ways of achieving these command executions? These questions just go too deep into the architecture and structure of the binding to be answered by a novice. Thus, any help from the experts would be greatly appreciated.

Awesome work with the investigation, it’s great to have someone as knowledgeable as you helping out with this! I’m gonna double check my settings and confirm they match yours - hoping I just have something backwards and that’s causing the doubles.

I’m not clear in your proposed solution if you have the ability to set the indicator lamp state separate from the scene buttons - this was possible to do in the OH1 binding and I’d love to have this ability to be able to sync the display on multiple RFWC5’s. Not had much time to work on this but I’ve not found a way to address them in OH2. There is a benefit to having the ability to read individual button on / off state for use with sync and also to make controlling non-scene things via .rules a lot easier.

Hopefully @chris will get back to us, I’d like to write up a step by step guide once we’ve got things worked out to help others up against configuring these things.

Sorry for the slow response t this one.

Do you have a log showing what is received from the device and possibly annotating it with what you think needs to be sent to the device at what time.

We could probably provide a channel linked to the indicator class so you can set this in a rule. If the device is really using a combination of the scene and basic classes that is a real pain as the scene class should provide everything that’s needed (it has methods for button down and button up, double, triple press etc).

Thanks

@Chris, Thanks for your note. I had hoped my post from March 18th would have provided the log of messages sent and received. Perhaps that post was not clear. Thus I will try to summarize this post. If this does not contain the information you had hoped for, I would appreciate your questions.
The RFWC5 maintains state for 5 scenes. That is any of these 5 scenes can be either on or off. This is indicated by the LEDs on the keys which are either dimm (off) or bright (on). The scene controller is initialized and the associations are set as detailed in the code below.

COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 1, Node ID = [your controller ID]
COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 2, Node ID = [your controller ID]
COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 3, Node ID = [your controller ID]
COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 4, Node ID = [your controller ID]
COMMAND_CLASS_ASSOCIATION_V1/ASSOCIATION_SET, Group ID = 5, Node ID = [your controller ID]
COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 1, Scene ID = 1, Dimming duration = 0
COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 2, Scene ID = 2, Dimming duration = 0
COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 3, Scene ID = 3, Dimming duration = 0
COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 4, Scene ID = 4, Dimming duration = 0
COMMAND_CLASS_SCENE_CONTROLLER_CONF_V1/SCENE_CONTROLLER_CONF_SET, Group ID = 5, Scene ID = 5, Dimming duration = 0

For operation, the scene controller behaves a bit inconvenient. Whenever a scene is activated (switches from off to on) the controller sends the following message

Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 <num> 00 
Received: COMMAND_CLASS_SCENE_ACTIVATION.SCENE_ACTIVATION_SET, hex data: 2B 01 <num> 00 

where is the scene number (1 through 5). That sounds pretty good. However, if a scene is switched off, then the controller sends

Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 
Received: COMMAND_CLASS_BASIC.BASIC_SET, hex data: 20 01 00 00 

independent of which scene is switched off, or even multiple scenes are switched off using a long press on the right " all off" button. In which case I cannot see any indication which scene was switched off.
However, one can query the current state of the scene activation using:

COMMAND_CLASS_INDICATOR_V1/INDICATOR_GET

Now the controller answers with

Received: COMMAND_CLASS_INDICATOR.INDICATOR_REPORT, hex data: 87 03 15

Where the last number, here 0x15, is the binary value of the 5 scenes. Here 0x15 means bits 5, 3, and 1 were set.
The state of the scenes can be written using

COMMAND_CLASS_INDICATOR_V1/INDICATOR_SET with Value v

The the controller updates its state and the LEDs change accordingly.
What I imagine as a possible way to operate the controller is to have an integer scene number 0-31 indicating which of the 5 scenes are active. Whenever a message is received from the scene controller, the scene controller is queried for its current state and the scene number updated accordingly. When the scene number is written to, then the scene activation of the scene controller is updated.

Thanks. I’m not really sure how bet to handle this as this would need quite a bit of coding to make work and at the moment I’d prefer to avoid putting this into the binding. The best I can currently suggest is to configure the database with all the different channels, and then write a rule to tie it all together.

I’ve not looked at the database for the device and can’t do that at the moment, but if the relevant channels aren’t available, then we can easily add them - just let me know your account on the database site and I can give you edit access.

@Peter_Maunz Did you reach a resolution on this to get everything working? I’m still operating mine through my Vera and would like to migrate it over. Thanks.

I’m very interested in this as well. Any additional success?

@DigiArchiver I tested yesterday and can confirm it’s still in the same situation. Rereading the posts above after trying some other approaches made me realize that Peter is using an Aeotec Zwave stick and directly programmed in the associations using Aeon’s zensys tools. I’m going to give that approach a try as well and will report back.

The other approach I tried was switching over to Z-Way. With a very convoluted route I did get it to work, but unfortunately Z-Ways support of their versions of channels is very limited which made locks all but non-usable and didn’t even work with one of my switches. So now it’s only running my scene controller, so if I can find a way here then I can eBay my Z-Way board and be down to a single solution…

@DigiArchiver I was able to get it to work for turning on and off scenes and associated devices (didn’t try to control the scene lights from external). I put together a quick tutorial of what I did here -
https://community.openhab.org/t/tutorial-cooper-rfwc5-scene-controller-with-openhab2/31731?u=rgerrans

Thanks! We REALLY need the “Indicator” class channel exposed in OH2. That will open up the possibilities. Also, “hail” class would also be very useful. With those three channels I could do anything with rules.

Please define what you want. The defintion above is not a simple channel that maps to a command class - it’s quite a lot of functionality specific to this device. If we can define a class that allows a generic setting of the indicators, and then the device specific functionality is handled in rules, then this would be relatively simple.

What do you want to do with the hail class? Hail is already supported, but again, please define what you want to do.

@chris if it’s any help, under OH1 the ‘indicator’ class WAS exposed and did work. You were able to set the status of the indicator LED’s using this notation (from OP)

Switch DR_Scene1i “Scene 1 LED” {zwave=“16:command=INDICATOR,bit=0”}

where bit is the binary value of the scene selected.

The indicator class is currently implemented - this is not the issue. The earlier request asked for some quite complex, device specific functionality that would take a lot of time, be complex and messy to implement in the binding. What you’ve suggested here would be easy to add and it’s not device specific.

At the end of the day, there needs to be “a way to manipulate the LED’s on the controller” whatever that may be.

The code excerpt I posted used to work on OH1 but does not on OH2. If there is a way to get that working (or any method at all!) to turn the LED’s on or off it’d be great!!

Please remember that OH1 and OH2 are completely different bindings, so functionality that worked on OH1 doesn’t necessarily work on OH2. The item definitions are for start completely different - this necessitated a complete rewrite of the interfaces.

Please raise an issue and I’ll take a look at adding this when I get a chance.

I understand the architecture is different, There is no problem using a different syntax, etc… on OH2, whatever works to allow for LED control to happen is fine here!

I have formally opened an issue below:

Please open the issue in the zwave issue tracker - it will not be tracked in the OH2 issue tracker and will be lost (sorry). (I only noticed as I was going to rename it to something more generic, but I’ve not got any access to manage this list).

The earlier request was merely asking the same thing in a less succinct way. In OH1 this worked, in OH2 it doesn’t. You say the indicator class is implemented. How can I utilize it without a channel for it in OH2? What method do I use to address it? If there is a way for me to create/address the channel that would be great.
As for “hail”, that’s the patent avoiding alternative for “instant update”. It would be used to so as to know when any button press occurs or indicator lights change as, according to Cooper, that hail should be happening whenever there is a state change. Currently, I can only pick up every other button press as the “off” presses don’t show anything anywhere. Only the “on” presses. Is there addition Zensys tool configuration of the device I can perform to alter that behavior?