Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# Instructions
## Content
1. Install OS
2. Connecting to the Pi
3. Setting up Raspian
4. Enable secure login
5. Install openHAB
6. Install mosquitto
## Install OS
1. Download OS image [](
2. Burn file to SD card
3. Boot the Raspberry Pi
## Connecting to the Pi
First you have to find out what IP address your Pi got in the network.
Later with will set a static IP, but for now the find the dynamically assigned IP address.
* On Windows you can use *Advanced IP Scanner*
* On Linux you can use `>> arp -a` to list all addresses.
1. Download [PuTTy](
2. Enter host name (the IP address of the RPi)
3. Post: 22
4. Connection Type: SSH
Press **Open...**
The default user is *pi*
And the default password is *raspberry*
## Setting up Raspbian
### Assign a static IP address
1. Show ifconfigs
>> ifconfig
inet addr:
2. Show netstat
>> netstat -nr
3. Edit config
>> sudo nano /etc/network/interfaces
iface eth0 inet dhcp
iface eth0 inet static
### Raspberry Pi setup references
* [Nice guide on how to setup Raspberry Pi](
* [Tutorial how to give your raspberry pi a static ip address](
## Install openHAB
Get openHAB:
>> cd openHAB
>> wget
>> wget
>> wget
>> unzip <files> /opt/openhab/1.8.3/.
Make openHAB auto-start after reboot.
1. Downloads scrits from:
2. Move openhab to /etc/init.d/ directory
3. Update paths to openHAB in openhab.conf
4. Move openhab.conf to the /etc/default/ directory
## Install mosquitto
Mosquitto is the mqtt broker and will be used to distribute messages between the #IoT-nodes and openHAB.
1. Goto [Mosquitto](
and follow the instructions to install
### Testing mosquitto
Start mosquitto:
>> mosquitto -v -c /etc/mosquitto/mosquitto.conf
Subscribe to all topics
>> ./mosquitto_sub.exe -v -h -t "#"
Publish a test message on some topic:
>> ./mosquitto_pub.exe -h -t "test/" -m "Hello World"
If message received properly, mosquitto is up and running!
### Mosquitto references:
* [Enable logging](
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment