Tahoma Binding compatible with OH2

The line is commented out … I’ll still change it, but it shouldn’t make a difference.

Wait no…sorry, you’re totally right. Starting to get tired here.

Good old copy paste error …

since I touched the shared http client, please, restart OH2 as well…

Yet still no luck. As soon as both bridges are in, the one and then the other goes Offline.

00:05:32.653 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'somfytahoma:bridge:e87b2d69' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Received invalid data
00:06:26.523 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'somfytahoma:bridge:e65f3139' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Received invalid data

They get back up one after the other, then go out again and so forth until Somfy locks me out for trying to often.

I actually did. I uninstalled the 2.5.2 version of your binding, stopped my docker container, cleaned the caches, put your new version in and fired the whole thing up again.

Ok, then I need your openhab.log with the trace enabled for the somfytahoma binding.
Can you PM me it?
I need to look at the error detail and received data.

thanks.
Ondrej

I’m on it and will send it to you shortly.

Browsing through your code change I’m wondering (I’m no expert on the Apache HTTPClient library and OpenHAB): httpClientFactory.getCommonHttpClient() sounds like it will always get the same client for all bridges. I’m sorry if I overstepped, you’re the expert on the subject.

I am not sure how it works actually, but I expect that I get two HttpClients if I call it twice in a row. (in the master there is only one HttpClient, in my SNAPSHOT I call it for each bridge)
I have to test it…I’ll get back to it tomorrow.
Thanks.
Ondrej

hmm, it returns the same httpClient, that is the problem :slight_smile:
that is really very weird behaviour

Glad I could be of some help :wink:

I sent you my logs via PM. But I’m not sure if they’ll help you as the problem seems to be the reuse of the HTTPClient-instance.

Thank you for looking into this and for the blazingly fast help you are providing.

Please send me a link to make you a donation. I’ll gladly support the effort you are making.

Ah, the Eclipse Smarthome project replaced Apache HttpClient with Jetty as I can see in the comments here: https://github.com/eclipse/smarthome/blob/master/bundles/io/org.eclipse.smarthome.io.net/src/main/java/org/eclipse/smarthome/io/net/http/HttpUtil.java

I found the HttpClientFactory.java source code here: https://github.com/eclipse/smarthome/blob/e25f1bd548126ef44fbdc90dd1dd0f85e83bdef0/bundles/io/org.eclipse.smarthome.io.net/src/main/java/org/eclipse/smarthome/io/net/http/HttpClientFactory.java

The way I’m reading the class you should use

HttpClient createHttpClient(String consumerName);

instead of

HttpClient getCommonHttpClient();

And to start the httpclient-instance you need to use:

$yourhttpClientinstance$.start();

as per https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/client/HttpClient.html

yeah, this is the similar way, how I was working with the client before. The only problem I see is the unique consumer name for the each bridge.
I’ll prepare the fix in the evening.
thanks.
Ondrej

this SNAPSHOT introduces the old fashioned way of creating a dedicated http client for each bridge instance… :slight_smile:
https://www.dropbox.com/s/pmm59z5vgw4j4px/org.openhab.binding.somfytahoma-2.5.3-SNAPSHOT.jar?dl=1
thanks for testing…
Ondrej

1 Like

Thanks for testing? Are you kidding me? THANK YOU for your incredible effort.
I just went ahead and I’m happy to report that all seems fine! All items on both bridges are working!! You are the boss! I’ll keep on testing and give you feedback in a day or so, so that you know that it works over a prolonged period of time too.
And again, thank you so much for your hard work.

Edit: 13 hours later, all is still working fine

2 Likes

Okay, 24h in since installing your 2.5.3 snapshot and all is still working as expected! Thank you so much for your hard work. Keep it up.

Cheers,
Gregory

P.S.: the snapshot version of the binding is still running smooth for nearly 10 days straight, even with the addition of a second Connexoon and thus three simoultaneously running Somfy Gateways in my network (as mentioned our house has thick walls with faraday-cage-like qualities requiring me to have more than one Gateway so my Somfy Slim io window contacts and other Somfy stuff works reliably).

Hi guys,

if you experience problems with scenario (action group) executions, please try this version
https://www.dropbox.com/s/bg36rt1x390wli6/org.openhab.binding.somfytahoma-2.5.3-SNAPSHOT.jar?dl=1

Unfortunately I have accidentaly broken its funtionality by my last pull request.
sorry for that

thanks.
Ondrej

Hi @Ondrej_Pecta,

funny coincidence: you sent your message and a corrected version barely 2 minutes after I noticed the problem. I use action groups only outside of the house to control a heater and the awning lights and up until today the weather didn’t allow for us to be outside on the terrace. I’ll give the newst snapshot a spin immediately and will get back to you. Thanks again for your work.

Cheers,
Gregory

EDIT - 16.03.2020 14:07: the action groups are working fine once more, with the snapshot of your binding. Thanks.

Hi everyone,
Is there any problem with the somfy server the last one hour?
Or is just me?
I’m getting Offline states every minute and so.

Same here. I’m getting this messages in the log:

2020-03-29 20:34:44.058 [hingStatusInfoChangedEvent] - 'somfytahoma:bridge:xxx' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Received invalid data
2020-03-29 20:35:14.144 [hingStatusInfoChangedEvent] - 'somfytahoma:bridge:xxxx' changed from OFFLINE (COMMUNICATION_ERROR): Received invalid data to OFFLINE (COMMUNICATION_ERROR): Cannot get login cookie

When using the conexxion app I got some “Lost server connection, please try again later.” errors, but after a few tries I was ably to control my roller shutters…

1 Like

Thank you for the feedback,
Everyone stays inside, streaming video, even Somfy is going down probably…
:slight_smile:

same here. Android app is not working and login on tahomalink is also not working.

1 Like