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
port: 8080
useHttps: false
trustedCertificate: false
restPath: /rest
aliveInterval: 5
accessibilityInterval: 3

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( ~[?:?]
at org.openhab.core.thing.util.ThingHelper.ensureUniqueChannels( ~[?:?]
at org.openhab.core.thing.binding.builder.ThingBuilder.withChannels( ~[?:?]
at org.openhab.core.thing.binding.builder.BridgeBuilder.withChannels( ~[?:?]
at org.openhab.core.thing.binding.builder.BridgeBuilder.withChannels( ~[?:?]
at org.openhab.binding.remoteopenhab.internal.handler.RemoteopenhabBridgeHandler.createChannels( ~[?:?]
at org.openhab.binding.remoteopenhab.internal.handler.RemoteopenhabBridgeHandler.checkConnection( ~[?:?]
at java.util.concurrent.Executors$ ~[?:?]
at ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
at java.util.concurrent.ThreadPoolExecutor$ [?:?]
at [?:?]

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.