To avoid the need for lots of code you could use the sensor to contol the coil of a two pole relay. Then use one set of contacts to operate the alarm input and the other set to operate the other systems inputs.PS - like the idea of tapping into the alarm panel to find the state of various sensors! i was toying with putting two contacts on the windows... this way i just need one set of cables between alarm and pi, and lots of code to decode whats being sent!