OpenHab 2 MQTT

Trying to migrate from openhab 1 to openhab 2.
Currently just copied all the items from OH1 to OH2
With the new “thing” philosophy i guess i have to rewrite all the items?
Want to start with MQTT. Currently copied as an example

Number sense_kitch_temp "TKit [%.1f °C]"	<temperature>   (Sensors) { mqtt="<[mqt:mygateway1-out/71/5/1/0/0:state:default]" }

So what will be the OH2 entry?

Your current item definitions should work correctly under openHAB 2 as they did under openHAB 1, as long as you install and configure the 1.9 MQTT binding there (via Paper UI is the easiest way). Give it a try and let us know how it works!

In case of any interest, I have just converted a fairly large size v1 MQTT installation to v2 and have not seen any problems related to MQTT yet. Actually I started with letting the original v1.8.3 openhab pass on all states etc to a Pi with v2.0.4 using the eventbus broker facility. This way I was able to test it all on a side machine while keeping the “old” version running without hiccups. The eventbus broker functionality is a neat feature.

1 Like