Extracting attributes from Remotec ZRC-90EU scene controller from OpenZwave

Hi All,
I have set up OpenZwave and included a Remotec ZRC-90EU. This is a scene controller with eight buttons. It is recognised by HA because the entity [sensor.zrc_90_battery_level] is listed. However no other information is showing. I presume I will need to set up an mqtt sensor to pull out the relevant attributes. I have not idea how to do that and I would be grateful for any help.
The mqtt message, for example when I press button 1 twice is:

OpenZWave/1/node/12/instance/1/commandclass/91/value/281475183722516/

and the payload is:

{
    "Label": "Scene 1",
    "Value": {
        "List": [
            {
                "Value": 0,
                "Label": "Inactive"
            },
            {
                "Value": 1,
                "Label": "Pressed 1 Time"
            },
            {
                "Value": 2,
                "Label": "Key Released"
            },
            {
                "Value": 3,
                "Label": "Key Held down"
            },
            {
                "Value": 4,
                "Label": "Pressed 2 Times"
            }
        ],
        "Selected": "Pressed 2 Times",
        "Selected_id": 4
    },
    "Units": "",
    "ValueSet": true,
    "ValuePolled": false,
    "ChangeVerified": false,
    "Min": 0,
    "Max": 0,
    "Type": "List",
    "Instance": 1,
    "CommandClass": "COMMAND_CLASS_CENTRAL_SCENE",
    "Index": 1,
    "Node": 12,
    "Genre": "User",
    "Help": "",
    "ValueIDKey": 281475183722516,
    "ReadOnly": true,
    "WriteOnly": false,
    "Event": "valueChanged",
    "TimeStamp": 1609371185
}

The attributes that seem to be relevant are:

"Label": "Scene 1" [this belongs to button 1]

and

        "Selected": "Pressed 2 Times", [action taken recorded as text]
        "Selected_id": 4 [action taken recorded as a number]

and

    "Index": 1, [button 1]
    "Node": 12, [the node number]

If I can extract the “Selected_id”, the “Index” and the “Node” I hope will be able to use that to create a sensor that can trigger an automation.
If anyone could suggest how I extract these attributes, and trigger an automation, and feed a unique number to the automation (so I can action a different script according to which button is pressed and whether a single or double press - such as pressing button 1 of node 12 twice sends something like 12_1_2 and the automation actions a script called scene_control_12_1_2) that would be very helpful.
Cheers!

You don’t need to go through all that trouble. Just use an event trigger in your automation and trigger off the ozw.scene_activated event.

What a relief, thank you freshcoast!

So, I have set up the following automation. When I trigger the automation, the switch is turned on, so the action is working.
But when I press button1 on the Remotec ZRC-90EU nothing happens.
I am using OpenZWave (beta) and Home Assistant in Docker containers without Supervisor on a Pi 4 with a ZMEEUZB1 (Zwave.me) stick.

In https://www.home-assistant.io/docs/z-wave/device-specific/ it talks about amending the zwcfg file but I can’t find this in the ozwd directory.

The automation is:

- alias: Single press button 1
  trigger:
  - platform: event
    event_type: ozw.scene_activated
    event_data:
      node_id: 3
      scene_id: 1
      scene_data: 0
  action:
    - service: switch.turn_on
      data:
        entity_id: switch.tz68_on_off_switch_socket_switch


Thank you very much for your help.

There are no config files to edit for ozw beta. Your event data is not correct as well, there’s no scene_data key. See https://www.home-assistant.io/integrations/ozw/#event-ozwscene_activated.

Thank you for your reply @freshcoast, from the mqtt payload am I able to tell what I should put in the automation trigger please?
I have tried the following based on the mqtt payload shown in my first posting:

- alias: Single press button 1
  trigger:
  - platform: event
    event_type: ozw.scene_activated
    event_data:
      node_id: 12
      scene_id: 1
      selected_id: 1
  action:
    - service: switch.turn_on
      data:
        entity_id: switch.tz68_on_off_switch_socket_switch

Have I entered the correct notation please? This automation has not worked when I loaded it.
Thanks again.

The docs I linked show the correct event data, selected_id is not one of them. Should be scene_value_id if you need a specific button press (single, double, etc).

Use the Event listener in Dev Tools (listen to ozw.scene_activated, press a buttton) to see the exact values for your device. They are standardized, but it helps to see the events.

Thank you very much @freshcoast for coaching a novice through this issue very patiently. I have not used the Event listener before so that was a learning experience for me. The automation is now working and I can now create more automations so that all eight buttons on the scene controller can operate my z-wave network.
For others coming along behind, the Event listener was in my case below the first page view of the the Developer Tools/Events page. Enter “ozw.scene_activated” into the field below “Event to subscribe to” and then click on the “START LISTENING” button. Lastly press a button on the scene controller and the message sent to HA show.
In my case, pressing button one on the scene controller produced the following:

{
    "event_type": "ozw.scene_activated",
    "data": {
        "instance_id": 1,
        "node_id": 4,
        "scene_id": 1,
        "scene_label": "Scene 1",
        "scene_value_id": 1,
        "scene_value_label": "Pressed 1 Time"
    },
    "origin": "LOCAL",
    "time_fired": "2021-01-16T18:02:16.120899+00:00",
    "context": {
        "id": "3379175bc63653d859924f9427a11f72",
        "parent_id": null,
        "user_id": null
    }
}

And so the details in my automation trigger needed to be:

- alias: Single press button 1
  trigger:
  - platform: event
    event_type: ozw.scene_activated
    event_data:
      node_id: 4
      scene_id: 1
      scene_value_id: 1
  action:
    - service: switch.toggle
      data:
        entity_id: switch.tz68_on_off_switch_socket_switch

Thanks again!