smartermeter 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/smartermeter/daemon.rb +2 -3
- data/lib/smartermeter/service.rb +3 -5
- data/lib/smartermeter/services/pachube.rb +1 -1
- data/lib/smartermeter.rb +1 -1
- data/smartermeter.gemspec +3 -3
- metadata +21 -21
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.4.1 (February 5, 2012)
|
4
|
+
* Fixed an issue with downloading multiple days at the same time.
|
5
|
+
* Fixed an issue with detecting incomplete data.
|
6
|
+
|
3
7
|
## 0.4.0 (January 28, 2012)
|
4
8
|
* Removed Google PowerMeter as it no longer exists
|
5
9
|
* Rewrote PG&E scraper to work with OPower, their new web data provider.
|
data/lib/smartermeter/daemon.rb
CHANGED
@@ -182,10 +182,9 @@ module SmarterMeter
|
|
182
182
|
next if data.empty?
|
183
183
|
|
184
184
|
@ui.log.info("Verifying #{date}")
|
185
|
-
samples = Samples.parse_espi(data).values
|
186
|
-
first_sample = samples.first
|
185
|
+
samples = Samples.parse_espi(data).values
|
187
186
|
|
188
|
-
if
|
187
|
+
if samples.any?
|
189
188
|
@ui.log.info("Saving #{date}")
|
190
189
|
FileUtils.mkdir_p(File.dirname(data_file(date)))
|
191
190
|
File.open(data_file(date), "w") do |f|
|
data/lib/smartermeter/service.rb
CHANGED
@@ -63,11 +63,9 @@ module SmarterMeter
|
|
63
63
|
|
64
64
|
begin
|
65
65
|
form = @data_page.forms.first
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
form.field_with(:name => 'to').value = date.strftime("%m/%d/%Y")
|
70
|
-
end
|
66
|
+
form.radiobutton_with(:name => 'exportFormat', :value => 'ESPI_INTERVAL').check
|
67
|
+
form['from'] = date.strftime("%m/%d/%Y")
|
68
|
+
form['to'] = date.strftime("%m/%d/%Y")
|
71
69
|
espi_xml_zip = form.submit
|
72
70
|
|
73
71
|
# This has to be one of the stupidest implementations I've seen
|
@@ -10,7 +10,7 @@ module SmarterMeter
|
|
10
10
|
raise "The Pachube datastream id must be configured" unless @config[:datastream_id]
|
11
11
|
end
|
12
12
|
|
13
|
-
# Public: Uploads an array of Samples to
|
13
|
+
# Public: Uploads an array of Samples to Pachube
|
14
14
|
#
|
15
15
|
# samples - An array of samples to upload
|
16
16
|
#
|
data/lib/smartermeter.rb
CHANGED
data/smartermeter.gemspec
CHANGED
@@ -13,14 +13,14 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'smartermeter'
|
16
|
-
s.version = '0.4.
|
17
|
-
s.date = '2012-
|
16
|
+
s.version = '0.4.1'
|
17
|
+
s.date = '2012-02-05'
|
18
18
|
s.rubyforge_project = 'smartermeter'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
21
21
|
## as you like.
|
22
22
|
s.summary = "Fetches SmartMeter data from PG&E"
|
23
|
-
s.description = "Fetches SmartMeter data from PG&E and can upload to
|
23
|
+
s.description = "Fetches SmartMeter data from PG&E and can upload to Pachube"
|
24
24
|
|
25
25
|
## List the primary authors. If there are a bunch of authors, it's probably
|
26
26
|
## better to set the email to an email list or something. If you don't have
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartermeter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mechanize
|
16
|
-
requirement: &
|
16
|
+
requirement: &70154877461120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - =
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70154877461120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: crypt19
|
27
|
-
requirement: &
|
27
|
+
requirement: &70154877459980 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - =
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.2.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70154877459980
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rest-client
|
38
|
-
requirement: &
|
38
|
+
requirement: &70154877458400 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - =
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.6.1
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70154877458400
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: json_pure
|
49
|
-
requirement: &
|
49
|
+
requirement: &70154877516580 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - =
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.5.1
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70154877516580
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rubyzip
|
60
|
-
requirement: &
|
60
|
+
requirement: &70154877516080 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - =
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.9.5
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70154877516080
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
|
-
requirement: &
|
71
|
+
requirement: &70154877515320 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 2.8.0
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70154877515320
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: vcr
|
82
|
-
requirement: &
|
82
|
+
requirement: &70154877514600 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 1.11.3
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70154877514600
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: webmock
|
93
|
-
requirement: &
|
93
|
+
requirement: &70154877514060 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 1.7.10
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70154877514060
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: minitar
|
104
|
-
requirement: &
|
104
|
+
requirement: &70154877513500 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,8 +109,8 @@ dependencies:
|
|
109
109
|
version: 0.5.2
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
113
|
-
description: Fetches SmartMeter data from PG&E and can upload to
|
112
|
+
version_requirements: *70154877513500
|
113
|
+
description: Fetches SmartMeter data from PG&E and can upload to Pachube
|
114
114
|
email: matt.removethis@nospam.colyer.name
|
115
115
|
executables:
|
116
116
|
- smartermeter
|