Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[linky] Full history of data returned by the requests #17070

Open
lolodomo opened this issue Jul 16, 2024 · 8 comments
Open

[linky] Full history of data returned by the requests #17070

lolodomo opened this issue Jul 16, 2024 · 8 comments
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@lolodomo
Copy link
Contributor

Start and end dates in the console command are ignored. Even default dates are ignored. Looks like around 3 years of data are systematically returned.
Maybe something has changed in the API with the handling of dates ?
If only thie "report" console command is affected, that is not dramatic. In case all daily requests are affected, that would be more annoying.
I will investigate.
@clinique for information

@lolodomo lolodomo added the bug An unexpected problem or unintended behavior of an add-on label Jul 16, 2024
@lolodomo
Copy link
Contributor Author

lolodomo commented Jul 16, 2024

Just by enabling DEBUG logs, I can unfortunately confirm that even daily requests are impacted, that means each request returns a full history. I guess the dates we provide are probably wrong, maybe the format has changed ?

@lolodomo
Copy link
Contributor Author

lolodomo commented Jul 16, 2024

Here is the date format used when building the GET URL:
https://github.com/openhab/openhab-addons/blob/main/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/api/EnedisHttpApi.java#L56

And here is the URL used with parameters dateDebut and dateFin:
https://github.com/openhab/openhab-addons/blob/main/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/api/EnedisHttpApi.java#L66

@clinique: could you please check if parameters are still dateDebut and dateFin and that the used format is still valid ?

@lolodomo lolodomo changed the title [linky] Full history returned by the "report" console command [linky] Full history of data returned by the requests Jul 16, 2024
@lolodomo
Copy link
Contributor Author

lolodomo commented Aug 4, 2024

@clinique : any chance you take a look ? Such a fix could be a candidate for 4.2.x.

@clinique
Copy link
Contributor

clinique commented Aug 4, 2024

Morning @lolodomo . I've made the check in the browser.
The URL parameters do not seem to have changed:
image

...just they seem to be completely ignored by the server :
image

@lolodomo
Copy link
Contributor Author

lolodomo commented Aug 6, 2024

What do you suggest to do ?

@clinique
Copy link
Contributor

clinique commented Aug 7, 2024

I don't know what I can do. The API does not take care of date filtering

@lsiepel
Copy link
Contributor

lsiepel commented Aug 7, 2024

Is there official documentation for this api?
I found https://data.enedis.fr/api/v1/console/datasets/1.0/search/ but that might be totally unrelated. If it is the same api, there is also a v2 and newer api. Those might not be affected (long shot)

@clinique
Copy link
Contributor

clinique commented Aug 7, 2024

No, it has be retro-engineered from the website. Final solution should come from #16355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

No branches or pull requests

3 participants