It's doing what it should do.
It's an ALARM system, it thinks someone is 'playing' with it.
1st, when you turn off the mains what you have described should not happen if everything is ok, it isn't.
The battery in the control panel needs replacing, it's had it.
The battery in the box outside has taken over because the one in the panel is naff.
That's why the Keypad does not work.
Turn the mains off, open the box, remove the battery, close the box, & take it to Maplin / Screwfix etc. for a replacement.
When replacing, turn mains off, replace battery, close panel, enter code & Bob's your father's brother.
acorn
August 2011