I’d like to share some details on the latest new features that made it into the 2.3 snapshot build (#1230):
First of all, it includes a new update from Eclipse SmartHome with quite some changes (see the details here) - most of them being small fixes, not worth to mention individually.
The one really big change coming from Eclipse SmartHome is the newly introduced support for units on numbers - you can now choose your measurement system and have any sensor values automatically converted for you and you can also do unit-safe calculations within rules. @henning wrote a blog post about this feature and he will also soon add some details to the openHAB documentation.
Important for all binding developers: In order to have full support of this feature, bindings should be enhanced in a way that they declare the units of the values that they are providing. Please see here for an example how it is done in the YahooWeather binding. There are still a few known limitations of this feature, so please be aware of them. If anyone is interested in helping to implement those missing parts, please leave a comment on the issue - it would be very welcome.
We have a new KNX binding! This has been in the works for at least 2 years and is now finally merged. It replaces the KNX 1 binding, which has now be moved to the legacy bindings (so if you are using it, please make sure to enable legacy add-ons in your addons.cfg file). We tried to keep the configuration similar to the 1.x KNX binding, so that it is not too hard to migrate - the config strings with the GAs are mainly moved to *.things files, where they can be structured per device. Nonetheless, depending on the size of your setup, the migration might keep you busy for a moment. I have myself done this excercise a few weeks ago and have the binding running in my production environment since then and can assure you that it is working pretty smoothly. So if you are using snapshot builds of openHAB, please have a go and test this binding yourself.
Karaf has been upgraded from 4.1.3 to 4.1.5, which brings a couple of fixes for the console (see release notes of 4.1.4 and 4.1.5).
As it is quite a big update, please keep an eye on any regression that you might encounter and enter issues on Github for them.
2018-03-16 20:42:24.831 [ERROR] [org.openhab.binding.bigassfan ] - [org.openhab.binding.bigassfan.internal.discovery.BigAssFanDiscoveryService(237)] The activate method has thrown an exception
java.lang.IncompatibleClassChangeError: Expected static field org.openhab.binding.bigassfan.internal.discovery.BigAssFanDiscoveryService.scheduler
2018-03-16 20:48:17.749 [ERROR] [org.eclipse.smarthome.core.thing ] - [org.eclipse.smarthome.core.thing.internal.ThingManager(91)] The addThingHandlerFactory method has thrown an exception
java.lang.IncompatibleClassChangeError: Expected static field org.openhab.binding.squeezebox.internal.discovery.SqueezeBoxPlayerDiscoveryParticipant.scheduler
Both these bindings were in my addons directory, and were built several days/weeks ago using mvn install in my dev environment.
Is this a consequence of the above-mentioned PR being source compatible, but not binary compatible? Can I infer from this that any binding that references scheduler that was built using anything but the most current ESH sources (such as bindings currently available on the marketplace) will have this problem?
To resolve this, do I need to update my dev environment to the latest ESH version, then rebuild these bindings?
Yes, it indeed is. In consequence, bindings in addons need to be recompiled against the latest ESH stable. This is quite some nasty impact, but I don’t see any other good way to deal with it as the static declaration was definitely a bug that had to be fixed.
To resolve this, do I need to update my dev environment to the latest ESH version, then rebuild these bindings?
You either simply run your addons build through Maven or if you exported your jar from the IDE, you should pull the latest master from openhab-distro (i.e. the “launch” project in your workspace) which should do an update on the openhab.target (make sure to apply the newly resolved target platform).
Agreed. , but I understand why it needed to be done.
So, what about the marketplace? Won’t bindings that are downloaded from the marketplace, or installed through Paper UI, have a problem until they are rebuilt. At least the portion of those bindings that reference scheduler.
2018-03-17 06:47:27.186 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'squeezebox.items' has errors, therefore ignoring it: [18,1]: missing EOF at 'Image'
2018-03-17 06:48:58.200 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'zoneminder.items' has errors, therefore ignoring it: [22,1]: missing EOF at 'Image'
@Kai Is there a change that might’ve had this as a side effect? I didn’t see anything immediately obvious in the change list.
Edit: All I can see is that the introduction of QuantityType made changes to the Item grammar. And I see that the most recent change dropped the | ID from the BaseModelItemType. Odd that there is and was no Image in the grammar.
I think it is important to mention that the Weather Underground weather binding was massively impacted by the new unit system.
I have not yet tested it since this change but it is more than probable that without an update of things / items definitions, the binding will no more work. It would be cool and important to mention it in case my assumption is correct.
Several rules now throw these errors in openhab.log:
[71,38]: no viable alternative at input '[lastUpdate]'
Excerpt from my rule:
when
Item gKE_Ramen received update
then
var event = gKE_Ramen.members.sortBy[lastUpdate].last
var event_update = event.lastUpdate.toDateTime.toString("yyyy-MM-dd HH:mm:ss")
var event_status = transform("MAP","windows.map",event.state.toString)
var event_label = event.label.toString.split(" ")
They worked before the upgrade.
Does anyone else have the same issue?
[EDIT]
And I also noticed a second issue:
In openhab.log I get a lot of these:
[26,96]: mismatched input ']' expecting '}'
[13,39]: mismatched character '|' expecting ']'
[158,32]: mismatched character ' ' expecting ']'
In all cases, they worked fine before the upgrade. I also don’t see what could be wrong with my rules.
Given this error:
[26,96]: mismatched input ']' expecting '}'
Is generated by this rule:
rule "Alarm interface via UDP"
when
Item Tex_UDP_Receive received update
then
var in_UDPmsg = Tex_UDP_Receive.state.toString.trim
if(in_UDPmsg.startsWith("\"Z0")) {
LINEWITH ERROR val itemName = gAllecontacten.allMembers.filter[sw|sw.name.contains(in_UDPmsg.substring(1, 5))].head
postUpdate(itemName, in_UDPmsg.substring(5))
}
just a note for people still staying on knx1: when you upgrade, the knx1 will be uninstalled, so make sure that you re-install the addon. it works fine afterwards.
For all users, it is now confirmed that most of the items for the Yahoo weather and WU weather bindings have to be updated to be compatible with the new snapshot.
The documentation for these bindings has to be updated.