you could set a flag on the xp8 itself when you turn the lights on via the 12v coil, test the flag to to determine if you want to turn lights on or off in a single macro. Your sense event from the doorbell switch would also initiate this macro so it will always toggle regardless of which keypad triggers it because the logic is in the xp8.
macro: test flag "x" if set then: open relay clear flag "x" if not set then: close relay set flag "x"
If you need to know on the rk itself what the status of the lights is then test the flag on the xp8 from the rk via macro or have the xp8 flag trigger a button status(reversed, invisible, etc) to let you know.
Hey, thats a nice plasma, you can put that in the back of my truck...