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

Does this require the openzwave PR mentioned above? Lack of Central Scene support has been the only blocker preventing me from trying Home Assistant for months now.

@jvolkman - No. I’ve tested on a regular HA 0.51.2 install without modifying anything else. The master branch of openzwave has some CentralScene knowledge (see open-zwave/cpp/src/command_classes/CentralScene.cpp) I noticed some log messages in OZW_log.txt anytime I did a double / triple tap stating No ValueID created for Scene 1, and that got me started down the correct path to figure out the modification I needed to make to the zwcfg file to get past that error and have openzwave issue a ValueChanged event, which I was able to intercept in HA.

I believe the PR mentioned above is for a more complete, proper implementation of the CentralScene, whereas this just catches the ValueChanged event that has enough information to get a unique ID for the different events.

@robbiet480, @PhilK - Thanks for the feedback. I’ll work on the PR today and tomorrow (bringing home my newborn from the hospital today so I might be a little busy). I’d like to see if this works for other devices using CentralScene like the Aeotec Wallmote, but I’ve not yet got one to test with. I’m assuming as long as the COMMAND_CLASS_CENTRAL_SCENE block in zwcfg has a SceneCount and a value matching the Instance and Index that openzwave is sending, then we will get the ValueChanged event with the information we need to identify the tap. If anyone has one that is willing to test, that would be awesome.

4 Likes

How would I add support for double and triple tap? Anyone have an example config?

These are mine and they’re working well (the variation in id format is me messing with the UI setup for automations)

- action:
  - data:
      entity_id: script.close_master_bedroom
    service: script.turn_on
  alias: Triple tap down close all
  condition: []
  id: triple_tap_down_close
  trigger:
  - event_data:
      entity_id: light.master_bedroom_level
      scene_id: 24
    event_type: zwave.scene_activated
    platform: event
- action:
  - data:
      entity_id: script.open_master_bedroom
    service: script.turn_on
  alias: Triple tap up open all
  condition: []
  id: triple_tap_up_open
  trigger:
  - event_data:
      entity_id: light.master_bedroom_level
      scene_id: 14
    event_type: zwave.scene_activated
    platform: event
- action:
  - data:
      entity_id: script.open_blackouts
    service: script.turn_on
  alias: double tap blinds up
  condition: []
  id: '1503110870233'
  trigger:
  - event_data:
      entity_id: light.master_bedroom_level
      scene_id: 13
    event_type: zwave.scene_activated
    platform: event
- action:
  - data:
      entity_id: scene.privacy
    service: scene.turn_on
  alias: double tap blinds down
  condition: []
  id: '1503110973790'
  trigger:
  - event_data:
      entity_id: light.master_bedroom_level
      scene_id: 23
    event_type: zwave.scene_activated
    platform: event

I’ve gone ahead and submitted a PR for this: https://github.com/home-assistant/home-assistant/pull/9178

4 Likes

I’ve been using the latest version of your PR and it works great. Thanks again!

1 Like

Awesome, thanks for the feedback.

If anyone has any other devices that utilize Central Scene I’d love some feedback as the HomeSeer dimmer is the only one I’ve got available to test on.

1 Like

I’ve tested your PR last night with a Z-Wave.Me WALLC-S wall switch. It works fine so far. Although I’ve only tested one simple scene trigger. I didn’t touch long, double or any other more complicated method.

The only thing I did was to change the COMMAND_CLASS_CENTRAL_SCENE block in the zwcfg file. The index apparently has to match the OZW scene ID.

		<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="5" issecured="true" innif="true" scenecount="5">
			<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="5" />
			<Value type="int" genre="user" instance="1" index="1" label="Top Left 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="Top Right 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="5" label="Bottom Left 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="6" label="Bottom Right Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
		</CommandClass>

So far all four buttons work with single tap.

1 Like

Is it now natively supported in HA or does it still need all these “dirty” modifications in code to get the Swipe usable in HA ?

Thanks

The PR has been merged and should ship with the next release (0.53).

1 Like

@cgtobi Thanks for confirmation, waiting for 0.53 now :smiley:

@vincen I believe even with 0.53 you’ll still need to manually update your zwcfg file to get working Central Scene commands. Not sure if that’s what you meant by “dirty” modifications…

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