Using wall switch

I am trying to understand how to use a “wall switch” in HS. It is a GoControl WA00Z-1. The instructions say to "Put your controller in ASSOCIATION mode with Group 2 or Group 3. I have not found any way to do this in HS. The device shows up only as battery condition entities. Nothing that looks like an on/off device.

Could you please give more detail?

Do you mean HA (Home Assistant)?

Are you trying to add the device to your Z-Wave network for the first time?

Looks like the default is to send Central Scene commands to Group 1. Group 1 is automatically configured by the driver. Group 2 and 3 would be for controlling other Z-Wave devices. Try listening for scene events. You can create automations to react to the different key press events. Device Triggers are also available to trigger from scene events.

HA does not support group associations, you need zwavejs2mqtt to do that.

I thought there might be some connection to the scene structure but it is not clear what “listening for scene events” really means.

Looking at the example in the link, there are a large number of parameters which it appears one needs to know. As a new user it is not at all clear where they all come from or what to expect to happen if one gets it working.

It is looking like this device will not easily do what was expected which was to act as a simple on-off switch which could be read by an automation as part of a control.

Use DevTools Events to listen for zwave_js_value_notification to see what your device is reporting. According to your device’s manual, the top button is scene 1 and bottom is scene 2 (default settings). It doesn’t say whether 2x/3x/etc taps are supported.

Looking at the example in the link, there are a large number of parameters which it appears one needs to know.

The example is of an event received by HA. Not all parameters are required. Of course, you need to know how to use Event triggers. As mentioned above, if you listen to the event in DevTools, you can see what your specific device reports. For an event trigger, only the minimal values are necessary to match.

If using event triggers is not your style, then try Device triggers. Go to the device page, click the + sign in Automations, and select the Central Scene trigger, which is hopefully available.

I have one of these scene switches (basically a set of two pushbuttons).

the buttons support press, long press and long press release events.

here is the data from my button presses when using zwavejs:

top button quick press:

{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 35,
        "home_id": 3971937092,
        "endpoint": 0,
        "device_id": "39b64a12cd75652fbfa657306760b444",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 001",
        "property": "scene",
        "property_name": "scene",
        "property_key": "001",
        "property_key_name": "001",
        "value": "KeyPressed",
        "value_raw": 0
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-01T21:24:30.698581+00:00",
    "context": {
        "id": "c372f962c87146c83d97c8d14b23b55c",
        "parent_id": null,
        "user_id": null
    }
}


top button hold:


{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 35,
        "home_id": 3971937092,
        "endpoint": 0,
        "device_id": "39b64a12cd75652fbfa657306760b444",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 001",
        "property": "scene",
        "property_name": "scene",
        "property_key": "001",
        "property_key_name": "001",
        "value": "KeyHeldDown",
        "value_raw": 2
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-01T21:25:10.412053+00:00",
    "context": {
        "id": "b1697a5d89972708e36cd24a8951fd07",
        "parent_id": null,
        "user_id": null
    }
}

top button release after hold:


{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 35,
        "home_id": 3971937092,
        "endpoint": 0,
        "device_id": "39b64a12cd75652fbfa657306760b444",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 001",
        "property": "scene",
        "property_name": "scene",
        "property_key": "001",
        "property_key_name": "001",
        "value": "KeyReleased",
        "value_raw": 1
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-01T21:25:10.811879+00:00",
    "context": {
        "id": "072246662b21b89e8d3e45da025d7eac",
        "parent_id": null,
        "user_id": null
    }
}


bottom button quick press:

{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 35,
        "home_id": 3971937092,
        "endpoint": 0,
        "device_id": "39b64a12cd75652fbfa657306760b444",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 002",
        "property": "scene",
        "property_name": "scene",
        "property_key": "002",
        "property_key_name": "002",
        "value": "KeyPressed",
        "value_raw": 0
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-01T21:27:00.728259+00:00",
    "context": {
        "id": "a4e4a5a77250bebf144643186c979902",
        "parent_id": null,
        "user_id": null
    }
}


bottom button hold:

{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 35,
        "home_id": 3971937092,
        "endpoint": 0,
        "device_id": "39b64a12cd75652fbfa657306760b444",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 002",
        "property": "scene",
        "property_name": "scene",
        "property_key": "002",
        "property_key_name": "002",
        "value": "KeyHeldDown",
        "value_raw": 2
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-01T21:30:10.214773+00:00",
    "context": {
        "id": "ad90ab20a848b3b18ef60b633a920249",
        "parent_id": null,
        "user_id": null
    }
}

bottom button release after hold:


{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 35,
        "home_id": 3971937092,
        "endpoint": 0,
        "device_id": "39b64a12cd75652fbfa657306760b444",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 002",
        "property": "scene",
        "property_name": "scene",
        "property_key": "002",
        "property_key_name": "002",
        "value": "KeyReleased",
        "value_raw": 1
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-01T21:30:12.688152+00:00",
    "context": {
        "id": "3378ff7f01470d2c3df2a0a1d278fdf4",
        "parent_id": null,
        "user_id": null
    }
}

you should only need a small bit of that data.

here are a couple of example triggers:

    trigger:
      - platform: event
        event_type: zwave_js_value_notification
        event_data:
          node_id: 35
          label: Scene 001
          value: KeyHeldDown
    trigger:
      - platform: event
        event_type: zwave_js_value_notification
        event_data:
          node_id: 35
          label: Scene 001
          value: KeyPressed

you should only need to change the node_id to your button node number

with that info you should be able to suss out the rest.

NOTE: this is for zwavejs. if you use the old zwave it will be different.

Thanks, I will give this a try.

Finity, This may sound elementary but none of the documentation I can find seems to actually say the following. I think I have some idea what most of the variables and labels do but then where does this go? The first group including “top button press” looks like it should go in the configuration.yaml file but it does not seem to do anything there. Also the second group with two trigger examples would seem to go in the scenes.yaml file but again it does not seem to have any effect. So:

What files does this code go in?

Once it is there with the proper node_id, do I expect to use it in an automation as a trigger? If so, what goes in “Event type”? do I use “Scene 001”?
Then what goes in “Event data”? do I use “KeyPressed”.

It appears that all these labels are arbitrary and do not come from a dictionally in the system. If that is so, then there does not appear to be anything in the code that defines the difference in the “top button quick press:” and “bottom button quick press:” code. Clearly something fundamental is being missed.

You will use the examples I gave in the trigger of the automation.

you might be able to set up a trigger binary sensor from the event data and then use that binary sensor as the trigger in an automation but that seems to be more work and more code for the same end result.

the event data I provided doesn’t “go” anywhere. it is only the event data supplied to the system on the various button actions.

you will use the unique portions of that even data in the triggers to your automations as I provided in the examples.

look in my examples.

it says:

event_type: zwave_js_value_notification

again look in my example:

event_data:
  node_id: 35
  label: Scene 001
  value: KeyHeldDown

if you look at the event data for all of the button actions I posted above you will see that all “top button” event data is defined as:

"label": "Scene 001",

and the bottom button events are all:

"label": "Scene 002",

the differences between the various button actions are delineated in the “value” (“KeyPressed”, “KeyHeldDown”, “KeyReleased”) for each event.

I thank you for your patience. I now have it working.

If I might ask one more thing, how did you get the messages showing all the details of an event? They look like they should have come from the event tab in “Developer tools”. I have never managed to get that to do anything. Perhaps that is why all this seems so cryptic. It appears that one has to provide an event name to “subscribe” to and then open some file. It is not clear what the syntax is of the event name or what file the results show up in.

It’s almost impossible to know what the event name to listen to unless you already know it. Not very user friendly but it is the way it is unfortunately.

But there is a a lit of events being listened for on the right side of the screen to give you an idea of what is available. I doubt it’s an exhaustive list tho.

But the way you do it is go to dev tools->events then at the bottom on the left portion of the screen under " Listen to events" there will be a line where you type in the event name to listen for. Put in “zwave_js_value_notification”. Then click “start listening”.

after that you will see data start to populate the screen below that when you push the buttons on the device.

finity, I would say that zwave_js_value_notification is the magic.

Seeing the events makes the operation of the system much clearer.

There are a number of things I could say about the related documentation but that is another story. I clearly don’t know enough about the system to do it properly and those that do, in an open source project, likely don’t have the time to do it.

1 Like