Although there is no direct way of intercepting the security module signals (for example Door/Window sensors), however, if you have the OnAlert plugin installed, you could write macros for your security modules and then later on intercept those macro commands in your program.
Hope it makes sense!