Create two virtual switches - one for each relay within the Enerwave RSM2.
Using Rule Machine, create a rule that uses Custom Actions to run the commands relay1 On() and relay1 Off() when with first virtual switch is turned on or off.
Do the exact same thing for the second virtual switch, except the Custom Actions will be relay2 On() and relay2 Off().
Found an old post of mine with the rule neatly laid out ...