How can I use OSX and/or iOS to wake up in the morning depending on calendar events? I'm not a morning person however occasionally I have to do things in the morning.  Currently it's up to me to adjust my alarm clock based on the events in my calendar for the next day.  I'd like to stop having to do this.  

So here are my dream requirements and I'd like to know if through a combination of apps and/or just basic configuration it would be possible to do.


Lets me set a general wakeup time for weekdays and weekends.
Adjusts wake up time based on what events I have the next day.
Lets me set a time I have to be at work by and makes sure I don't snooze too long.
Integrates with home automation systems so I can either open blinds or slowly turn the lights on
Doesn't require me to open an app or anything in order to use it.
Makes it simple to add one off exceptions to this.


I know this is somewhat subjective because people have different needs but I think at least everything except the Home Automation is useful to everyone.
There is an application for OS X named Power Manager. You can schedule your Home, School, Work or Office times and assign triggers and actions. This application runs as a daemon in the background. It can wake up or sleep your Mac, open other applications, interact with other OS features, or even extend its functionalities with making and running external scripts.