I was finally able to get the Leviton Scene Controllers to work, although still not 100% ideal.
I have a RZCS4-1L scene controller, but this should be the same configuration for the VRCS4-1L (as the RZCS is the older, 9600 bps version). I am unsure how well this would work for the Zone Controllers, as they have two discrete buttons for each scene.
As OZW does not have an XML for this device, you will need to set the association of groups 1,2,3,4 with your controller (typically node 1). Group 1 should already be associated with your controller by default. This ensures that the scene controller will send back the scene activated message to your controller.
Note that you can also do a few other things with the Leviton scene controller – if you set an additional group association to the node for dimmer switch, the dim buttons on the bottom will control that dimmer; independent of OZW (when the relevant scene button is enabled – group 1 for button 1, and so on and so forth).
After that, add the following to your automations.yaml file (replace my devices with your devices). I had to add code to disable and renable the automation (as a debounce timer) as the scene controller sends at least 4 duplicate SceneEvent commands whenever a scene button is pressed.
# Leviton Scene Controller Integration
- alias: Leviton Scene Button 1
trigger:
platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.master_bedroom_scene_controller
scene_id: 1
action:
- service: homeassistant.turn_off # Disable automation due to multiple scene activated message
entity_id: automation.leviton_scene_button_1
- service: switch.toggle
entity_id: switch.master_bedroom_ceiling_fan
- delay: '00:00:02' # Wait 2 Seconds
- service: homeassistant.turn_on # Re-enable automation
entity_id: automation.leviton_scene_button_1
- alias: Leviton Scene Button 2
trigger:
platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.master_bedroom_scene_controller
scene_id: 2
action:
- service: homeassistant.turn_off # Disable automation due to multiple scene activated messages
entity_id: automation.leviton_scene_button_2
- service: switch.toggle
entity_id: switch.master_bedroom_left_bedside_light
- delay: '00:00:02' # Wait 2 seconds
- service: homeassistant.turn_on # Re-enable automation
entity_id: automation.leviton_scene_button_2
- alias: Leviton Scene Button 3
trigger:
platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.master_bedroom_scene_controller
scene_id: 3
action:
- service: homeassistant.turn_off # Disable automation due to multiple scene activated messages
entity_id: automation.leviton_scene_button_3
- service: switch.toggle
entity_id: switch.master_bedroom_right_bedside_light
- delay: '00:00:02' # Wait 2 seconds
- service: homeassistant.turn_on # Re-enable automation
entity_id: automation.leviton_scene_button_3
- alias: Leviton Scene Button 4
trigger:
platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.master_bedroom_scene_controller
scene_id: 4
action:
- service: homeassistant.turn_off # Disable automation due to multiple scene activated messages
entity_id: automation.leviton_scene_button_4
- service: switch.toggle
entity_id: switch.master_bedroom_snail_light
- delay: '00:00:02' # Wait 2 seconds
- service: homeassistant.turn_on # Re-enable automation
entity_id: automation.leviton_scene_button_4
The only issue is that when toggling the same device on/off, you need an extra key press in between. If switching between devices, you don’t need the extra key press (as the controller “disables” one scene and enables another scene). This is because we are only trapping the scene activation event, and when the scene is “deactivated” on the Leviton controller, it sends a NodeEvent message back. However, it doesn’t not look like there is any difference in the NodeEvent message for any of the 4 scenes.
2017-08-03 14:04:11.020 Detail,
2017-08-03 14:04:11.020 Info, Node039, UPDATE_STATE_NODE_INFO_RECEIVED from node 39
2017-08-03 14:04:11.021 Detail, Node039, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Dynamic live=1
2017-08-03 14:04:11.021 Detail, Node039, QueryStage_Dynamic
2017-08-03 14:04:11.022 Detail, Node039, QueryStage_Configuration
2017-08-03 14:04:11.022 Detail, Node039, QueryStage_Complete
2017-08-03 14:04:11.023 Warning, CheckCompletedNodeQueries m_allNodesQueried=0 m_awakeNodesQueried=1
2017-08-03 14:04:11.024 Warning, CheckCompletedNodeQueries all=0, deadFound=0 sleepingOnly=1
2017-08-03 14:04:11.024 Detail, Node039, Notification: NodeQueriesComplete
2017-08-03 14:04:11.070 Detail, Node039, Received: 0x01, 0x09, 0x00, 0x04, 0x08, 0x27, 0x03, 0x20, 0x01, 0x00, 0xff
2017-08-03 14:04:11.071 Detail,
2017-08-03 14:04:11.071 Info, Node039, Received Basic set from node 39: level=0. Sending event notification.
2017-08-03 14:04:11.072 Detail, Node039, Notification: NodeEvent
2017-08-03 14:04:11.115 Detail, Node039, Received: 0x01, 0x09, 0x00, 0x04, 0x08, 0x27, 0x03, 0x20, 0x01, 0x00, 0xff
2017-08-03 14:04:11.121 Detail,
2017-08-03 14:04:11.123 Info, Node039, Received Basic set from node 39: level=0. Sending event notification.
2017-08-03 14:04:11.123 Detail, Node039, Notification: NodeEvent
2017-08-03 14:04:11.182 Detail, Node039, Received: 0x01, 0x09, 0x00, 0x04, 0x08, 0x27, 0x03, 0x20, 0x01, 0x00, 0xff
2017-08-03 14:04:11.185 Detail,
2017-08-03 14:04:11.186 Info, Node039, Received Basic set from node 39: level=0. Sending event notification.
2017-08-03 14:04:11.187 Detail, Node039, Notification: NodeEvent
2017-08-03 14:04:11.265 Detail, Node039, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x27, 0x03, 0x20, 0x01, 0x00, 0xf7
2017-08-03 14:04:11.266 Detail,
2017-08-03 14:04:11.267 Info, Node039, Received Basic set from node 39: level=0. Sending event notification.
2017-08-03 14:04:11.267 Detail, Node039, Notification: NodeEvent