The software to trigger the alarm can be as simple as
If (car door state toggles from close > open) && (keyfob or key card or phone is NOT detected)
Alarm = ON
So as of now, before you open the door, make sure the phone bluetooth is on or have a keyfob or key card nearby, else the car...