Problems with Milight Binding and Sitemap after Upgrade from 2.0.0 to 2.1.0

I’m using the official docker image of openhab and it’s configured using config files that are mounted to /openhab/conf.

In 2.0.0 everything works. Unfortunately as soon as I switch from 2.0.0-amd64 to 2.1.0-amd64, I have several (probably connected) problems:

  1. The Milight Binding stops working correctly (somehow):
    I managed to find out that the thins name has to be changed from milight:bridge:XYZ to milight:bridgeV3:XYZ and additionally get an ID field.
    As soon as I change this, the milight gateway is recognized and obviously the bulbs are too but nothing happens when I try to control these via the PaperUI. Instead the log gets ArrayIndexOutOfBoundsExceptions when trying to control the bulbs.

  2. My Sitemap is not found
    I have just a “default” sitemap created. It’s not found anymore. There are no error messages in openhab.log.

Since everything works great with 2.0.0, I wouldn’t expect a problem in the config files, unless there are some breaking syntax changes. Are there? Any ideas what could cause this behaviour?

When you upgraded did you clear out userdata?

For now the best way to upgrade is to do a backup of userdata, pass an empty userdata to the container, then recreate anything lost or go through a restore to get back your list items and things.

Hi Rich,
actually userdata is thrown away by docker automatically on every restart, since I always recreate containers and only mount the conf and log directory.
Meanwhile I figured out the problem - thanks Rich for your hint to recreate everything step by step - it turns out that on the one hand another thing obviously changed in milight binding and on the other hand openhab 2.1 is quite more strict than 2.0 was.

For others that might run into the same problems I’ll list the things I found:

Milight binding:

  • name the Bridge “…:bridgeV3:…” in things configuration
  • Formerly the different types of bulbs were identified by the group index, so my rgbLeds had 6-10, now it’s 0-4 for every type of bulb.

OpenHab 2.1:

  • SiteMap:

    • I used “Group” Items to create a new page in the Sitemap - now I’m using “Text”
    • In a Slider I had an option sendFrequency=“200”, this has to be sendFrequency=200 now (without ")
    • There was a “Number” element in my sitemap - that also prevented it from loading. Didn’t find a suitable replacement meanwhile - currently its “Text” but doesn’t show anything - but at least my sitemap is running at all
  • Rules:

    • There was a missing closing bracket somewehere - 2.0 just ignored it and worked fine, but 2.1 didn’t (<- Syntax problem on my side Improvement in 2.1 in my opinion - fail fast :wink: )

Unfortunately openhab was absolutely quiet about the sitemap-problems in the logs.

This is the same bad update experience as I had on updating from 1.8 to 2. There is no documentation about what exactly changed. Again I had to work it out step by step on my own.
Or did I just not find it? :wink:

However - now I can go to Ikea and get some Tradfri :smiley:

Probably not the best approach give there are some permanent config data that goes into userdata including longer config and anything you do through one of the UIs. Also, this means that every time you restart the container you have to wait minutes before everything is back up and running as opposed to seconds.

All of the problems lasted have always been problems. The only change made in 2.1 is that it now reports these problems in the logs and if the syntax error is bad enough it rejects the whole file rather than accepting the file up to that point.

Designer will have always reported these as errors.

This one actually is a change I think. It has already been won’t to use Group for this but I think it used to work.

There is no Number element for Sitemaps and had never been one. Text is the correct element to use to display information without any controls.

Actually there is a change log and most of not all of these changes are listed. The announcement for the release of a new state version always includes a link to the change log. And for breaking changes the changes are listed in the announcement itself. Many of these problems you had may not have been listed as they are not do much breaking changes as they are better handling of errors that have always been errors.