Linky binding ERROR

Since my last OpenHAB 4.2.2 update I have an error on the LINKY connection which worked with my previous version. Below is the message:

Error requesting ‘https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/null/prms’ : {“message”:“Internal server error. Please try again”,“code”:“INTERNAL_SERVER_ERROR”}

Raspberry Pi4
OS Openhabian

The Linky binding stopped working for several days. I have a similar error:

COMMUNICATION_ERROR

Error requesting ‘https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/JPO042LSO/prms/14421707548037/donnees-energie?dateDebut=01-01-2023&dateFin=14-10-2024&mesuretypecode=CONS’ : {“message”:“Internal server error. Please try again”,“code”:“INTERNAL_SERVER_ERROR”}

Raspberry PI 4 - 8GB
OS Openhabian

Any idea about how to solve this problem ?

Thanks in advance

You can track:

Thanks

@Lolodomo and I are having a hard time testing this PR and we would need your help.
On my dev / production, this updated version works well but it is not the case at @Lolodomo setup.

Can some of you test it and give us feed-back ?
Steps :

  • uninstall current linky binding
  • download the jar located here
  • put the jar in usr/share/openhab/addons (depending upon your environment).

Your linky bridge should come back ONLINE … or not. Let us know.

I am not so much familiar with the use of a new version of the binding. I use openhabian, in which folder I have to install the new version of the binding ? in /var/lib/openhab/addons ? How I can remove the old one ?
Thanks

If it is installed via the UI go to the Add-Ons Store => Bindings then remove linky binding.
I think that for openhabian, the target folder is /usr/share/openhab/addons but please ensure this is correct.

Done. Thanks.

But unfortunately, I got again this message:

I hope I did not make a mistake some days ago since I did again all the steps to configure the Linky thing (visit to the Enedis web site to get the ID)…

I remembered how to get debug messages for a binding via the openhab console. Herewith is the trace of events when enabling the Linky thing:

2024-10-21 11:22:10.965 [DEBUG] [.linky.internal.handler.LinkyHandler] - Disposing the Linky handler.
2024-10-21 11:22:15.141 [DEBUG] [.linky.internal.handler.LinkyHandler] - Initializing Linky handler.
2024-10-21 11:22:15.143 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Starting login process for user: xxx.xxx@xxx.fr
2024-10-21 11:22:15.145 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Step 1: getting authentification
2024-10-21 11:22:15.274 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Reception request SAML
2024-10-21 11:22:15.277 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Step 2: send SSO SAMLRequest
2024-10-21 11:22:15.388 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Get the location and the ReqID
2024-10-21 11:22:15.389 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Step 3: auth1 - retrieve the template, thanks to cookie internalAuthId user is already set
2024-10-21 11:22:15.801 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Step 4: auth2 - send the auth data
2024-10-21 11:22:16.039 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Add the tokenId cookie
2024-10-21 11:22:16.040 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Step 5: retrieve the SAMLresponse
2024-10-21 11:22:16.145 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Step 6: post the SAMLresponse to finish the authentication
2024-10-21 11:22:16.184 [DEBUG] [.linky.internal.api.ExpiringDayCache] - getValue from cache "power cache" is requiring a fresh value
2024-10-21 11:22:16.185 [DEBUG] [.linky.internal.handler.LinkyHandler] - getPowerData from 2024-10-19 to 2024-10-21
2024-10-21 11:22:16.308 [DEBUG] [.linky.internal.handler.LinkyHandler] - Exception when getting power data: Error requesting 'https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/JPO042LSO/prms/14421707548037/donnees-pmax?dateDebut=19-10-2024&dateFin=21-10-2024&mesuretypecode=CONS': {"message":"Internal server error. Please try again","code":"INTERNAL_SERVER_ERROR"}
org.openhab.binding.linky.internal.LinkyException: Error requesting 'https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/JPO042LSO/prms/14421707548037/donnees-pmax?dateDebut=19-10-2024&dateFin=21-10-2024&mesuretypecode=CONS': {"message":"Internal server error. Please try again","code":"INTERNAL_SERVER_ERROR"}
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getContent(EnedisHttpApi.java:214) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getData(EnedisHttpApi.java:228) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getMeasures(EnedisHttpApi.java:263) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getPowerData(EnedisHttpApi.java:272) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.getPowerData(LinkyHandler.java:380) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.lambda$1(LinkyHandler.java:118) ~[?:?]
	at org.openhab.binding.linky.internal.api.ExpiringDayCache.refreshValue(ExpiringDayCache.java:86) ~[?:?]
	at org.openhab.binding.linky.internal.api.ExpiringDayCache.getValue(ExpiringDayCache.java:73) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.updatePowerData(LinkyHandler.java:212) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.updateData(LinkyHandler.java:201) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.lambda$4(LinkyHandler.java:175) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
	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:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
2024-10-21 11:22:16.317 [DEBUG] [.linky.internal.api.ExpiringDayCache] - calcNextExpiresAt result = 2024-10-22T01:00:00
2024-10-21 11:22:16.318 [DEBUG] [.linky.internal.handler.LinkyHandler] - Update channel daily#power with NaN
2024-10-21 11:22:16.321 [DEBUG] [.linky.internal.api.ExpiringDayCache] - getValue from cache "daily cache" is requiring a fresh value
2024-10-21 11:22:16.323 [DEBUG] [.linky.internal.handler.LinkyHandler] - getConsumptionData from 2024-10-06 to 2024-10-21
2024-10-21 11:22:16.498 [DEBUG] [.linky.internal.handler.LinkyHandler] - Exception when getting consumption data: Error requesting 'https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/JPO042LSO/prms/14421707548037/donnees-energie?dateDebut=06-10-2024&dateFin=21-10-2024&mesuretypecode=CONS': {"message":"Internal server error. Please try again","code":"INTERNAL_SERVER_ERROR"}
org.openhab.binding.linky.internal.LinkyException: Error requesting 'https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/JPO042LSO/prms/14421707548037/donnees-energie?dateDebut=06-10-2024&dateFin=21-10-2024&mesuretypecode=CONS': {"message":"Internal server error. Please try again","code":"INTERNAL_SERVER_ERROR"}
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getContent(EnedisHttpApi.java:214) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getData(EnedisHttpApi.java:228) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getMeasures(EnedisHttpApi.java:263) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getEnergyData(EnedisHttpApi.java:268) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.getConsumptionData(LinkyHandler.java:363) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.lambda$0(LinkyHandler.java:101) ~[?:?]
	at org.openhab.binding.linky.internal.api.ExpiringDayCache.refreshValue(ExpiringDayCache.java:86) ~[?:?]
	at org.openhab.binding.linky.internal.api.ExpiringDayCache.getValue(ExpiringDayCache.java:73) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.updateDailyWeeklyData(LinkyHandler.java:241) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.updateData(LinkyHandler.java:202) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.lambda$4(LinkyHandler.java:175) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
	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:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
2024-10-21 11:22:16.505 [DEBUG] [.linky.internal.api.ExpiringDayCache] - calcNextExpiresAt result = 2024-10-22T01:00:00
2024-10-21 11:22:16.506 [DEBUG] [.linky.internal.handler.LinkyHandler] - Update channel daily#yesterday with NaN
2024-10-21 11:22:16.507 [DEBUG] [.linky.internal.handler.LinkyHandler] - Update channel weekly#thisWeek with 0.0
2024-10-21 11:22:16.509 [DEBUG] [.linky.internal.handler.LinkyHandler] - Update channel weekly#lastWeek with NaN
2024-10-21 11:22:16.511 [DEBUG] [.linky.internal.api.ExpiringDayCache] - getValue from cache "monthly cache" is requiring a fresh value
2024-10-21 11:22:16.512 [DEBUG] [.linky.internal.handler.LinkyHandler] - getConsumptionData from 2024-09-01 to 2024-10-21
2024-10-21 11:22:16.663 [DEBUG] [.linky.internal.handler.LinkyHandler] - Exception when getting consumption data: Error requesting 'https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/JPO042LSO/prms/14421707548037/donnees-energie?dateDebut=01-09-2024&dateFin=21-10-2024&mesuretypecode=CONS': {"message":"Internal server error. Please try again","code":"INTERNAL_SERVER_ERROR"}
org.openhab.binding.linky.internal.LinkyException: Error requesting 'https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/JPO042LSO/prms/14421707548037/donnees-energie?dateDebut=01-09-2024&dateFin=21-10-2024&mesuretypecode=CONS': {"message":"Internal server error. Please try again","code":"INTERNAL_SERVER_ERROR"}
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getContent(EnedisHttpApi.java:214) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getData(EnedisHttpApi.java:228) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getMeasures(EnedisHttpApi.java:263) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getEnergyData(EnedisHttpApi.java:268) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.getConsumptionData(LinkyHandler.java:363) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.lambda$2(LinkyHandler.java:129) ~[?:?]
	at org.openhab.binding.linky.internal.api.ExpiringDayCache.refreshValue(ExpiringDayCache.java:86) ~[?:?]
	at org.openhab.binding.linky.internal.api.ExpiringDayCache.getValue(ExpiringDayCache.java:73) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.updateMonthlyData(LinkyHandler.java:262) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.updateData(LinkyHandler.java:203) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.lambda$4(LinkyHandler.java:175) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
	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:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
2024-10-21 11:22:16.666 [DEBUG] [.linky.internal.api.ExpiringDayCache] - calcNextExpiresAt result = 2024-10-22T01:00:00
2024-10-21 11:22:16.667 [DEBUG] [.linky.internal.handler.LinkyHandler] - Update channel monthly#thisMonth with NaN
2024-10-21 11:22:16.668 [DEBUG] [.linky.internal.api.ExpiringDayCache] - getValue from cache "yearly cache" is requiring a fresh value
2024-10-21 11:22:16.668 [DEBUG] [.linky.internal.handler.LinkyHandler] - getConsumptionData from 2023-01-01 to 2024-10-21
2024-10-21 11:22:16.823 [DEBUG] [.linky.internal.handler.LinkyHandler] - Exception when getting consumption data: Error requesting 'https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/JPO042LSO/prms/14421707548037/donnees-energie?dateDebut=01-01-2023&dateFin=21-10-2024&mesuretypecode=CONS': {"message":"Internal server error. Please try again","code":"INTERNAL_SERVER_ERROR"}
org.openhab.binding.linky.internal.LinkyException: Error requesting 'https://alex.microapplications.enedis.fr/mes-mesures/api/private/v1/personnes/JPO042LSO/prms/14421707548037/donnees-energie?dateDebut=01-01-2023&dateFin=21-10-2024&mesuretypecode=CONS': {"message":"Internal server error. Please try again","code":"INTERNAL_SERVER_ERROR"}
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getContent(EnedisHttpApi.java:214) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getData(EnedisHttpApi.java:228) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getMeasures(EnedisHttpApi.java:263) ~[?:?]
	at org.openhab.binding.linky.internal.api.EnedisHttpApi.getEnergyData(EnedisHttpApi.java:268) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.getConsumptionData(LinkyHandler.java:363) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.lambda$3(LinkyHandler.java:139) ~[?:?]
	at org.openhab.binding.linky.internal.api.ExpiringDayCache.refreshValue(ExpiringDayCache.java:86) ~[?:?]
	at org.openhab.binding.linky.internal.api.ExpiringDayCache.getValue(ExpiringDayCache.java:73) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.updateYearlyData(LinkyHandler.java:279) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.updateData(LinkyHandler.java:204) ~[?:?]
	at org.openhab.binding.linky.internal.handler.LinkyHandler.lambda$4(LinkyHandler.java:175) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
	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:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
2024-10-21 11:22:16.826 [DEBUG] [.linky.internal.api.ExpiringDayCache] - calcNextExpiresAt result = 2024-10-22T01:00:00
2024-10-21 11:22:16.827 [DEBUG] [.linky.internal.handler.LinkyHandler] - Update channel yearly#thisYear with NaN
2024-10-21 11:22:16.828 [DEBUG] [ing.linky.internal.api.EnedisHttpApi] - Logout process

The new version of the binding is active:

346 │ Active │ 80 │ 4.3.0.202410201742 │ openHAB Add-ons :: Bundles :: Linky Binding

I hope it helps. If you need anything else, please let me know

Thanks you, it confirms what I already noticed. Same result for me.

Meanwhile, I created a new linky thing. And this one appears ONLINE… but as soon as I link an item to a channel, the thing goes offline with the error message. So it means that the authentication works fine but not the data retrieval.

I also tested the binding with a fresh install of openhab (4.2.2). Only one binding (linky) and one thing. The issue remains. I did with the latest openhab snapshot. Same problem.

Hi

It's good indeed the link is online again.
I need to check if the values ​​returned are correct.

| glhopital Gaël L’hopital
October 20 |

  • | - |

@Lolodomo and I are having a hard time testing this PR and we would need your help.
On my dev / production, this updated version works well but it is not the case at @Lolodomosetup.

Can some of you test it and give us feed-back ?
Steps :

  • uninstall current linky binding
  • download the jar located here
  • put the jar in usr/share/openhab/addons (depending upon your environment).

Your linky bridge should come back ONLINE … or not. Let us know.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.