I should have paid closer attention the the first thread. I assumed you were seeing spurious triggering, but now I realize this isn't the case.
You script uses md_get_cell_val, not md_get_cell_diff so this doesn't represent spurious motion detection. It represents the average value of the cell.