The data flow diagram above explains how the three pieces of software (Arduino, Mosquitto, and OpenHAB) work together to get the functionality we're after. This one diagram pretty much explains how all the communications work. Hopefully it makes sense.
Let's take care of the PC side by installing the two programs Mosquitto and OpenHAB.
Install the MQTT broker called Mosquitto. Once installed, Mosquitto can simply be ran by double clicking on the executable after installation. Make sure Mosquitto is running by navigating to the program folder and running this following command in the command prompt window ("dos prompt").
cd C:\"Program Files (x86)"\mosquitto
mosquitto_sub -h localhost -t #
This subscribes to all topics on the MQTT broker. When numbers come in from the Arduino's ultrasonic distance sensor in later steps, you'll see them appear here. And when you push the garage door open button, you'll also see that activity here. Use ctrl_c to cancel out of this.
OpenHAB is the main server. It can be installed on a PC, Mac, or Raspberry Pi (and other similar single board computer). The Raspberry Pi is ideal for this since it's very energy efficient, but for first time users, a Windows or Mac installation will be easiest.
Install OpenHAB according to the instructions on the OpenHAB wiki. Get familiar with some of the OpenHAB files like the sitemap, item, and rules file. The wiki does a good job explaining this, so I'll forgo the OpenHAB explanation myself.
Once installed, use the attached text file and add the appropriate sections to the configuration of the item, sitemap, and rules files. Here's the the graphics used for the "car present" indicator, but you're free to use your own if you're artistically incline. The images go in \webapps\images of the OpenHAB folder.
That should be it for OpenHAB. If you're using Windows, double click the "start.bat" file in the OpenHAB folder to start running it. Open a browser and go to "http://localhost:8080/openhab.app?sitemap=demo" to view the interface.
For the mobile app, download it from the app store and enter the IP address of the PC hosting OpenHAB. You'll have to "port forward" and create a "dynamic DNS" in order to use the app outside of your home wifi network. I won't go over this detail, but google it and you shall find.