As usual, revealing the code exposes bigger problems.
delay(200);
In the middle of an interrupt?
I presume that's your debounce, but it's entirely the wrong approach. To sit in there for 200 ms blocks everything else happening on your processor.
Instead, just set a flag for contact close, and do the debounce processing in loop().
Of course, the plethora of other delays in your code will prevent you from doing much else anyway.
And that's because the contacts are bouncing, as expected. You need to defend against that, but not in the interrupt routine.
Basically, note when a change happens, and don't accept another change for a period of time - but not using delay().
The reason I'm not being more explicit as to how to do it in your code is because there is so much that needs renovating there, I don't know where to begin; I'm also not familiar with FireBase, so there's that.