“Central Scene” Command Class - Fibaro Swipe, HomeSeer WS-100D Switches

Upgraded to 0.53 and i can confirm it works but it needs “dirty” modifications to the zwcfg file. To get this fixed nicely i think it needs a fix on openzwave.

1 Like

So what exactly are the steps to make this thing work ?

Step1: Upgrade to 0.53 :slight_smile:
Step2: Shutdown HASS
Step3: Edit the zwcfg_0x…xml file in your config dir and find your Fibaro Swipe section
Step4: Replace the entire id=91 CommandClass section with the code below

	        <CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="4">
			<Instance index="1" />
			<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="4" />
			<Value type="int" genre="user" instance="1" index="1" label="Flick UP" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
			<Value type="int" genre="user" instance="1" index="2" label="Flick DOWN" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
			<Value type="int" genre="user" instance="1" index="3" label="Flick LEFT" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
			<Value type="int" genre="user" instance="1" index="4" label="Flick RIGHT" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
		</CommandClass>

With this code you can use UP, DOWN, LEFT and RIGHT. I haven’t added the circular motions yet and can’t be bothered to be honest at the moment.

Step5: Start HASS
Step6: Add an automation using zwave.scene.activated as a trigger, for example:

trigger:
  - platform: event
    event_type: zwave.scene_activated
    event_data:
      entity_id: zwave.swipe1
      scene_id: 1

This uses scene id 1 which corresponds to UP. 2 = DOWN, 3 = LEFT and 4 = RIGHT

4 Likes

Thanks for the detailed information but I don’t have a Fibaro I do have a HomeSeer HS-WD100+

The steps should be the same. Just edit the CommandClass section to match the HS-WD100+
This was posted earlier by sirmalloc

<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="2">
        <Instance index="1" />
        <Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="2" />
        <Value type="int" genre="user" instance="1" index="1" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
        <Value type="int" genre="user" instance="1" index="2" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
</CommandClass>
1 Like

Thanks !!!

How can you use this with different HomeSeer WS-100D Switches ???
object_id: or this is not necessary ?

You just need to change the entity_id in the automation trigger to the switch you want to use.

1 Like

Hi … I dont understand

For example this is my automation:

- alias: Patio Double Up Gate
  hide_entity: True
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data:
      scene_id: 1
      scene_data: 3
  action:
    - service: homeassistant.toggle
      entity_id: input_boolean.gate

I want to use central scene with different HomeSeer switches I have.

The entity_id that activated the central scene is included in the event_data sent with the event. For your particular automation, you’d do something like this:

- alias: Patio Double Up Gate
  hide_entity: True
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data:
      entity_id: zwave.dining_room_lights
      scene_id: 1
      scene_data: 3
  action:
    - service: homeassistant.toggle
      entity_id: input_boolean.gate
5 Likes

Thank you very much !! that worked perfect !!!

Ok. I’m pulling my hair out…
COMPLETELY new to HA, this is the first automation I’m trying to set up… here’s what I have:

Developer Tools -> about (in HA) says I’m on Home Assistant 0.53.0

I’ve added the following to the zwcfg_*.xml file:

<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="2">
  <Instance index="1" />
  <Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="2" />
  <Value type="int" genre="user" instance="1" index="1" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
  <Value type="int" genre="user" instance="1" index="2" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
</CommandClass>

Here’s my automations.yaml (properly called from configuration.yaml):

## - DEN DIMMER Automations - ################
- alias: 'Den North Light DBLTap Up'
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data:
      entity_id: zwave.den_north_light
      scene_id: 1
      scene_data: 3
  action:
  - service: light.turn_on
    entity_id: light.den_north_light_level
    data:
      brightness: 255

From within HA, if I go to Automations and click trigger, the light comes on.
If I double tap up on the HS Dimmer, nothing happens, other than the log found at Configuration -> ZWave -> OZW Log says:

2017-09-12 21:10:38.291 Detail, Node009,   Received: [HEX]
2017-09-12 21:10:38.292 Detail, 
2017-09-12 21:10:38.292 Info, Node009, Received Central Scene set from node 9: scene id=1 in 3 seconds. Sending event notification.
2017-09-12 21:10:38.292 Warning, Node009, No ValueID created for Scene 1

And the info for that dimmer is:

is ready true
sentCnt 6
receivedDups 0
is zwave plus true
retries 0
averageResponseRTT 159
is awake true
is failed false
node name Den North Light
neighbors 8, 10
node id 9
receivedCnt 4
old entity id zwave.den_north_light_9
sentFailed 0
capabilities routing, beaming, listening
manufacturer name HomeSeer
product name HS-WD100+ Wall Dimmer
receivedTS 2017-09-12 21:10:19:128
max baud rate 40000
lastResponseRTT 165
is info received true
new entity id zwave.den_north_light
averageRequestRTT 90
query stage Complete
receivedUnsolicited 0
sentTS 2017-09-12 21:10:18:963
lastRequestRTT 102

I must be missing something completely obvious?!?!

@sephtin - Was Home Assistant stopped when you made the zwcfg_*.xml modifications? If not, then your changes will be overwritten when it shuts down or restarts. The “Warning, Node009, No ValueID created for Scene 1” message is appearing because OZW can’t find the value defined in the zwcfg_*.xml, so the change was either not made properly, or got reverted when Home Assistant restarted. I’d double check that first.

1 Like

Has anybody here tried this with an Aeotec Wallmote Quad? I got it working for the normal button presses with the code above, but I haven’t been able to get the long presses working. Any help would be appreciated!

1 Like

@sirmalloc - Thank you for the assistance, it’s greatly appreciated!
I figured it out… Finally. You were spot on, that it was the zwcfg_*.xml. I have three of the dimmers added, and didn’t realize that I had to change that section multiple times int he file.
Upon re-reading the doc at https://home-assistant.io/docs/z-wave/device-specific/
I had missed that it says “for each node”.

Again, completely HASS newb. … it’s working now!
Thank you again!!

1 Like

@garrettbeachy - Do you see any activity in the OZW_Log.txt when you do the long presses?

@sirmalloc This what I see when I short press the button:

2017-09-14 20:08:32.707 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0xf5, 0x00, 0x01, 0x4a
2017-09-14 20:08:32.707 Detail, 
2017-09-14 20:08:32.707 Info, Node019, Received Central Scene set from node 19: scene id=1 in 0 seconds. Sending event notification.
2017-09-14 20:08:32.707 Detail, Node019, Refreshed Value: old value=0, new value=0, type=int
2017-09-14 20:08:32.707 Detail, Node019, Changes to this value are not verified
2017-09-14 20:08:32.707 Detail, Node019, Notification: ValueChanged

This is what I see when I long press the button:

2017-09-14 20:09:17.666 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0xf6, 0x00, 0x01, 0x49
2017-09-14 20:09:17.666 Detail, 
2017-09-14 20:09:17.666 Info, Node019, Received Central Scene set from node 19: scene id=1 in 0 seconds. Sending event notification.
2017-09-14 20:09:17.666 Detail, Node019, Refreshed Value: old value=0, new value=0, type=int
2017-09-14 20:09:17.666 Detail, Node019, Changes to this value are not verified
2017-09-14 20:09:17.667 Detail, Node019, Notification: ValueChanged

And this is what I put in my .xml file to get it to register the presses:

<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="4">
    <Instance index="1" />
    <Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="4" />
    <Value type="int" genre="user" instance="1" index="1" label="1" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
    <Value type="int" genre="user" instance="1" index="2" label="2" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
    <Value type="int" genre="user" instance="1" index="3" label="3" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
    <Value type="int" genre="user" instance="1" index="4" label="4" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
</CommandClass>

The only difference I can see between the short and long presses is the characters at the end of the first line.

2 Likes

@garrettbeachy - By any chance is it sending two events for the long press that you might be overlooking - one when the press is started and another when it ends? If not, I’d suggest turning on verbose logging in the OpenZWave options.xml (https://github.com/OpenZWave/open-zwave/wiki/Config-Options) and see if anything additional is displayed when the long press occurs.

Good catch! I didn’t realize that it was sending multiple events. This is everything that I see when I long press one of the buttons:

2017-09-15 18:50:17.337 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0xff, 0x02, 0x01, 0x42
2017-09-15 18:50:17.337 Detail, 
2017-09-15 18:50:17.337 Info, Node019, Received Central Scene set from node 19: scene id=1 in 2 seconds. Sending event notification.
2017-09-15 18:50:17.337 Detail, Node019, Refreshed Value: old value=1, new value=2, type=int
2017-09-15 18:50:17.337 Detail, Node019, Changes to this value are not verified
2017-09-15 18:50:17.338 Detail, Node019, Notification: ValueChanged
2017-09-15 18:50:17.357 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0x00, 0x02, 0x01, 0xbd
2017-09-15 18:50:17.357 Detail, 
2017-09-15 18:50:17.357 Info, Node019, Received Central Scene set from node 19: scene id=1 in 2 seconds. Sending event notification.
2017-09-15 18:50:17.357 Detail, Node019, Refreshed Value: old value=2, new value=2, type=int
2017-09-15 18:50:17.358 Detail, Node019, Changes to this value are not verified
2017-09-15 18:50:17.358 Detail, Node019, Notification: ValueChanged
2017-09-15 18:50:17.545 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0x01, 0x02, 0x01, 0xbc
2017-09-15 18:50:17.546 Detail, 
2017-09-15 18:50:17.546 Info, Node019, Received Central Scene set from node 19: scene id=1 in 2 seconds. Sending event notification.
2017-09-15 18:50:17.546 Detail, Node019, Refreshed Value: old value=2, new value=2, type=int
2017-09-15 18:50:17.546 Detail, Node019, Changes to this value are not verified
2017-09-15 18:50:17.546 Detail, Node019, Notification: ValueChanged
2017-09-15 18:50:17.736 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0x02, 0x02, 0x01, 0xbf
2017-09-15 18:50:17.852 Detail, 
2017-09-15 18:50:17.853 Info, Node019, Received Central Scene set from node 19: scene id=1 in 2 seconds. Sending event notification.
2017-09-15 18:50:17.853 Detail, Node019, Refreshed Value: old value=2, new value=2, type=int
2017-09-15 18:50:17.853 Detail, Node019, Changes to this value are not verified
2017-09-15 18:50:17.853 Detail, Node019, Notification: ValueChanged
2017-09-15 18:50:17.936 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0x03, 0x02, 0x01, 0xbe
2017-09-15 18:50:18.019 Detail, 
2017-09-15 18:50:18.019 Info, Node019, Received Central Scene set from node 19: scene id=1 in 2 seconds. Sending event notification.
2017-09-15 18:50:18.020 Detail, Node019, Refreshed Value: old value=2, new value=2, type=int
2017-09-15 18:50:18.020 Detail, Node019, Changes to this value are not verified
2017-09-15 18:50:18.023 Detail, Node019, Notification: ValueChanged
2017-09-15 18:50:18.028 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0x04, 0x01, 0x01, 0xba
2017-09-15 18:50:18.029 Detail, 
2017-09-15 18:50:18.029 Info, Node019, Received Central Scene set from node 19: scene id=1 in 1 seconds. Sending event notification.
2017-09-15 18:50:18.029 Detail, Node019, Refreshed Value: old value=2, new value=1, type=int
2017-09-15 18:50:18.029 Detail, Node019, Changes to this value are not verified
2017-09-15 18:50:18.029 Detail, Node019, Notification: ValueChanged

It looks like it makes more events if I hold longer on the button as well.

That’s perfect. The HomeSeer dimmer does that as well for press and hold events. That should make things fairly simple as it looks to me like these are the values for the button you’ve been testing:

Action scene_id scene_data
Short Press 1 0
Long Press Start / Hold 1 2
Long Press End 1 1

You should be able to bind an automation to the scene data at the end of the long press (scene_id = 1, scene_data = 1), and if you wanted to get fancy you can use the start / hold scene data to perform more complex automation like dimming a light while the button is being held. Let me know how that works out for you.

1 Like