smartermeter 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/README.md +16 -16
- data/Rakefile +9 -14
- data/lib/smartermeter/daemon.rb +9 -10
- data/lib/smartermeter/interfaces/swing.rb +35 -30
- data/lib/smartermeter/samples.rb +21 -25
- data/lib/smartermeter/service.rb +49 -66
- data/lib/smartermeter/services/pachube.erb +2 -0
- data/lib/smartermeter/services/{google_powermeter.rb → pachube.rb} +10 -10
- data/lib/smartermeter.rb +2 -2
- data/smartermeter.gemspec +8 -16
- metadata +147 -154
- data/lib/smartermeter/services/google_powermeter.erb +0 -16
- data/spec/fixtures/data.csv +0 -21
- data/spec/fixtures/expected_google_request.xml +0 -292
- data/spec/fixtures/vcr_cassettes/brighterplanet.yml +0 -106
- data/spec/sample_spec.rb +0 -8
- data/spec/samples_spec.rb +0 -39
- data/spec/service_spec.rb +0 -7
- data/spec/services/brighterplanet_spec.rb +0 -26
- data/spec/services/google_powermeter_spec.rb +0 -19
- data/spec/spec_helper.rb +0 -15
metadata
CHANGED
@@ -1,176 +1,169 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartermeter
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.3.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
7
|
+
authors:
|
8
|
+
- Matt Colyer
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
12
|
+
date: 2012-01-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: mechanize
|
16
|
+
requirement: &70260787107760 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - =
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.0.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70260787107760
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: crypt19
|
27
|
+
requirement: &70260787105640 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - =
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.2.1
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70260787105640
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rest-client
|
38
|
+
requirement: &70260787101360 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - =
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.6.1
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70260787101360
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: json_pure
|
49
|
+
requirement: &70260787100160 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - =
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.5.1
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70260787100160
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rubyzip
|
60
|
+
requirement: &70260787141160 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - =
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 0.9.5
|
66
|
+
type: :runtime
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70260787141160
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: &70260787136680 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 2.8.0
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70260787136680
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: vcr
|
82
|
+
requirement: &70260787160520 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ~>
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 1.11.3
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70260787160520
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: webmock
|
93
|
+
requirement: &70260787157720 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ~>
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 1.7.10
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *70260787157720
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: minitar
|
104
|
+
requirement: &70260787156440 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 0.5.2
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: *70260787156440
|
104
113
|
description: Fetches SmartMeter data from PG&E and can upload to Google PowerMeter
|
105
114
|
email: matt.removethis@nospam.colyer.name
|
106
|
-
executables:
|
107
|
-
|
115
|
+
executables:
|
116
|
+
- smartermeter
|
108
117
|
extensions: []
|
109
|
-
|
110
118
|
extra_rdoc_files: []
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
- smartermeter.gemspec
|
138
|
-
- spec/fixtures/data.csv
|
139
|
-
- spec/fixtures/expected_google_request.xml
|
140
|
-
- spec/fixtures/vcr_cassettes/brighterplanet.yml
|
141
|
-
- spec/sample_spec.rb
|
142
|
-
- spec/samples_spec.rb
|
143
|
-
- spec/service_spec.rb
|
144
|
-
- spec/services/brighterplanet_spec.rb
|
145
|
-
- spec/services/google_powermeter_spec.rb
|
146
|
-
- spec/spec_helper.rb
|
147
|
-
has_rdoc: true
|
119
|
+
files:
|
120
|
+
- CHANGELOG.md
|
121
|
+
- Gemfile
|
122
|
+
- LICENSE
|
123
|
+
- README.md
|
124
|
+
- Rakefile
|
125
|
+
- bin/smartermeter
|
126
|
+
- icons/smartermeter-16x16.png
|
127
|
+
- icons/smartermeter-32x32.png
|
128
|
+
- icons/smartermeter.ico
|
129
|
+
- icons/smartermeter.svg
|
130
|
+
- installer/launch4j.xml
|
131
|
+
- installer/main.rb
|
132
|
+
- installer/nsis.nsi
|
133
|
+
- lib/smartermeter.rb
|
134
|
+
- lib/smartermeter/daemon.rb
|
135
|
+
- lib/smartermeter/interfaces/cli.rb
|
136
|
+
- lib/smartermeter/interfaces/swing.rb
|
137
|
+
- lib/smartermeter/sample.rb
|
138
|
+
- lib/smartermeter/samples.rb
|
139
|
+
- lib/smartermeter/service.rb
|
140
|
+
- lib/smartermeter/services/brighterplanet.rb
|
141
|
+
- lib/smartermeter/services/cacert.pem
|
142
|
+
- lib/smartermeter/services/pachube.erb
|
143
|
+
- lib/smartermeter/services/pachube.rb
|
144
|
+
- smartermeter.gemspec
|
148
145
|
homepage: http://github.com/mcolyer/smartermeter
|
149
146
|
licenses: []
|
150
|
-
|
151
147
|
post_install_message:
|
152
148
|
rdoc_options: []
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
require_paths:
|
150
|
+
- lib
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
152
|
none: false
|
158
|
-
requirements:
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ! '>='
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
158
|
none: false
|
164
|
-
requirements:
|
165
|
-
|
166
|
-
|
167
|
-
|
159
|
+
requirements:
|
160
|
+
- - ! '>='
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
168
163
|
requirements: []
|
169
|
-
|
170
164
|
rubyforge_project: smartermeter
|
171
|
-
rubygems_version: 1.
|
165
|
+
rubygems_version: 1.8.11
|
172
166
|
signing_key:
|
173
167
|
specification_version: 2
|
174
168
|
summary: Fetches SmartMeter data from PG&E
|
175
169
|
test_files: []
|
176
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<?xml version="1.0"?>
|
2
|
-
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:meter="http://schemas.google.com/meter/2008">
|
3
|
-
<% samples.each do |sample| %>
|
4
|
-
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:meter="http://schemas.google.com/meter/2008">
|
5
|
-
<id>https://www.google.com/powermeter/feeds<%= @config[:variable] %>/durMeasurement/<%= sample.utc_start_time.gsub(":", "_") %></id>
|
6
|
-
<category scheme="http://schemas.google.com/g/2005#kind"
|
7
|
-
term="http://schemas.google.com/meter/2008#durMeasurement"/>
|
8
|
-
<meter:subject>https://www.google.com/powermeter/feeds<%= @config[:variable] %></meter:subject>
|
9
|
-
<meter:startTime meter:uncertainty="1.000000"><%= sample.utc_start_time %></meter:startTime>
|
10
|
-
<meter:endTime meter:uncertainty="1.000000"><%= sample.utc_stop_time %></meter:endTime>
|
11
|
-
<meter:quantity meter:uncertainty="0.001000" meter:unit="kW h">
|
12
|
-
<%= sample.kwh %>
|
13
|
-
</meter:quantity>
|
14
|
-
</entry>
|
15
|
-
<% end %>
|
16
|
-
</feed>
|
data/spec/fixtures/data.csv
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
"Name","DOE,JOHN "
|
2
|
-
"Address","1 MARKET ST, SAN FRANCSICO, CA 94110"
|
3
|
-
"Account Number",="12345678"
|
4
|
-
"Disclaimer","The information contained in this file is intended for the personal and confidential use of the recipient(s) named above. Any unauthorized use is prohibited."
|
5
|
-
|
6
|
-
"Title","Hourly Usage"
|
7
|
-
"Meter Number","Electric - 12345678"
|
8
|
-
"Selected Date","10/01/2009"
|
9
|
-
"Selected Period","Week"
|
10
|
-
"Primary Data Unit","kWh"
|
11
|
-
"Secondary Data Unit","-"
|
12
|
-
|
13
|
-
"","12:00 AM","1:00 AM","2:00 AM","3:00 AM","4:00 AM","5:00 AM","6:00 AM","7:00 AM","8:00 AM","9:00 AM","10:00 AM","11:00 AM","12:00 PM","1:00 PM","2:00 PM","3:00 PM","4:00 PM","5:00 PM","6:00 PM","7:00 PM","8:00 PM","9:00 PM","10:00 PM","11:00 PM"
|
14
|
-
"9/27/2009","-",".205",".257",".131",".142",".136",".127",".137",".136",".134",".416","1.732","1.844",".190",".189",".182",".173","1.136","3.550","3.011","1.426",".508",".580",".316"
|
15
|
-
"9/28/2009",".142",".165",".140",".148",".157",".138",".140",".607",".709",".183",".131",".134",".144",".143",".135",".214",".179",".161",".165",".661",".461",".390",".467",".239"
|
16
|
-
"9/29/2009",".271",".124",".127",".122",".133",".131",".121",".149",".723",".409",".388",".317",".341",".335",".338",".341",".310",".298",".316","1.561",".601",".463",".494",".471"
|
17
|
-
"9/30/2009",".536",".224",".136",".131",".133",".128",".128",".104",".518",".706",".385",".320",".338",".373",".227",".097",".088",".097",".093",".099",".100",".090",".095",".092"
|
18
|
-
"10/01/2009",".097",".096",".094",".095",".082",".086",".094",".089",".080",".093",".074",".094",".087",".081",".096",".089",".080",".170",".143",".106",".096",".091",".099",".097"
|
19
|
-
"10/02/2009",".098",".095",".089",".083",".094",".095",".080",".088",".095",".073",".095",".094",".075",".094",".096",".075",".095",".097",".096",".098",".098",".096",".097",".086"
|
20
|
-
"10/03/2009",".093",".088",".097",".097",".094",".096",".092",".079",".094",".094",".095",".131",".151",".098",".083",".092",".097",".098",".092",".080",".095",".097",".097",".074"
|
21
|
-
|