Vera 3 UI5 programmining and questions

Hi All, New to this forum, but have had a nice Zwave system running for the past 2 years. Running a Vera3 UI5 system ( Had UI7 in 2015 but found too many issues do downgraded to UI5 and been running well)
I have Enerwave Zwave relays connected to my Air conditioning systems. I have 1 large AC running 2 apartments. Each apartment has a Enerwave Relay to open that apartments damper and turn the main AC on.
Problem is if one relay turns off, the main ac system also turns off even though the other apartment is still on.
I have no experience in programming or LUUP but have looked everywhere to teach myself. What im after is a scene or program to

1 relay on - Switch AC main plant on
2 relays on - Switch main plant on
1 relay on and 1 relay off - keep main plant on
2 relays off - switch main plant off.

Any help would be greatly appreciated.

Sounds like PLEG might be the ticket for you. But, do a little research. The newest version of PLEG isn’t UI5 compatible. You need an older version and I’m not sure if you need to take special steps to get it.

You woudl have scenes or PLEG conditions controlling the dampers and then a PLEG instance to control the AC. With PLEG the AC_Off condition would be a simple AND statement.

AC_Off : Damper1Closed AND Damper2CLosed AND AC_On