How do you control a Red Switch from another rule?

I’m using a LZW30-SN red switch to control ceiling lights using multi-tap with local control from wall disabled. But I can’t figure out how to remotely control the switch from another rule in Rule machine. If send an action to push button 1 on the device, nothing happens. I tried looking at the device page and I don’t see any buttons listed 1-8 that i can control from there.

Assuming you want to do this all via the hub and not via Z-Wave association, then you’ll need to one of two things — but first decide whether you’re trying to simulate multi-taps on the other switch (creating button events, technically Z-Wave Central Scene Reports, that you are responding to in other apps/rules) or if you’re trying to just respond to multi-taps on one particular switch to control things like on/off (or level if you have a dimmer) on another switch. Your post describes the first thing, but it seems more like that you’re looking for the second. I’ll explain both anyway so you can see:

Option 1: you want to simulate multi-taps on another switch

First, if you are using Inovelli’s custom driver, you must uncomment the custom commands like “pressUp1x” starting around line 99 (in the current version of the LZW30-SN driver as I’m looking at it now; this may change in the future). You don’t need to know anything about Groovy programming to do this; just remove the /* and */ characters that surround this block of code (the entirety of lines 99 and 113 but nothing else; again, these line numbers are as of my writing this and may be different in the future).

Second, you’ll have to use a custom action in Rule Machine instead of its native “push” actions and whatnot. This is because Inovelli’s drivers use custom command names like pressUpX1() instead of the pseudo-standard Hubitat push() (or push(1), for this particular action, passing 1 as the button number) command to simulate button presses (triggering apps or rules that listen for these events). So, instead of the “Control Switches, Push Buttons” category, you’ll use the “Set Mode or Variables, Run Custom Action” category, choose a custom action, and then choose the command name that matches what you want to run (Inovelli named these to easily match the real-world action with the command name, so it should be simple to find the one you want). Do not add any parameters, as Inovelli’s commands take none.

If you’re using Hubitat’s built-in drivers, you can skip both of the above and just use the standard “Push button” action in Rule Machine. But if you were using this, I assume you wouldn’t have a problem, so either you’re using Inovelli’s custom driver or are really looking for Option 2 (below) instead.

Here’s an example of why Option 1 might be what you’re looking for:

  • You have a Red Series switch or dimmer, let’s call it Switch 1, where you’re already using an app like Rule Machine or Button Controller to respond to multi-taps (button events on Hubitat; “scenes” in Z-Wave terminology) to perform a set of actions that may or may not be related to the light Switch 1 controls
  • You have another Red Series switch or dimmer somewhere, let’s call it Switch 2, where you want to perform the same actions as a mulit-tap that Switch 1 is configured for (as above) without having to program the same actions again in Button Controller, Rule Machine, etc. (instead, just trigger any apps/rules/etc. that would have been triggered by your chosen mulit-tap on Switch 1; some configuration still required but possibly less duplication)

Option 2: you want to control another switch (the light/load) from a multi-tap on another

For this, either Hubitat’s stock driver or Inovelli’s custom driver (or any other community driver you’re using) should all work as-is. What you want is a straightforward Button Controller or rule created, triggered based on the scene event you get from your tap/multi-tap. You’ll need to know what event the particular driver you’re using generates on Hubitat for the real-world action you perform. For example, a double tap down in Hubitat’s stock driver gives you a “button 2 double tapped” event, whereas the same action with Inovelli’s driver gives you “button 2 held” (no, that doesn’t make sense, but usurping the usual meaning of “held” here is how they overcame the need to do button-number math on account of the fact that Hubitat’s native capabilities stop after double-taps). If you’re not sure, try it and see what event happens in your logs or device page (may be hard to tell if there wasn’t a state change), or ask.

Once you figure that out, you’ll just need to set up an automation to respond to that event and control the other switch as desired. If you don’t have a preferred app already for this, Button Controller is built-in and an easy place to start: just choose your button device, add an actions section for the particular button number and event you want to respond to (or all of them and just fill out the ones you’re interested in), and — in there — choose whatever actions you want for the other switch, like turning it off or on.

Here’s an example of something you could do with Option 2:

  • You have a Red Series switch or dimmer that controls the light/load it’s attached to, but you want to use a mulit-tap to control another Red Series switch/dimmer on a totally different circuit (or really any device at all that Hubitat is capable of controlling)
2 Likes

Wow thank you so much for the detailed response! I should have been more specific in my question as I wanted to use the sun setting to trigger the multitap from another rule, but option 1 was exactly what i needed to do in order to solve that.
So happy I use Inovelli switches + hubitat as the support here is soooo great!

1 Like