from an electrical safety point of view a plug and socket is fine, however it leaves the possibility of the alarm being unplugged either accidently or maliciously. They do have battery backup but it is still imo not a good idea to leave them so easy to disconnect.