Hello Oliver,
I’m not able to find that option again, I search 2h to give you the correct answer, but nothing =(
I’m struggling a lot with OH3 now UI. sorry again, maybe some one can help us to find that option called
“Switch Enabled” again…
I had similar issues with the sitemap in OH3.
The workaround I found is the same as already described here (disable switch), however I think I might have also found the reason for this behavior.
In the code section, with the switch enabled, you’ll have something like this (slider in my example):
11:25:06.778 [ERROR] [components.UIComponentSitemapProvider] - Cannot build sitemap page_4311621bfa
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Boolean (java.lang.String and java.lang.Boolean are in module java.base of loader 'bootstrap')
at org.openhab.core.model.sitemap.sitemap.impl.SliderImpl.eSet(SliderImpl.java:320) ~[bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.setWidgetPropertyFromComponentConfig(UIComponentSitemapProvider.java:286) ~[bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.buildWidget(UIComponentSitemapProvider.java:214) ~[bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.buildWidget(UIComponentSitemapProvider.java:262) ~[bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.buildSitemap(UIComponentSitemapProvider.java:146) ~[bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.buildSitemap(UIComponentSitemapProvider.java:124) [bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.getSitemap(UIComponentSitemapProvider.java:89) [bundleFile:?]
at org.openhab.core.io.rest.sitemap.SitemapSubscriptionService.getSitemap(SitemapSubscriptionService.java:298) [bundleFile:?]
at org.openhab.core.io.rest.sitemap.SitemapSubscriptionService.collectWidgets(SitemapSubscriptionService.java:264) [bundleFile:?]
at org.openhab.core.io.rest.sitemap.SitemapSubscriptionService.modelChanged(SitemapSubscriptionService.java:320) [bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.updated(UIComponentSitemapProvider.java:333) [bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.updated(UIComponentSitemapProvider.java:1) [bundleFile:?]
at org.openhab.core.common.registry.AbstractRegistry.notifyListeners(AbstractRegistry.java:387) [bundleFile:?]
at org.openhab.core.common.registry.AbstractRegistry.notifyListenersAboutUpdatedElement(AbstractRegistry.java:408) [bundleFile:?]
at org.openhab.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:314) [bundleFile:?]
at org.openhab.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:1) [bundleFile:?]
at org.openhab.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:66) [bundleFile:?]
at org.openhab.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:91) [bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentProvider.update(UIComponentProvider.java:92) [bundleFile:?]
at org.openhab.core.ui.internal.components.UIComponentProvider.update(UIComponentProvider.java:1) [bundleFile:?]
at org.openhab.core.common.registry.AbstractRegistry.update(AbstractRegistry.java:353) [bundleFile:?]
at org.openhab.core.io.rest.ui.internal.UIResource.updateComponent(UIResource.java:182) [bundleFile:?]
at jdk.internal.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) [bundleFile:1.0.9]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) [bundleFile:1.0.9]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201) [bundleFile:1.0.9]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104) [bundleFile:1.0.9]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) [bundleFile:1.0.9]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) [bundleFile:1.0.9]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [bundleFile:1.0.9]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [bundleFile:1.0.9]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) [bundleFile:1.0.9]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) [bundleFile:1.0.9]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) [bundleFile:1.0.9]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) [bundleFile:1.0.9]
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) [bundleFile:1.0.9]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) [bundleFile:1.0.9]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:237) [bundleFile:1.0.9]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) [bundleFile:3.1.0]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) [bundleFile:1.0.9]
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) [?:?]
So something’s trying to convert a string to a boolean value, and the exception is not thrown when I remove the switchEnabled="true" part. So I’m pretty sure the problem is, that it’s "true" instead of just true.
Unfortunately, the editor doesn’t let one save the file without the "" (you can click save, but on reloading they’re back).
In the generated JSON, the quotation marks also show up, so maybe this is an issue in the conversion to JSON and back?
@Oliver2222 The page is located under Settings → Pages. Then you need to open/edit a sitemap. If you don’t have a sitemap yet, you can create one with the + button in the lower right corner.
I haven’t created a Main UI sitemap yet. I’m hoping to convert my .sitemap file to a Main UI sitemap.
Oliver, I have noticed that when working on my current sitemap, If I have just ONE little thing out of place, it screws up the sitemap and won’t display it. In that case I remark out the last thing I worked on and see if the sitemap returns, and keep doing that until it does return. That will usually tell me where the error is, I just need to find it. Then slowly add lines until you get everything back. I hope this helps.
Well… Nor that I’ve created my Main UI pages sitemap, locally, it works fine, both on the computer and in the Android app, but when I try to access it remotely on the Android app, I can navigate it well, but none of the functions work. I haven’t enabled any of the “switch enabled” functions. I have found with a couple of other things on my setup, some things that weren’t working correctly (rules and pages) miraculously started working after a couple of weeks or so.
My wife uses an iPhone and this morning she told me OH wasn’t working. When I looked at it, her sitemap wasn’t showing. Unfortunately, I didn’t have a lot of time to look into it.
Also… question… What’s the “Switch Enabled” SUPPOSED to do?
Interesting…