Commit 2d5c9454 by source_reader

bug fixes and new test calibration matrix

parent 99d1575b
...@@ -4,7 +4,8 @@ After = syslog.target ...@@ -4,7 +4,8 @@ After = syslog.target
[Service] [Service]
Type = simple Type = simple
ExecStart = /var/venvs/joule/bin/jouled Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/venvs/joule/bin"
ExecStart = /usr/local/bin/jouled
StandardOutput = journal StandardOutput = journal
StandardError = journal StandardError = journal
Restart = always Restart = always
......
...@@ -61,7 +61,7 @@ class nginx::install::pi{ ...@@ -61,7 +61,7 @@ class nginx::install::pi{
source => 'puppet:///modules/nginx/pi/nginx.service' source => 'puppet:///modules/nginx/pi/nginx.service'
} }
package {'passenger': package {'passenger':
ensure => "6.0.4", ensure => "6.0.12",
provider => gem, provider => gem,
} }
package {'libcurl4-openssl-dev': package {'libcurl4-openssl-dev':
...@@ -69,7 +69,7 @@ class nginx::install::pi{ ...@@ -69,7 +69,7 @@ class nginx::install::pi{
} }
exec {'install-agent': exec {'install-agent':
command => '/usr/local/bin/passenger-config install-agent --auto', command => '/usr/local/bin/passenger-config install-agent --auto',
creates => '/var/lib/gems/2.5.0/gems/passenger-6.0.4/buildout/support-binaries/PassengerAgent', creates => '/var/lib/gems/2.7.0/gems/passenger-6.0.12/buildout/support-binaries/PassengerAgent',
timeout => 0, timeout => 0,
require => Package['passenger','libcurl4-openssl-dev'], require => Package['passenger','libcurl4-openssl-dev'],
} }
......
...@@ -30,11 +30,11 @@ class nginx::sites { ...@@ -30,11 +30,11 @@ class nginx::sites {
group => root, group => root,
mode => '0644', mode => '0644',
} }
$docs_cmd = "wget http://cloud.wattsworth.net/docs/docs.tar > /dev/null &&\ $docs_cmd = "wget http://cloud.wattsworth.net/docs/docs.tar.gz > /dev/null &&\
rm -rf /var/www/docs/* &&\ rm -rf /var/www/docs/* &&\
tar -xf docs.tar -C /var/www/docs &&\ tar -xzf docs.tar.gz -C /var/www/docs &&\
mv /var/www/docs/standalone_index.html /var/www/docs/index.html &&\ mv /var/www/docs/standalone_index.html /var/www/docs/index.html &&\
rm docs.tar" rm docs.tar.gz"
exec{ 'InstallDocs': exec{ 'InstallDocs':
command => $docs_cmd, command => $docs_cmd,
......
class nilm::config{ class nilm::config{
$nilm_bin = ['nilm','nilm-reader-capture', # $nilm_bin = ['nilm','nilm-reader-capture',
'nilm-filter-prep','nilm-filter-sinefit', # 'nilm-filter-prep','nilm-filter-sinefit',
'nilm-filter-reconstructor','nilm-filter-rawtoprep', # 'nilm-filter-reconstructor','nilm-filter-rawtoprep',
'nilm-plug','jim-term'] # 'nilm-plug','jim-term']
$nilm_bin.each |String $name| { # $nilm_bin.each |String $name| {
file{"/usr/local/bin/$name": # file{"/usr/local/bin/$name":
ensure => link, # ensure => link,
target => "/var/venvs/joule/bin/$name" # target => "/var/venvs/joule/bin/$name"
} # }
} # }
exec{'initialize_nilm': exec{'initialize_nilm':
command => 'nilm initialize', command => 'nilm initialize',
path => ['/usr/local/bin','/usr/sbin','/bin'], path => ['/var/venvs/joule/bin','/usr/local/bin','/usr/sbin','/bin'],
creates => '/opt/configs/meters.example.yml', creates => '/opt/configs/meters.example.yml',
require => File['/usr/local/bin/nilm']
} }
exec{'initialize_nilmplug': exec{'initialize_nilmplug':
command => 'nilm-plug --initialize', command => 'nilm-plug --initialize',
path => ['/usr/local/bin','/usr/sbin','/bin'], path => ['/var/venvs/joule/bin','/usr/local/bin','/usr/sbin','/bin'],
creates => '/etc/udev/rules.d/90-nilmplug.rules', creates => '/etc/udev/rules.d/90-nilmplug.rules',
require => File['/usr/local/bin/nilm-plug']
} }
} }
...@@ -208,47 +208,49 @@ meter2: ...@@ -208,47 +208,49 @@ meter2:
EOF EOF
#meter1.yml (calibration) #meter1.yml (calibration)
cat > /opt/configs/meters/meter2.yml <<EOF cat > /opt/configs/meters/meter2.yml <<EOF
current_matrix: current_matrix:
- - 0.013698286257034089 - - 0.0037746992345301924
- -0.008372095473047129 - 0.0003925424615672237
- -7.195016997648725e-05 - 0.0002892541810926171
- 6.943971771534212e-05 - 1.785967957824139e-08
- - 0.00045113523026404256 - - -6.757891246352776e-06
- 0.0010320134824391492 - -0.0006451522156305825
- -0.025266006217889984 - 0.06172431827668136
- 0.04766767945698939 - -9.657855127109635e-06
duration: 9 duration: 9
has_neutral: true has_neutral: true
off_duration: 2
on_duration: 1
pq_coeffs: pq_coeffs:
- - - 30791.144718303465 - - - 0.5613834689688728
- -1218.828836681789 - 0.8275557991872661
- - -18821.142653407267 - - 0.05835518464523408
- 755.897624263009 - 0.0870284477204723
- - -112.74221300378883 - - 0.0006778629398427929
- -72.39838665487767 - 0.0009958592530492554
- - 57.49251728329302 - - 0.0001247745558515221
- -13.325557613619015 - -6.466454130673776e-05
- - - 60.406866609359994 - - - 0.026831347565645126
- -31.015634339553483 - 0.07225784891776485
- - 221.7698659131578 - - -0.0028736810340140454
- -29.075136106286408 - 0.02416421698412425
- - -5026.504793830757 - - -0.5671686103408003
- 214.02621852139075 - -0.8236017043717707
- - 9484.224738585859 - - -0.0021136771017480414
- -380.9201452842851 - 0.001647066333949648
sensor_matrix: sensor_matrix:
- - 53.14555615658608 - - 262.0422499341873
- 0.10624348113745874 - -1.210458139743937
- - -32.48605950376758 - - 27.456926510182655
- 0.3841797932263452 - -0.29596422201695566
- - -0.1893501464831944 - - 0.3156744761911736
- -8.676794632867567 - 16.197843591044396
- - 0.09998591835992797 - - 0.004332307004927795
- 16.370162190401707 - -0.002554648333854752
sinefit_rotations: sinefit_rotations:
- -0.039563090697980044 - 0.9747397197790278
- -0.040141975928641264 - -2.1738602819131203
voltage_scale: 1.0
watts: 200 watts: 200
EOF EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment