So I'm going to wire the motion sensor to both the PF and the GPIO for testing and when I have things right, I'll remove the PF. What I need to do is figure out a way to count ON commands or ON/OFF cycles and when I see more than a set number in a period of time, I disable the sensor from causing anything to happen. I'm ok with the second part, but not the counting.
My quick and dirty approach would work, but I hate doing it this way. Set up an array of x length. When a command comes in, put the time of the command in array location 1 and move everything down. When a command comes in, check to see if the time between command 1 and command n is less than a specified interval and, if so, turn off whatever code is using the motion sensor results.
I'm sure this would work, but I'm not sure if it's the best/cleanest approach. Maybe I'm over complicating it. The issue I have really is having to store potentially a large set of commands. I guess if I just decide that 10 commands in a minute is excessive, I'd only need to store 10 times, so maybe it's not too bad.