Remote Openhab Server Thing stays "unknown"?

Two items with the same label, that is of course possible and accepted by openHAB. But in this case, this will not generate any difficulty in the binding. The label is not considered by the binding.

I will add the catch of the IllegalArgumentException but I will not be able to test it myself.

1 Like

Improvement proposed:

1 Like

Fix is now merged and included in all snapshots starting with 2112.

1 Like

I have the same issues with remote binding sometimes works, sometimes not. I haven’t found a clearer error description. Nevertheless I have the following error in the log file.

2021-01-04 16:56:43.226 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NumberFormatException: Character   is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
	at java.math.BigDecimal.<init>(BigDecimal.java:518) ~[?:?]
	at java.math.BigDecimal.<init>(BigDecimal.java:401) ~[?:?]
	at java.math.BigDecimal.<init>(BigDecimal.java:834) ~[?:?]
	at org.openhab.core.library.types.DecimalType.<init>(DecimalType.java:56) ~[?:?]
	at org.openhab.binding.remoteopenhab.internal.handler.RemoteopenhabBridgeHandler.updateChannelState(RemoteopenhabBridgeHandler.java:510) ~[?:?]
	at org.openhab.binding.remoteopenhab.internal.handler.RemoteopenhabBridgeHandler.checkConnection(RemoteopenhabBridgeHandler.java:347) ~[?:?]
	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) [?:?]
==> /var/log/openhab/events.log <==

I am curious what value you get to produce the NumberFormatException. I will update the code to not fail in case this exception is thrown for a particular item and I will log the item and the value in case it occurs.

In fact, it looks like your decimal value contains unexpected blanks.

I just proposed a fix to avoid a failing of the binding init when the parsing of an item state is failing.
If the parsing fails, this state is just ignored and something is logged to mention it.

In a second time, we will have to understand what is wrong with your item state in particular.

The second fix is merged too.
Unfortunately we don’t have yet a snapshot including them.

I reinstalled my remote machine und now everything works fine … including token and SSL. Thanks for your quick reply.

Snapshot 2116 includes all fixes.
Please let me know if you see warning logs when the binding loads. It would mean unexpected item states to be analyzed.

I run OH 4 M3 and OH 3.4 on different raspberries.
The remote binding works fine for individual items, but things will never be linked, as you can see on the screenshot. Is there anything I do wrong?
I thought, linking the thing will give me all items of the thing at ones and I don‘t have to look for all single items as they are not proper alphabetically listed.

Over night it became „Online“, but no channels. So will wait for some more time.

Copy/paste from documentation:

“Please note that if your remote server is an openHAB v3 server, in order for all of your things to be properly initialized, you will need to define on your bridge thing a valid API token in the parameter token and also define the parameter authenticateAnyway to true in case you are using an unsecured connection (HTTP). This API token can be created on your remote server using Main UI.”

1 Like