How to upgrade from 2.3 to 2.4?

I need your help on upgrading, but I think I should start by explaining my hardware.

15 years ago, I made a major rebuild on my house before moving in. I was always looking for home automation and I work as a PLC programmer so I bought a PLC and some remote IOs and connect every light, windows’ shutters and some other stuff to the PLC. All the light switches are press buttons connected to the same PLC.

All my “rules” were programmed in PLC logic. I managed to closed all the windows at Sunset, open then at 8h in the morning except at weekends and holidays (including the ones depending on Easter), close all windows and doors at night, turning off all exterior lights at day time, etc., all without internet connection,

I needed some way to give information to the system and I couldn’t buy an HMI (wife said I had already spend too much on PLC, cabling and relays :sunglasses: ) so I add some micro-switches as PLC inputs to change our state as “Away” or to disable the automatic shutter opening in the morning if I wanted to sleep next morning.

Later I added a serial to TCP Modbus gateway and I could write in some words in the PLC thus turning a light on or off. I needed to know by heart the number of the ModBus word and bit to use the ModBus Droid App. That had 0 WAF (:roll_eyes:).

I found OpenHab on version 1.7 . The most important thing to me was (is) being able to create an easy way of “talking” to my PLC that controls the house. As you understand I started by using the ModBus binding to connect to all the lamps and shutters. Then make a nice sitemap and…voilà. I can control everything in the house from everywhere. I started in a Windows laptop and bought a Raspberry after everything was tested and running.

When upgrading to OpenHAB V2 I copied my files (items, rules, sitemaps, …) to the new installation, fiddle a little with paper UI and it was running again.
As for most of you, I could not stop and start adding more bindings (Sonos, LGWebOS, Astro, mqtt, …)
At this moment I have two V1 bindings (ModBus and mqtt) that are the core of my installation. This leads me to my question: How to upgrade from 2.3 to 2.4?
Should I use V1 versions of ModBus and mqtt? Is there any “easy” way of migrating from V1 to V2 for this bindings? What is the advantage of V2 over V1 for ModBus and mqtt? Should I make a clean installation and remake all the ModBus items? My openHAB is working flawless for a long time now, and I want to give a go to 2.4 so I ask your opinion on the best way to do it.



I can’t speak to the modbus binding. For MQTT I recommend keeping the MQTT 1 binding and install the MQTT 2 binding. The two can coexist on the same OH happily at the same time. Then slowly and at your leisure move your Items, one by one, over to the new MQTT 2 way of doing things.

I would imagine the same is possible with modbus, though you may have to set up a test version of OH if the 1 and 2 versions of the bindings do not coexist happily together. You can do this by following the manual installation instructions for OH and manually install 2.4. Do not configure it to start automatically. Then stop your existing 2.3, manually start the manual 2.4 and work on moving your Items to the 2 version of the modbus binding. Once you are satisfied it works, upgrade your installed OH to 2.4 and move your config over to the installed version.

1 Like

Thank you Rich

I just upgrade to V2.4.
installed MQTT V1 and ModBus V1 and everything is working good.
Had a few problems with Sonos and Unifi but the process was very smooth.

I will install V2 of MQTT soon and start moving items. I’m not sure what to do about ModBus. I have lots of Items and maybe use the " If it ain’t broke, don’t fix it" way for now.

Thanks again.

Hi All,
I have MQTT v1 on v2.4 working and stable and I am now considering the next steps.

I am pondering the benefits of MQTT v2 for me. I have a large number of devices and also other controllers that partake in the MQTT traffic in my home.
So, assuming that OH takes over the whole role of the MQTT Broker for all systems not just the ones defined in OH that then makes mosquito redundant. But what else?
That seems a lot of effort to remove something that ‘just works’. I am really looking for another driver.
Can anyone point out what obvious advantage I am missing here?

On other key enhancements, I have begun my journey with HABOT and looking forward to getting it setup, just to show I am not against change :slight_smile:
I am not so sure about the profiles use right now, I think ‘I get it’ but waiting for some really good examples in the forum before I take a leap, it took me a while to get to grips with groups and now love them :smiley:



  • works and behaves like all other OH 2 bindings with Things and such improving consistency
  • binding, broker, and Things can all be managed through PaperUI, the REST API and the Karaf Console
  • supports automatic discovery for devices that implement the Homie 3.0.0 or Home Assistant standards
  • will receive much more attention and further development compared to the. 1.x version binding going forward
  • implements a new Rule trigger that can be used in the NGRE to trigger Rules directly from messages to topics without the need for Items (I think we still need to create Things though)
  • the ability to chain transforms for subscription Things
  • stupports encrypted connections to the broker, even if using Mosquito or some other external broker
  • new features and capabilities planned to be implemented or in the process of being implemented
  • now that it has been released it is the default binding so most of the new tutorials and threads posted to the forum will be about the 2 version

That is what I can think of off the top of my head.

1 Like

Yep got that it was the decided future and I know I will need to move eventually to it.
but from what you have shown above nothing really exciting that I am dying to try out.
I will put it after profiles in my to-do list.

Thanks Rich


For what it’s worth I’m using the MQTTv2 with the mosquitto broker.

Thanks @opus, thats really good to know so another option on the table for me to consider do I keep with my existing mosquito broker which I am currently very happy with?

I think my least favourite way forward is to use both brokers.
I think this holiday period for most will provide interesting thoughts on where this all goes. I am looking to wait until the new year before I commit in any direction.

As a prerequisite I am looking at tidying up rules, items and things in anticipation of some period of major disruption (mainly caused by me and typo’s).



There are two schools of thought.

If it ain’t broke

  1. don’t fix it.
  2. you’re not trying hard enough.

Which one you fall into will answer your question. There are goo arguments for keeping Mosquitto as your broker and “it’s less work in the short term” is also a good reason. For users new to OH and MQTT, having one embedded with OH is a boon though as it is one less thing to set up and configure separately. If you already have Mosquitto set up I see no reason to move to the embedded broker. I don’t plan to, until such time that Mosquitto gives me some grief at which point it’s out of here.

There is no hurry to change to the new binding. Take your time. And since the two bindings can coexist happily together, you can gradually transition without needing to move all your MQTT stuff over all at once.

If you decide to migrate brokers and use the embedded one, assuming that Mosquitto is currently running on the same machine as OH and you are using a fairly standard config in Mosquitto then migration may be as simple as stopping Mosquitto, creating the Broker Thing and configuring it with the same username and password (assuming you are using those). You don’t even have to modify any of your publishers and devices. And if you don’t like it, kill the broker and bring Mosquitto back up.

But like I said, if you are 1 type of person, leave it be. There is no compelling reason to change it if you already have Mosquitto set up.

1 Like

Thanks Rich, for a great summary (and loved the humour).

I am thinking it goes on the back burner for now while I look at more straight up beneficial things.



Did you copy may X-mas plan?
Happy holidays.