Tell us about yourself!
take the task in components. meaning first work on the rain gauge logic. perhaps a resberry pi with Sensehat so you can make it a weather station and can better predict the weather (barometric pressure). With the Rasberry Pi you could write a script to perform the weather logic you are wanting. The window simply needs to be told when to open (+) volts or close (0) volts from controller. The mechanics of the window I would imagine would have a top and bottom sensor to trigger when to disengage the motor (similar to a garage door opener). The other option is use pneumatic devices to open / close the window so with no pressure the window closes (spring or weight driven) and with pressure it opens up.. good luck
Loft Bed - DIYView Instructable »