IP Cam does not work in sitemap #3836
Comments
I can reproduce this error only after modification of the sitemap file (which indeed is a bug). After a restart your example works for me. Can you confirm this behavior? |
Doesn't make a difference to me - still doesn't work in Basic UI or Classic UI. I have a slightly different sitemap:
and I don't get any errors in the log. Just a white blob where the image should be, but of course it works fine if I go to that url directly in a browser. (just to clarify: the absence of a password in the url is intentional - I removed it for testing purposes) |
For me the restart of OpenHAB doesn‘t fix the issue |
Hi @SJKA - it may be you can't reproduce the error without a webcam using this format of url. If so, let me know, and I'll open a port to my webcam and send you login info. |
@Dan1001 please don't capture this issue - the problem you descripe has completely different symptoms (apart from the fact that you also try to display an image in your sitemap). Just create another one if you think this is a bug within the framework. |
Closing as per #3846 (comment). |
Since the update to OpenHAB 2.1 my connection to the IP Cam is broken.
My sitemap code:
Text item=IP_Cam_1 {
Image url="http://192.168.56.3/snapshot.cgi?user=test&pwd=password" label="IP Cam 1"
}
I have also tried this:
Text label="IP Cam 1" {
Image label="IP Cam 1" url="http://192.168.56.3/snapshot.cgi?user=test&pwd=password"
}
The openhab.log file:
2017-07-08 19:59:44.610 [ERROR] [.core.internal.folder.FolderObserver] - Error handling update of file '/etc/openhab2/sitemaps/Test.sitemap': index=2, size=2.
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=2, size=2
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:346)[63:org.eclipse.emf.common:2.11.0.v20150805-0538]
at org.eclipse.smarthome.ui.internal.items.ItemUIRegistryImpl.getWidget(ItemUIRegistryImpl.java:516)[136:org.eclipse.smarthome.ui:0.9.0.b5]
at org.eclipse.smarthome.io.rest.sitemap.SitemapSubscriptionService.collectWidgets(SitemapSubscriptionService.java:225)[117:org.eclipse.smarthome.io.rest.sitemap:0.9.0.b5]
at org.eclipse.smarthome.io.rest.sitemap.SitemapSubscriptionService.modelChanged(SitemapSubscriptionService.java:276)[117:org.eclipse.smarthome.io.rest.sitemap:0.9.0.b5]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:286)[122:org.eclipse.smarthome.model.core:0.9.0.b5]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:136)[122:org.eclipse.smarthome.model.core:0.9.0.b5]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:234)[122:org.eclipse.smarthome.model.core:0.9.0.b5]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:297)[122:org.eclipse.smarthome.model.core:0.9.0.b5]
at org.eclipse.smarthome.core.service.WatchQueueReader.run(WatchQueueReader.java:206)[98:org.eclipse.smarthome.core:0.9.0.b5]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]
2017-07-08 20:03:34.130 [WARN ] [eclipse.jetty.servlet.ServletHandler] - /proxy
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=1, size=1
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:346)[63:org.eclipse.emf.common:2.11.0.v20150805-0538]
at org.eclipse.smarthome.ui.internal.items.ItemUIRegistryImpl.getWidget(ItemUIRegistryImpl.java:516)[136:org.eclipse.smarthome.ui:0.9.0.b5]
at org.eclipse.smarthome.ui.internal.proxy.ProxyServletService.uriFromRequest(ProxyServletService.java:236)[136:org.eclipse.smarthome.ui:0.9.0.b5]
at org.eclipse.smarthome.ui.internal.proxy.AsyncProxyServlet.rewriteTarget(AsyncProxyServlet.java:64)[136:org.eclipse.smarthome.ui:0.9.0.b5]
at org.eclipse.jetty.proxy.ProxyServlet.rewriteURI(ProxyServlet.java:184)[77:org.eclipse.jetty.proxy:9.2.19.v20160908]
at org.eclipse.jetty.proxy.ProxyServlet.service(ProxyServlet.java:56)[77:org.eclipse.jetty.proxy:9.2.19.v20160908]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[18:javax.servlet-api:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[79:org.eclipse.jetty.security:9.2.19.v20160908]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.Server.handle(Server.java:499)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[71:org.eclipse.jetty.io:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]
When I open the URL I get the image from the camera. On version 2.0 everything worked fine.
The text was updated successfully, but these errors were encountered: