home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.2k stars 30.22k forks source link

Linky Integration: cannot connect with my valid credentials #33634

Closed mixoum closed 4 years ago

mixoum commented 4 years ago

The problem

Cannot connect on linky integration with my valid credentials (but working on https://mon-compte-particulier.enedis.fr/). I have the issue: " Erreur inconnue: merci de réessayer plus tard (pas entre 23h et 2h)". I try to add it since since few weeks. It works fine on Enedis and EDF website. it does not work either with the intergation in configuration.yaml file or directly in the lovelace UI.

Environment

Problem-relevant configuration.yaml

linky:
  - username: 'xxx'
    password: 'xxx'

Traceback/Error logs

 Logger: homeassistant.components.linky.config_flow

No Data
Source: components/linky/config_flow.py:82
Integration: linky (documentation, issues)
First occurred: 11:20:41 (2 occurrences)
Last logged: 11:39:41

Additional information

rParslow commented 4 years ago

just to make some precision on the Enedis data connect way of use it's not under enedis account , it's under https://datahub-enedis.fr/data-connect/

@jluc2808 did you get any return from them ?

jluc2808 commented 4 years ago

just to make some precision on the Enedis data connect way of use it's not under enedis account , it's under https://datahub-enedis.fr/data-connect/

@jluc2808 did you get any return from them ?

yes i made a contract (beetween my society and enedis) get the ability to exchange token (special client_id / secret_id in production). With these items i'm able to complete the Oauth2 dialog which allow to start the data transfert itself. It's what we discuss with @Quentame.

Quentame commented 4 years ago

Linky integration will be removed in 0.114.0, and Enedis integration will come next.

It' longer than expected and first time for me dealing with OAuth2.

I'll tell you when you can test the next integration.

Sorry for the delay.

flemzord commented 4 years ago

I can't find a way to integrate Enedis? @Quentame

Quentame commented 4 years ago

It's not available. Actually coding it right now.

big-muscle commented 4 years ago

Linky integration will be removed in 0.114.0, and Enedis integration will come next.

It' longer than expected and first time for me dealing with OAuth2.

I'll tell you when you can test the next integration.

Sorry for the delay.

Hi @Quentame !

Thanks a lot for your work ;) I'm available if you have any questions about OAuth2 (i have already implemented OAuth2 on Facebook, Instagram, VKontact, Weibo) I would be happy to work on the Enedis implementation ;)

urbatecte commented 4 years ago

Hi @Quentame ,

It seems that both ENEDIS and GRDF share the same API ? ENEDIS https://data.enedis.fr/api/v1/console/datasets/1.0/search/ GRDF https://opendata.grdf.fr/api/v1/console/datasets/1.0/search/

If so, do you think your upcoming code will be OK for both Link and Gazpar ?

By the way, thanks a lot for your job on HA integration ;o)

alexis-via commented 4 years ago

@urbatecte No, the 2 links you give for ENEDIS and GRDF APIs are not designed to get the individual gaz or electricity index ; they give some global information for France or for a specific geographic area.

The API for GRDF is here: https://www.developers.pprd.api.grdf.fr/ Anyone can open an account. Once logged, you can download a functional documentation which explains clearly that this API allows to get the daily gaz consumption. You can create an application, get an API key and/or an oauth client ID and secret. But I couldn't select any API ; the list of API is always empty.

grea09 commented 4 years ago

I wanted to get in that discussion about the possible utility meter integration. Indeed the old component was only getting raw data into home assistant. Since then we got a new tool to represent utility meters. I would like to help in development if needed to make it more user friendly. The main issue was that the data wasn't real-time and HA doesn't really handle history data. I tried discussing the matter with the core team without success. The issue lies in the recorder and we would need a API or something to add old data into it, which isn't possible so far.

It would be nice to have a country wide available utility meter display something like the cost of the last or current day based on data asked by the integration about the characteristics of the billing (like high hours rates and the such).

Is there a repo to follow the development of this feature ? Thanks again for the good work !

utkiupe commented 4 years ago

isn't that how the utility meter works already? you can set it up with tariffs and find a way to display informations in Lovelace. I personally use the mini card card extension to display nice daily bar charts. But maybe this is not what you are talking about :)

Quentame commented 4 years ago

I was 2 weeks in vacation.

Will be back to work in 1-2 weeks.

When I left, I saw an issue in the @jluc2808 wrapper API that needs changes. I contacted him.

grea09 commented 4 years ago

isn't that how the utility meter works already? you can set it up with tariffs and find a way to display informations in Lovelace. I personally use the mini card card extension to display nice daily bar charts. But maybe this is not what you are talking about :)

The issue is that the data is from yesterday at least meaning that you can't compare it to other sensors without time trickery. The solution would be to tweak or hack the recorder but that's quite messy if not adressed properly.

saniho commented 4 years ago

I have seen a plugin with Domoticz, perhaps this could help for development : https://github.com/guillaumezin/DomoticzLinky

Conobi commented 4 years ago

If you need any beta testers for Enedis new integration, I'm in ;)

docteurzoidberg commented 4 years ago

+1 beta tester available

RobertLesgros commented 4 years ago

me too 😉

Bredin76 commented 4 years ago

I'm in too!

Le jeu. 24 sept. 2020 à 16:00, RobertLesgros notifications@github.com a écrit :

me too 😉

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/33634#issuecomment-698363418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQPUX2Q47FWJXRQK4TQVHTSHNGHVANCNFSM4L6N4GNQ .

Conobi commented 3 years ago

I was 2 weeks in vacation.

Will be back to work in 1-2 weeks.

When I left, I saw an issue in the @jluc2808 wrapper API that needs changes. I contacted him.

Anything new? Do you need help on something?

Quentame commented 3 years ago

The Linky integration platform has been remove because the API has been discontinued.

A new Enedis integration will be created but other integrations that I maintain needs my attention now: iCloud, Synology DSM.

I'll let you know when the time comes. During this time, you can join the HA French speaking Discord server, where we speak about the integration and workarounds : https://discord.gg/jGy9uMM

max5962 commented 3 years ago

Hey @Quentame , The invite link has expired.

Quentame commented 3 years ago

Hey @Quentame , The invite link has expired.

Link updated 😉

df911 commented 3 years ago

Why don't use : https://enedisgateway.tech/ ?

sylvertom commented 3 years ago

Why don't use : https://enedisgateway.tech/ ?

I like the concept but I'm not a fan of hosted services, also I can't find the code for this app anywhere, i doubt this is open source.

Conobi commented 3 years ago

Why don't use : enedisgateway.tech ?

I like the concept but I'm not a fan of hosted services, also I can't find the code for this app anywhere, i doubt this is open source.

Well, the issue is the fact that the API is now limited to company usage ; you can't have an API key if you don't have a business working with Enedis (or having a big project). This Enedis Gateway is right now the only way to use officially the API

sylvertom commented 3 years ago

Why don't use : enedisgateway.tech ?

I like the concept but I'm not a fan of hosted services, also I can't find the code for this app anywhere, i doubt this is open source.

Well, the issue is the fact that the API is now limited to company usage ; you can't have an API key if you don't have a business working with Enedis (or having a big project). This Enedis Gateway is right now the only way to use officially the API

Self employed developpers can't get credentials ? Does your app needs to be reviewed in order to qualify for an API key ?

grea09 commented 3 years ago

Why don't use : enedisgateway.tech ?

I like the concept but I'm not a fan of hosted services, also I can't find the code for this app anywhere, i doubt this is open source.

Well, the issue is the fact that the API is now limited to company usage ; you can't have an API key if you don't have a business working with Enedis (or having a big project). This Enedis Gateway is right now the only way to use officially the API

Self employed developpers can't get credentials ? Does your app needs to be reviewed in order to qualify for an API key ?

They ask for SIRET and such I'm guessing. For those the Home assistant team got NabuCasa to do the endorsement for the community. I think it should be asked if there's no other way.

roncamma commented 3 years ago

Hello, If we can have an Linky and Gazpar integration, it would be amazing ! Have a nice day !

SemiCroustii commented 3 years ago

Maybe we can use this project : https://github.com/bokub/linky ?

m4dm4rtig4n commented 3 years ago

Why don't use : https://enedisgateway.tech/ ?

I like the concept but I'm not a fan of hosted services, also I can't find the code for this app anywhere, i doubt this is open source.

Initially this project was a POC to see the possibilities of NodeRED :p I created the flow primarily for personal use, but when I first started talking about the project, a lot of people asked me to open it. What I ended up doing :)

I could share the flow without problem, but as it is, it would be unusable without the signing of a legal contract with Enedis. To use the flow, you need credentials provided by Enedis and respect a whole customer path for the assets.

Do not hesitate to go on my Discord dedicated to home automation: https://discord.gg/DfVJZme