I feel your pain
Have been there… days… and lots of frustration…
Well… I assume you have configured a working Pi OS, and then saved the image. If you have, restore that…
Then…
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -
echo "deb http://dl.bintray.com/openhab/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/openhab.list
sudo apt-get update sudo apt-get install openhab-runtime
Start openHAB - at system startup
sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable openhab.service
instal openHAB persistance with rrdj4
sudo apt-get install openhab-addon-persistence-rrd4j
add YourUserName to the openhab group
sudo usermod -aG openhab YourUserName
change file ownership
sudo chown -hR openhab:openhab /etc/openhab sudo chown -hR openhab:openhab /usr/share/openhab
add rights
sudo chmod -R 777 /etc/openhab/
sudo apt-get install openhab-addon-binding-http sudo apt-get install openhab-addon-binding-ntp
sudo apt-get update sudo apt-get upgrade
start openHAB
sudo systemctl start openhab
This should give you a working openHAB system on the Pi
If you want the demo files… download and install…
Where do you want to run the Designer? Windows or Linux
If on Windows you need to share the Pi openhab directories via SAMBA o the Pi.
Get SAMBA
sudo apt-get install samba samba-common-bin
Configure samba
sudo nano /etc/samba/smb.conf
uncomment:
workgroup = WORKGROUP wins support = yes
Add these shares:
[OpenHAB Home] comment = OpenHAB Home path = /usr/share/openhab browseable = yes writeable = yes only guest = no create mask = 0777 directory mask = 0777 public = no
[OpenHAB Config] comment= OpenHAB Site Config path = /etc/openhab browseable = yes writeable = yes only guest = no create mask = 0777 directory mask = 0777 public = no
run testparm
to check whether you made any errors in the config.
Add a samba password for your user account
sudo smbpasswd -a YourUserName
see if service is up
sudo /etc/init.d/smbd status
or
ps -ef | grep smbd ps -ef | grep nmbd
change openhab permissions:
sudo chmod -R 777 /etc/openhab/ sudo chmod -R 777 /usr/share/openhab/
There is a bug/script in openhab; when you reboot the Pi, the permissions are stuffed, and you have to rerun the two chmods above again.
to see what openhab is doing:
sudo tail -f /var/log/messages
Install the Designer on windows; e.g. Drive:\openhab
Point the designer to the config files on your Pi
And you should be ready to go.
Good luck!