fsantini / python-e3dc

Python API for querying E3/DC systems through the manufacturer's portal
MIT License
74 stars 23 forks source link

Getting history data #18

Closed steff333 closed 4 years ago

steff333 commented 4 years ago

Im trying to read the history data with DB_REQ_HISTORY_DATA_DAY but can't get it to work. The reason is to get the daily sums for production, grid etc.

Did you get it to work? I checked for example
e3dc.sendRequest(('DB_REQ_HISTORY_DATA_DAY', 'Container', [ ('DB_REQ_HISTORY_TIME_START', 'Uint16', 0), ('DB_SUM_CONTAINER', 'None', None),]), keepAlive=True) but always only get errors back.

Can you help?

fsantini commented 4 years ago

I can try, but it seems that it's an error in the format of the request, and I have no clue about those. I only know how to handle the low-level communication. How did you come up with this request?

steff333 commented 4 years ago

Honestly, I tried to get access to the archive values - I'm missing a proper documentation from e3dc. Is there a better way to retrieve e.g. the total amount of production by day?

It would be rather dull to read the data every second and calculate something manually.

Am 24. Mai 2020 22:03:32 MESZ schrieb fsantini notifications@github.com:

I can try, but it seems that it's an error in the format of the request, and I have no clue about those. I only know how to handle the low-level communication. How did you come up with this request?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/fsantini/python-e3dc/issues/18#issuecomment-633289152

steff333 commented 4 years ago

I think I fixed it and sent you a pull request for the python3 branch

vchrisb commented 4 years ago

Thank you very much for your contribution. #20 I already picked up your enhancements for e3dc-rest.