Lights turning ON or OFF

How can I prevent recording when lights are turned ON or OFF. I have set things up to record on motion and have set up an area for detection but things seem to record when lights are used or even when there is nothing in my motion detection area?

Yes that is tricky. There is no way for the present motion detection algorithm to tell if when light turns on/off if that´s good or bad. You would need an algorithm where you can learn the system that in your case when that happens it´s nothing to worry about and do not react. However, then you must be very certain that next time that happens it also nothing to react to. These AI systems usually have another price tag on them.
For a recording to start the motion detection must be triggered so something in the area sets it off. For motion detection enable the signal bar. Look at the recording and when that goes red check on the video what sets it off. You can tweak the system with Motion Sensibility and Threshold. Change to the motion detection algorithm Blob detection can sometimes also help.