Relays off if not connected to the server

Okay, that’s your problem.

You should use virtual pins instead…

Pete.