I used OpenHAB 1 for a while couple months back. I shelved it because the available UIs had issues updating themselves after some time. Now, seeing OpenHAB 2’s second alpha release, I decided to give it a go. Installed the runtime and the addons, fired it all up and… ran into a brick wall.
The paper UI comes up fine, however in the bottom right hand corner it keeps showing Error 404 when I’m navigating the UI.
When I try to add a new Group or a Thing, I get Error 500.
I’m running OpenHAB on Debian Jessie. Made the OpenHAB folder writeable by the world and I’m running the whole thing as root, to boot - just to eliminate any permission issues.
have you turned on javascript support in your browser? If I remember correctly PaperUI is build on AngularJS. Does the classicUI (http://localhost:8080/classicui/app) work (f.e. with the demo sitemap)?
Installed OH2 snapshot build from 4th October.
The PaperUI works. Adding the weather binding shows we the weather, etc.
I can manually configure groups.
But that’s pretty much it.
The “Control” part is empty and a black rectangle is shown in the bottom-right with ERROR: 500 - Request failed.
Then I’ve realized that items have to be tagged with [ “home-group” ] in the items file to show up in PaperUI.
But that doesn’t solve the 500 problem.
This seems to be working fine in the demo package.
I’ve tried adding a new group with subgroup and a switch and marked it as [ “home-group” ] and voila the PaperUI picks it up automatically and shows the switch.
It seems groups (under configuration) also also added as found in items file.
But when I do this in my prod system the groups are just not showing up in PaperUI. Instead I only see the error 500.
Error 500 is an internal server error. This should usually mean that some exception is thrown in the REST API.
Do you run debug logging? Is there anything helpful in the logs?
2015-10-06 18:31:55 [WARN ] [lipse.jetty.server.HttpChannel:395 ] - /rest/items?recursive=truejavax.servlet.ServletException: javax.servlet.ServletException: java.util.IllegalFormatConversionException: d != java.lang.String
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:130)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.servlet.ServletException: java.util.IllegalFormatConversionException: d != java.lang.String
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:423)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
Caused by: java.util.IllegalFormatConversionException: d != java.lang.String
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302)
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747)
at java.util.Formatter.format(Formatter.java:2520)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at org.eclipse.smarthome.core.transform.TransformationHelper.transform(TransformationHelper.java:80)
at org.eclipse.smarthome.io.rest.core.item.EnrichedItemDTOMapper.considerTransformation(EnrichedItemDTOMapper.java:95)
at org.eclipse.smarthome.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:47)
at org.eclipse.smarthome.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:42)
at org.eclipse.smarthome.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:63)
2015-10-06 18:31:55 [WARN ] [lipse.jetty.server.HttpChannel:481 ] - Could not send response error 500: javax.servlet.ServletException: javax.servlet.ServletException: java.util.IllegalFormatConversionException: d != java.lang.String
Where could this come from.
I have a couple of “%d” in my items file for format conversion.
And why do I not see WARN level output when running the non-debug version.
You may be right.
In fact replacing the %d with %s fixes the errors.
I thought though that the format represents the source datatype. Which in this case is an integer.
Same for temperatures: [%.1f °C]
Or is this different?
The classicui was able to handle this correctly and showing me the right value from the map.
Is it more forgiving to errors in items file?
Well, I think I need to join this discussion, cause I get the same black error box in the bottom right. In this box there are the same messages as described from Rait. (If you want me to do my own topic about this tell me!)
What did I do? I installed a fresh openHAB2 IDE with ESH and tried to install a fresh new binding like this and also followed the Kais vid on youtube. The log shows these Errors, when I try to add a new item:
2015-10-08 15:41:18 [WARN ] [e.jetty.servlet.ServletHandler:620 ] - javax.servlet.ServletException: java.lang.IllegalStateException: ManagedProvider is not available
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:423)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
Caused by: java.lang.IllegalStateException: ManagedProvider is not available
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.add(AbstractRegistry.java:112)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThingSafely(ThingSetupManager.java:648)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThing(ThingSetupManager.java:609)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThing(ThingSetupManager.java:583)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThing(ThingSetupManager.java:162)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThing(ThingSetupManager.java:131)
at org.eclipse.smarthome.io.rest.core.thing.setup.ThingSetupManagerResource.addThing(ThingSetupManagerResource.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
2015-10-08 15:41:18 [WARN ] [lipse.jetty.server.HttpChannel:395 ] - /rest/setup/thingsjavax.servlet.ServletException: javax.servlet.ServletException: java.lang.IllegalStateException: ManagedProvider is not available
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:130)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.servlet.ServletException: java.lang.IllegalStateException: ManagedProvider is not available
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:423)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
Caused by: java.lang.IllegalStateException: ManagedProvider is not available
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.add(AbstractRegistry.java:112)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThingSafely(ThingSetupManager.java:648)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThing(ThingSetupManager.java:609)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThing(ThingSetupManager.java:583)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThing(ThingSetupManager.java:162)
at org.eclipse.smarthome.core.thing.setup.ThingSetupManager.addThing(ThingSetupManager.java:131)
at org.eclipse.smarthome.io.rest.core.thing.setup.ThingSetupManagerResource.addThing(ThingSetupManagerResource.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
2015-10-08 15:41:18 [WARN ] [lipse.jetty.server.HttpChannel:481 ] - Could not send response error 500: javax.servlet.ServletException: javax.servlet.ServletException: java.lang.IllegalStateException: ManagedProvider is not available
Then I searched for something similiar and found this topic. I checked if my javascript is running in the browser, it is. Then I downloaded the openHAB2 Demo, started it and there it is working fine.
The important part is “ManagedProvider is not available”.
This means that your launch configuration is missing some bundles. Are you sure that you haven’t changed anything in it? Do you really require the “with ESH” option? If not, I recommend the normal openHAB 2 IDE setup as this simplifies things.
I installed Openhab2 today on RasPi v2 using the zip file in /opt/openhab2
Set package = demo in addons.cfg
Started ./start_debug.sh
Entered log:tail in the shell and seeing info messages:
14:55:00.133 [INFO ] [marthome.event.ItemStateChangedEvent] - Temperature_GF_Kitchen changed from 18.0 to 20.1
14:55:00.136 [INFO ] [ome.event.GroupItemStateChangedEvent] - Status changed from 20.0 to 20.3 through Temperature
14:55:00.139 [INFO ] [marthome.event.ItemStateChangedEvent] - Temperature_FF_Bath changed from 19.9 to 21.2
14:55:00.144 [INFO ] [ome.event.GroupItemStateChangedEvent] - Status changed from 20.3 to 20.5 through Temperature
14:55:00.144 [INFO ] [marthome.event.ItemStateChangedEvent] - Temperature_FF_Office changed from 20.4 to 19.8
14:55:00.148 [INFO ] [ome.event.GroupItemStateChangedEvent] - Status changed from 20.5 to 20.4 through Temperature
14:55:00.148 [INFO ] [ome.event.GroupItemStateChangedEvent] - Temperature changed from 20.4 to 20.5 through Temperature_FF_Child
14:55:00.152 [INFO ] [marthome.event.ItemStateChangedEvent] - Temperature_FF_Child changed from 18.0 to 18.6
14:55:00.152 [INFO ] [ome.event.GroupItemStateChangedEvent] - Status changed from 20.4 to 20.5 through Temperature
14:55:00.159 [INFO ] [ome.event.GroupItemStateChangedEvent] - Temperature changed from 20.5 to 19.9 through Temperature_FF_Bed
14:55:00.165 [INFO ] [ome.event.GroupItemStateChangedEvent] - Status changed from 20.5 to 19.9 through Temperature
14:55:00.166 [INFO ] [marthome.event.ItemStateChangedEvent] - Temperature_FF_Bed changed from 21.9 to 17.6
14:55:20.031 [INFO ] [marthome.event.ItemStateChangedEvent] - Wifi_Level changed from 1 to 3
14:55:40.022 [INFO ] [marthome.event.ItemStateChangedEvent] - Wifi_Level changed from 3 to 0
All,
I seem to have a similar problem with the rest api - see here:
I would like to switch in the karaf console to DEBUG for the rest api.
For another problem I did this for the Hue Emulation with:
log:set DEBUG org.openhab.io.hueemulation