Create two virtual switches; you'll use these to control each of the relays in the RSM2. In the example below, I've called the RSM2 as "Enerwave" and the virtual switches as "Switch-A" and "Switch-B".
Create 2 separate rules in RM:
Rule - 1:
Switch-A turns *changed*
IF (Switch-A is on) THEN
on1() on Enerwave
off1() on Enerwave
Rule - 2:
Switch-B turns *changed*
IF (Switch-B is on) THEN
on2() on Enerwave
off2() on Enerwave
Add Switch-A and Switch-B to your Dashboard. You'll be able to control each of the relays independently. Also, the actions on1(), on2(), off1(), and off2() are exposed as Custom Actions for the Enerwave device in Rule Machine.
I am new to Hubitat and have not created a Virtual Switch nor a Rule of that nature before. Need a bit more detail in order to do what you recommend. I don't see anything in the Help section on Virtual switches. also - I can't seem to click on the 'Trigger' function in the Rule Machine. This SW is not very intuitive. Can you elaborate or direct me to a good location with training information?
That is one tricky rule machine to get working, but in the end I got all my dual switches working. Thank you. Does it work any better in any particular Internet browser? I was having button not show up occasionally.
Came across this topic when moving from ST to Hubitat. At first I thought the plus version of the RSM2 driver was not available but looking closer Eric Maycock did create a plus version for Hubitat. All you do is install both the RSM2-Plus driver and the switch child device driver. Then save the RSM2-Plus driver to the device and it will automatically create the child devices. It avoids having to create the virtual devices or creating the rules in RM. And, more importantly, it syncs the child device status with the Physical switch. The regular driver with the virtual devices and the rules cannot change the individual Virtual Switches when one of the physical switches is changed. With the Plus driver, if you use the child devices names in Alexa, you can physically turn one of the switches, or both, and have Alexa turn it off.
If you look at the ST post on this, Eric started with the regular DTH/Driver with a smart app to keep them in sync (Physical Switch Sync) but updated it with the plus driver which does not need the smart app. It takes a few minutes after you connect the plus driver for the child switches to appear but they do if you have the child driver installed.
Thank you @gmf. Your comment helped me get started.
I have also just started migrating from ST to HE, and this was one of the first drivers. I had three RSM2-Plus's and two of them did not automatically create the switch child devices even after 10minutes post applying the custom driver from Eric. Below shows a one RSM2-Plus that has child device created, and one below that shows one that doesn't create child device:
it took me while (newbie) but i got it all working
the driver im using is: enerwave-rsm2-dual-relay-switch
and i looked at the code it doesn't use children, and one doesn't need it
i figured out how to do everything i needed in RM using custom attributes and commands
as i use the dual relay to trigger another device
but to answer the question, there are no preferences, hense no debug on/off
which is odd... maybe driver needs a little more polishing...
Hi, I've been using Eric's driver for a while and it worked perfect, both the main and the Child devices. No need to create virtual switches, and the status of the child devices updated immediately when the physical switch was used.
For a reason that I can't find, about two weeks ago the child devices stopped reporting its status. When I look at the events in the child, there is nothing there starting about two weeks ago. I noticed because it devices become irresponsive in the dashboard I'm using them.
I tried removing the device, resetting and adding again to HE, but still the same problem. The main device report status OK, the Childs work OK from their individual UI pages, I can turn them on and off but no events are logged and no status is show in the child device page. Its like they don't exist to HE (which by definition is an event based platform...) but they can be turned on or off.
Nothing seems to be wrong in the logs when using the Childs from their pages:
While I've never did anything in Groovy, looking at the code and comparing with Python it seems the function ChannelNumber() fails as the var passed is null. I wasn't able to trace back the problem, though.
Anybody had seen something like this?
Not sure if @ericm still uses this driver, from what I've look in the ST forums...
I don't have this device anymore, but I just updated the driver to specify which version of multichannel to parse (a little different than your change). If it was working before I would think that this would fix.