Sorry, this is a long post (it does concentrate on the app logic that I'm proposing).
I'm a complete noob with both the Rpi and Android programming (although I am a software developer by trade).
Someone has already created an Android app, which (via a local pc + wifi) - opens the garage door.
Basically, his app has wifi ON continuously on his smartphone and when he get's within range - the garage opens.
By his own admission, the app is 'basic', and I was looking to produce a more polished version.
My clearest thoughts are around the requirements of the smartphone app and the Rpi details are sketchy at best (although I envisage it being relatively simple to switch the door on receipt of a wi-fi signal, although - I'll probably eat my words lol).
I'm a biker, and therefore would love to not have to stop in the pouring, freezing rain / sleet, take my gloves off and click a remote (somewhere in one of my pockets).
My main concern for an app has been with battery power conservation on the smart-phone.
Basically, leaving Wi-Fi on (or having to switch it on before you set off from work) is a no-no - too much wasted smartphone power / not convenient.
I'd like the app to be 'smarter' than that. E.g. leave it 'on' all day - with very little battery consumption.
So how to do just that?
D = actual time distance from the garage
W = time distance from home to turn on wi-fi for the garage BEFORE the smart phone get's there.
T = the time in which the app should wake and check it's own location (D - W).
Let's start some distance from home - say at work...
1) The app is 'running' all the time during the day and is simply a 'timer' that boots it's 'real' self up every T minutes.
2) T is a time variable, which is adjusted by the app itself - dependant on distance from the 'garage' minus WiFi range time.
3) W in minutes / seconds can be re-set by the user (for fine tuning / calibration - for different wi-fi ranges / GPS accuracies etc). This is the time when wi-fi must be switched on in time to not be too far or too close to switch wi-fi on (ready to be within range of the garage). Let's say that W = 2 minutes.
4) The user can also enter modes of travel (basically speed of travel - for more accurate estimation of 'time from home'), which will amend how D is calculated (although even this should be 'programmed-in' to be re-evaluated by the app - if it seems that the user has changed transport type and is travelling much faster / slower than expected).
5) At work - the app 'wakes', turns on GPS and checks the distance to the garage - 15 miles say. (Let's say that for 15 miles; D = 30 minutes).
6) It knows that it will take D minutes for the owner to get to the garage, so it set's a timer to wake and run it's check process in T minutes (D - W), turns off GPS and 'goes to sleep' (now just running an internal timer).
7) In T minutes - it calls it's check-process. The owner hasn't moved - still at work: so redo 5).
8) In T minutes - it calls it's check-process. The owner HAS moved (established by GPS) and is now 10 minutes away from home.
9) It calculates D - W (8 minutes) and resets T. It then set's a timer to wake and run it's check process in T minutes, turns off GPS and 'goes to sleep' (now just running an internal timer).
10) In T minutes - it wakes and runs the check-process - it calculates D - W (T) which is zero (or minus).
11) As T is zero (or) minus - it must be close to home; it turns WiFi on - ready for the garage Rpi to receive.
12) The garage Rpi get's the Wifi signal and boots it's own software app (checking if the door is open or closed etc) and opens the garage door (whilst the smartphone is currently 20 seconds away).
13) The garage Rpi sends a wi-fi signal to the smartphone to say that 'the garage is open as requested' and the smartphone app shuts itself down (completely - no timer etc).
14) The owner parks the vehicle in the garage and closes it via whatever means (remote fob, manually etc) - done.
In the morning:
1) The owner activates the smartphone app with a single click just before leaving the house.
2) The app 'knows' that it is well within the W (2 minute) range; so it turns on WiFi (and leaves it on; maybe the house has thick walls and the owner must be outside) - the Rpi app gets the signal and opens the garage.
3) The owner drives the vehicle out of the garage.
4) The Rpi is 'polling' for wi-fi signal, and when the smartphone wi-fi is lost - it's closes the garage.
5) The smartphone app is still running and amending T, so it shuts WiFi off and continuously calculates T and resets itself to wake in T (subsequently greater and greater times).
5) (An additional idea): If the garage doesn't close correctly - the Rpi sends an email to the smartphone owner, which activates an alarm on the smartphone (not too far away for it to be a drag to return and check the obstruction).
Of course this could be controlled remotely via the web quite easily (possibly your neighbour needs to get in to release a cat etc.) if the Rpi is connected to your home WWW connected network.
Here are some working garage openers:
Get's me au-fait with Android programming / Rpi.
Get's me into my garage on bike with no thought or action.
Get's me into my nice, warm house a few minutes quicker.
If this is to be a generic solution for most electric garage doors, it's difficult to envisage a standard (easy) interface solution to the garage door motor with a relay etc. - unless there's someone who KNOWS garage door electronics.
I've seen 'soldered contacts' in remote fobs etc. which are fed by a relay controlled by a server (not 'clean' enough for me).
I've seen X10 controlled systems ((still messy, with an extra piece of 'dumb' hardware) that's why I'm looking at Rpi).
I'd love to create a small, standalone, boxed, 'sealed' Rpi with a relay sealed within that box, which sits between the garage opener electricity circuit (+ve / -ve) and the relay between it and that supply and the garage opener motor. 4 electricity connections and a sealed Rpi running WiFi - KISS.
Perfect? Nope, but the software app will at least get proven out - ready for a future 'generic' electronic solution (if written generically).
Too complex? Hmm, I believe that we should embed complexity in software - the above long-winded logic that took you 2 minutes to read, is processed in nano-seconds.
RazAquato - your solution requirement is a 'wireless remote fob' which you can buy with the motor, as a kit, for your garage door for perhaps $100.
I already have a remote fob garage door.
I'm talking about a generic solution that automatically opens your garage door type (and mine) - without us doing anything to activate it, apart from start an app in the morning.
If you're interested - I'm just about ready to buy an Rpi and start the project.
I'm interested in Android, but a colleague is interested in IOS (iPhone) and has just bought an Rpi for experimentation.
Drop me a line to see how I'm doing (or possibly collaborate).