i am editing my configuration files with Visual Studio Code. I just installed everything so as of now OpenHAB and VS Code are latest. Whenever I click on the OpenHAB button on the left side of VS Code and click on an item, I get:
Your openHAB environment is running in simple mode. Paper UI can’t edit items when this mode is activated!
Looking at the settings in OpenHAB, Simple Mode is off.
Thanks. I edited the addons.cfg, but no change. Rebooted the computer and restarted Code also but stills says it. Note even though it seems to work, May be related but I do get this on Code each startup:
[Error - 6:13:07 PM] Server initialization failed.
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: URI has an authority component
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:593)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: URI has an authority component
at sun.nio.fs.UnixUriUtils.fromUri(UnixUriUtils.java:53)
at sun.nio.fs.UnixFileSystemProvider.getPath(UnixFileSystemProvider.java:98)
at java.nio.file.Paths.get(Paths.java:138)
at org.eclipse.smarthome.model.lsp.internal.MappingUriExtensions.toPathAsInXtext212(MappingUriExtensions.java:209)
at org.eclipse.smarthome.model.lsp.internal.MappingUriExtensions.mapToClientPath(MappingUriExtensions.java:119)
at org.eclipse.smarthome.model.lsp.internal.MappingUriExtensions.toUriString(MappingUriExtensions.java:110)
at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$publishDiagnostics$26(LanguageServerImpl.java:447)
at org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_doubleArrow(ObjectExtensions.java:139)
at org.eclipse.xtext.ide.server.LanguageServerImpl.publishDiagnostics(LanguageServerImpl.java:457)
at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$null$9(LanguageServerImpl.java:293)
at org.eclipse.xtext.ide.server.ProjectManager.lambda$null$3(ProjectManager.java:135)
at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.validate(IncrementalBuilder.java:267)
at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.lambda$launch$6(IncrementalBuilder.java:244)
at org.eclipse.xtext.build.ClusteringStorageAwareResourceLoader.lambda$executeClustered$1(ClusteringStorageAwareResourceLoader.java:77)
at org.eclipse.xtext.xbase.lib.internal.FunctionDelegate.apply(FunctionDelegate.java:42)
at com.google.common.collect.Lists$TransformingRandomAccessList$1.transform(Lists.java:617)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at java.util.AbstractCollection.toArray(AbstractCollection.java:141)
at java.util.ArrayList.addAll(ArrayList.java:581)
at com.google.common.collect.Iterables.addAll(Iterables.java:352)
at org.eclipse.xtext.build.ClusteringStorageAwareResourceLoader.executeClustered(ClusteringStorageAwareResourceLoader.java:80)
at org.eclipse.xtext.build.BuildContext.executeClustered(BuildContext.java:55)
at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.launch(IncrementalBuilder.java:251)
at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:399)
at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:384)
at org.eclipse.xtext.ide.server.ProjectManager.doBuild(ProjectManager.java:115)
at org.eclipse.xtext.ide.server.ProjectManager.doInitialBuild(ProjectManager.java:107)
at org.eclipse.xtext.ide.server.BuildManager.doInitialBuild(BuildManager.java:148)
at org.eclipse.xtext.ide.server.WorkspaceManager.refreshWorkspaceConfig(WorkspaceManager.java:148)
at org.eclipse.xtext.ide.server.WorkspaceManager.initialize(WorkspaceManager.java:117)
at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$initialize$10(LanguageServerImpl.java:295)
at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:38)
… 5 more
Log into paper UI -> configuration and find “simple mode”. Switch it off and press “Save”. Simple mode is on by default if you have select “simple” or so initially.
Do you realize how much impact fundamental changes to the config UI have ?
Let alone those gazillions of people that did encounter these or similar problems but never put up a thread for it.
And no, that’s no argument to shrink functionality to a single way of doing things.
It’s an argument to be very careful, to progress slowly and in well-documented and well-announced steps only, with A LOT of overlap in timing and functionality.
We mustn’t frustrate any existing OH user - that’s way more important than to attract new ones.
In this case it will be a change to the core though. (At the moment simple mode is implemented within OH itself, not within Paper UI.) The simple mode is not helpful and frustrates as soon as you are not the first day beginner anymore. Should be removed and the UIs itself should offer to create an item for a channel.
That would be a fundamental change that doesn’t allow a grace or overlap time, but for the end user it feels the same anyway. The textual people will not notice this as they are defining their own items anyway and the UI users don’t notice it because the UI is doing the same that the core did before.
Thanks folks. All I can say, contrary to what is here, that for me Simple mode was always as my screen shot showed. I did try out Simple mode, however because I’m virtual, reverted back to before I implemented anything beyond the base install. So technically I never had Simple turned on. Now if it’s on by default, why mine shows as it does, not sure.
In my case I was able to fix this problem by activating simple mode in the UI, then ‘save’.
Then I disabled it again and once more ‘save’.
Now VSCode is working as expected.
super super!
Had the same problem and was desperately searching for a solution.
Now your hint; activate+save & deactivate+save solved the problem. Thanks!
Did that and helped. Seeing also when I click on an item it opens that item in OpenHAB. Not sure if I like that in theory as since I’m editing everything thru config files those items are grayed out so can’t actually do anything but still better. I was also getting constant internal errors yesterday after doing this but not seeing it today. Maybe a reboot of OpenHAB helped as I haven’t close Code since the change.
Hi All, still experience the URI error on opening a file with VSCode+OH extension
Even after the trick in paper UI with simple mode, did also a reboot, no luck.
Do I need to do more? ? Yes, just found out what and now sharing
Environment newest version of VSCode on Windows 10 -> RPI3+OH
After some T&E I was able to avoid the URI ERROR by disabling “communication with Language Server of openHAB instance” with following command.
"openhab.remoteLspEnabled": false
Settings in OH English with region NL, Windows 10 (English(Netherlands), not sure what is relevant.
Hope this addition is helpfull if you still encounter URI ERROR.