Migration to Openhab 2.x
After my first attempts almost a year ago, I migrated my entire OpenHab 1.x installation on OpenHab 2.x on my last vacation. OpenHab 2 offers some very interesting new things. e.g. A completely revised interface, device discovery, performance improvements (eg, in conjunction with serial interfaces), more bindings, and the introduction of “Things” as another abstraction.
A good start is the site Migration from openHAB 1.x to openHAB 2
In addition, I have encountered some Stolpersteine which I would like in the following list to help others to facilitate the migration or error search.
- Changed “Uninitialized” to NULL in all rule files
- Lowercase my own iconset and adapt the changed filenames in my items and sitemap files
- Map translations together with %d in item files does not work, but gives also no exception. Without enough informations it was hard to find the real reason. Solution was to change it to %s, modified also the values in the translation file and it works again
- Fix some syntax errors in my own rule files. Openhab2 is more strict while parsing
- Primitive types are not supported as Function parameter in rule files. Solution: Changed it to objects
- Removed wildcard imports. For me it was enough to just delete it.
- Copy unsupported s300th binding jar from openhab1 and it works without any changes. Irritating was that this binding was not listed when I called “feature:list”, but it works. I think the reason is, that this binding is not prepared for openhab2
- Trigger “received command” works different now. Its fired when the Item receives the command but has not update its state. To work with the new state use the variable “receivedCommand”