Strange error when updating an item file

Please use code fences, I can see smart quotes and they will cause issues but unless u post in code fences it may just betheforum.

Btw do not exposeitems as that is not needed unless you use IFTTT as it will constantly use your internet even when not using a app or ui. Also best to keep The load on myopenhab as low as u can as it is a community runserver. The items at myopenhab will only update if u expose an item and then move the control. As mentioned do not expose any items just be sure to have remote andnotifications selected and then the tags do the rest.

The online tab unless I am wrong ONLY shows your openhabserver is connecting to the myopenhab server, nothing more. There is a place in the menu where you can see thesucessful oauth2 connections from Google home or Alexa apps with a rubbish bin icon next to them to remove them.

1 Like

@matt1 & @Thedannymullen - thanks for the input. Sorry I did not put in code fences I was looking for that. There are no funny links or blue lines on my output i just presented itself in the forum.

My item is being state changed all the time so this should not be an issue. I have just installed the REST API Docs and ran a GET on Items for the item involved here is the result in code fences:

{
  "link": "http://openhabianpi:8080/rest/items/Kitchen_PantryLights",
  "state": "OFF",
  "editable": false,
  "type": "Switch",
  "name": "Kitchen_PantryLights",
  "label": "Pantry Lights OH",
  "category": "light",
  "tags": [
    "Lighting"
  ],
  "groupNames": [
    "gDevices",
    "gRoom_Kitchen"
  ]
}

As you can see it looks fine - It changes state no problems, has rules with expire bindings, works in the android app etc.

When I installed the API Docs however I got a lot of WARNINGS in the logtail the most relevant being this:

2018-07-24 12:15:06.195 [WARN ] [org.eclipse.jetty.server.HttpChannel] - //openhabianpi:8080/rest/sitemaps/default/gRoom_Kitchen?_=5995273660b96

javax.servlet.ServletException: javax.servlet.ServletException: A MultiException has 1 exceptions.  They are:

1. java.lang.IllegalStateException: ServiceLocatorImpl(__HK2_Generated_3,4,22948653) has been shut down

	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:88) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [84:org.eclipse.jetty.server:9.3.21.v20170918]

	at org.eclipse.jetty.server.Server.handle(Server.java:534) [84:org.eclipse.jetty.server:9.3.21.v20170918]

	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [84:org.eclipse.jetty.server:9.3.21.v20170918]

	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [84:org.eclipse.jetty.server:9.3.21.v20170918]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [76:org.eclipse.jetty.io:9.3.21.v20170918]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [76:org.eclipse.jetty.io:9.3.21.v20170918]

	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [76:org.eclipse.jetty.io:9.3.21.v20170918]

	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [87:org.eclipse.jetty.util:9.3.21.v20170918]

	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [87:org.eclipse.jetty.util:9.3.21.v20170918]

	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [87:org.eclipse.jetty.util:9.3.21.v20170918]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [87:org.eclipse.jetty.util:9.3.21.v20170918]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [87:org.eclipse.jetty.util:9.3.21.v20170918]

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

There were a heap of warnings but all very similar.

I just disabled/removed the Alexa link from myopenhab.org and recreated the account linking from the Alexa app - tried discovery and still nothing? Everything looks right apart from the warnings but still no go. I have read about the _ in item names - is this a real problem?

Jetty is also used by cloud connector so if u get errors that may stop it from running best to fix. Remove your sitemap file for testing and reboot your openhab server after clearing tmp and cache folders. Search forum for how and don’t delete the folders only contents

@matt1 Thanks mate that was it cleared the cache and tmp and presto it came up. Took some time to go Online but now working perfectly.

Good to hear it is fixed, but that is bad news for me as I was hoping others would say it is a server issue. I am still hunting on how to fix my setup. Perhaps you can help me out, that JSON output you posted, is that how it was formatted? Or did you edit it to make it look pretty? Mine came out as a single line with no carriage returns (press enter to make new line) and that may possibly be a hint as to what is wrong with my setup. Please reply in my thread so as not to hijack this one…

When I finally fix my setup I plan to do a major write up and push request for the documentation on how to setup and fault find the cloud connector.

2 Likes

@matt1 I am in full agreement that the cloud docs could use some improvement. I have submitted issues on git for the problems I have found. The google side seemed to be receptive while the Alexa side and the cloud connector people have given no response yet to the issues.

On fault finding, yes definitely need some tools or something to help us. You can see on the forums that many people have issues. In my opinion these issues can turn people off to openHAB which is the opposite behavior of what you want.

I would love to see some better syntax checking first. If for example a tag is required then openHAB should throw and error. If a space is required between quotes and a bracket the. OpenHAB should throw a error. This would help all users. But the first step is to update the docs as if they do the have the requirements explicitly spelled out then we can develop syntax checks!

I still need to investigate a few things on my end, but I think I have a few more issues on git for the cloud connector.

1 Like

I hope I do not double post, but I wanted to mention, that this behaviour is not “harmless” as mentioned in some posts. This kills the homekit connection.
I have an items file with about 100 homematic items, of which I tagged all lights as lighting and all switches as switchable. On a fresh restart of OH (latest openhabian, 2.3) everything works fine and Apple Home discovers all items.
When I change a single thing in this items-file, the file gets reloaded, I get tons of “Could not update element with key” warnings and all items disappear from Apple Home. I then need to restart OH and all items reappear, though I need to sort them again into the rooms I created in Apple Home. Since I cannot do this sorting for 25+ items everytime I make a minor change in that items-file, this bug effectively breaks the homekit-functionality.

3 Likes

I totally agree. All my items contain underlines, and nö they are Not visible by Alexa anymore. Is there a solution for this, beide renaming all the items? Which part must not have underlines?

@misken totally agree have exactly the same issue with 50+ items I need to resort in the correct rooms each and every time.

With the latest Release (2.4) there is not shown any Error / warnings. I am not sure if the failure was solved or if the failure messages are solely supressed, because my Alexa still does not find any devices

Hi all.
If someone is facing the same problem:
I was able to solve the problem by installing an old Alexa APK in my Android device. In this app I was able to find the devices. After they were found and stored, it is possible to control them with the Echo Dot/ other Alexas as well