magico13 / PyEmVue

Python Library for the Emporia Vue Energy Monitor
MIT License
185 stars 36 forks source link

pulling past power-data on a second-by-second basis #48

Closed Raphael164 closed 1 year ago

Raphael164 commented 1 year ago

Hello,

although I have been working with the great package pyemvue for some time now, I have not yet managed to get past power data. I know that Emporia /Amazon AWS provides second by second data only for a limited period of time. My idea was to create a script that before the end of the deletion of the record of a certain period, let's say hourly, to populate and process the secondly data at once. Just to be clear, I do not want to populate average values, but the exact measured values.

Is there someone who could help me, also with regard to the storage time in the Emporia Cloud system?

Thanks in advance!

Raphael

EmperorXLII commented 1 year ago

I believe the second-resolution data is saved for \~three hours. What I do is initially request the maximum number of second-resolution samples (to reduce total API call count; currently 4k) from the present time on backwards, until the server returns "no data" failures. Then wait until at least 4k samples have accumulated, and keep requesting from the end of the previous sample request on forwards. (Not sure if my PowerShell version will be of use to you in Python, but you can find the "Emporia Recorder" project here.)

Raphael164 commented 1 year ago

@EmperorXLII Well, first of all thank you for your fast reply. Since I am working in python I don't think your project will be that useful. Nevertheless, I am grateful for your responce, because know I have a clue on how to mangage my data-pull-script.

Do you provide a documentation on your project? Since I am interested on how you managed to get your data.

Best Raphael