Problems Setting up MQTT on Openhab2

Hey Guys,

I’ve spent about 4 hours today trying to set up mqtt on Openhab (and asking google). my Idea is:

  • measuring temperature and humidity with a DHT22 on a ESP8266 (works fine)
  • transfer the values to mosquitto running on my Pi (works fine)
  • make a graph in OpenHAB to show the temp/hum changing over time (I’m stuck)

So OpenHAB (mqtt extension is installed) runs on the same RPi3 where Mosquitto, shouln’t be a Problem, right?

I was trying to follow loosely this tutorial: http://onesmarthome.de/smart-home-openhab-2-mqtt-mosquitto/

The step where is get stuck is at the very beginning: I’m not able to edit the mqtt.cfg. I installed the smart home designer on my Mac which I now think didn’t make sense because I found out it should be on the same system that runs openhab.
When i open Openhab in the browser i cant find any option in any UI to edit the file.
After that i tried to manually edit the file in Raspbian but i cant save because the OS says the file is owned by Openhab.

Too be honest I believe that i’m making some very stupid mistake because editing a file cant be that hard :slight_smile:
Is there a possibility to work with the SmartHome Designer though its running on another System?

Yes, create a Samba share and use your Mac to edit all the files:

http://docs.openhab.org/installation/linux.html#network-sharing

1 Like

OK, I was thinking about this possibility. This Morning i tried connecting to my Pi via Remote Desktop and editing the mqtt.conf using sudo nano … and it worked :slight_smile:

So first Problem should be solved!

EDIT: Accessing my Pi Via SSH should also work I think but remote desktop is easier for me

Great :grinning:

So this may solve your next problem:

1 Like

I finally made it, thank you for the fast help and the great Tutorial!

1 Like