Door Sensor

Is there any way I can have my backdoor only sending notifications during certain hours like 12pm till 6am? Or when no one is home? Thanks for any help. Also trying to figure out what to do with the motion sensor, the cameras work well for what I use them for.