Upgrade from 1.x to 2.0 - bindings for "1.x" items

Working on upgrading my installation from 1.8.3 to 2.0. I got a somewhat stupid question regarding bindings that have been upgraded to 2.x e.g. the astro binding or the zwave binding.

I have some existing astro items defined e.g. I have the following entry in astro.items.

DateTime Sunrise_Time  "Sunrise [%1$tH:%1$tM]"  {astro="planet=sun, type=rise, property=start"}

These do not work unless adding the 2.0 astro items as things and referring to them with the channel syntax in the items file. For the astro items its not such a big deal but its a bit more complex with all zwave items that are far more in numbers in my setup.

Do I understand it correctly that in order to use the 1.x items files as is for e.g. the astro binding one have to install the 1.x binding on the openhab2 installation?

If so it kind of makes sense but it is not very well documented. Some forum post simply say - move your items files to your 2.0 installation and create a conf file for your binding. This works out quite well for the not yet migrated 2.0 bindings as e.g.the Weather binding but it sure creates quite a lot of work for bindings converted to 2.0.

You should use the 2.0 bindings. Normally you will only find one version provided, either 1.x or 2.0 (astro is an exception to that).

That said: Yes you have to migrate all your item definitions to the new configuration scheme documented here as an example: http://docs.openhab.org/addons/bindings/astro/readme.html
Changing all files might be a bit bothersome indeed but it actually only takes a few minutes when using the search&replace function of your favorite editor :wink: Give it a try!

Hi,
Does the Astro 2 bind already support triggering of event by e.g. sunset like the old binding did?

No.
This use case will be handled by another feature of openHAB 2, hopefully available soon.
Till then, please refrain to this easy hack: