Node-Red Blue Switch ZHA Flow

Hi Folks,

Here’s a Node-RED flow/subflow for Inovelli Blue switches.
It’s a modified from the Z-Wave version(can’t remember source)
Features Up/Down: 1-5 taps, held, and released. Config: 1, and 2 taps
Just add the device id to the Device node and attach an Inovelli scene ZHA subflow node

inoblueflow

[
    {
        "id": "0ad4df0e7f32cd7f",
        "type": "subflow",
        "name": "Inovelli scenes ZHA",
        "info": "",
        "category": "",
        "in": [
            {
                "x": 65,
                "y": 360,
                "wires": [
                    {
                        "id": "35630d399d38b44f"
                    }
                ]
            }
        ],
        "out": [
            {
                "x": 749,
                "y": 180,
                "wires": [
                    {
                        "id": "0c681df92541d650",
                        "port": 0
                    }
                ]
            },
            {
                "x": 749,
                "y": 225,
                "wires": [
                    {
                        "id": "0c681df92541d650",
                        "port": 1
                    }
                ]
            },
            {
                "x": 749,
                "y": 270,
                "wires": [
                    {
                        "id": "0c681df92541d650",
                        "port": 2
                    }
                ]
            },
            {
                "x": 749,
                "y": 315,
                "wires": [
                    {
                        "id": "0c681df92541d650",
                        "port": 3
                    }
                ]
            },
            {
                "x": 749,
                "y": 360,
                "wires": [
                    {
                        "id": "0c681df92541d650",
                        "port": 4
                    }
                ]
            },
            {
                "x": 749,
                "y": 405,
                "wires": [
                    {
                        "id": "0c681df92541d650",
                        "port": 5
                    }
                ]
            },
            {
                "x": 749,
                "y": 450,
                "wires": [
                    {
                        "id": "0c681df92541d650",
                        "port": 6
                    }
                ]
            },
            {
                "x": 758,
                "y": 522,
                "wires": [
                    {
                        "id": "07a0b06d5ab3ce9b",
                        "port": 0
                    }
                ]
            },
            {
                "x": 758,
                "y": 567,
                "wires": [
                    {
                        "id": "07a0b06d5ab3ce9b",
                        "port": 1
                    }
                ]
            },
            {
                "x": 758,
                "y": 612,
                "wires": [
                    {
                        "id": "07a0b06d5ab3ce9b",
                        "port": 2
                    }
                ]
            },
            {
                "x": 758,
                "y": 657,
                "wires": [
                    {
                        "id": "07a0b06d5ab3ce9b",
                        "port": 3
                    }
                ]
            },
            {
                "x": 758,
                "y": 702,
                "wires": [
                    {
                        "id": "07a0b06d5ab3ce9b",
                        "port": 4
                    }
                ]
            },
            {
                "x": 758,
                "y": 747,
                "wires": [
                    {
                        "id": "07a0b06d5ab3ce9b",
                        "port": 5
                    }
                ]
            },
            {
                "x": 758,
                "y": 792,
                "wires": [
                    {
                        "id": "07a0b06d5ab3ce9b",
                        "port": 6
                    }
                ]
            },
            {
                "x": 749,
                "y": 882,
                "wires": [
                    {
                        "id": "2952437261522b91",
                        "port": 0
                    }
                ]
            },
            {
                "x": 749,
                "y": 936,
                "wires": [
                    {
                        "id": "2952437261522b91",
                        "port": 1
                    }
                ]
            }
        ],
        "env": [],
        "color": "#DDAA99",
        "outputLabels": [
            "Up 1x",
            "Up 2x",
            "Up 3x",
            "Up 4x",
            "Up 5x",
            "Up held",
            "Up released",
            "Down 1x",
            "Down 2x",
            "Down 3x",
            "Down 4x",
            "Down 5x",
            "Down held",
            "Down released",
            "Config tap 1x",
            "Config tap 2x"
        ]
    },
    {
        "id": "35630d399d38b44f",
        "type": "switch",
        "z": "0ad4df0e7f32cd7f",
        "name": "Scene ID",
        "property": "payload.event.params.button_pressed",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 231,
        "y": 360,
        "wires": [
            [
                "07a0b06d5ab3ce9b"
            ],
            [
                "0c681df92541d650"
            ],
            [
                "2952437261522b91"
            ]
        ]
    },
    {
        "id": "0c681df92541d650",
        "type": "switch",
        "z": "0ad4df0e7f32cd7f",
        "name": "Scene Value (Up)",
        "property": "payload.event.params.press_type",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "5",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "6",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 7,
        "x": 558,
        "y": 270,
        "wires": [
            [],
            [],
            [],
            [],
            [],
            [],
            []
        ],
        "outputLabels": [
            "Up 1x",
            "Up 2x",
            "Up 3x",
            "Up 4x",
            "Up 5x",
            "Up hold",
            ""
        ]
    },
    {
        "id": "2952437261522b91",
        "type": "switch",
        "z": "0ad4df0e7f32cd7f",
        "name": "Scene Value (Config)",
        "property": "payload.event.params.press_type",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 560,
        "y": 909,
        "wires": [
            [],
            []
        ],
        "outputLabels": [
            "Single Config Tap",
            ""
        ]
    },
    {
        "id": "07a0b06d5ab3ce9b",
        "type": "switch",
        "z": "0ad4df0e7f32cd7f",
        "name": "Scene Value (Down)",
        "property": "payload.event.params.press_type",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "5",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "6",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 7,
        "x": 550,
        "y": 639,
        "wires": [
            [],
            [],
            [],
            [],
            [],
            [],
            []
        ],
        "outputLabels": [
            "Down 1x",
            "Down 2x",
            "Down 3x",
            "Down 4x",
            "Down 5x",
            "Down held",
            ""
        ]
    },
    {
        "id": "b0027e70f08cce75",
        "type": "server-events",
        "z": "caac49a3740b59c4",
        "name": "ZHA",
        "server": "",
        "version": 1,
        "event_type": "zha_event",
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "waitForRunning": true,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            },
            {
                "property": "topic",
                "propertyType": "msg",
                "value": "$outputData(\"eventData\").event_type",
                "valueType": "jsonata"
            }
        ],
        "x": 90,
        "y": 620,
        "wires": [
            [
                "3144aed186073a24"
            ]
        ]
    },
    {
        "id": "6a9905b29515109f",
        "type": "subflow:0ad4df0e7f32cd7f",
        "z": "caac49a3740b59c4",
        "name": "",
        "x": 440,
        "y": 420,
        "wires": [
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            []
        ]
    },
    {
        "id": "3144aed186073a24",
        "type": "switch",
        "z": "caac49a3740b59c4",
        "name": "Device",
        "property": "payload.event.device_id",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 10,
        "x": 230,
        "y": 620,
        "wires": [
            [
                "6a9905b29515109f"
            ],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            []
        ]
    }
]
4 Likes

This is the way…if your switch is outputting events unlike mine currently with the signal/routing issues.