Should I change from 1.x to 2.4.0? How should I get started?

Hello folks,

I’ve recently migrated from OH1 to OH2 using the OpenhabainPi image. I’m slowing moving from my old system to this new and now I’m starting to tackle the MQTT objects. I’m reaching out to the community because I can’t seem to grasp where to start using the whitepapers. I find that I can better understand how to work through these things on the forums.

Should I start with the Paper UI or just a text editor?

Here’s my current working (MQTT 1.x) items. I understand that I need to create a .things to create a broker and channels. I don’t understand how the channels and items work together.

Would someone help walk me through how to convert these?

/* Living Room 3 in 1 */
String Node50RSSI “Living Room RSSI [%s db]” (All,NodeHealth) {expire=“72h,0”, mqtt="<[mosquitto:home/rfm_gw/nb/node50/dev02:state:default]"}
//Date Time Last Update
DateTime Node50DaTi “Living Room Last Update [%1$tm/%1$td, %1$tI:%1$tM %1$tp]” (All,NodeHealth)
Number Node50Volt “Living Room [%.2f Vdd]” (All,NodeHealth,LiPoBat) {mqtt="<[mosquitto:home/rfm_gw/nb/node50/dev04:state:default]"}
Number Node50Hum “Living Room Humidity [%s %%]” <hum_icon> (All,InsideCond) {mqtt="<[mosquitto:home/rfm_gw/nb/node50/dev49:state:default]"}
String Node50Mot “Living Rm Motion [MAP(]” (All,InsideCond) {mqtt="<[mosquitto:home/rfm_gw/nb/node50/dev41:state:default]"}
Number Node50Temp “Living Room Temp [%.1f °F]” (All,InsideCond) {mqtt="<[mosquitto:home/rfm_gw/nb/node50/dev48:state:default]"}
//Temperature Chart
Group Node50Temp_Chart (temperature)
//Temperature Minimum
Number Node50Temp_Min “Living Rm Temperature Minimum [%.0f °F]” (All,Node50Temp_Chart)
//Temperature Maximum
Number Node50Temp_Max “Living Rm Temperature Maximum [%.0f °F]” (All,Node50Temp_Chart)
//Temperature Average
Number Node50Temp_Ave “Living Rm Temperature Average [%.0f °F]” (All,Node50Temp_Chart)
//Temperature Period
Number Node50Temp_Per “Living Rm Temperature Period”

/* Office Door Contact */
String Node60RSSI “Office Door RSSI [%s db]” (All,NodeHealth) {expire=“72h,0”, mqtt="<[mosquitto:home/rfm_gw/nb/node60/dev02:state:default]"}
//Date Time Last Update
DateTime Node60DaTi “Office Door Last Update [%1$tm/%1$td, %1$tI:%1$tM %1$tp]” (All,NodeHealth)
Number Node60Volt “Office Door [%.2f Vdd]” (All,NodeHealth,LiPoBat) {mqtt="<[mosquitto:home/rfm_gw/nb/node60/dev04:state:default]"}
String Node60Dor “Office Door Contact [MAP(]” (All,InsideCond) {mqtt="<[mosquitto:home/rfm_gw/nb/node60/dev46:state:default]"}

/* Freezer Door Contact */
String Node61RSSI “Freezer Door RSSI [%s db]” (All,NodeHealth) {expire=“72h,0”, mqtt="<[mosquitto:home/rfm_gw/nb/node61/dev02:state:default]"}
//Date Time Last Update
DateTime Node61DaTi “Freezer Door Last Update [%1$tm/%1$td, %1$tI:%1$tM %1$tp]” (All,NodeHealth)
Number Node61Volt “Freezer Door [%.2f Vdd]” (All,NodeHealth,LiPoBat) {mqtt="<[mosquitto:home/rfm_gw/nb/node61/dev04:state:default]"}
String Node61Dor “Freezer Door Contact [MAP(]” (All,InsideCond) {mqtt="<[mosquitto:home/rfm_gw/nb/node61/dev46:state:default]"}
//Freezer Door Timer
Switch FrzrDoorTim “Freezer Timer” (All) { expire=“5m,command=OFF” }

/* 3D Printer Controller /
String Node71RSSI “3d Monitor RSSI [%s db]” (All,NodeHealth) { expire=“72h,0”, mqtt="<[mosquitto:home/rfm_gw/nb/node71/dev02:state:default]"}
String Node71Curs “3d Current [%s amps]” (All) {mqtt="<[mosquitto:home/rfm_gw/nb/node71/dev52:state:default]"}
//Switch Cooling
Switch Node71SW2 “3d Cooling” { mqtt="<[mosquitto:home/rfm_gw/nb/node71/dev18:state:default::]", mqtt=">[mosquitto:home/rfm_gw/sb/node71/dev18:command:
:default]" }
Switch Node71SW2Prox
//Switch Power
Switch Node71SW3 “3d Power” { mqtt="<[mosquitto:home/rfm_gw/nb/node71/dev19:state:default::]", mqtt=">[mosquitto:home/rfm_gw/sb/node71/dev19:command:*:default]" }
Switch Node71SW3Prox

I’m making it myself easy and stick to the 1.x MQTT binding. I don’t have very complicated needs and I decided to wait until the documentation is updated, potential bugs are removed and the binding is stable. Then I’ll move. Just my two cents.

1 Like

Read the docs and the migration tutorial.
In short: Stick with 1.x bindings until you’ve got the rest working.

1 Like

Thanks… Looks as if the migration is a larger endeavor than I thought. The migration tutorial looks to be very helpful.

Thank again for your time.