@bigjme Sounds “simple” but it is actually a complex project for most beginners. Fortunately the Spark Core does much of the hard work for you making this easy and can handle reading one analog (light sensor) and one digital (motion sensor) input, manage a real time clock for timed action, and allow override control of this through exposing Spark Functions (turnOn() and turnOff() or slightly more complex turnDevice(bool val) and pass it “ON” or “OFF”), all in the name of controlling one output.
My suggestion for you is to start by experimenting with each piece separately until they work flawlessly. Then start coupling them together.
You may need to debounce your digital input if your motion sensor does not have any hysteresis built into it, however it’s output should change states (high or low) and stay that way for a little bit… at least while there is motion. When the motion settles it should change back to the at rest state (high or low). If not, the output could jitter high and low while the motion is in an in-between state. This would require debouncing.
Your analog input shouldn’t require any filtering if your light levels are not wildly changing. If they are expected to change rapidly you might want to add a digital filter. I have an example here of how to filter an analog input https://community.spark.io/t/spark-core-execution-speed/884/6 This example also shows how to setup timed loops, and counters for other timed processes. You would need something like that to effectively debounce a digital input.
Here is how to expose internal functions over the internet: http://docs.spark.io/#/firmware/cloud-spark-function
You could put together a simple single page web application (SPA) that controls your functions and returns status on the current condition of the output with something like this pretty easily: http://jflasher.github.io/spark-helper/
To figure out what the current state of the output is, you could access an internal state variable that controls your output like this: http://docs.spark.io/#/firmware/cloud-spark-variable
I don’t believe there is a Real Time clock example yet, but I’m sure there will be one soon. The functionality is there already. You just need an easy way of setting the time (maybe via atomic server) and then polling for the current time and comparing vs. some preset constants. Maybe later you can work up a way to set the time over the internet through a function.