electricitymaps / bloom-contrib

Making carbon footprint data available to everyone.
https://www.bloomclimate.com
MIT License
436 stars 104 forks source link

Upgrade Linky to official OAuth2 API #292

Closed corradio closed 4 years ago

corradio commented 4 years ago

More info here:

flavianh commented 4 years ago

I'll have a look!

ovbm commented 4 years ago

Thanks a lot! Let us know if you need any help, access to a user account etc!

flavianh commented 4 years ago

@ovbm thanks! I do need help:

martincollignon commented 4 years ago

Hi @flavianh !

Let me know if you need anything else!

flavianh commented 4 years ago

@martincollignon So, the current behavior of the app is the following:

Unclear points are the following:

martincollignon commented 4 years ago

@corradio I think you discussed with Enedis how the oauth flow would work. Can you help?

On Sat, Jan 25, 2020, 20:53 Flavian Hautbois notifications@github.com wrote:

@martincollignon https://github.com/martincollignon So, the current behavior of the app is the following:

  • I open Linky
  • I enter my datahub https://datahub-enedis.fr/sinscrire/ credentials
  • I get a "Access Denied" error, which is an error which, I guess, makes sense since the integration is not done

Unclear points are the following:

  • I need to enter my Linky ID somewhere, and have no idea how to make that. Any input on this?
  • I don't see how users can figure out the Linky connection by themselves as well, since it involves the enedis datahub which is never mentioned in the app?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tmrowco/tmrowapp-contrib/issues/292?email_source=notifications&email_token=AAT333SQ5WKTS56AP35ZIB3Q7SKDZA5CNFSM4J36VSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ5EEGI#issuecomment-578437657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAT333XBOSFE34Q3YYXYZCDQ7SKDZANCNFSM4J36VSVQ .

corradio commented 4 years ago

@flavianh are you sure the linky ID is required in order to fetch data from the datahub? I understand it is required to sign up, but not to fetch?

We are aware that the current version of the app exhibits problems though :( We will also make sure to link to the enedis datahub from the app to make it clearer how to use the integration (but so far a lot of people have tried to use it!)

flavianh commented 4 years ago

@corradio well I did not use it to sign up to the datahub In the metering endpoint https://datahub-enedis.fr/data-connect/documentation/api-metering-data-v3/ you have to use the PRM which are user based. Does the app provide that info?

corradio commented 4 years ago

The app doesn't provide that info. In principle, a user should just enter his linky username/password (just like on the website) and we should be able to retrieve the PRM and then use it to retrieve metering data. Are you sure there's no way to retrieve the PRM once a user is authorized? If not, we might have to contact Enedis.

Olivier

On Tue, Jan 28, 2020 at 9:47 AM Flavian Hautbois notifications@github.com wrote:

@corradio https://github.com/corradio well I did not use it to sign up to the datahub In the metering endpoint https://datahub-enedis.fr/data-connect/documentation/api-metering-data-v3/ you have to use the PRM which are user based. Does the app provide that info?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tmrowco/tmrowapp-contrib/issues/292?email_source=notifications&email_token=AAMUIKBU2CGMT5AFVZUORTTQ77WKVA5CNFSM4J36VSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKCPWLY#issuecomment-579140399, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMUIKATSPW2K26J7OJIKXTQ77WKVANCNFSM4J36VSVQ .

--

Olivier Corradi

Founder, CEO

https://www.linkedin.com/in/oliviercorradi https://twitter.com/corradio

tmrow.com

corradio commented 4 years ago

Hi @flavianh , I just looked again, and it seems like the authorize endpoint gives you back the PRMs:

https://datahub-enedis.fr/data-connect/documentation/authorize-v1/

image

Let me know if you're able to help here! Else I might take a crack at it myself.