Remote Openhab Server Thing stays "unknown"?

I try to connect to OH 2 from OH 3 with Remote Openhab Server binding. It stays at “unknown” for over a day. I have tried restarting both Thing, OH and computer. OH 3 on windows 10, OH 2 on Win 7.

My binding:
UID: remoteopenhab:server:94557b3211
label: Remote openHAB Server
thingTypeUID: remoteopenhab:server
configuration:
port: 8080
host: 192.168.1.197
useHttps: false
trustedCertificate: false
restPath: /rest
aliveInterval: 5
accessibilityInterval: 3

http://192.168.1.197:8080/rest
Give:
{“version”:“0.9.0.b4”,“links”:[{“type”:“uuid”,“url”:“http://192.168.1.197:8080/rest/uuid"},{“type”:“bindings”,“url”:“http://192.168.1.197:8080/rest/bindings”},{“type”:“channel-types”,“url”:“http://192.168.1.197:8080/rest/channel-types”},{“type”:“config-descriptions”,“url”:“http://192.168.1.197:8080/rest/config-descriptions”},{“type”:“services”,“url”:“http://192.168.1.197:8080/rest/services”},{“type”:“discovery”,“url”:“http://192.168.1.197:8080/rest/discovery”},{“type”:“extensions”,“url”:“http://192.168.1.197:8080/rest/extensions”},{“type”:“inbox”,“url”:“http://192.168.1.197:8080/rest/inbox”},{“type”:“links”,“url”:“http://192.168.1.197:8080/rest/links”},{“type”:“items”,“url”:“http://192.168.1.197:8080/rest/items”},{“type”:“persistence”,“url”:“http://192.168.1.197:8080/rest/persistence”},{“type”:“things”,“url”:“http://192.168.1.197:8080/rest/things”},{“type”:“thing-types”,“url”:“http://192.168.1.197:8080/rest/thing-types”},{“type”:“sitemaps”,“url”:“http://192.168.1.197:8080/rest/sitemaps”},{“type”:“voice”,“url”:“http://192.168.1.197:8080/rest/voice”},{“type”:“iconsets”,“url”:“http://192.168.1.197:8080/rest/iconsets”},{“type”:“habmin/charts”,“url”:“http://192.168.1.197:8080/rest/habmin/charts”},{“type”:“habmin/dashboards”,“url”:“http://192.168.1.197:8080/rest/habmin/dashboards”},{“type”:“habmin/designer”,“url”:“http://192.168.1.197:8080/rest/habmin/designer”},{“type”:“habmin/floorplan”,“url”:“http://192.168.1.197:8080/rest/habmin/floorplan”},{“type”:“habmin/rules”,“url”:“http://192.168.1.197:8080/rest/habmin/rules”},{“type”:“module-types”,“url”:“http://192.168.1.197:8080/rest/module-types”},{“type”:“rules”,“url”:“http://192.168.1.197:8080/rest/rules”},{“type”:“templates”,“url”:"http://192.168.1.197:8080/rest/templates”}]}

I believe the server is more useful than the thing. When I tried using the thing and opened a GitHub Issue I was told I misunderstood the purpose of the thing in remoteopenhab.

EDIT I just looked at the documentation and we need @Lolodomo to help clarify, I think.

Ok, can I use/install Remote Openhab Server in different ways?
Other than install binding as a Thing?

In the server all he OH2 Items show up as channels that can then be linked to OH3 Items.

I see. My binding/Thing stays “unknown” yellow, never gets “online”.

Under Channels I have:
This thing has no channels. Either the thing type doesn’t define channels, or they may be detected and appear later.

That issue needs to be fixed first then. I think it takes a few minutes for the binding to discover the server channels once online.

What do the logs say? Is the IP address of the server correct and reachable from OH3? In the advanced configuration you can also specify the OH2 port used.

Im not so good on log files :slight_smile:
IP adress should be correct, and in my first post “/rest” from that IP is shown. I guess thats correct data there?

Log files:
2020-12-28 16:20:45.930 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘remoteopenhab:server:94557b3211’ changed from UNINITIALIZED (DISABLED) to INITIALIZING
2020-12-28 16:20:45.999 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘remoteopenhab:server:94557b3211’ changed from INITIALIZING to UNKNOWN

2020-12-28 16:20:46.084 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.IllegalArgumentException: Duplicate channels remoteopenhab:server:94557b3211:MoonFull
at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:152) ~[?:?]
at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:128) ~[?:?]
at org.openhab.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:86) ~[?:?]
at org.openhab.core.thing.binding.builder.BridgeBuilder.withChannels(BridgeBuilder.java:74) ~[?:?]
at org.openhab.core.thing.binding.builder.BridgeBuilder.withChannels(BridgeBuilder.java:1) ~[?:?]
at org.openhab.binding.remoteopenhab.internal.handler.RemoteopenhabBridgeHandler.createChannels(RemoteopenhabBridgeHandler.java:260) ~[?:?]
at org.openhab.binding.remoteopenhab.internal.handler.RemoteopenhabBridgeHandler.checkConnection(RemoteopenhabBridgeHandler.java:336) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

Do you have 2 OH2 Items with the same name?

I have several folders with OH 2 versions but only one running.
Folders different names but if I named them with same name otherwise, I dont know :).

It appears to be complaining about 2 Items named MoonFull.

Ok, I see. Strange. Ive never used that name… Hmm.
Only thing close that would be the astro binding for moon.

But thanx, I will look and see if I can find any double versions.

Are your OH2 Items in files or created in the UI?

Files in OH 2.
I did find two MoonFull.rrd on that computer. One in dropbox backup and one on the server.

Strange if that should have effect?

When starting another OH 2 (2.5) server on the same computer it works.
There must be something corrupt on my first OH 2.0.

Thanx for your help. :+1:

I do not know if the binding was tested with a version THAT old. LOL

:innocent: :upside_down_face:

@Lolodomo is this a binding bug or a documentation bug?

I was not aware that is was possible to have several items with the same name !
As this is something of course to be avoided (makes no sense), the workaround is easy, just delete any duplicated item in your remote server.

Now, yes, the remote openHAB binding should be more robust and not fail in this unusual case. So something has to be fixed, like considering only the first item with a certain name and then ignore the other items with the same name. But this will be low in my priorities. You can open an issue in Git to not forget it.

1 Like

I have no idea how you succeeded to have several items with the same name. I tried in different ways on my OH2 server but was not able to do it !

  • if the two items are defined in the same .items file, the validation of the file is simply failing
  • If the two items are defined in two different .items file, the item from the second loaded file is just ignored
  • If I try to create the item with PaperUI, the field is underlined with red with this message: Item name already exists

Just curious. Did you test with 2 Items having the same label? That is possible.