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

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

@sirmalloc Awesome! That works perfectly. Thanks for your help

Nice! Does anybody know what the future of the permanent fix for this is? Still trying to work out what needs to be patched to make these features work natively. Cheers!

@bruhautomation - To avoid any manual configuration editing for the HS-WD100+, one would need to submit an updated hs-wd100plus.xml to the OpenZWave project and have them accept it, wait for a new release of both OpenZWave and python_openzwave, modify Home Assistant to reference the released version of python_openzwave, submit a pull request for that and have it accepted, then wait for a new release of Home Assistant.

To shortcut some of that, you could manually modify your local site-packages/python_openzwave/ozw_config/homeseer/hs-wd100plus.xml to include the command class, remove the nodes from your zwcfg xml, then relaunch Home Assistant and add them via the UI, at which point it’ll pull the command class from the XML for any nodes of that type.

I believe there is still an open pull request for a more complete implementation of the central scene command class in OpenZWave. I’m unsure if that better performs discovery of the scenes available from a device, thus negating the need for the manual definition in the xml. If so, that would be ideal, and would require no more changes in Home Assistant aside from referencing whatever version of OpenZWave contains the update.

1 Like

Gotcha. Nice! Sorry for the delay responding. Always see these from my inbox and forget to hit respond. Thanks for the info. Pumped for the progress on this front. Looking forward to implementing and making more videos soon. Cheers!

1 Like

Here is the PR from @robbiet480 on the openzwave GitHub, unfortunately it’s been open for 8 months without the maintainer doing much work on it.

https://github.com/OpenZWave/open-zwave/pull/1125

@sirmalloc

Is there somewhere to get the required changes for these files, that includes the central scene detail?
I have another 12 or so of these to add, and as I’m having a horrible time getting my zwconf*.xml to hold the changes (stopping hass, making the change, restarting hass (or rebooting, etc.) doesn’t hold the changes).

I’d happy mod the hs-wd100plus.xml and hs-ws100plus.xml, add all my devices to save the hassle, just need to know what changes are required.

Nevermind, I just put the entries that I would have put in the zwcfg*.xml file into the xml files for the switch and dimmer, then removed and re-added a couple switches and dimmers to test, and they’re working well.

With help from sixreeves (discord chat) and @sirmalloc (From: Trying to efficiently write automation using trigger.entity_id - can't seem to get syntax right) my automations work after simply adding and renaming the switches/dimmers.

For example, all of my HS Dimmers go to full brightness on double tap up, dim very low on double tap down (I also have single tap up turn them on to different levels based on time of day…).

#### - HS DIMMER Automation - ################
- alias: 'HSDimmer DBLTap Up'
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data:
      scene_id: 1
      scene_data: 3
  action:
    service: light.turn_on
    data_template:
      entity_id: '{{"light." + trigger.event.data.entity_id.split(".")[1] + "_level" }}'
    data:
      brightness: 255
1 Like

Thanks for the example, this works for my switches now

 - alias: 'HomeSeer Switch Fix On'
    trigger:
      platform: event
      event_type: zwave.scene_activated
      event_data:
        scene_id: 1
        scene_data: 0
    action:
      - service: switch.turn_on
        data_template:
          entity_id: '{{"switch." + trigger.event.data.entity_id.split(".")[1] + "_switch" }}'
  - alias: 'HomeSeer Switch Fix Off'
    trigger:
      platform: event
      event_type: zwave.scene_activated
      event_data:
        scene_id: 2
        scene_data: 0
    action:
      - service: switch.turn_off
        data_template:
          entity_id: '{{"switch." + trigger.event.data.entity_id.split(".")[1] + "_switch" }}'

Hello,

I’m trying to setup a scene command for a WS-100D but it doesn’t work and I don’t know why:

  • zwcfg xml has been updated
  • event is received
    Nov 28 21:50:01 pi hass[730]: 2017-11-28 21:50:01 INFO (MainThread) [homeassistant.core] Bus:Handling <Event zwave.scene_activated[L]: node_id=3, scene_id=1, entity_id=zwave.homeseer_hswd100_wall_dimmer, scene_data=3>
  • I can manually fire an event (from developper tool) that will trigger my automation rule with success:
    • event type: zwave.scene_activated
    • event data { “entity_id”: “light.homeseer_hswd100_wall_dimmer_level”, “scene_data”: 3, “scene_id”: 1})
  • but the rule doesn’t work when I actually double tap the dimmer:
- id: a0009
  alias: Double tap 
  trigger:
    - platform: event
      event_type: zwave.scene_activated
      event_data:
        entity_id: light.homeseer_hswd100_wall_dimmer
        scene_id: 1
        scene_data: 3
  action:
    - service: light.turn_on
      data:
        entity_id: light.commode
        color_name: red
        brightness: 40
        transition: 10

I can’t figure why the rule works with a manual test event and doesn’t work with a real event.
Any clue?

got it fixed, entity_id must be the zwave device not the light device. I based my rule on some examples that can not cleary work.

What is this for ? to fix the delay and the communication of this switches ?