Turn on light at certain times with motion detected?

Can anyone guide me how to do this? I am looking at my UI5; I created a scene with a trigger and a schedule, but it seems the schedule is turning on the light at those times regardless of motion.

Does this require LUUP programming? If so, can you point me in the right direction to start learning luup?

If not, what am I missing?

For LUA:
Lua: documentation
http://wiki.micasaverde.com/index.php/Luup_Lua_extensions
And search for forums for various examples.

For NON LUA options:
http://forum.micasaverde.com/index.php/topic,13802.0.html

You can also use the Smart Switch plugin, and a couple scenes.

More info on setting up scenes at different times:
http://forum.micasaverde.com/index.php/topic,11246.msg109422.html#msg109422