Help converting OH2 Rule to OH3

No-one has dragged you anywhere. Maybe you allowed automatic updates at some time, or you chose OH3 for some feature you wanted, I don’t know.
OH2 continues to be available if you don’t want to use OH3.

This is still true.
If you have file based Items linked to v1.x bindings, like this one is linked to mios-

you will have to do something about it.
I assumed there would be a Mios things & channels binding version, but I was mistaken.
People have developed an HTTP approach instead here -

You do not have to throw out the baby with the bathwater, unless you choose to do so.
If you have old OH2 rules using datetime processing, you will need to update those because it is handled differently in OH3.
If you have old OH2 rules using executeCommandLine, you will need to update those because it is handled differently in OH3.

Many of the bindings introduced Quantity Type channels (Units of Measurement) alongside OH3 updates, so you may find some of your Items now have units.
Particularly in the case of comparisons, some old OH2 rules may need updating to handle units.

These changes would be needed whether your rules are files based or GUI entered, that part makes no difference.
There’s 9 months of people gone before you in this, so lots of threads already with advice to overcome stumbling blocks.

If you want to enter your rules in GUI, do so. You can convert piecemeal if you like, files and GUI rules can co-exist.

Like most GUI things, try it, click and do. Just like in files, you choose some event to trigger your rule, usually an Item event. The GUI also offers conditions for triggering, like say some other Item state, For very simple rule actions like sending some other Item a command, this can beentered directly in the GUI. For the average rule with its ifs-and-buts, you’ll want a scripted section - corresponding to the rule body between ‘then’ and ‘end’ in a file rule. You can choose to script in various languages - including familiar DSL.

1 Like