Linky communication error

hello

there seems to be a problem with the url ‘https://apps.lincs.enedis.fr/authenticate?target=https://mon-compte-particulier.enedis.fr/suivi-de-mesure/’ send by the binding.
See the log file below

if I send this url ‘https://apps.lincs.enedis.fr/authenticate?target=https://mon-compte-particulier.enedis.fr/suivi-de-mesures/’ with my web explorer, I connect to my account on the measurements page.
I added an s to “suivi-de-mesures”

Can you help me ?

2022-02-04 16:01:32.035 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘linky:linky:5918bf1f8b’ changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): Error getting url : ‘https://apps.lincs.enedis.fr/authenticate?target=https://mon-compte-particulier.enedis.fr/suivi-de-mesure/

Hi,

I have the same problem :

2022-04-05 08:47:24.538 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘linky:linky:Linky’ changed from OFFLINE (COMMUNICATION_ERROR): Error getting url : ‘https://apps.lincs.enedis.fr/authenticate?target=https://mon-compte-particulier.enedis.fr/suivi-de-mesure/’ to UNINITIALIZED
2022-04-05 08:47:24.539 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘linky:linky:Linky’ changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2022-04-05 08:47:27.255 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘linky:linky:Linky’ changed from UNINITIALIZED (DISABLED) to INITIALIZING
2022-04-05 08:47:27.255 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘linky:linky:Linky’ changed from INITIALIZING to UNKNOWN
2022-04-05 08:47:28.708 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘linky:linky:Linky’ changed from UNKNOWN to ONLINE
2022-04-05 08:47:29.219 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘linky:linky:Linky’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error getting url : ‘https://apps.lincs.enedis.fr/userinfos

Has a solution existed since February 2022 ?

Many thanks,

There was an issue since several months. The problem has been fixed Sunday and the fix is available in daily snapshots since today (snapshot 2842).
I am not sure that your error is exactly the one we got but what is sure is that the binding was broken and is now alive again.

Thanks a lot Lolodomo for that very good news.
Would you know where the latest .jar that fixes the issue could be donwloaded for testing (waiting for next milestone release)?
Your support will be very much appreciated.

https://ci.openhab.org/job/openHAB-Addons/ws/bundles/org.openhab.binding.linky/target/org.openhab.binding.linky-3.3.0-SNAPSHOT.jar

Excellent, many thanks. :pray:

Sorry, one more question: what are the associated dependancies to install for that binding?
In karaf, the binding remains in Installed, and not in Active.

Yes, the jar is not sufficient due to a dependency.
The solution I used for testing last weekend was to have the official binding installed and then update it using console command bundle:update

1 Like

Works fine. Thanks

I just upgraded the linky binding with the latest version using bundle:upgrade:

317 │ Active │  80 │ 3.3.0.202205020346     │ openHAB Add-ons :: Bundles :: Linky Binding

But I have still an issue with the thing I created:

Status:
OFFLINE
COMMUNICATION_ERROR
Error opening connection with Enedis webservice 

I followed the process to get the internalAuthId data. But the thing does not work. In the log, I got these messages:

2022-05-02 17:30:42.271 [DEBUG] [.linky.internal.handler.LinkyHandler] - Disposing the Linky handler.
2022-05-02 17:30:48.349 [DEBUG] [.linky.internal.handler.LinkyHandler] - Initializing Linky handler.
2022-05-02 17:30:48.350 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Starting login process for user : xxx.xxx@xxx.fr
2022-05-02 17:30:48.363 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Step 1 : getting authentification
2022-05-02 17:30:48.542 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Reception request SAML
2022-05-02 17:30:48.544 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Step 2 : send SSO SAMLRequest

I did not see any error messages. Any advice to make it to work ?

As my thing is ONLINE, I an suspecting a bad input setting on your side.
@glhopital may help you?

Yes, the error is probably on my side. But there are only 3 parameters associated to the thing, I checked them and I did not see any error. The only problem I saw is that my email for my enedis account has 2 uppercase letters. Would it be a problem for the authentication ?

My thing is also ONLINE, so I suspect a configuration error.

I changed my email address to have only lower case letters but the issue remains. The log is the same. It does not go to step 3. The 3 parameters are OK. Is there a way to have more info from the log ?

Meanwhile, I upgraded openhab to 3.3.0.M4 but this did not solve the problem.

I investigated further using a rpi4 instead of my Synology (openhab within a Docker container). On the Synology, I used Openhab 3.3 M3, the binding did not work but may be it was due to the binding that did not include the latest correction ? I also installed 3.3 M4, the binding did not work. I was forced to go back to M3 due to a sitemap issue with this new milestone.

With the rpi4, I installed OpenHab 3.3 M4, the binding works fine.

Could my problem come from the fact I use a docker container to host OpenHAB ?

Considering your tests and results, the answer looks obvious.
But the question is why?

The fix is in M4, not M3.

Ok so the best way is to install openhab M4 within a docker container on my rpi4 and see if I have the same issue as the one I have with my Synology.

I confirm the issue. Using a docker container with the RPI4: the binding does not work. Same config but without docker: it runs fine. Then I have to find why… Would it be a certificate issue ?

I was able to debug the binding to see what was the reason why the it does not work within a docker container. I made a small modification to EnedisHttpApi.java :

            logger.debug("Step 2 : send SSO SAMLRequest - rpi4 docker");
            ContentResponse result = httpClient.POST(el.attr("action"))
                    .content(getFormContent("SAMLRequest", samlInput.attr("value"))).send();

            logger.debug("getStatus : {}", result.getStatus());

The status never appeared in the log. An exception was raised during the execution of httpClient.POST

java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure