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

Add sunnyportal2file #9

Merged
merged 9 commits into from May 28, 2020
Merged

Add sunnyportal2file #9

merged 9 commits into from May 28, 2020

Conversation

joebe975
Copy link
Contributor

@joebe975 joebe975 commented May 9, 2020

The file sunnyportal2file can be used to download data from Sunny Portal to file. It currently allows 7 output format (csv, json, pickle, hdf, parquet, feather and excel). It also contains a flag --append which can be used to only download new data and append it to existing file.

@erijo
Copy link
Owner

erijo commented May 17, 2020

Just to let you know that I haven't forgot about this PR. I just haven't had time to look at it yet.

@ivansanders
Copy link

ivansanders commented May 17, 2020 via email

erijo added a commit that referenced this pull request May 23, 2020
erijo added a commit that referenced this pull request May 23, 2020
Power = namedtuple('Power', ['timestamp', 'power'])
Power = namedtuple('Power', ['timestamp', 'min_power','mean_power','max_power'])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've merged these changes in a slightly different form (see 45bcd9d). The power member is still there and the other two are called min and max.

Please rebase your changes ontop of this.

@@ -253,11 +253,13 @@ def parse(self, data):
self.power_measurements = []
tag_name = "fiveteen" if self.quarter else "hour"
for entry in tag.iterfind('./channel/day/%s' % tag_name):
mean = self.kw_to_w(entry.get('mean'))
if mean is not None:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of always including all power measurements I added a parameter in 2986ad0 to only include it when requested.

bin/sunnyportal2file Outdated Show resolved Hide resolved
bin/sunnyportal2file Outdated Show resolved Hide resolved
erijo added a commit that referenced this pull request May 28, 2020
The script can be used to save data from Sunny Portal to a number of different
formats.
@erijo erijo merged commit 6a9c323 into erijo:master May 28, 2020
@erijo
Copy link
Owner

erijo commented May 28, 2020

Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

3 participants