Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[basicUI]: ipcamera videostream in basicUI sitemap throws exception #745

Closed
Boby71 opened this issue Jan 2, 2021 · 20 comments · Fixed by openhab/openhab-core#2072 or openhab/openhab-core#2178
Labels
bug Something isn't working main ui Main UI

Comments

@Boby71
Copy link

Boby71 commented Jan 2, 2021

The problem

When going to a page within the basicUI sitemap containing the video element the following exceptions are being thrown:

HTTP ERROR 500
Problem accessing /basicui/app. Reason:

    Server Error
Caused by:
java.lang.NullPointerException
	at org.openhab.ui.basic.internal.render.VideoRenderer.renderWidget(VideoRenderer.java:64)
	at org.openhab.ui.basic.internal.render.PageRenderer.renderWidget(PageRenderer.java:195)
	at org.openhab.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:161)
	at org.openhab.ui.basic.internal.render.PageRenderer.processPage(PageRenderer.java:125)
	at org.openhab.ui.basic.internal.servlet.WebAppServlet.service(WebAppServlet.java:183)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:494)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
	at java.base/java.lang.Thread.run(Thread.java:834)

Expected behavior

I expected the video stream to be shown on the page.

Steps to reproduce

  1. Define an item which contains the URL to a video stream of an IPCamera. For me it's the provided channel of the IPCamera binding:
    image
  2. Create a page "sitemap" with the following content:
sitemap page_328b2c7c3a label="New Sitemap" {
    Video item=DoorCam_MJPEGURL
}

  1. Open the sitemap in the browser -> exception

Your environment

runtimeInfo:
  version: 3.1.0
  buildString: "Build #2109"
locale: de_AT
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 11.0.9
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu11.43+88-CA
  osName: Linux
  osVersion: 5.4.79-v7+
  osArchitecture: arm
  availableProcessors: 4
  freeMemory: 49156576
  totalMemory: 194904064
bindings:
  - amazonechocontrol
  - daikin
  - denonmarantz
  - exec
  - harmonyhub
  - http
  - ipcamera
  - mqtt
  - netatmo
  - network
  - ntp
  - systeminfo
  - unifi
  - wled
  - worxlandroid
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1
    prefersColorScheme: dark
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 8
    language: de
    languages:
      - de
      - de-DE
      - en
      - en-US
      - en-AU
    onLine: true
    platform: Win32
  screen:
    width: 1920
    height: 1080
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: dark
    filled: true
    pageTransitionAnimation: default
    bars: filled
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
    like Gecko) Chrome/87.0.4280.88 Safari/537.36
timestamp: 2021-01-02T11:51:50.352Z

Browser console

image

Browser network traffic

image

Additional information

My IPCam is an INSTAR 9008 Full HD; the provided URL of the item can be opened an viewed at in any browser without any problem. This case was already mentioned here, but as I don't have the rights to move the issue to another repo, I reopened the case here: openhab/openhab-addons#9518

@lolodomo
Copy link
Contributor

lolodomo commented Jan 2, 2021

Is it working with a sitemap created manually in a .sitemap file (not with MainUI) ?

@lolodomo
Copy link
Contributor

lolodomo commented Jan 2, 2021

A video widget requires a mandatory url argument, something like:
Video url="http://xxxxxxx.mp4" item=VideoUrl

https://www.openhab.org/docs/configuration/sitemaps.html#element-type-video

Issue to be closed (wrong sitemap syntax) or to be associated to MainUI rather than BasicUI if the problem is the sitezmap builder from MainUI.

@Boby71
Copy link
Author

Boby71 commented Jan 2, 2021

Unfortunately, it's the same when I add the URL to the element:

Sitemap:
Video icon="camera" item=DoorCam_MJPEGURL url="http://192.168.1.50:8081/ipcamera.mjpeg"

Logfile:

2021-01-02 19:14:14.847 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /basicui/app

java.lang.NullPointerException: null

	at org.openhab.ui.basic.internal.render.VideoRenderer.renderWidget(VideoRenderer.java:64) ~[?:?]

	at org.openhab.ui.basic.internal.render.PageRenderer.renderWidget(PageRenderer.java:195) ~[?:?]

	at org.openhab.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:161) ~[?:?]

	at org.openhab.ui.basic.internal.render.PageRenderer.processPage(PageRenderer.java:125) ~[?:?]

	at org.openhab.ui.basic.internal.servlet.WebAppServlet.service(WebAppServlet.java:203) ~[?:?]

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[bundleFile:3.1.0]

	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544) ~[bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307) ~[bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[bundleFile:?]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.Server.handle(Server.java:494) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]

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

When I put the video element into a .sitemap file and open the page, there is no exception:

.sitemap-file:

sitemap test123 label="Test123" {
        Video icon="camera" item=DoorCam_MJPEGURL url="http://192.168.1.50:8081/ipcamera.mjpeg"
}

image

I still don't see an image in the video control, but this might have other reasons I need to check.
But the exception is ONLY thrown for the sitemap built by the sitemap builder in GUI.

The used URL works fine:
image

@lolodomo
Copy link
Contributor

lolodomo commented Jan 2, 2021

But the exception is ONLY thrown for the sitemap built by the sitemap builder in GUI.

Ok, so this is not a Basic UI bug but rather a bug in the MainUI sitemap builder.
@ghys : any idea ?

@Skinah
Copy link
Contributor

Skinah commented Jan 3, 2021

This works for me if contained in a sitemap FILE and viewed in basicUI and the ios app. Note the encoding is added.

Video url="http://192.168.1.xx:54321/ipcamera.mjpeg" encoding="mjpeg"

I have heard others say it does not work if stored in the JSON database and that putting it into a file fixes it, but I have not tried it myself to confirm. I am now mostly using a OH3 widget to display the feeds as it is much better as it has the ability to overlay controls and alarms on top of the feed.

@Boby71
Copy link
Author

Boby71 commented Jan 3, 2021

Encoding doesn't make a difference - it even fails when it's used too. But even if this had been the reason:
From a users perspective at least a understandable error message should show up in the log, like "no encoding used - skipped the element" or something like that. Throwing an exception and freezing the system isn't the way.

To sum it up:

  • video element on MainUI created sitemaps causes exceptions
  • (the same) video element in a .sitemap file doesn't throw an exception

ghys added a commit to ghys/openhab-core that referenced this issue Jan 4, 2021
Also catch remaining exceptions and log a warning/ignore the parameter
instead of making the whole sitemap building process fail.

Fix wrong feature ID for the video widget URL.

Fixes openhab#2047.
Fixes openhab#1987.
Fixes openhab#1898.
Fixes openhab#1875.
Fixes openhab/openhab-webui#745.

Signed-off-by: Yannick Schaus <[email protected]>
@ghys
Copy link
Member

ghys commented Jan 4, 2021

@ghys : any idea ?

Should be fixed by openhab/openhab-core#2072.

@Boby71
Copy link
Author

Boby71 commented Jan 4, 2021

@ghys: I guess this will solve this issue as well?
openhab/openhab-core#2005

@Boby71
Copy link
Author

Boby71 commented Jan 5, 2021

Stupid question: How can I find out which PR is included in which build/snapshot?
I had a look at the Jenkins build log, but there were no changes in #2116?
https://ci.openhab.org/job/openHAB3-Distribution/2116/

@ghys
Copy link
Member

ghys commented Jan 5, 2021

@ghys: I guess this will solve this issue as well?

Yes, thanks.

How can I find out which PR is included in which build/snapshot?

Look at https://ci.openhab.org/job/openHAB-Core/changes and check that your distribution build was made after the build which included the commit you're after. openhab/openhab-core#2072 is not yet merged btw.

@Boby71
Copy link
Author

Boby71 commented Jan 5, 2021

@ghys , thank you!

I did a quick check and used exactly the same sitemap in a .sitemap file and in a UI generated sitemap:

sitemap test label="Test" {
    Text icon="camera" item=DoorCam_MJPEGURL label="Video-URL"
    Video icon="camera" item=DoorCam_MJPEGURL url="http://192.168.1.50:8081/ipcamera.mjpeg" encoding="mjpeg"
    Text icon="camera" item=DoorCam_ImageURL label="Image-URL"
    Image icon="camera" item=DoorCam_ImageURL url="http://192.168.1.50:8081/ipcamera.jpg" label="Image" refresh=60
}

I don't get an exception anymore, but a completely different behaviour in basicUI, depending on where I created the sitemap:
.sitemap file:
image
UI made sitemap:
image

Do you think this different behaviour will be fixed as well? Thank you!

kaikreuzer pushed a commit to openhab/openhab-core that referenced this issue Jan 5, 2021
…aps (#2072)

* Fix parsing integer & booleans parameters in UI component based sitemaps

Also catch remaining exceptions and log a warning/ignore the parameter
instead of making the whole sitemap building process fail.

Fix wrong feature ID for the video widget URL.

Fixes #2047.
Fixes #1987.
Fixes #1898.
Fixes #1875.
Fixes openhab/openhab-webui#745.

Signed-off-by: Yannick Schaus <[email protected]>
@Boby71
Copy link
Author

Boby71 commented Jan 6, 2021

@kaikreuzer , @ghys : I updated now to build #2118 which should include #2072, but I still get an exception when using the MainUI generated sitemap to display the page with the video element inside:

2021-01-06 12:32:35.998 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /basicui/app

java.lang.NullPointerException: null

	at org.openhab.ui.basic.internal.render.VideoRenderer.renderWidget(VideoRenderer.java:64) ~[?:?]

	at org.openhab.ui.basic.internal.render.PageRenderer.renderWidget(PageRenderer.java:195) ~[?:?]

	at org.openhab.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:161) ~[?:?]

	at org.openhab.ui.basic.internal.render.PageRenderer.processPage(PageRenderer.java:125) ~[?:?]

	at org.openhab.ui.basic.internal.servlet.WebAppServlet.service(WebAppServlet.java:203) ~[?:?]

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[bundleFile:3.1.0]

	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544) ~[bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307) ~[bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[bundleFile:?]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.Server.handle(Server.java:494) ~[bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]

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

@Boby71
Copy link
Author

Boby71 commented Jan 6, 2021

...and when I try to use an image instead I don't get an exception, but also no image:

    Group icon="door" label="Gartentor" {
        Switch icon="door" mappings=[ON="ÖFFNEN"] label="Gartentor []" item=Gartentor_oeffnen
        Image icon="camera" url="http://192.168.1.50:8081/ipcamera.jpg" item=DoorCam_ImageURL
    }

leads to:
image

Doing the same in a .sitemap file there's no problem at all.

cweitkamp pushed a commit to openhab/openhab-core that referenced this issue Jan 10, 2021
…aps (#2072)

* Fix parsing integer & booleans parameters in UI component based sitemaps

Also catch remaining exceptions and log a warning/ignore the parameter
instead of making the whole sitemap building process fail.

Fix wrong feature ID for the video widget URL.

Fixes #2047.
Fixes #1987.
Fixes #1898.
Fixes #1875.
Fixes openhab/openhab-webui#745.

Signed-off-by: Yannick Schaus <[email protected]>
@vcatini
Copy link

vcatini commented Jan 17, 2021

Hi, is it solved? I still get this issue after installing version 3.1.0 Build #2147.

@Boby71
Copy link
Author

Boby71 commented Jan 24, 2021

Hi, is it solved? I still get this issue after installing version 3.1.0 Build #2147.

it works for me. Do you a) use the item provided by the channel and b) the video URL in parallel?

@vcatini
Copy link

vcatini commented Jan 24, 2021

Screenshot_20210124-053833_Chrome
Screenshot_20210124-053911_Chrome
Yes, I use both, and I get error message in the screenshot. It works fine in a text format saved sitemap file. I updated openhab to the latest snapshot through openhabian config console. What else I miss? I'd like to remove sitemap file to manage it in the UI but I can't. Many thanks for any help.

@Boby71
Copy link
Author

Boby71 commented Jan 24, 2021

58A4D8FF-241C-4AA2-ADA0-EA0939604C8C
I use the URL and port provided by the thing - and not the address of the cam itself. My cam is 192.168.1.82, but I use 192.168.1.50:8081 (the port needs to be defined at the thing).

@vcatini
Copy link

vcatini commented Jan 25, 2021

Hi, I tried also using image widget instead of video but even if I get no error in the log I also get no image in the UI.
I use same configuration as Boby71 one, this is the code in the sitemap UI:

sitemap page_a3a0449c28 label="New Sitemap" {
Image icon="camera" url="http://192.168.1.57:54321/ipcamera.jpg" label="Cucina" item=CameraCucina192168185_ImageURL refresh=1000
}

where IP address is the openhab one and port is the one configured at things level. If I put the URL directly in the browser it works fine, if I put this sitemap code in a sitemap file it works fine.
I just look at web page source code to search for differences:

  • the one created by the UI reports the following line for the image:
  • the one created by the sitemap text file reports the following line instead:
    that's clear why there is no image in the first case but I don't know which is the main cause.
    I have the following version of openhab installed: openHAB 3.1.0 Build Javascript error when actionAnalyzerItems value is a string #2158
    I have followed all the steps in this thread, I think.
    Many thanks for all your support

@vcatini
Copy link

vcatini commented Jan 25, 2021

I just look at web page source code to search for differences:

the one created by the UI reports the following line for the image: img src="images/none.png"
the one created by the sitemap text file reports the following line instead: img src="../proxy?sitemap=prova.sitemap&widgetId=00&t=1611574750279"
that's clear why there is no image in the first case but I don't know which is the main cause.
I have the following version of openhab installed: openHAB 3.1.0 Build #2158
I have followed all the steps in this thread, I think.
Many thanks for all your support

@Boby71
Copy link
Author

Boby71 commented Jan 25, 2021

The missing image is related to another bug I filed an issue for:
#763

cweitkamp pushed a commit to openhab/openhab-core that referenced this issue Feb 6, 2021
* Add site provider lookup in proxy

Third attempt at this PR, but this very simply allows for the proxy to find the sitemaps for both file based as well as gui generated.

Fixes #2154
Fixes openhab/openhab-webui#763
Fixes openhab/openhab-webui#745

Also-by: Kai Kreuzer <[email protected]>
Signed-off-by: Brian Homeyer <[email protected]>
cweitkamp pushed a commit to openhab/openhab-core that referenced this issue Feb 6, 2021
* Add site provider lookup in proxy

Third attempt at this PR, but this very simply allows for the proxy to find the sitemaps for both file based as well as gui generated.

Fixes #2154
Fixes openhab/openhab-webui#763
Fixes openhab/openhab-webui#745

Also-by: Kai Kreuzer <[email protected]>
Signed-off-by: Brian Homeyer <[email protected]>
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 11, 2023
…aps (openhab#2072)

* Fix parsing integer & booleans parameters in UI component based sitemaps

Also catch remaining exceptions and log a warning/ignore the parameter
instead of making the whole sitemap building process fail.

Fix wrong feature ID for the video widget URL.

Fixes openhab#2047.
Fixes openhab#1987.
Fixes openhab#1898.
Fixes openhab#1875.
Fixes openhab/openhab-webui#745.

Signed-off-by: Yannick Schaus <[email protected]>
GitOrigin-RevId: fcaf251
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 11, 2023
* Add site provider lookup in proxy

Third attempt at this PR, but this very simply allows for the proxy to find the sitemaps for both file based as well as gui generated.

Fixes openhab#2154
Fixes openhab/openhab-webui#763
Fixes openhab/openhab-webui#745

Also-by: Kai Kreuzer <[email protected]>
Signed-off-by: Brian Homeyer <[email protected]>
GitOrigin-RevId: 74c4c23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
5 participants