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

Error in filter for Elektrus: Wrong GLN #242

Closed
jlaur opened this issue Jan 29, 2023 · 1 comment · Fixed by #246
Closed

Error in filter for Elektrus: Wrong GLN #242

jlaur opened this issue Jan 29, 2023 · 1 comment · Fixed by #246
Labels
bug Something isn't working

Comments

@jlaur
Copy link

jlaur commented Jan 29, 2023

I found this repository when working on a similar integration in openHAB: openhab/openhab-addons#14222

Looking at your code helped me in the right direction of providing customized filters for the different grid companies.

I believe I found a small problem here:

"TREFOR El-net Øst": {
"gln": "5790000706686",
"company": "TREFOR El-net Øst A/S",
"type": ["46"],
"note": ["Nettarif C time"],
},
"Elektrus": {
"gln": "5790000706686",
"company": "Elektrus A/S",
"type": ["6000091"],
"note": ["Nettarif C time"],
},

These two filters refer to the same GLN. The one for TREFOR El-net Øst seems to be the correct one, since the other one didn't give any results. But doing a broad cross-GLN search, I found the GLN for Elektrus to be 5790000836239. This was confirmed by seeing charge type code 6000091 in this dataset, which is also in your filter:
https://api.energidataservice.dk/dataset/DatahubPricelist?filter={%22GLN_Number%22:[%225790000836239%22],%22ChargeType%22:[%22D03%22],%22ChargeTypeCode%22:[%226000091%22],%22Note%22:[%22Nettarif%20C%20time%22]}&columns=ValidFrom,ValidTo,GLN_Number,ChargeOwner,ChargeTypeCode,Note&start=2023-01-01

Btw, the compiler found the problem for me because of duplicate values in a switch/case:
https://github.com/jlaur/openhab-addons/blob/14222-energidataservice/bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/api/DatahubTariffFilterFactory.java

Out of curiosity, are the filters used here provided/reported by users, or which workflow do you use for updating them?

@MTrab
Copy link
Owner

MTrab commented Jan 29, 2023

Good find - sometimes it just goes too fast ;) I'll fix this for the next release.

As for the filters, charge owners, it's currently manually as there are so many combinations of type and notes, that I haven't made that automated yet.

@MTrab MTrab added the bug Something isn't working label Jan 29, 2023
@MTrab MTrab closed this as completed in #246 Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants