Most efficient way to turn off lights when no motion?

I should have included a link to HPM. That is the beauty of that app, once you do this one time install, you don't need to do anything but click and it downloads and installs a wide variety of apps and drivers for you...