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 */
//RSSI
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)
//Battery
Number Node50Volt “Living Room [%.2f Vdd]” (All,NodeHealth,LiPoBat) {mqtt="<[mosquitto:home/rfm_gw/nb/node50/dev04:state:default]"}
//Humidity
Number Node50Hum “Living Room Humidity [%s %%]” <hum_icon> (All,InsideCond) {mqtt="<[mosquitto:home/rfm_gw/nb/node50/dev49:state:default]"}
//Motion
String Node50Mot “Living Rm Motion [MAP(motion.map):%s]” (All,InsideCond) {mqtt="<[mosquitto:home/rfm_gw/nb/node50/dev41:state:default]"}
//Temperature
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 */
//RSSI
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)
//Battery
Number Node60Volt “Office Door [%.2f Vdd]” (All,NodeHealth,LiPoBat) {mqtt="<[mosquitto:home/rfm_gw/nb/node60/dev04:state:default]"}
//Contact
String Node60Dor “Office Door Contact [MAP(door.map):%s]” (All,InsideCond) {mqtt="<[mosquitto:home/rfm_gw/nb/node60/dev46:state:default]"}

/* Freezer Door Contact */
//RSSI
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)
//Battery
Number Node61Volt “Freezer Door [%.2f Vdd]” (All,NodeHealth,LiPoBat) {mqtt="<[mosquitto:home/rfm_gw/nb/node61/dev04:state:default]"}
//Contact
String Node61Dor “Freezer Door Contact [MAP(door.map):%s]” (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 /
//RSSI
String Node71RSSI “3d Monitor RSSI [%s db]” (All,NodeHealth) { expire=“72h,0”, mqtt="<[mosquitto:home/rfm_gw/nb/node71/dev02:state:default]"}
//Current
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.