Added code to update relays from server input