This will do it for you.
Use the variable %opencontact% in a message and trigger it with a switch or rain sensor or time
Andy