Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Dutch Essent account with no readings? #2

Closed
Giovenale2 opened this issue May 26, 2019 · 9 comments
Closed

Dutch Essent account with no readings? #2

Giovenale2 opened this issue May 26, 2019 · 9 comments

Comments

@Giovenale2
Copy link

Hi team,
Really like your idea for this project! I have a NL Essent account, and I can see my usage online after logging in. Nevertheless, i get a parsing error in home assistant, because and '.find('Installations')' fails. When I try to use this code with spyder I get to the result xml, where the data pull seems to be successful, but it contains no readings.
I get 10 EANs, but each of them seems to have no readings. Below the response, with the EAN hidden. Any suggestion to solve this? I am really looking forwards to get my readings in HA :)

<?xml version="1.0" encoding="utf-8"?> <GetMeterReadingHistory> <Header> <Context> <ServiceUser>MIJNESSENT</ServiceUser> <Domain>SelfService</Domain> <Brand>essent</Brand> </Context> </Header> <request> <PartnerID>0150307865</PartnerID> <ServiceProviders> <SupplierEAN name="Essent Retail Energie" EAN="xxx"/> </ServiceProviders> <Installations> <Installation> <ConnectEAN>xxx</ConnectEAN> </Installation> </Installations> <OnlyLastMeterReading>false</OnlyLastMeterReading> <Period> <StartDate>2018-03-26T00:00:00+02:00</StartDate> <EndDate>2019-05-26T23:59:59+02:00</EndDate> </Period> </request> <response> <Info/> <Messages> <Message> <Type>S</Type> <Code>000</Code> <Message>Service Call is Successful</Message> </Message> <Message> <Type>I</Type> <Code>200</Code> <Message>No Records Found</Message> </Message> </Messages> </response> </GetMeterReadingHistory>

@TheLastProject
Copy link
Owner

Oh, interesting. I just grabbed the first EAN when implementing this because that works for me. Does only one EAN return meter info or do multiple do? In the last case, how would I decide which is the correct EAN?

@TheLastProject
Copy link
Owner

I get 10 EANs, but each of them seems to have no readings.

Oops, misread this. Could you check if the VerbruiksManager is enabled on the Mijn Essent website and if it has anything under "Meterstanden" for you?

@Giovenale2
Copy link
Author

Giovenale2 commented May 26, 2019

Wow, quick reaction!
Yes, i can access that part of the MijnEssent and I see monthly (some months 2 measures) incremental readings for :

Opnamedatum | Stroom dagtelwerk | Stroom nacht/weekend telwerk

Instead, I see missing values for

Stroom teruglevering, dagtelwerk | Stroom teruglevering, nacht/weekend telwerk

"Bron" is "Opgave door slimme meter" for every entry.

@TheLastProject
Copy link
Owner

Hmm, that sounds about right then. You're sure not a single one of the EANs returns any readings? Because as far as I'm aware at least one of them should return this data.

@Giovenale2
Copy link
Author

Yes, I am sure. I printed the content of each EAN directly from within your code. Any idea of what could be different from other cases?

@TheLastProject
Copy link
Owner

Can you try the code in the README again on the latest master branch?

from pyessent import PyEssent

essent = PyEssent(username=username, password=password)
for ean in essent.get_EANs():
    essent.read_meter(ean)

And see if it outputs anything at all?

@Giovenale2
Copy link
Author

Giovenale2 commented May 26, 2019

Interesting. The code does not beak now, but i also do not get any value out. If I print the server response from within your code as I did in the previous commit, I now get a simple

<Response [200]>

@TheLastProject
Copy link
Owner

How odd, I expect output like this:

$ python3
Python 3.7.3 (default, May 11 2019, 00:38:04) 
[GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
@>>> from pyessent import PyEssent
@>>> essent = PyEssent(username='username', password='password')
@>>> for ean in essent.get_EANs():
@...     essent.read_meter(ean)
@... 
{'type': 'Elektriciteit', 'values': {'TLV': {'N': {'unit': 'KWH', 'records': {'2019-05-01T00:00:00+02:00': '0', '2019-04-01T00:00:00+02:00': '0', '2019-03-01T00:00:00+01:00': '0', '2019-02-01T00:00:00+01:00': '0', '2019-01-01T00:00:00+01:00': '0', '2018-12-31T00:00:00+01:00': '0', '2018-12-12T00:00:00+01:00': '0'}}, 'L': {'unit': 'KWH', 'records': {'2019-05-01T00:00:00+02:00': '0', '2019-04-01T00:00:00+02:00': '0', '2019-03-01T00:00:00+01:00': '0', '2019-02-01T00:00:00+01:00': '0', '2019-01-01T00:00:00+01:00': '0', '2018-12-31T00:00:00+01:00': '0', '2018-12-12T00:00:00+01:00': '0'}}}, 'LVR': {'N': {'unit': 'KWH', 'records': {'2019-05-01T00:00:00+02:00': '100', '2019-04-01T00:00:00+02:00': '100', '2019-03-01T00:00:00+01:00': '100', '2019-02-01T00:00:00+01:00': '100', '2019-01-01T00:00:00+01:00': '100', '2018-12-31T00:00:00+01:00': '100', '2018-12-12T00:00:00+01:00': '100'}}, 'L': {'unit': 'KWH', 'records': {'2019-05-01T00:00:00+02:00': '100', '2019-04-01T00:00:00+02:00': '100', '2019-03-01T00:00:00+01:00': '100', '2019-02-01T00:00:00+01:00': '100', '2019-01-01T00:00:00+01:00': '100', '2018-12-31T00:00:00+01:00': '100', '2018-12-12T00:00:00+01:00': '100'}}}}}
{'type': 'Gas', 'values': {'LVR': {'N': {'unit': 'MTQ', 'records': {'2019-05-01T00:00:00+02:00': '100', '2019-04-01T00:00:00+02:00': '100', '2019-03-19T00:00:00+01:00': '100', '2019-03-01T00:00:00+01:00': '100', '2019-02-01T00:00:00+01:00': '100', '2019-01-01T00:00:00+01:00': '100', '2018-12-31T00:00:00+01:00': '100', '2018-12-12T00:00:00+01:00': '100'}}}}}

Just to make sure, under "Instellingen", both these boxes are checked?
image

@TheLastProject
Copy link
Owner

Should be fixed in #6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants