So, where is your binding? According to what you are showing us you don’t have any mqtt binding installed
You need to list the bundles exactly via bundle:list | grep -i mqtt
I just gave up, formatted the SD and started over.
When starting with openHAB almost four years ago I did the same: tinkering around, making some mistakes, learning, then starting over. Everything working fine since then. Good luck.
One more hint: make sure you are making the right decisions regarding MQTT before a new install:
Either use the new MQTT2 binding with the embedded broker (no mqtt.cfg needed!) or use the legacy, outdated, but still working MQTT1 binding.
I would recommend to use the MQTT2 binding.
I didn’t install anything version 1 until I looked at MQTT Persistence in the old directories. I think it is version 1.X.X . I copied all 3 folders over to another drive before I formatted the SD card for the 100th time. That way I can just install MQTT 2.4.x and still have my sitemaps, items, icons, things and transform files I had already created. Now I just have to go back and connect to the new binding.
The main problem I had was using Google to find answers to some of the problems I was having. I think it was because even after reading the manual, it didn’t sink in what I needed to put in the items file as that didn’t fully show the links to the bindings specifically. I found sometimes it pointed me to older documentation and that is how I “fixed” some of my problems. That along with not having any programming experience in these new languages. I found a couple of times, the RPi would show up at a different IP address after a power bump or a reboot. I found out how to make it static and that worked. So now I just need to “reconnect” all the broken links using MQTT 2.4 and see what happens.
Thanks for helping me try to get this fixed.
John Frankforther
I have reloaded OH2 and loaded MQTT from the config menus and went back and ran the
bundle:list | grep -i mqtt command and this is what it shows.
openhab> bundle:list | grep -i mqtt
198 x Active x 80 x 1.2.0 x Paho MQTT Client
200 x Active x 80 x 0.10.0.oh240 x Eclipse SmartHome MQTT Binding
201 x Active x 80 x 0.10.0.oh240 x Eclipse SmartHome MQTT Thing Binding
202 x Active x 80 x 0.10.0.oh240 x Eclipse SmartHome MQTT Transport Bundle
It doesn’t look like I’m on the same rev of MQTT as you have shown above. Is there something more I need to update? I went through and updated what I thought was everything.
Sorry to be a bother, I just want to figure out how to set up my first sensor correctly.
Thank you
John Frankfther
No, because I am on the 2.5 snapshot.
I think you are on the right track now
Now don’t follow outdated tutorials, MQTT2 is pretty new, only read the newer posts (starting with the relase of 2.4 stable).
Best thing to do is following the official docs.