Maybe an overkill for the requested, but have a look, Ideas for controlling blinds based on weather?.