Aeotec WallMote and OpenZWave qt-openzwave

Hi, I am running Home Assistant 0.110.4 on Raspberry PI 4 installed in Python virtual env. Got Aeotec WallMote Quad added as a Device using OpenZWave along with latest qt-openzwave

What I am trying to do is activate Scene when WallMote button is pressed. Created my Automation as below:

When tapping WallMote button I can see (using ngrep) the following being passed to MQTT broker:

T 127.0.0.1:1883 -> 127.0.0.1:52499 [AP] #2
0...EOpenZWave/1/node/27/instance/1/commandclass/91/value/281475435380756/{
    "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"
            }
        ],
        "Selected": "Pressed 1 Time",
        "Selected_id": 1
    },
    "Units": "",
    "ValueSet": false,
    "ValuePolled": false,
    "ChangeVerified": false,
    "Min": 0,
    "Max": 0,
    "Type": "List",
    "Instance": 1,
    "CommandClass": "COMMAND_CLASS_CENTRAL_SCENE",
    "Index": 1,
    "Node": 27,
    "Genre": "User",
    "Help": "",
    "ValueIDKey": 281475435380756,
    "ReadOnly": false,
    "WriteOnly": false,
    "Event": "valueChanged",
    "TimeStamp": 1591085496
}

But automation is not executed for some reason.

Any suggestions on how to make this work very much appreciated.

Regards,
Chris

Don’t post screenshots of the automation. post the actual code created by the automation editor. Make sure it’s correctly formatted for the forum.

Hi @finity - thanks for prompt reply and apologies for not following forum guidelines in relation to screenshots. Here is content of my automations.yaml file:

- id: '1591078797227'
  alias: Office Light Switch
  description: ''
  trigger:
  - device_id: 5450c0d8579a4ee0a4bacdea9106dabf
    domain: switch
    entity_id: switch.wallmote_quad_instance_2_switch
    platform: device
    type: turned_on
  condition: []
  action:
  - scene: scene.office_light_on

Is there any other YAML / JSON etc I can share to help investigate this further?

What’s the status of switch.wallmote_quad_instance_2_switch when you push the button?

The status of switch.wallmote_quad_instance_2_switch when I push the button is off

Then the reason it won’t work is because the automation is looking for the entity to be “turned_on”.

I don’t have a wallmote but I believe in the old zwave integrated system you needed to trigger off of a zwave event since there was no state change to watch for.

With the new system you will need to figure out what changes in HA when you push the button.

I think (without having one of them or knowing how the new zwave over mqtt works for sure) since the new zwave doesn’t generate zwave events that you will probably need to not use a device automation (TBH, I’ve never used a device automation…ever) but use a regular automation that triggers on an MQTT topic/payload message.

I hope that rambling sentence makes sense…

Thanks a lot for a hint. I did managed to get this to work now by creating two Automations (one to switch ON and the other to switch OFF my light):

- id: '1591078797227'
  alias: Office Light ON
  description: ''
  trigger:
  - platform: mqtt
    topic: OpenZWave/1/node/27/instance/1/commandclass/91/value/562950412091412/
  condition:
  - condition: device
    device_id: e551af299a804b07bbbbcbb1bde2530a
    domain: switch
    entity_id: switch.zw175_smart_switch_7_switch
    type: is_off
  action:
  - device_id: e551af299a804b07bbbbcbb1bde2530a
    domain: switch
    entity_id: switch.zw175_smart_switch_7_switch
    type: turn_on
- id: '1591097653942'
  alias: Office Light OFF
  description: ''
  trigger:
  - platform: mqtt
    topic: OpenZWave/1/node/27/instance/1/commandclass/91/value/562950412091412/
  condition:
  - condition: device
    device_id: e551af299a804b07bbbbcbb1bde2530a
    domain: switch
    entity_id: switch.zw175_smart_switch_7_switch
    type: is_on
  action:
  - device_id: e551af299a804b07bbbbcbb1bde2530a
    domain: switch
    entity_id: switch.zw175_smart_switch_7_switch
    type: turn_off

I am very new to HA, so a question here: is it possible to do if/else type of condition in Automation, so I could have one Automation to achieve the above instead of two?

Another problem I have is for some reason my device is generating not one, but two events (1s apart) when I press the button, so my light if switching ON and than back OFF after 1 sec:

2020-06-02 12:41:56 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/27/instance/1/commandclass/91/value/562950412091412/: b'{\n    "Label": "Scene 2",\n    "Value": {\n        "List": [\n            {\n                "Value": 0,\n                "Label": "Inactive"\n            },\n            {\n                "Value": 1,\n                "Label": "Pressed 1 Time"\n            },\n            {\n                "Value": 2,\n                "Label": "Key Released"\n            },\n            {\n                "Value": 3,\n                "Label": "Key Held down"\n            }\n        ],\n        "Selected": "Pressed 1 Time",\n        "Selected_id": 1\n    },\n    "Units": "",\n    "ValueSet": false,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "List",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_CENTRAL_SCENE",\n    "Index": 2,\n    "Node": 27,\n    "Genre": "User",\n    "Help": "",\n    "ValueIDKey": 562950412091412,\n    "ReadOnly": false,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1591098116\n}'
2020-06-02 12:41:56 INFO (MainThread) [homeassistant.components.automation] Executing Office Light OFF
2020-06-02 12:41:56 INFO (MainThread) [homeassistant.components.automation] Office Light OFF: Running script
2020-06-02 12:41:56 INFO (MainThread) [homeassistant.components.automation] Office Light OFF: Executing step device automation
2020-06-02 12:41:56 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on OpenZWave/1/command/setvalue/: {"ValueIDKey": 441008144, "Value": false}
2020-06-02 12:41:56 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/command/setvalue/: b'{"ValueIDKey": 441008144, "Value": false}'
2020-06-02 12:41:56 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/event/setvalue/: b'{\n    "status": "ok",\n    "TimeStamp": 1591098116\n}'
2020-06-02 12:41:57 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/26/instance/1/commandclass/37/value/441008144/: b'{\n    "Label": "Switch",\n    "Value": false,\n    "Units": "",\n    "ValueSet": false,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "Bool",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_SWITCH_BINARY",\n    "Index": 0,\n    "Node": 26,\n    "Genre": "User",\n    "Help": "Turn On/Off Device",\n    "ValueIDKey": 441008144,\n    "ReadOnly": false,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1591098117\n}'
2020-06-02 12:41:57 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/27/instance/1/commandclass/91/value/562950412091412/: b'{\n    "Label": "Scene 2",\n    "Value": {\n        "List": [\n            {\n                "Value": 0,\n                "Label": "Inactive"\n            },\n            {\n                "Value": 1,\n                "Label": "Pressed 1 Time"\n            },\n            {\n                "Value": 2,\n                "Label": "Key Released"\n            },\n            {\n                "Value": 3,\n                "Label": "Key Held down"\n            }\n        ],\n        "Selected": "Inactive",\n        "Selected_id": 0\n    },\n    "Units": "",\n    "ValueSet": false,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "List",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_CENTRAL_SCENE",\n    "Index": 2,\n    "Node": 27,\n    "Genre": "User",\n    "Help": "",\n    "ValueIDKey": 562950412091412,\n    "ReadOnly": false,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1591098117\n}'
2020-06-02 12:41:57 INFO (MainThread) [homeassistant.components.automation] Executing Office Light ON
2020-06-02 12:41:57 INFO (MainThread) [homeassistant.components.automation] Office Light ON: Running script
2020-06-02 12:41:57 INFO (MainThread) [homeassistant.components.automation] Office Light ON: Executing step device automation
2020-06-02 12:41:57 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on OpenZWave/1/command/setvalue/: {"ValueIDKey": 441008144, "Value": true}
2020-06-02 12:41:57 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/command/setvalue/: b'{"ValueIDKey": 441008144, "Value": true}'
2020-06-02 12:41:57 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/event/setvalue/: b'{\n    "status": "ok",\n    "TimeStamp": 1591098117\n}'
2020-06-02 12:41:58 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on OpenZWave/1/node/26/instance/1/commandclass/37/value/441008144/: b'{\n    "Label": "Switch",\n    "Value": true,\n    "Units": "",\n    "ValueSet": false,\n    "ValuePolled": false,\n    "ChangeVerified": false,\n    "Min": 0,\n    "Max": 0,\n    "Type": "Bool",\n    "Instance": 1,\n    "CommandClass": "COMMAND_CLASS_SWITCH_BINARY",\n    "Index": 0,\n    "Node": 26,\n    "Genre": "User",\n    "Help": "Turn On/Off Device",\n    "ValueIDKey": 441008144,\n    "ReadOnly": false,\n    "WriteOnly": false,\n    "Event": "valueChanged",\n    "TimeStamp": 1591098118\n}'

Fix for that will be in qt-openzwave settings I guess.

Best regards,
Chris

As I said above I don’t ever use the device automations or even use the automation UI editor to create any automations at all.

So I would have to say I really don’t know. I do know it can be fairly easily done in yaml.

I see that too on my test system.

you should be able to extract the payload and only trigger the on or off automations with the corresponding on or off payload. But in order to do that I’m not sure if the automation UI editor allows you to select the desired payload from the MQTT message. Otherwise you will have to do it in yaml.

@chris-mac did you get this working? Do you have some details on how you resolved it? I’m having the same problem with the light turning 1 second later because I lifted my finer :slight_smile: