just a few days ago I installed openHABian on my pi 2 B.
In the end I want to controll an RGB strip via ESP8266 and MQTT.
My problem now is, I don´t have any Idea how to start/install Mosquitto on openHABian.
I would be verry happy, if anybody could tell me how to set up a MQTT Broker on openHABian.
PS: It was a verry short night figuering out how to get started with this howl thing, so my writing skill might don´t be the best…
this is actually way easier than one might think.
- the installation of Mosquitto is done in just a few steps (see official project page)
- On openHABian t’s even easier, because openHABian includes Mosquitto as an optional component: http://docs.openhab.org/installation/openhabian.html
I didn´t noticed that option.
So now I installed it and he sad that I should be able to connect now. But I´m not…
I tried to connect via MQTTfx and the ESP but both are not able to connect.
Is there a way I can look up the port of mosquitto? Or can check if it is even up and running?
And nothing MQTT related is showing up in the Paper UI.
Should have worked but yeah that can happen. The setup doesn’t do any special settings, you should be able to connect with e.g. MQTTfx.
In the case of an error, just try the normal linux blub.
- Check if mosquitto is running:
sudo systemctl status mosquitto
- Check if is installed
- Check it’s logfile.
- Try to connect locally with mosquitto_pub
Mosquitto was already running in the Background.
I still don´t know why mqttfx doesn´t want to connect, but with some Android Apps and mqtt-spy I can send and recive. Also the ESP is, after some corrections, able to connect send and recive.
But I still don´t know how to implement MQTT into the Paper UI. By now I have installed every MQTT Addon available and still there is no MQTT showing up.
In the Topics I read, they created a new Item and selected MQTT, or at least I understood it this way. But I´m not able to select MQTT.
Is there a documentation for Mosquitto and the PaperUI I didn´t found?
Or do I have to install the pi again and choose the 1.x like designe this time?
You don’t have to change anything on your system. You’ll have to understand, that the MQTT binding is a 1.x binding and as such needs configuration via config files rather than through Paper UI. Read more about it here:
Everything you need to know MQTT specific is described here: http://docs.openhab.org/addons/bindings/mqtt1/readme.html
An example about how this could look like with an example device:
Especially while following along the last link, you will realize that this is quite easy! Good luck!
Ok, I have worked around this for a while.
The Links helped a lot.
Unfortunalety I had to learn a lot for some exams…
I have now created an Item, that I can interact with and also almost finished the ESP.
Only problems left, I wasn´t able to send a MQTT message according to the colorpicker, I have some example codes I want to inspect now, and the analysis of the MQTT message at the ESP isn´t doing what I expect it to.
Next week I will finnaly be able to invest more time in it again.
But I wanted to thank for the help with setting up Mosquitto!
And is there a funtion to set a discussion to solved?
(Or just change the name?)
Happy you made progress. Good luck with the next few steps!
There is a “solved” option you can choose for answers.
Do you want to share your esp code?
Did you get it to work?
Unfortunatley University started again and I had to pause the project.
I can upload the ESP-Code but the processing of the send json isn´t doing what it is supposed to do.
Hope it will help you.
My second problem is to send mqtt messages according to the colorwheel.
All the examples I could find didn´t send any messages…
And I was thinking about sending the color on 3 MQTT chanels and trash the json Idea…
Only something like to months left and I can unfreez the project again.