Zwave-JS - Honeywell Switch Double Click

I have several rooms that have a main ceiling light/fan that are controlled with Honeywell Zwave dimmer and fan switches, all configured with ZwaveJS2mqtt (using socket not mqtt). These switches also support scene control through double tapping. I also have several lamps in that room with Zigbee bulbs linked through Deconz. The lamps are all on a switched outlet, which means my wife constantly shuts them off completely so they become unresponsive. I want to move them to a non-switched outlet and would like to configure an automation to toggle the lamps on/off through a double tap of the zwave switch. However, I can’t seem to find where and if that is possible. I have some zigbee buttons that I create automations through the deconz events, but wasn’t sure if it was possible through zwave-js. I did set the logging to “silly” and here’s what a top button double click produces:

2021-10-13T16:15:18.197Z DRIVER « [Node 014] [REQ] [ApplicationCommand]
└─[BasicCCSet]
target value: 255
2021-10-13T16:15:18.198Z CNTRLR [Node 014] treating BasicCC::Set as a value event

And here’s what a bottom double tap produces:

2021-10-13T16:16:24.718Z DRIVER « [Node 014] [REQ] [ApplicationCommand]
└─[BasicCCSet]
target value: 0
2021-10-13T16:16:24.720Z CNTRLR [Node 014] treating BasicCC::Set as a value event

from Debug Tab in ZwaveJS2mqtt you can track what are the value for each action (double, triple tap, etc). Then you can use this in your automation. This is what I have:

[{"id":"7c077dd7.d2bd34","type":"switch","z":"d47f25ca.e1a558","name":"Zwave device?","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"eq","v":"14","vt":"str"},{"t":"eq","v":"8","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":240,"y":180,"wires":[["b8196e6c.34ba2"],["9d06019.d25ed"]]},{"id":"b8196e6c.34ba2","type":"function","z":"d47f25ca.e1a558","name":"","func":"var ID = (msg.payload.event.property_key).toString() + (msg.payload.event.value_raw).toString()\nmsg.payload = ID\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":60,"wires":[["b265418f.5fc7f"]]},{"id":"b265418f.5fc7f","type":"switch","z":"d47f25ca.e1a558","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0013","vt":"str"},{"t":"eq","v":"0023","vt":"str"},{"t":"eq","v":"0014","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":650,"y":60,"wires":[["d9cc8269.d45fe"],["d39413cc.eb955"],["db5923ca.d6579"]]}]

I use 1 action (say double tap up) as an on/off toggle.

What model switch is it? Can you post a link to the device that’s listed at https://devices.zwave-js.io/ ?

EDIT: nevermind, your device is already configured to emit notification events. You can use the zwave_js_value_notification that was posted already. See the docs for details: Z-Wave JS - Home Assistant

I have a blueprint that handles double taps for GE switches, which are the same. You could take the blueprint and modify the manufacturer, or look at it to see how zwave_js events can be triggered off of.

Or, you can use Device triggers in the UI to do the same.

1 Like

That worked beautifully! Thanks for sharing that.

Thanks for sharing! I was able to get this working in node-red with your example.

I’m glad it helped you.

I was not successful in using the above solution to monitor event zwave_js_value_notification to get double taps to work despite having the same switches and seeing the same data in ‘silly’ logging as the OP. I did even import the node-red script provided by @e_jp but the events node didn’t import. I suspect maybe somthing has changed in home assistant since 2021.

What worked for me was to create an events:state node in node red with the entity event.<entity name here>_event_value. Node red will auto-complete this for you when you start typing and there is one for each one of these switches that I have. Then I created a switch node and switched on data.new_state.attributes.value with up being a number value of 255 and down being 0. The node red export for this is below. Hope it helps someone.

[
    {
        "id": "7c16039b3a06632f",
        "type": "api-call-service",
        "z": "74448d5550379ac2",
        "name": "kitchen can lights off",
        "server": "48db2cad.a7e544",
        "version": 5,
        "debugenabled": false,
        "domain": "light",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.kitchen_can_lights_5"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 740,
        "y": 480,
        "wires": [
            []
        ]
    },
    {
        "id": "fb9f37014ce0548b",
        "type": "api-call-service",
        "z": "74448d5550379ac2",
        "name": "kitchen can lights on",
        "server": "48db2cad.a7e544",
        "version": 5,
        "debugenabled": true,
        "domain": "light",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "light.kitchen_can_lights_5"
        ],
        "data": "",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 740,
        "y": 420,
        "wires": [
            []
        ]
    },
    {
        "id": "3d348dabde9dd568",
        "type": "switch",
        "z": "74448d5550379ac2",
        "name": "dbl tap up or down",
        "property": "data.new_state.attributes.value",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "255",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 370,
        "y": 920,
        "wires": [
            [
                "cd87b6e24bf3b2e4",
                "fb9f37014ce0548b"
            ],
            [
                "2a0403ae6df21497",
                "7c16039b3a06632f"
            ]
        ]
    },
    {
        "id": "6fdf36ced2180e0f",
        "type": "server-state-changed",
        "z": "74448d5550379ac2",
        "name": "kitchen can dbl tap",
        "server": "48db2cad.a7e544",
        "version": 5,
        "outputs": 1,
        "exposeAsEntityConfig": "",
        "entityId": "event.kitchen_can_lights_event_value",
        "entityIdType": "exact",
        "outputInitially": false,
        "stateType": "str",
        "ifState": "",
        "ifStateType": "str",
        "ifStateOperator": "is",
        "outputOnlyOnStateChange": true,
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            },
            {
                "property": "topic",
                "propertyType": "msg",
                "value": "",
                "valueType": "triggerId"
            }
        ],
        "x": 150,
        "y": 920,
        "wires": [
            [
                "3d348dabde9dd568"
            ]
        ]
    },
    {
        "id": "48db2cad.a7e544",
        "type": "server",
        "name": "Home Assistant",
        "version": 5,
        "addon": true,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true,
        "cacheJson": true,
        "heartbeat": false,
        "heartbeatInterval": 30,
        "areaSelector": "friendlyName",
        "deviceSelector": "friendlyName",
        "entitySelector": "friendlyName",
        "statusSeparator": "at: ",
        "statusYear": "hidden",
        "statusMonth": "short",
        "statusDay": "numeric",
        "statusHourCycle": "h23",
        "statusTimeFormat": "h:m",
        "enableGlobalContextStore": true
    }
]