Integrating the system control with relays and devices