BasicUI gives Server Error 500 after a few hours

I’m running a Pi with OpenHAB2 which has been stable for a while. Given the troubles I had setting it up, I had tried to avoid updating and had been running 2.3.0 SNAPSHOT for a while (August 2017 ish).

Anyway, BasicUI wasn’t showing the right status of my Hue switches, so I figured what the hell, and updated…

All went well, but now ive started to get Error 500 after a while - ONLY on BasicUI (PaperUI & Habmin work ok);

Problem accessing /basicui/app. Reason:

    Server Error
Caused by:
	at org.eclipse.smarthome.ui.basic.internal.render.SetpointRenderer.renderWidget(
	at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.renderWidget(
	at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processChildren(
	at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processChildren(
	at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processPage(
	at org.eclipse.smarthome.ui.basic.internal.servlet.WebAppServlet.service(
	at org.eclipse.jetty.servlet.ServletHolder.handle(
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(
	at org.eclipse.jetty.servlet.ServletHandler.doScope(
	at org.eclipse.jetty.server.session.SessionHandler.doScope(
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
	at org.eclipse.jetty.server.Server.handle(
	at org.eclipse.jetty.server.HttpChannel.handle(
	at org.eclipse.jetty.server.HttpConnection.onFillable(
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
	at org.eclipse.jetty.util.thread.QueuedThreadPool$

Clearing the UserData Config & UserData TMP dirs bring it back to life, but only for a few hours until whatever is triggering it, happens again.

Any ideas?

Have you tried Clear the Cache yet? When weird things like this start happening it is the first thing to try.

The upgrade should have done this for you but I guess sometimes something goes wrong to corrupt it when it gets rebuilt.

Sometimes it helps.

Yeah, this brings it back to life for a few hours…

@Vini is the cache directory contained in the ones you cleared? There is an actual directory named “cache” the Rich was asking about.

My bad, typo, I of course meant Cache not Config.

I have however, seemed to identify the cause as being an erroneous setpoint in my sitemap. This has worked flawlessly until I switched from 2.3.0 to 2.4.0, so I’m wondering if something has been deprecated in the runtime/binding, or maybe my Java update caused something?

Setpoint item=NestTStatHallway_target_temperature_c label="Target Home Temperature" minValue=1 maxValue=32 step=1 icon="temperature"

Either way, after removing that line from my sitemap, it seems to work again…

The good news (for me) is that im soon to be moving house so plan to redo my Openhab instance anyway. But thats not really the point.

I don’t know that this is new, but I do think the order matters, meaning you should put the icon after the label. Let us know if that fixes it. If not come back and we can start to figure out how to file an issue. Either there is a bug that was introduced and we need to file an issue, or there is a breaking change we need to make sure makes it into the release notes.

Further investigation reveals its actually the [%.1f °C] transform within the label that is breaking it;

Setpoint item=NestTStatHallway_target_temperature_c label="Target Home Temperature [%.1f °C]" minValue=1 maxValue=32 step=1 icon="temperature"

If I remove the [%.1f °C] transform it actually works.

I would say this was definitely introduced in 2.4.0, rightly or wrongly I’ve been using this particularly transform since I started using Openhab & Nest.

I suspect this is something that I’ve missed and/or a bug in the Nest binding (and/or maybe, missing documentation?).

With the introduction of “item dimension” I have dropped the [%.1f °C] transform from the sitemap label and updated the Dimension of the Nest “target temperature” item to Temperature within PaperUI. It now shows correctly as °C in my BasicUI sitemap, with no error.

OK, yes this is probably caused by the introduction of units and Nest 2.x binding just recently started using them. I’ve still not wrapped my head around how they work but I do know they break some things.