openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.9k stars 3.59k forks source link

[loxone] Unable to Bind Loxone 11.3 #9275

Closed tonydoval closed 1 year ago

tonydoval commented 3 years ago

With Loxone Version 11.3 I wasn't able to make a binding. Status: OFFLINE COMMUNICATION_ERROR Error communicating with Miniserver (normally closed)

I tried with SSL port with Miniserver v2 without success and with HTTP port. According with doc https://www.loxone.com/dede/wp-content/uploads/sites/2/2020/10/11-00_Communicating-with-the-Miniserver-2.pdf the token adquiring shoud be with HTTPS or Websocket.

Some debug logs:

able,age=197} action COMPLETE

2020-12-07 10:34:31.348 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - COMPLETE for /rest/things/loxone:miniserver:dbe8600d/enable written=465

2020-12-07 10:34:31.233 [INFO ] [me.event.ThingStatusInfoChangedEvent] - Thing 'loxone:miniserver:dbe8600d' changed from UNINITIALIZED (DISABLED) to INITIALIZING

2020-12-07 10:34:31.463 [DEBUG] [tty.websocket.client.WebSocketClient] - connect websocket org.openhab.binding.loxone.internal.LxWebSocket@48c346e1 to ws://192.168.0.254:19438/ws/rfc6455

2020-12-07 10:34:31.466 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=null,onBinary=null,onText=null,onFrame=null,onError=null,onClose=null], class org.openhab.binding.loxone.internal.LxWebSocket, public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable), @org.eclipse.jetty.websocket.api.annotations.OnWebSocketError())

2020-12-07 10:34:31.468 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=null,onBinary=null,onText=null,onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=null], class org.openhab.binding.loxone.internal.LxWebSocket, public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String), @org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage())

2020-12-07 10:34:31.470 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=null,onBinary=null,onText=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String)],onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=null], class org.openhab.binding.loxone.internal.LxWebSocket, public void org.openhab.binding.loxone.internal.LxWebSocket.onConnect(org.eclipse.jetty.websocket.api.Session), @org.eclipse.jetty.websocket.api.annotations.OnWebSocketConnect())

2020-12-07 10:34:31.473 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=CallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onConnect(org.eclipse.jetty.websocket.api.Session)],onBinary=null,onText=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String)],onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=null], class org.openhab.binding.loxone.internal.LxWebSocket, public void org.openhab.binding.loxone.internal.LxWebSocket.onBinaryMessage(byte[],int,int), @org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage())

2020-12-07 10:34:31.476 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=CallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onConnect(org.eclipse.jetty.websocket.api.Session)],onBinary=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onBinaryMessage(byte[],int,int)],onText=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String)],onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=null], class org.openhab.binding.loxone.internal.LxWebSocket, public void org.openhab.binding.loxone.internal.LxWebSocket.onClose(int,java.lang.String), @org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose())

2020-12-07 10:34:31.480 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=CallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onConnect(org.eclipse.jetty.websocket.api.Session)],onBinary=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onBinaryMessage(byte[],int,int)],onText=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String)],onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onClose(int,java.lang.String)]], class java.lang.Object, protected void java.lang.Object.finalize() throws java.lang.Throwable, @java.lang.Deprecated(forRemoval=false, since="9"))

2020-12-07 10:34:31.483 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=CallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onConnect(org.eclipse.jetty.websocket.api.Session)],onBinary=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onBinaryMessage(byte[],int,int)],onText=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String)],onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onClose(int,java.lang.String)]], class java.lang.Object, public native int java.lang.Object.hashCode(), @jdk.internal.HotSpotIntrinsicCandidate())

2020-12-07 10:34:31.487 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=CallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onConnect(org.eclipse.jetty.websocket.api.Session)],onBinary=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onBinaryMessage(byte[],int,int)],onText=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String)],onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onClose(int,java.lang.String)]], class java.lang.Object, public final native java.lang.Class java.lang.Object.getClass(), @jdk.internal.HotSpotIntrinsicCandidate())

2020-12-07 10:34:31.490 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=CallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onConnect(org.eclipse.jetty.websocket.api.Session)],onBinary=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onBinaryMessage(byte[],int,int)],onText=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String)],onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onClose(int,java.lang.String)]], class java.lang.Object, protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException, @jdk.internal.HotSpotIntrinsicCandidate())

2020-12-07 10:34:31.493 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=CallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onConnect(org.eclipse.jetty.websocket.api.Session)],onBinary=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onBinaryMessage(byte[],int,int)],onText=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String)],onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onClose(int,java.lang.String)]], class java.lang.Object, public final native void java.lang.Object.notify(), @jdk.internal.HotSpotIntrinsicCandidate())

2020-12-07 10:34:31.496 [DEBUG] [.common.events.JettyAnnotatedScanner] - onMethodAnnotation(JettyPojoMetadata[onConnect=CallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onConnect(org.eclipse.jetty.websocket.api.Session)],onBinary=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onBinaryMessage(byte[],int,int)],onText=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onMessage(java.lang.String)],onFrame=null,onError=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onError(java.lang.Throwable)],onClose=OptionalSessionCallableMethod[public void org.openhab.binding.loxone.internal.LxWebSocket.onClose(int,java.lang.String)]], class java.lang.Object, public final native void java.lang.Object.notifyAll(), @jdk.internal.HotSpotIntrinsicCandidate())

2020-12-07 10:34:35.465 [INFO ] [me.event.ThingStatusInfoChangedEvent] - Thing 'loxone:miniserver:dbe8600d' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Error communicating with Miniserver (Miniserver response timeout occured)

2020-12-07 10:35:02.270 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - REQUEST for //192.168.0.38:8080/rest/things/loxone:miniserver:dbe8600d/config on HttpChannelOverHttp@3e6da04d{r=1,c=false,c=false/false,a=IDLE,uri=//192.168.0.38:8080/rest/things/loxone:miniserver:dbe8600d/config,age=1}

PUT //192.168.0.38:8080/rest/things/loxone:miniserver:dbe8600d/config HTTP/1.1

2020-12-07 10:35:02.272 [DEBUG] [.eclipse.jetty.server.HttpConnection] - HttpConnection@263bcda2::SocketChannelEndPoint@1f19a0bf{/192.168.0.17:60271<->/192.168.0.38:8080,OPEN,fill=-,flush=-,to=89/30000}{io=0/0,kio=0,kro=1}->HttpConnection@263bcda2[p=HttpParser{s=CONTENT,0 of 255},g=HttpGenerator@74759d82{s=START}]=>HttpChannelOverHttp@3e6da04d{r=1,c=false,c=false/false,a=IDLE,uri=//192.168.0.38:8080/rest/things/loxone:miniserver:dbe8600d/config,age=3} parsed true HttpParser{s=CONTENT,0 of 255}

2020-12-07 10:35:02.274 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - HttpChannelOverHttp@3e6da04d{r=1,c=false,c=false/false,a=IDLE,uri=//192.168.0.38:8080/rest/things/loxone:miniserver:dbe8600d/config,age=5} handle //192.168.0.38:8080/rest/things/loxone:miniserver:dbe8600d/config

2020-12-07 10:35:02.277 [DEBUG] [org.eclipse.jetty.server.HttpChannel] - HttpChannelOverHttp@3e6da04d{r=1,c=false,c=false/false,a=DISPATCHED,uri=//192.168.0.38:8080/rest/things/loxone:miniserver:dbe8600d/config,age=8} action DISPATCH

2020-12-07 10:35:02.278 [DEBUG] [org.eclipse.jetty.server.Server ] - REQUEST PUT /rest/things/loxone:miniserver:dbe8600d/config on HttpChannelOverHttp@3e6da04d{r=1,c=false,c=false/false,a=DISPATCHED,uri=//192.168.0.38:8080/rest/things/loxone:miniserver:dbe8600d/config,age=9}

ppieczul commented 3 years ago

Hi @tonydoval. On Loxone web I can see only version 11.1.9.14. Where did you take 11.3 from? Do you have any description or change log of this version? It looks like it is not possible to establish the websocket channel. Maybe something changed in that area, but I can't see it and it is not described in the API yet. THanks.

tonydoval commented 3 years ago

Sorry, 11.2 https://www.loxone.com/nlnl/info/public-beta/ I'm using latest beta version.

El lun, 7 dic 2020 a las 15:09, Pawel Pieczul (notifications@github.com) escribió:

Hi @tonydoval https://github.com/tonydoval. On Loxone web I can see only version 11.1.9.14. Where did you take 11.3 from? Do you have any description or change log of this version? It looks like it is not possible to establish the websocket channel. Maybe something changed in that area, but I can't see it and it is not described in the API yet. THanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-addons/issues/9275#issuecomment-739940806, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV2PT5D6ISMYDP6F7QIMKLSTTOZRANCNFSM4UQGDITQ .

ppieczul commented 3 years ago

Thanks @tonydoval. Do you have Miniserver Gen1 or Gen2?

tonydoval commented 3 years ago

Gen2. I tried with another software and I’m getting similar error. Could be the issue caused by special characters in the objects? (I’m from Spain and in my objects there are names such has Salón )

Enviado desde mi iPhone

El 7 dic 2020, a las 18:09, Pawel Pieczul notifications@github.com escribió:

 Thanks @tonydoval. Do you have Miniserver Gen1 or Gen2?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ppieczul commented 3 years ago

From your logs it looks like the issue is much earlier - in the establishment of websocket link. It is before the configuration is read. I read on Loxone website that GEN2 HW supports transport link encryption and that 11.2 starts using that. This looks like a possible reason. I don't have GEN2 unfortunately, but I can upgrade to 11.2 on GEN1 and see if it works. If yes, this will confirm the theory. Then I'll have to think how to get GEN2 and implement websocket encryption or find someone with GEN2 implement it.

tonydoval commented 3 years ago

Hi,

I don’t have enough Java knowledge to implement it but I can to provide to you a remote access to a demo miniserver with a small configuration.

Enviado desde mi iPhone

El 7 dic 2020, a las 19:36, Pawel Pieczul notifications@github.com escribió:

 From your logs it looks like the issue is much earlier - in the establishment of websocket link. It is before the configuration is read. I read on Loxone website that GEN2 HW supports transport link encryption and that 11.2 starts using that. This looks like a possible reason. I don't have GEN2 unfortunately, but I can upgrade to 11.2 on GEN1 and see if it works. If yes, this will confirm the theory. Then I'll have to think how to get GEN2 and implement websocket encryption or find someone with GEN2 implement it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ppieczul commented 3 years ago

Hi, I can look at that over the weekend. I will start with installing 11.2 on my GEN1 and testing. Then it will be great to have remote access to your GEN2. Could you in the meantime run the failed connection attempt and enable debug traces in loxone binding and disable on jetty? Thanks Pawel

tonydoval commented 3 years ago

Hello,

How can I do that?

El lun, 7 dic 2020 a las 21:05, Pawel Pieczul (notifications@github.com) escribió:

Hi, I can look at that over the weekend. I will start with installing 11.2 on my GEN1 and testing. Then it will be great to have remote access to your GEN2. Could you in the meantime run the failed connection attempt and enable debug traces in loxone binding and disable on jetty? Thanks Pawel

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-addons/issues/9275#issuecomment-740149512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV2PTY3IQ4XLYCAYNCQGTTSTUYQPANCNFSM4UQGDITQ .

tonydoval commented 3 years ago

I got these errors.

With HTTP

020-12-08 20:04:42.263 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:04:42.291 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:04:42.295 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:04:42.297 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:04:42.313 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:04:42.334 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:04:42.338 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:04:42.343 [DEBUG] [.binding.loxone.internal.LxWebSocket]

2020-12-08 20:04:46.334 [DEBUG] [.binding.loxone.internal.LxWebSocket]

2020-12-08 20:04:46.336 [DEBUG] [.binding.loxone.internal.LxWebSocket]

2020-12-08 20:04:46.338 [DEBUG] [ding.loxone.internal.LxServerHandler]

==> /var/log/openhab2/events.log <==

2020-12-08 20:04:46.345 [hingStatusInfoChangedEvent] - 'loxone:miniserver:504F94A015DA' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Error communicating with Miniserver (Miniserver response timeout occured)

==> /var/log/openhab2/openhab.log <==

2020-12-08 20:07:51.740 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.749 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.751 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.748 [DEBUG] [al.LxDynamicStateDescriptionProvider]

2020-12-08 20:07:51.754 [DEBUG] [.binding.loxone.internal.LxWebSocket]

2020-12-08 20:07:51.765 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.767 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.774 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.784 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.786 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.798 [DEBUG] [ding.loxone.internal.LxServerHandler]

==> /var/log/openhab2/events.log <==

2020-12-08 20:07:51.802 [me.event.ThingUpdatedEvent] - Thing 'loxone:miniserver:504F94A015DA' has been updated.

==> /var/log/openhab2/openhab.log <==

With HTTPS

2020-12-08 20:07:51.846 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.848 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.850 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.887 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.904 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.909 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:51.944 [DEBUG] [.binding.loxone.internal.LxWebSocket]

2020-12-08 20:07:55.904 [DEBUG] [.binding.loxone.internal.LxWebSocket]

2020-12-08 20:07:55.906 [DEBUG] [.binding.loxone.internal.LxWebSocket]

2020-12-08 20:07:55.908 [DEBUG] [ding.loxone.internal.LxServerHandler]

2020-12-08 20:07:55.909 [DEBUG] [ding.loxone.internal.LxServerHandler]

El mar, 8 dic 2020 a las 19:55, Tony Doval (tony.doval@gmail.com) escribió:

Hello,

How can I do that?

El lun, 7 dic 2020 a las 21:05, Pawel Pieczul (notifications@github.com) escribió:

Hi, I can look at that over the weekend. I will start with installing 11.2 on my GEN1 and testing. Then it will be great to have remote access to your GEN2. Could you in the meantime run the failed connection attempt and enable debug traces in loxone binding and disable on jetty? Thanks Pawel

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-addons/issues/9275#issuecomment-740149512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV2PTY3IQ4XLYCAYNCQGTTSTUYQPANCNFSM4UQGDITQ .

ppieczul commented 3 years ago

@tonydoval I checked 11.2.11.16 with my GEN1 and it works fine. So I'd like to ask you to let me access your GEN2 as you kindly offered. Thanks.

tonydoval commented 3 years ago

Okk. Can we talk by private? I will send you an access to a remote miniserver Gen2.

El dom, 13 dic 2020 a las 16:52, Pawel Pieczul (notifications@github.com) escribió:

@tonydoval https://github.com/tonydoval I checked 11.2.11.16 with my GEN1 and it works fine. So I'd like to ask you to let me access your GEN2 as you kindly offered. Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-addons/issues/9275#issuecomment-744027226, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV2PT5BSFTDHKOF5MCT4UDSUTPNHANCNFSM4UQGDITQ .

ppieczul commented 3 years ago

@tonydoval please find me on fb by name, the dog's head penguin icon

sirkserac commented 3 years ago

Hello did you find the solution? I am having the same problem whit firmware 11.1.9.

lsiepel commented 1 year ago

@tonydoval and @ppieczul did you get to a solution or is it still an issue?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.