Hi @Thomase004,
You will need to start with a fresh install of OpenHAB2. Download the latest version from Git Hub. Depending on your OS you will need to download the appropriate program to install the image onto your SD card. DO THIS STEP NO MATTER IF YOU HAD THIS WORKING BEFORE.
Plug in your network cable to your switch or plug in a cross over network cable directly to your computer. (This is the easiest method to set this up.) You can set up the wifi later.
Next you will need to identify the IP Address of your RPi. The easiest method here is to look on your router or use “arp -a” and use the process of elimination.
Open a command prompt window (linux) or open a Putty window (windows). In Linux, type “sudo ssh openhab@RPiIpaddress”. Enter root password for your computer. Next, when prompted, type the SSH password of the Openhab server. The default is “openhab”. For Windows you will have to put the IP of the Openhab server into the IP address field and set Putty to SSH. Google Putty Wiki for more info there.
Next you will need to install the ifmetric and ifplugd packages.
Before we install these packages, you should update your libraries. To do this type “sudo apt-get update”. Enter sudo password for Openhab. Default is “openhab”.
To install ifmetric, type “sudo apt-get install ifmeteric”. Enter the sudo password. You will be prompted about the package install, press enter or type Y to continue.
To install ifplugd, type “sudo apt-get install ifplugd”. Enter sudo password. You will be prompted about the package install, press enter or type Y to continue.
Next follow @metin’s post…
Type “sudo nano /etc/default/ifplugd”. Enter sudo password.
Copy the following into ifplud file…
INTERFACES="auto"
HOTPLUG_INTERFACES="all"
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"
Press Ctrl X to save changes and exit nano.
Type “sudo nano /etc/network/interfaces”. Enter sudo password.
Replace your interfaces file with the following:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
# up ifmetric eth0 10
allow-hotplug wlan0
iface wlan0 inet manual
# up ifmetric wlan0 20
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Press Ctrl X to save changes and exit nano.
Next update your openhab.conf file…
To do this type “sudo nano /openhabian.conf”. (I may have the file location here wrong as I am not in front of my Openhab server at the moment to check…)
Add your wifi SSID and password here.
Press Ctrl X to exit here.
To test to see if things are working, unplug your network cable to your RPi. You should be able to see your RPi on your wireless network. This does take a second. So be patient. If not, reboot your RPi. You can do this by typing “sudo reboot” on your SSH command prompt.
You might also have to add your wireless into the wpa_supplicant directory. To do so CD into /etc/wpa_supplicant/ and edit wpa_supplicant.conf in nano.
Once you get this far, you should be able to either wireless or wifi.
Good luck!
Cheers!