Hello, everyone… I’ve searched all over the place and I’m having a hard time figuring out how to access multi-button presses on the Inovelli Blue switch in Node Red so that I can set up scenes and/or automations that trigger when I double or triple (etc) press buttons on the switch.
I’ve played with the events: state node, the device node, and trigger: state nodes, hooked up to debug nodes, and the only response I get in the debug window are for on and off. I’m sure I’m missing something basic.
My current setup is that I have a raspberry pi 4 with Home Assistant installed. I’ve linked the switches to Home Assistant via Zigbee2MQTT. I have a mix of smart and dumb bulbs. I’ve bound the switches directly to the smart bulbs.
I can create basic automations in Node Red and can detect in node red when the switch is turned on or off. But I can’t figure out how to detect double presses, triples, etc. in Node Red.
I’m a newbie at this, so detailed answers would be very helpful for me. Thanks in advance for your help.
I stopped using node red prior to the blue’s, but I’d have probably used the zigbee2mqtt-in node out of the z2m pallete to accomplish this. You’ll have to open the pallete manager to add these nodes in.
There’s probably 3 or 4 other ways to do the same thing. Some other options would be the mqtt node or an event:all node (not generally recommended for resources). Somebody still using node-red should be able to help you further, but this should get you pointed in the right direction.
Not gonna be super helpful, but just wanted to throw the thing I did out there. I guess it creates a button entity in HA that triggers the flow when pressed.
Thanks for this. I did happen to find some information on the z2m palette. I installed it, but I was having trouble figuring out how to connect it to the mqtt server. I was not sure where to find the host IP address. I’ll explore this option further.
I have not played with the MQTT node. I’ll check it out.
This does seem like an option, but maybe a bit clunky? I think there’s a more streamlined approach out there because I’ve seen references to it, but never a detailed explanation on how to set it up! Thank you for the input… it gives me new realms to explore.
For those reading, I did find that, in node red, if I choose the “action” entity for the switch in the “events: state” node, the msg payload contains all of the various button presses. Now my goal is to figure out the most efficient way to set this up so I don’t have a spiderweb of nodes for each switch. Input on how to accomplish this would be much appreciated!
OK, if you’ve got it reading the events, the next step is to run that event node into a switch node. Change msg.payload to whatever the location of the action event is, then add items for all of the possible options you want.
If you decide to go the z2m node route, the host would be the ip address of your HA server (assuming you’re using the z2m addon, not standalone). Topic is typically zigbee2mqtt, port 1883. Once you’ve setup the configuration node, when you drop in the z2m in node, you’ll get a drop down list of all your devices. Then you’ll run it into a switch node just like above.
Thanks, Stu… I got this working via the Z2M “in” node, but I’ll give this method a try, too. I’m not sure if there’s one that’ll be more reliable than the other. If you have any input on that, let me know!