I am not sure what the blue and black wire go to but it does not appear to be the door ajar switch. I attached the wiring diagram and that wire is not part of the system.
If you door ajar light stays on then it is either the switch or the wiring. This is a simple circuit so when the Security Module sees the circuit closed, it turns the light off. When one of them is open, the light is on.
Have you checked for an open circuit on that door?
This could explain why your alarm goes off at times because if the system is on and it sees a door open then it could turn the alarm on.
Let me know about the open circuit and we can go from there. Thanks
Images (Click to enlarge)
Saturday, March 13th, 2021 AT 6:09 PM