Unit-Support, KNX 2, Karaf 4.1.5 Upgrade and more!

Yes, I’m also seeing this on Image items.

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 opened an issue for this.

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.

1 Like

@Lolodomo I was planning to do some testing with the Weather Underground binding but I got sidetracked with the Image issue mentioned above…

Hi,
I have upgraded to #1231 (from #1224).

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.

1 Like

You need to add a space after [ and before ].

3 Likes

Thanks! That was indeed the problem.

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.

@Dries confirmed!!

Updated today to openHAB 2.3.0 Build #1231 and all my rules stopped working :flushed:

I could reduce it now to this line:

val lastItem = Windows.members.sortBy[lastUpdate].last

2018-03-17 18:45:44.151 [ERROR] [af.features.internal.service.BootFeaturesInstaller] - Error installing boot feature repository mvn:org.apache.karaf.features/framework//4.1.5/xml/features
java.io.IOException: Error resolving artifact org.apache.karaf.features:framework:4.1.5:xml:LATEST : mvn:org.apache.karaf.features/framework//4.1.5/xml/features
        at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:91) [10:org.apache.karaf.features.core:4.1.5]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.loadRepository(FeaturesServiceImpl.java:480) [10:org.apache.karaf.features.core:4.1.5]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:496) [10:org.apache.karaf.features.core:4.1.5]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:491) [10:org.apache.karaf.features.core:4.1.5]
        at org.apache.karaf.features.internal.service.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:98) [10:org.apache.karaf.features.core:4.1.5]
        at org.apache.karaf.features.internal.service.BootFeaturesInstaller.start(BootFeaturesInstaller.java:87) [10:org.apache.karaf.features.core:4.1.5]
        at org.apache.karaf.features.internal.osgi.Activator.doStart(Activator.java:273) [10:org.apache.karaf.features.core:4.1.5]
        at org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.java:242) [10:org.apache.karaf.features.core:4.1.5]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.io.IOException: Error resolving artifact org.apache.karaf.features:framework:4.1.5:xml:LATEST
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:729) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:659) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:600) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:567) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:557) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]
        at java.net.URL.openStream(URL.java:1045) ~[?:?]
        at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:86) ~[?:?]
        ... 12 more
Caused by: shaded.org.eclipse.aether.resolution.VersionRangeResolutionException: No highest version found for org.apache.karaf.features:framework:4.1.5:xml:[0.0,)
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveLatestVersionRange(AetherBasedResolver.java:998) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:703) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:659) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:600) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:567) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:557) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]
        at java.net.URL.openStream(URL.java:1045) ~[?:?]
        at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:86) ~[?:?]
        ... 12 more

I’m getting this after an upgrade to 1231 of a manual installation. I’m using a home brewed backup/restore script that has worked great previously (1224 was the last upgrade I did). I’m guessing there’s something wrong with my script and I need to compare it to the official ones. But any ideas?

Did your restore add back the files:

userdata/etc/overrides.properties
userdata/etc/org.openhab.addons.cfg

If so, you’ll need to remove them and restart openHAB.

2 Likes

Thank you x5! That was it. My script left those in place. Removing them fixed it.

I had 53 instances of…

[280,107]: mismatched character '.' expecting ']'

… which prevented my rule files from loading. This resolved it (thank you @Udo_Hartmann!), but why?

Hi,

happy about the knx2-binding I converted my installation with ~200 KNX-Items.
It somehow works - but throws endless warnings in this style.
(Even after reducing it to a few testitems only)

2018-03-18 08:19:54.209 [WARN ] [Xnet/IP Tunneling 192.168.10.26:3671] - response timeout waiting for confirmation

tuwien.auto.calimero.KNXTimeoutException: no confirmation reply received for 3.1.101->3.1.23 L_Data.req, system priority hop count 6 repeat, tpdu 80

	at tuwien.auto.calimero.knxnetip.ClientConnection.doExtraBlockingModes(ClientConnection.java:244) ~[?:?]

	at tuwien.auto.calimero.knxnetip.ConnectionBase.send(ConnectionBase.java:258) ~[?:?]

	at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.send(KNXnetIPTunnel.java:178) ~[?:?]

	at tuwien.auto.calimero.link.KNXNetworkLinkIP.onSend(KNXNetworkLinkIP.java:243) ~[?:?]

	at tuwien.auto.calimero.link.AbstractLink.send(AbstractLink.java:351) ~[?:?]

	at tuwien.auto.calimero.link.KNXNetworkLinkIP.sendRequestWait(KNXNetworkLinkIP.java:222) ~[?:?]

	at tuwien.auto.calimero.mgmt.TransportLayerImpl.connect(TransportLayerImpl.java:327) ~[?:?]

	at tuwien.auto.calimero.mgmt.ManagementClientImpl.send(ManagementClientImpl.java:796) ~[?:?]

	at tuwien.auto.calimero.mgmt.ManagementClientImpl.sendWait2(ManagementClientImpl.java:824) ~[?:?]

	at tuwien.auto.calimero.mgmt.ManagementClientImpl.readDeviceDesc(ManagementClientImpl.java:447) ~[?:?]

	at tuwien.auto.calimero.mgmt.ManagementProceduresImpl.isAddressOccupied(ManagementProceduresImpl.java:310) ~[?:?]

	at org.openhab.binding.knx.internal.client.AbstractKNXClient.isReachable(AbstractKNXClient.java:338) ~[?:?]

	at org.openhab.binding.knx.handler.AbstractKNXThingHandler.pollDeviceStatus(AbstractKNXThingHandler.java:144) ~[?:?]

	at org.openhab.binding.knx.handler.AbstractKNXThingHandler.lambda$1(AbstractKNXThingHandler.java:184) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

Any hint?

Every 10 minutes, when the Weather Underground binding updates it’s channels, I’m getting the following errors…

I don’t know if this is expected behaviour or an oversight, but I’m finding that items using an extended item type are not being persisted. When I revert an item back to using a regular item type, I am stuck with the default unit (ie, temps are in Celcius with no way to convert to Fahrenheit). I’m using JDBC MariaDB, but I doubt this is specific to the flavor of persistence I’m using. It’s looking like I will need to downgrade to the 1.x Weather binding or scrape my own data since my rules rely heavily on historical weather data.

That is a good question. Is the new type correctly handled by persistence services.

Thanks a lot for KNX2, just finished the migration, it’s really “another world”… You clearly feel that it’s less amateur in the approach !!!

The migration went absolutely well, I’ve integrated all the lights (almost 40 in my case) and I’ll start now with probes and rules.

THANKS A THOUSAND OF TIME !!!

3 Likes

Agree an update like this it might be possible that persistence isn’t working quite as expected. If lasUpdate is returning null for any of the members that line will fail.

You can filter those out

call lastItem = Windows.members.filter[w | w.lastUpdate != null].sortBy...

Though since you are on the snapshot you should be using Member of and triggering item if you are using this line to find what item triggered the rule. Features for Rules that work with Groups

@rlkoshak I think this is something different. In my case the complete rule-file didn’t work anymore. There was a need to add spaces after [ and before ]:

Does not work:
val lastItem = Windows.members.sortBy[lastUpdate].last

Works:
val lastItem = Windows.members.sortBy[ lastUpdate ].last

But thanks anyway…will update the rules to your suggestion :slight_smile:

1 Like