FREE Shipping on orders over $49 USA $99 INTERNATIONAL

OpenHab2: Setting Up The Home Automation Server Software Mac

Setting Up The Home Automation Serve
Software Mac:
Setting up the micro sd card (Updated 6/21/17):
1. Grab the micro sd card at least 16 gb recommended 32GB
2. Put the micro sd card into your computer, could be using a micro sd card reader
3. Go to:
4. Scroll down to downloads and download the raspberry pi image by clicking on the file called “openhabianpi-raspbian-XXXXX.img.xz”
5. It should download
6. Go to: and download The Unarchiver
7. Go to your downloads folder
8. Double click on the file
9. Drag The unarchiver to applications folder
10. Right click on the openhabianpi-raspbian-XXXXX.img.xz and open with the unarchiver it should unzip it and create a regular .img file without the .xz
12. Scroll down to most recent version (recommended) and click download now
13. Open finder and go to your downloads folder
14. Double click to unzip the
15. Then double click on ApplePi-Baker to open the program
16. You might get a warning saying unidentified developer, if so go to system preferences
17. Security and Privacy then click the button open anyway a box will pop up click open
18. Now we are in apple pi baker and it will ask for admin password for your computer, so type it in and press ok
19. Next in the left side click and select your micro sd card
20. Then in the IMG file field click the 3 dots to browse for the image
21. Head over to your downloads folder and select the openhabianpi-raspbian-XXXXX.img file and click open
22. Then click Restore Backup
23. When the box pops up that says Your ApplePi is ready! Click ok and remove the micro sd card from your computer.
24. Then quit apple pi baker
Putting the micro SD card into the raspberry pi:
1. Take the micro sd card and put it into the raspberry pi, the logo on the SD card should be facing down
2. Then take the other end of the power adapter and plug it in
3. The raspberry pi is now booting
4. Please be patient and set a timer for 45 minutes because that is how long the first boot will take
Setting up the static IP address:
1. Go to you routers web page using a web browser, mine is and login
2. Then go to DHCP and DHCP Client list
3. Look through the list and find openHABianPi
4. Then copy its MAC address
5. Now head over to address reservation
6. Then click add new
7. In the MAC address field paste the pi’s MAC address
8. And then give it a reserved IP address, continuing on from the network videos, I am going to give it
9. Then click save and in the pop up box click ok
10. There will be a little warning saying that it needs to reboot so click on the thing that says “click here”
11. And press the reboot button and ok in the pop up box
12. Let the router restart
13. Once the router is fully booted unplug the raspberry pi wait 10 seconds and then plug it back in
14. Wait 1 minute for the raspberry pi to boot back up
Setting Up OpenHAB 2 base components + MQTT Server Mosquito (Updated 6-21-17):
1. Then open up your web browser and go to http://yourpiipadress:8080 replace the yourpiipadress with your pi’s ip address, mine is
2. You should see a webpage asking which setup you would like, we are going to click Expert
3. Now it should be installing our user interfaces, this could take a couple minutes so be patient
4. Open up terminal on mac and type in ssh openhabian@ replace with your pi's IP and press enter
5. Type in yes and press enter
6. Default password is openhabian
7. type in sudo openhabian-config and press enter
8. Type in the default password openhabian
9. Use the arrow keys and go to update and press enter (it might kick you out of the configurator if so follow step 10 if not go to step 11)
10. Then go back to configuration type in sudo openhabian-config and press enter
11. Use arrow keys and go to Upgrade system and press enter
12. Once that is done use the arrow keys and go to optional components and press enter
13. Then use arrow keys and go down to Mosquitto and press enter
14. Then on the screen press enter while continue is highlighted
15. We will not be using authentication so use arrow keys and go over OK and press enter
16. It should now be installing our mqtt server
17. Once it is done press enter over OK
18. Use arrow keys go to exit and press enter
19. It should give you a warning that we didn't change the password so we are going to change some passwords I recommend using the same new password for the next two things
20. Type passwd and press enter, we are now going to change ssh password, so enter the default password openhabian and press enter then enter a new password and press enter then confirm that password by typing it in again and enter it should say updated successfully
21. We are now going to change the samba password I will explain what this is later, anyway type in sudo smbpasswd openhabian and press enter
22. You might have to Type in the sudo password so the one we just changed previously and press enter if not go to step 22
23. Now type in a new password I recommend using the same password as the sudo password so type it in and press enter then type it in again and press enter
24. Next we are going to change the timezone and locale so the raspberry pi can set its date and time
25. Type in timedatectl list-timezones and press enter Then use the arrow keys to scroll down through the list to find your time zone, once you find it highlight it and then copy or remember it then press control z to exit
26. Type in sudo timedatectl set-timezone Europe/Berlin but replace the Europe/Berlin part with your timezone then press enter
27. Then type timedatectl and press enter to check the timezone
28. We have now finished the initial configuration the home automation server
29. So now type in sudo reboot and press enter, you might have to type in the sudo password and press enter
Testing The MQTT Server Mosquito:
1. Once it is done rebooting go to
2. Press Download MQTT.fx then click on the one below Latest version
3. It will take you to a new page click on the file that has the ending macos.dmg
4. It will start downloading
5. Once it downloads open up finder and go to your downloads folder
6. Double click on mqttfx……...macos.dmg
7. Box should pop up double click on MQTT.fx installer
8. Should give a warning of unidentified developer so go system preferences > security and privacy and the click open anyway
9. Another box will pop up click open
10. Then go through the setup by click next two times and then finish
11. It is now installed so go to launchpad and click on MQTT.fx
12. This is now a good time to explain what this is, this is a program that tests mqtt stuff so you can debug it and see if it is working
13. Click on the gear at the top
14. Change broker address to the ip address of the raspberry pi mine is and make sure the port is 1883
15. Then at the bottom click apply then click cancel
16. Now click connect
17. If it connects successfully and there is a green circle in the top right then you are good
18. Go over to the subscribe tab and type in the # symbol and press subscribe
19. Then in the publish tab type in hi in the field and then in the big box type in hello world! Then hit publish
20. Then go back to the subscribe tab and if you see hello world that we are very good
21. We successfully set up the mqtt server
Connecting The MQTT Mosquito server to OpenHAB 2:
1. Now lets connect the mqtt server to openhab, so go to open up your web browser and go to http://yourpiipadress:8080 replace the yourpiipadress with your pi’s ip address, mine is
2. Then click paper ui, paper ui is the web administration pannel for the automation server
3. Add ons
4. In the search box type in MQTT
5. Next to where it says MQTT Binding click install wait for it to install
6. Go back to terminal and ssh into raspberry pi, type in ssh openhabian@ replace with your pi's IP and press enter, then type in your sudo password and press enter
7. Type in sudo nano /etc/openhab2/services/mqtt.cfg and press enter
8. Might ask for sudo password so enter that
9. The only thing we are going to change is the server or url to our broker so delete the line #<broker>.url=tcp://<host>:1883 and replace it with broker.url=tcp:// but change the IP address to match your raspberry pi
10. Press Control x and then press y then press enter to save
Software Part Complete For The Setting Up The Home Automation Server