Can't get to the zwcfg*.xml file

Can’t find zwcfg*.xml file. I’m not the most skillful programmer so maybe I’m missing something.

I am trying to get my HANK Four-key Scene Controller HKZN-SCN04 to function. According to https://www.home-assistant.io/docs/z-wave/device-specific/ I need to edit my zwcfg*.xml file. I see in many forum discussions that I need to must stop the zwave network and then call my API.

The file is never present probably because I’m not sure how to call my API. What am I missing?

How do you run zwave in HA? The old deprecated zwave or zwavejs or ozw?

If you aren’t using the deprecated zwave then you won’t have that file in your system.

agreed which Zwave app are you trying to run is the first step on this

I have installed the OpenZWave add-on version: 0.9.1. I use ozw. So that must be why I have no zwcfg*.xml.

I’m trying to make an automation triggered by the HANK Four-key Scene Controller. It may be that everything works, but maybe I am not implementing the trigger in my automation correctly.

My log file shows this when I push a button:
[20210221 19:22:57.974 PST] [ozw.library] [debug]: Detail - Node: 22 Notification: ValueChanged CC: COMMAND_CLASS_CENTRAL_SCENE Instance: 1 Index: 3

In my automation I have tried dozens of different ways but none work. Below is my current non-functional attempt:
![HankButtons|587x364]
(upload://jPHBK0Q60OMSxqnw06o4G0Gxqjg.jpeg)

You need to watch the ozw events in the event viewer to see what the events are for the different button presses. Then you can use that data in your trigger.

As an fyi, I don’t do anything with screenshots for code. You need to post the yaml/text instead.

I see the owz event but I’m not sure how to use it to trigger. The owz event I see is:

[20210223 10:37:33.517 PST] [ozw.library] [debug]: Detail - Node: 22 Notification: ValueChanged CC: COMMAND_CLASS_CENTRAL_SCENE Instance: 1 Index: 1

Here is my automation that I’m trying to get working. Part of my problem Is I don’t know what my trigger platform should be. I am using “state” but maybe I need to use Device or Event.

- id: '1612896422385'
  alias: Test Button
  description: ''
  trigger:
  - platform: state
    entity_id: sensor.hkzw_scn04_scene_controller_basic
    from: '0'
    to: '1'
  condition: []
  action:
  - type: toggle
    device_id: 3d6d1924df4e5b22a02e3e30a50d5ef9
    entity_id: switch.46201_in_wall_smart_switch_switch
    domain: switch
  mode: single

You need to use an event. https://www.home-assistant.io/integrations/ozw/#event-ozwscene_activated

I see the owz event and have tried to integrate it into an automation trigger but nothing works.

I think my problem is that I may be missing an entity value for my Hank 4 button. I suspect this because the HA documentation Z-Wave - Home Assistant says I need to edit my zwcfg*.xml file. It makes special referance to the Hank 4 button sceen controller. I do not have a zwcfg*.xml file. According to this post Zwave - Hank 4 Button Controller - Help w/ Setup - #5 by hackerkatt I need to stop HA so the cache file is flushed to disk and create my zwcfg.xml. I have stopped OpenZ wave add-on, and stopped HA, neither create a zwcfg.xml.

Maybe I don’t need to make the edit the HA documentation describes but every time I try various forms of an Hank 4 button automation trigger I get:

Message malformed: extra keys not allowed @ data['entity_id']

There are only two entities for this device, battery and sensor.hkzw_scn04_scene_controller_basic which is always registers “0” as viewed in History and never changes.

For referance the owz events logged when a button is pushed are:

[20210221 19:22:56.969 PST] [ozw.library] [info]: Info - Node: 22 Received Central Scene set from node 22: scene id=3 with key Attribute 0. Sending event notification. 
[20210221 19:22:56.969 PST] [ozw.library] [debug]: Detail - Node: 22 Value Updated: old value=0, new value=1, type=list 
[20210221 19:22:56.970 PST] [ozw.library] [info]: Info - Node: 22 Automatically Clearing Scene 3 in 1000ms 
[20210221 19:22:56.972 PST] [ozw.library] [debug]: Detail - Node: 22 Notification: ValueChanged CC: COMMAND_CLASS_CENTRAL_SCENE Instance: 1 Index: 3  
[20210221 19:22:57.974 PST] [ozw.library] [debug]: Detail - Node: 22 Notification: ValueChanged CC: COMMAND_CLASS_CENTRAL_SCENE Instance: 1 Index: 3 

Nope, in the OZW integration there is no zwcfg*.xml file (renamed to ozwcache*.xml), and scenes are supported by default. The docs you look at are for the zwave integration. There is nothing to edit.

No entities are needed for scene events. You have to reference node id, as shown in the example event. Look at the example again, there is no entity_id. I think the error you’re showing is related to a bad automation, perhaps post that code. If you’re still using a state trigger, you need to convert to an event trigger, states are only for entities.

I’m not sure how to reference my node ID in my automation trigger?
Also you say I don’t need a reference to entity if I trigger off a State but when I change from Event to State in the graphical Configuration/Automation editor it still wants an entity value. When I change from event to state and remove the entity value and save I still get the same message:

Message malformed: required key not provided @ data['entity_id']

and then I review the automation.yaml file and see the entity_id is still in there:

- id: '1612896422385'
  alias: Test Button
  description: ''
  trigger:
  - platform: state
    to: scene = 3
    entity_id: sensor.hkzw_scn04_scene_controller_basic
  condition: []
  action:
  - type: toggle
    device_id: 3d6d1924df4e5b22a02e3e30a50d5ef9
    entity_id: switch.46201_in_wall_smart_switch_switch
    domain: switch
  mode: single

So I make this change using the graphical interface Configuration/Automation then select “Edit in YAML” and make the following:

platform: state
node: 22
scene:3

but when I save I get the same message:

Message malformed: required key not provided @ data['entity_id']

Again I see the automations.yaml file does not reflect the changes I made. And I again get the same message. I consider just editing the automation.yaml file (is this allowed?) Have I corrupted something?

You are still using a state trigger. Scenes are not entities, they are events, so you need to use an event trigger.

  trigger:
    platform: event
    event_type: ozw.scene_activated
    event_data:
      node_id: 22
      scene_id: 3
      scene_value_id: 1

Use the event viewer and listen for ozw.scene_activated to see which values to plugin.

Thank you. It works!