-
Notifications
You must be signed in to change notification settings - Fork 55
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
Meters #1853
Conversation
…ings saved as kBtu - 1st iteration
…erlying pm_property_ids
* TravisCI - install timescaledb * flake8 linter
* Update TimescaleDB OSX install instructions
… on meter data upload - More ui grid tweaks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @adrian-lara can you verify the timestamp imports for GreenButton? It looks like the data are in epoch time, but when importing and converting, it looks like that we are at least 1 hour off.
Raw file (example-GreenButton-data.xml)
<IntervalReading>
<timePeriod>
<duration>900</duration>
<start>1299387600</start>
</timePeriod>
<value>1790</value>
</IntervalReading>
<IntervalReading>
<timePeriod>
<duration>900</duration>
<start>1299388500</start>
</timePeriod>
<value>1791</value>
</IntervalReading>
seed/api/v2/urls.py
Outdated
url(r'meters/(?P<pk>\w+)/timeseries/$', | ||
MeterViewSet.as_view({'post': 'add_timeseries'}), | ||
name='meters-add-timeseries'), | ||
# url(r'meters/(?P<pk>\w+)/timeseries/$', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just remove these? Seems like these are old.
|
||
self.assertEqual(meter_reading_10.start_time, make_aware(datetime(2011, 3, 5, 21, 0, 0), timezone=self.tz_obj)) | ||
self.assertEqual(meter_reading_10.end_time, make_aware(datetime(2011, 3, 5, 21, 15, 0), timezone=self.tz_obj)) | ||
self.assertEqual(meter_reading_10.reading, 1790 * 3.412 / 1000 * ureg('kBtu')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
# Sanity check to be sure, nothing was changed with existing meter reading | ||
self.assertEqual(meter_reading_12, existing_meter_reading) | ||
|
||
def test_existing_meter_reading_has_reading_source_unit_and_conversion_factor_updated_if_import_file_references_previous_entry(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this_is_the_longest_function_name_ive_ever_seen
@@ -119,12 +136,17 @@ class Meta: | |||
created = models.DateTimeField(auto_now_add=True, null=True) | |||
modified = models.DateTimeField(auto_now=True, null=True) | |||
|
|||
# Default preferred all meter units to kBtu | |||
display_meter_units = JSONField(default=_default_display_meter_units) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
name='meter', | ||
), | ||
migrations.RemoveField( | ||
model_name='meter', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for cleaning these up.
Per @RDmitchell -- And how about putting all the ESPM choices together? Which would mean the ESPM meter option would go right below the Upload Portfolio Manager Data button |
@nllong, I specified GB epoch times to be read and saved using the default timezone of the app seed/config/settings/common.py Line 34 in 41a307c
I used the same epoch converter site but changed the timezone (https://www.epochconverter.com/timezones?q=1299387600&tz=America%2FLos_Angeles) and got the time shown in your SEED screenshot. |
Oh. Good. I'll double check that makes sense!
…On Thu, May 2, 2019 at 17:03 Adrian Lara ***@***.***> wrote:
hi @adrian-lara <https://github.com/adrian-lara> can you verify the
timestamp imports for GreenButton? It looks like the data are in epoch
time, but when importing and converting, it looks like that we are at least
1 hour off.
Raw file (example-GreenButton-data.xml)
<IntervalReading>
<timePeriod>
<duration>900</duration>
<start>1299387600</start>
</timePeriod>
<value>1790</value>
</IntervalReading>
<IntervalReading>
<timePeriod>
<duration>900</duration>
<start>1299388500</start>
</timePeriod>
<value>1791</value>
</IntervalReading>
Epoch Calc
[image: image]
<https://user-images.githubusercontent.com/1907354/57101734-1063e600-6cdf-11e9-9602-ffb17f95834f.png>
Seed
[image: image]
<https://user-images.githubusercontent.com/1907354/57101606-d4308580-6cde-11e9-9420-68d4eaa43dd8.png>
@nllong <https://github.com/nllong>, I specified GB epoch times to be
read and saved using the default timezone of the app America/Los_Angeles
specified here:
https://github.com/SEED-platform/seed/blob/41a307c78d31929d421e728fa814b4385f2e4d4a/config/settings/common.py#L34
I used the same epoch converter site but changed the timezone (
https://www.epochconverter.com/timezones?q=1299387600&tz=America%2FLos_Angeles)
and got the time shown in your SEED screenshot.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1853 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAORVGQ35OADSGNOUW3IFMDPTNXNZANCNFSM4HCTPG6Q>
.
|
Do we have a good source for greenbutton data? When we were implementing this before with CMU I generated greenbutton files from my house, which I can do again if that would be useful. |
The samples I used came from here: https://www.energy.gov/downloads/green-button-sample-data-pge
|
I think this is good to go. Any last comments before I merge? |
Implementation of Meter uploads using a time-series enhanced database (Postgres + TimescaleDB extension).
Any background context you want to provide?
Notable details/caveats:
Assumptions:
What's this PR do?
Key features include:
How should this be manually tested?
Import PM monthly meters for multiple properties and GB meters for single properties. View the uploaded meters using the new "Energy" tab in the property detail pages.
What are the relevant tickets?
Screenshots (if appropriate)