klimekt
posted this
14 August 2018
I found following information at this url:
https://community.openhab.org/t/cooper-rfwc5-indicators-and-scene-control-in-oh2-not-working/23647/22
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.