New OH2 binding: Tankerkoenig

the older version doenst work for me, i cant add any things as you can see on the screenshot:

That should work under Configuration -Things, clicking on the plus sign should show the dialog from which binding to add thingsā€¦
Let me know if that doesnā€™t work either.

with the binding from the market it works this may, with the older version it didnt.

In this case you have to wait until Iā€™m back home. I already have an idea what causes the error, but I need to check.
Iā€™ll write in here if I have something new. Is that OK with you?

Of course! I am very thankful for your help and Support!

IMHO the error is resolved!
The update is available as a Marketplace Binding (Version in bundle:list will show 2.1.0.201706031844)

The problem was a typo in a variable name.

The problem with the older .jar which could be downloaded from my dropbox was caused by using the snapshot version.
Iā€™m not sure if that behaviour is intended (I asked that question in th code section already), it will occur also with the actual binding, when installed by just dropping it into the addons folder (which works on the stable release).
Note: I did test the actual binding on the snapshot release when installed via PaperUI! It worked for me (keeping fingers crossed)

thank you very much! now it works fine!

1 Like

Iā€™m glad to hear that, thanks for the feedback.
If you have any further question, donā€™t hesitate to call.

hello!

actually i got problems again with the binding - the things are not initializised. also i saw, that there are two bindings now at the add-ons - of course i tried both.

didnt find anything in the errorlog.

thanks for help.

yours alex

One of them comes from the market, see the grey name on the first entry.

When a binding is merged into the core, you have to delete the entry on the Eclipse market.

@e36Alex
The above is correct, you have the Marketplace version and the brandnew snapshot version.
During the release process several were necessary resulting in a situation that you need to re-setup the Webswrvice (bridge) and Statiobs (things ).
That is also described as comment in the marketplace.
@hakan
Thanks for stepping in.
In my understanding I should remove the Marketplace version when the binding is in the release version. Please advise if Iā€™m mistaken.

Looking a bit closer, you installed only the Snapshot version. This one should show the Stations and Webservice go ONLINE within a minute. If not check a Station if it shows more detail. Iā€™d assume the cause in a wrong API key or no connection.
If you raise to DEBUG level to log will show more detail.
[Edit]
TI misread , in the picture you have the Marketplace version installed. In the one from laSt week, it can take a while until anything goes ONLINE,you have to for a complete Refresh Time , only after that prices will get updated and all things go ONLINE Refresh Time default is 60 minutes!

You should remove the Marketplace entry after the binding PR is merged. Unfortunately, I did not find a way to ā€œdisableā€ the entry (and totally forgot to open up an Issue for this functionality)

When you have a new PR, changing what is merged into the master, you can always re-create the Marketplace entry.

Will do immidiatly

Hi,

Iā€™m a newbie in OH and have problems with this binding. I copied the sample from the official binding description, but I get no results. These are the log entries:

2017-06-25 12:39:25.749 [ThingAddedEvent           ] - Thing 'tankerkoenig:webservice:WebserviceName' has been added.
2017-06-25 12:39:25.899 [hingStatusInfoChangedEvent] - 'tankerkoenig:webservice:WebserviceName' changed from UNINITIALIZED to INITIALIZING
2017-06-25 12:39:25.899 [hingStatusInfoChangedEvent] - 'tankerkoenig:webservice:WebserviceName' changed from INITIALIZING to UNKNOWN
2017-06-25 12:39:25.903 [ThingAddedEvent           ] - Thing 'tankerkoenig:station:WebserviceName:StationName1' has been added.
2017-06-25 12:39:25.906 [hingStatusInfoChangedEvent] - 'tankerkoenig:station:WebserviceName:StationName2' changed from INITIALIZING to UNKNOWN
2017-06-25 12:39:25.907 [hingStatusInfoChangedEvent] - 'tankerkoenig:station:WebserviceName:StationName1' changed from UNINITIALIZED to INITIALIZING
2017-06-25 12:39:25.908 [ThingAddedEvent           ] - Thing 'tankerkoenig:station:WebserviceName:StationName2' has been added.
2017-06-25 12:39:25.909 [hingStatusInfoChangedEvent] - 'tankerkoenig:station:WebserviceName:StationName1' changed from INITIALIZING to UNKNOWN
2017-06-25 12:39:25.909 [hingStatusInfoChangedEvent] - 'tankerkoenig:station:WebserviceName:StationName2' changed from UNINITIALIZED to INITIALIZING
2017-06-25 12:39:41.229 [hingStatusInfoChangedEvent] - 'tankerkoenig:station:WebserviceName:StationName2' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): Empty return or no internet connection
2017-06-25 12:39:41.261 [hingStatusInfoChangedEvent] - 'tankerkoenig:station:WebserviceName:StationName1' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): Empty return or no internet connection

Can anyone help me with this problem?

Have you used your personal API-Key as received from Tankerkoenig.de?
If yes, please raise logging level to Debug for this binding and post the relevant entries when trying to setup the binding.

I have now changed the log level to debug, this is what I can see in the log:

2017-06-25 15:53:00.367 [DEBUG] [org.openhab.binding.tankerkoenig    ] - BundleEvent INSTALLED - org.openhab.binding.tankerkoenig
2017-06-25 15:53:00.462 [DEBUG] [org.openhab.binding.tankerkoenig    ] - BundleEvent RESOLVED - org.openhab.binding.tankerkoenig
2017-06-25 15:53:00.464 [DEBUG] [org.openhab.binding.tankerkoenig    ] - BundleEvent STARTING - org.openhab.binding.tankerkoenig
2017-06-25 15:53:00.477 [DEBUG] [org.openhab.binding.tankerkoenig    ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=binding.tankerkoenig, component.id=188, service.id=319, service.bundleid=194, service.scope=bundle} - org.openhab.binding.tankerkoenig
2017-06-25 15:53:00.481 [DEBUG] [org.openhab.binding.tankerkoenig    ] - BundleEvent STARTED - org.openhab.binding.tankerkoenig
2017-06-25 15:54:06.852 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'tankerkoenig.things'
2017-06-25 15:54:06.867 [DEBUG] [nkerkoenig.handler.WebserviceHandler] - Initialize Bridge
2017-06-25 15:54:06.869 [DEBUG] [nkerkoenig.handler.WebserviceHandler] - Refresh job scheduled to run every 60 min. for 'tankerkoenig:webservice:WebserviceName'
2017-06-25 15:54:06.873 [DEBUG] [.tankerkoenig.handler.StationHandler] - Initializing Tankerkoenig handler 'tankerkoenig:station:WebserviceName:StationName1'
2017-06-25 15:54:06.875 [DEBUG] [.tankerkoenig.handler.StationHandler] - Refresh job scheduled to run every 24 hours for 'tankerkoenig:station:WebserviceName:StationName1'
2017-06-25 15:54:06.884 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'tankerkoenig.things'
2017-06-25 15:54:06.897 [DEBUG] [nkerkoenig.handler.WebserviceHandler] - Initialize Bridge
2017-06-25 15:54:07.041 [DEBUG] [nkerkoenig.handler.WebserviceHandler] - Refresh job scheduled to run every 60 min. for 'tankerkoenig:webservice:WebserviceName'
2017-06-25 15:54:07.042 [DEBUG] [.tankerkoenig.handler.StationHandler] - Initializing Tankerkoenig handler 'tankerkoenig:station:WebserviceName:StationName1'
2017-06-25 15:54:07.043 [DEBUG] [.tankerkoenig.handler.StationHandler] - Refresh job scheduled to run every 24 hours for 'tankerkoenig:station:WebserviceName:StationName1'
2017-06-25 15:54:22.044 [DEBUG] [.tankerkoenig.handler.StationHandler] - Try to refresh detail data
2017-06-25 15:54:22.176 [DEBUG] [ig.internal.data.TankerkoenigService] - getTankerkoenigDetailResult IOException: 
java.io.IOException: java.util.concurrent.ExecutionException: java.nio.channels.ClosedChannelException
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:255)[113:org.eclipse.smarthome.io.net:0.9.0.201706211517]
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:149)[113:org.eclipse.smarthome.io.net:0.9.0.201706211517]
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:122)[113:org.eclipse.smarthome.io.net:0.9.0.201706211517]
	at org.openhab.binding.tankerkoenig.internal.data.TankerkoenigService.getResponseString(TankerkoenigService.java:67)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at org.openhab.binding.tankerkoenig.internal.data.TankerkoenigService.getTankerkoenigDetailResult(TankerkoenigService.java:90)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at org.openhab.binding.tankerkoenig.internal.data.TankerkoenigService.getStationDetailData(TankerkoenigService.java:48)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at org.openhab.binding.tankerkoenig.handler.StationHandler.updateDetailData(StationHandler.java:133)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at org.openhab.binding.tankerkoenig.handler.StationHandler$1.run(StationHandler.java:90)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_66]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_66]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_66]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_66]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_66]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_66]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_66]
Caused by: java.util.concurrent.ExecutionException: java.nio.channels.ClosedChannelException
	at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:655)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:246)[113:org.eclipse.smarthome.io.net:0.9.0.201706211517]
	... 14 more
Caused by: java.nio.channels.ClosedChannelException
	at org.eclipse.jetty.io.WriteFlusher.onClose(WriteFlusher.java:482)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.io.AbstractEndPoint.onClose(AbstractEndPoint.java:109)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.io.AbstractEndPoint.close(AbstractEndPoint.java:116)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.close(SslConnection.java:913)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConnection.java:667)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.flush(SslConnection.java:841)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:408)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.io.WriteFlusher.completeWrite(WriteFlusher.java:364)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.io.ssl.SslConnection$1.run(SslConnection.java:98)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
	... 1 more

After a restart I get the following exception:

2017-06-25 16:02:12.424 [DEBUG] [.tankerkoenig.handler.StationHandler] - Try to refresh detail data
2017-06-25 16:02:12.679 [DEBUG] [ig.internal.data.TankerkoenigService] - getTankerkoenigDetailResult IOException: 
java.io.IOException: java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:255)[113:org.eclipse.smarthome.io.net:0.9.0.201706211517]
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:149)[113:org.eclipse.smarthome.io.net:0.9.0.201706211517]
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:122)[113:org.eclipse.smarthome.io.net:0.9.0.201706211517]
	at org.openhab.binding.tankerkoenig.internal.data.TankerkoenigService.getResponseString(TankerkoenigService.java:67)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at org.openhab.binding.tankerkoenig.internal.data.TankerkoenigService.getTankerkoenigDetailResult(TankerkoenigService.java:90)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at org.openhab.binding.tankerkoenig.internal.data.TankerkoenigService.getStationDetailData(TankerkoenigService.java:48)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at org.openhab.binding.tankerkoenig.handler.StationHandler.updateDetailData(StationHandler.java:133)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at org.openhab.binding.tankerkoenig.handler.StationHandler$1.run(StationHandler.java:90)[194:org.openhab.binding.tankerkoenig:2.1.0.201706241642]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_66]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_66]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_66]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_66]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_66]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_66]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_66]
Caused by: java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
	at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:655)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:246)[113:org.eclipse.smarthome.io.net:0.9.0.201706211517]
	... 14 more
Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
	at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1431)[:1.8.0_66]
	at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:535)[:1.8.0_66]
	at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:813)[:1.8.0_66]
	at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)[:1.8.0_66]
	at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)[:1.8.0_66]
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConnection.java:520)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:111)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:69)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:89)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:123)[68:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
	... 1 more
Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)[:1.8.0_66]
	at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1728)[:1.8.0_66]
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:304)[:1.8.0_66]
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)[:1.8.0_66]
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)[:1.8.0_66]
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)[:1.8.0_66]
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)[:1.8.0_66]
	at sun.security.ssl.Handshaker$1.run(Handshaker.java:919)[:1.8.0_66]
	at sun.security.ssl.Handshaker$1.run(Handshaker.java:916)[:1.8.0_66]
	at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_66]
	at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1369)[:1.8.0_66]
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConnection.java:620)[71:org.eclipse.jetty.io:9.2.19.v20160908]
	... 8 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)[:1.8.0_66]
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)[:1.8.0_66]
	at sun.security.validator.Validator.validate(Validator.java:260)[:1.8.0_66]
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)[:1.8.0_66]
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:281)[:1.8.0_66]
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:136)[:1.8.0_66]
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496)[:1.8.0_66]
	... 15 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146)[:1.8.0_66]
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)[:1.8.0_66]
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)[:1.8.0_66]
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)[:1.8.0_66]
	... 21 more

Looking at the log it seems to me as if there is a problem getting the web request out. But Iā€™m not sure on that. The binding itself does not use any SSL.
Could you check if the system on which OH2 runs has access to the Internet?
Iā€™m on travel now, so I canā€™t do some checks with the development system now. Iā€™ll do that as soon as possible.
Could you post a bit more information about your system, OH2 on what system, special setup (like docker)ā€¦

ā€¦and please positively confirm that you are using a personal API-Key and IDs for the Stations 1 and 2 and NOT just the copy from the ReadMe.
Iā€™m sorry for that question, but I need to make sure.

Yes, Iā€™m using a personal API-Key and real IDs for the stations. Iā€™ve tested two different API-keys, both with the same result. At the moment OH2 is running on my Windows 10 desktop with internet access, so no special setup. Iā€™ll test it on another pc in the next days, perhaps itā€™s a problem on my pc.