I have exactly the same issue above with a 5222L Hw Rev A2.
If I enable video motion, at night, with IR on, the quality is so bad and video so flickering that triggers continuously the motion detection, no matter which percentage I select. I have tried even 10 % but no luck. During the day the quality of the video is ok and everything is fine.
I ended up in activate only the PIR sensor which works fine but only detects if someone passes by in front of the camera and doesn't detect other area of the room more far away.
Hope that a better firmware will fix this because for the rest, I love the features of this camera.
It would be nice also if the sound and motion can be set together to trigger the detection and not separately as it is now.