Migrate OpenHAB 2.5.12 to OpenHAB3 MQTT 1x Items Help

So I am in the process of trying to migrate to OH3. I am having some confusion how to configure my items file in order to use the new MQTT binding with OH3

I have MANY (50+) tasmota devices in my home. This is how they are currently set up…


Switch	Kettle_Power 					"Kettle [%s]"  								<kettle>		(gSonoff_OnOff)	["Switchable"]	{mqtt=">[mosquitto:Kettle/cmnd/POWER:command:*:default],
																														<[mosquitto:Kettle/stat/POWER:state:default]"}
Number 	Kettle_RSSI 					"Kettle RSSI [%d %%]" 						<wifi>			(gRSSI_Group)		{mqtt="<[mosquitto:Kettle/tele/STATE:state:JSONPATH($.Wifi.RSSI)]"}
Switch 	Kettle_Unreach 					"Kettle unreachable [%s]" 					<siren> 		(gUnreach_Group)    {mqtt="<[mosquitto:Kettle/tele/LWT:state:MAP(unreach.map)]"}
String 	Kettle_FW						"Kettle FW [v%s]"							<sonoff> 		(gFirmware)			{mqtt="<[mosquitto:Kettle/stat/STATUS2:state:JSONPATH($.StatusFWR.Version)]"}
String 	Kettle_IP 						"Kettle IP [%s]"							<kettle>		(gSonoff_IP)		{mqtt="<[mosquitto:Kettle/stat/STATUS5:state:JSONPATH($.StatusNET.IPAddress)]"}

How do i properly configure this part for the new MQTT binding.

{mqtt=">[mosquitto:Kettle/cmnd/POWER:command:*:default], <[mosquitto:Kettle/stat/POWER:state:default]"}

The documentation I have seen is not very descriptive from this article

versus the old documentation

Thanks for the help!

Read This

For one Tasmota supports the Home Assistant standard. Enable that and openHAB will automatically discover your devices and create all the Things for you. That would probably be the least amount of work.

Beyond that, Jürgen posted a good link for how to create the Things using text based .things files. If you want to manage Things through the UI, see Migrating MQTT1 items to MQTT2.4 items. For a generic MQTT 2 tutorial see the first half of MQTT 2.5 Event Bus.

Because you have a lot of devices, if you want to use the UI but don’t want to use automatic discovery, my recommendation is to:

  1. Create the MQTT Bridge Thing which connects to the MQTT Broker
  2. Create an example Generic MQTT Thing and test that it works
  3. From the REST API Docs query for that Generic MQTT Thing; copy the JSON that is returned
  4. Paste that JSON into the Thing Creation REST endpoint and edit the stuff that needs to be different (topics subscribed to, Thing ID, Thing name, etc.) and submit.

Repeat step 4 for each remaining Thing that needs to be created.

And read this:

Thanks Guys,

I had a feeling this is going to be ALOT of work I am not ready for :dizzy_face:

Thing is I did an apt-get update, cleared cache of my OH2.5 and now I cannot get any of the the ui to work or startup ( paper, basic, ui-dashboard) so its been a cluster F of a day…


Failed installing 'openhab-ui-basic, openhab-ui-paper': Error:

	Error downloading mvn:org.openhab.ui.bundles/org.openhab.ui.paper/[2.5.0,2.6)

Bintray, the place where all the addons is stored that allows openHAB to download them on demand is no more. There was an announcement and several threads. Unfortunately, bintray didn’t give us much time before the service was cut on May 1st.

For OH 2.5 you’ll have to dowload the openhab-addons kar file (see Download openHAB | openHAB) and drop that into the addons folder. OH 2.5.12 is the last release for OH 2.x and moving the artifacts for it to jfrog (the new repo) didn’t happen because of the time and effort involved.

But in general, you should only ever clear the cache when there has been an update to openHAB itself, in which case the clearing of the cache is done for you, or if you are experiencing problems that specifically have to do with the installation of bindings. It should never be “just something I do.”

Oh this is a life saver, I did not know that. At least I have a working OpenHAB until I slowly convert all this MQTT stuff.

Thanks!!