Two openhab Servers? (RPI)

so it looks like when my raspberry pi boots up, it starts an openhab server. but none of my sitemaps work. the info is there but it doesnt connect.

so i have to navigate to /opt/openhab/ and start it manually. then it works. sh start

what am i doing wrong?

How did you install?

What does your openhab.log say?

What is almost certainly happening is that there is not an openhab server starting when the Pi boots up, or it is failing to come up. If it were running then you wouldn’t be able to start it later using as it would be unable to bind to the needed ports.

i used this Tutorial to install openhab.

my is in /opt/openhab/

i tried following other tutorials to make it start on boot, and thats where i believe i have messed up. when the rpi boots up and i put ls /var/run it shows

but it my sitemap doesnt work.

then when i go to /opt/openhab and it allows me to start and the sitemap starts to work.

i think i am going to to do a fresh install on the rpi

That tutorial is pretty out of date. The preferred installation method is documented here.

Installation via apt-get will:

  • make it run as a non-privileged user, necessary for security
  • put everything in a standard Debian based location (raspbian is Debian based)
  • makes sure all the proper file permissions are configured
  • makes it much much easier for us on this forum to help you with problems like this because we can make certain assumptions about where things are located and how things are configured
  • gives you automatic updates when new releases come out

When you do the fresh, please install via apt-get.

i appreciate the response.

thats what i am going to do. thank you very much

is there a newer tutorial to install mosquitto? or is that the same?

I don’t know. I just ran apt-get install mosquitto but I’m running on Ubuntu, not raspbian. But I would be shocked if that command didn’t work on the Pi too.

well i did a fresh install via the apt-get method, but openhab does not load on boot up. i followed the instructions to the t. not sure why i have to start it manually.

edit: nevermind, it starts automatically, now its another problem

my esp8266 esp01 module keeps disconnecting and reconnecting.

tried asking in the esp8266 forum, but everytime i post a mod needs to approve it…

getting frustrated.

All I can suggest is to make sure your MQTT broker is running and look at its logs to see if perhaps the broker is reporting some sort of error.

i fixed it by reinstalling and mosquitto and binding to openhab