Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wattsworth
/
puppet
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ec5afb5b
authored
Jul 01, 2020
by
source_reader
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug fixes for raspi and fix to storage README documentation
parent
a70f651b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
292 additions
and
6 deletions
cleanup.sh
modules/docs/files/STORAGE_README
modules/docs/files/nilm/README
modules/docs/manifests/nilm.pp
rpi_cleanup.sh
tests/apl_nilm_test_script.sh
cleanup.sh
View file @
ec5afb5b
...
...
@@ -3,6 +3,7 @@ set -e
echo
"updating all packages and removing unnecessary ones"
apt update
apt-get clean
#apt upgrade -y
#apt autoremove -y
...
...
modules/docs/files/STORAGE_README
View file @
ec5afb5b
...
...
@@ -13,7 +13,7 @@ data from persistent instllations.
fields should be 0 and 2 for a second partition or drive.
**If this is the root volume you must enable it on the drive as well**
$> sudo tune2fs -o journal_data
_writeback
/dev/DEVCIE
$> sudo tune2fs -o journal_data /dev/DEVCIE
-----------------
...
...
modules/docs/files/nilm/README
View file @
ec5afb5b
...
...
@@ -28,4 +28,6 @@ metric_generator
puppet Scripts for building system images "sticks"
nilm_admin
*To build these projects first extract /opt/asf.tar.gz to src/asf
\ No newline at end of file
*To build these projects first install cross compiler toolchain:
$> sudo apt install gcc-arm-none-eabi and gdb-multiarch
Then extract /opt/asf.tar.gz to src/asf
\ No newline at end of file
modules/docs/manifests/nilm.pp
View file @
ec5afb5b
...
...
@@ -92,9 +92,9 @@ class docs::nilm(String $docs_path, String $owner){
path
=>
[
'/bin'
,
'/usr/sbin'
,
'/usr/bin'
],
creates
=>
"/opt/asf.tar.gz"
}
package
{[
'gcc-arm-none-eabi'
,
'gdb-multiarch'
]:
ensure
=>
present
,
}
#
package{['gcc-arm-none-eabi','gdb-multiarch']:
#
ensure => present,
#
}
vcsrepo
{
"
${src_path}
/wemo_firmware"
:
ensure
=>
latest
,
provider
=>
git
,
...
...
rpi_cleanup.sh
View file @
ec5afb5b
#!/bin/bash
set
-e
apt-get clean
echo
"stopping joule and lumen"
service joule stop
...
...
tests/apl_nilm_test_script.sh
0 → 100755
View file @
ec5afb5b
#!/bin/bash
export
LC_ALL
=
C.UTF-8
export
LANG
=
C.UTF-8
joule admin authorize
joule master add lumen 127.0.0.1
#----Module Configs----
#Demo Reader
cat
>
/etc/joule/module_configs/demo_reader.conf
<<
EOF
[Main]
exec_cmd = joule-random-reader
name = Demo Reader
[Arguments]
width = 2
rate = 10
[Inputs]
# a reader has no input streams
[Outputs]
output = /demo/Random Data
EOF
#Demo Filter
cat
>
/etc/joule/module_configs/demo_filter.conf
<<
EOF
[Main]
exec_cmd = joule-mean-filter
name = Demo Filter
[Arguments]
window = 11
[Inputs]
input = /demo/Random Data
[Outputs]
output = /demo/smoothed
EOF
#Visualizer
cat
>
/etc/joule/module_configs/visualizer.conf
<<
EOF
[Main]
exec_cmd = joule-visualizer-filter
name = User Interface
is_app = yes
[Arguments]
title = Quick Start Data Pipeline
[Inputs]
smoothed = /demo/smoothed
random = /demo/Random Data
EOF
#LabJack
cat
>
/etc/joule/module_configs/lj.conf
<<
EOF
[Main]
name = LabJack
exec_cmd = labjack_u3
[Arguments]
#valid values are [0-15]
channels = 0,1,2
#data rate in Hz
rate = 500
[Outputs]
output = /demo/LabJack Data
EOF
#Meter1 Capture and Meter1 Process
#created by nilm configure
#----Stream Configs----
#/demo/random
cat
>
/etc/joule/stream_configs/random.conf
<<
EOF
[Main]
name = Random Data
path = /demo
datatype = float32
keep = 1w
[Element1]
name = rand1
[Element2]
name = rand2
EOF
#/demo/smoothed
cat
>
/etc/joule/stream_configs/smoothed.conf
<<
EOF
[Main]
name = smoothed
path = /demo
datatype = float32
keep = 1w
[Element1]
name = filtered1
[Element2]
name = filtered2
EOF
#/demo/lj
cat
>
/etc/joule/stream_configs/lj.conf
<<
EOF
[Main]
name = LabJack Data
path = /demo
datatype = float32
keep = 1w
# [channels] number of elements
# units are voltages
[Element1]
name = Pot1
units = V
[Element2]
name = Floating
units = V
[Element3]
name = Pot2
units = V
#additional elements...
EOF
# meter configuration
#meters.yml
cat
>
/opt/configs/meters.yml
<<
EOF
meter1:
type: contact
path: /meters/contact
enabled: true # set to false to disable this meter
daq_type: labjack
ip_address: 172.31.33.6
phases: 2 # 1 - 3
sensors:
voltage:
sensor_indices: [3, 4] # maps to phase A,B,C
sensor_scales: 0.0919 # built-in constant
sinefit_phase: A # [A,B,C] voltage used by sinefit
nominal_rms_voltage: 120 # used to scale prep to watts
current:
sensor_indices: [0,1] # maps to phase A,B,C
sensor_scales: [0.0010090,0.00050452]
sinefit_rotations: [0,0] # relative to sinefit_phase voltage
filter:
enable: false
streams:
sinefit:
decimate: true # if [false] only the base stream will be saved
keep: 1m # how much data to keep as [amount][units]
iv: # h: hours, d: days, w: weeks
decimate: true # m: months, y: years
keep: 1w # if [false] no data will be saved
prep:
decimate: true
keep: 3w
nshift: 1
goertzel: false
sensor:
keep: false
meter2:
type: noncontact
path: /meters/noncontact # database location for meter streams
enabled: true # set to false to disable this meter
serial_number: meter2000 # found on the meter case
phases: 2 # 1 - 3
sensors:
voltage:
sensor_index: 7 # electric field sensor
digitally_integrate: false # if true, integrate using FIR filter
nominal_rms_voltage: 120 # used to scale the electric field
current: # --uncomment a line below, or customize--
sensor_indices: [0,1,2,3] # D-Board with 4 A-Boards
calibration:
duration: 9 # length of calibration in seconds
on_duration: 1
off_duration: 2
watts: 200 # power consumed by calibration load
has_neutral: true # [false] if the system has no neutral bus
streams:
sinefit:
decimate: true # if [false] only the base stream will be saved
keep: 1m # how much data to keep as [amount][units]
iv: # h: hours, d: days, w: weeks,
decimate: true # m: months, y: years
keep: 1w # if [false] no data will be saved
prep:
decimate: true
keep: 3w
nshift: 1
goertzel: false
sensor:
keep: false
EOF
#meter2.yml (calibration)
cat
>
/opt/configs/meters/meter2.yml
<<
EOF
current_matrix:
- - -0.00012125438257085366
- 0.013679350060842796
- 0.012167743200954548
- 0.00011571253227221393
- - 0.014798241213175594
- 5.03314331965079e-05
- 2.5566000089109125e-05
- 0.021480242055926087
duration: 9
has_neutral: true
off_duration: 2
on_duration: 1
pq_coeffs:
- - - -0.011621992054812813
- 0.003352649533804292
- - 0.999798742714013
- 0.02006175634082956
- - 0.8893134315159313
- 0.018254152891579608
- - 0.004598760118981981
- -0.002041876588625002
- - - 0.6888856214469614
- 0.01093614048128584
- - -0.0008472395183449421
- -0.001612130817487953
- - -0.0016074052596581833
- -0.004407350320724345
- - 0.9999080073416354
- 0.013563806769483603
sensor_matrix:
- - -0.47143977448979235
- 21.75075523821834
- - 40.80884144411953
- -0.02743516239650606
- - 36.29949144228311
- -0.05262827295894099
- - 0.1859606242595248
- 31.569933057364704
sinefit_rotations:
- 0.020063102307395508
- 0.013564222708336394
voltage_scale: 1.0
watts: 200
EOF
nilm configure
#start capture
service joule restart
echo
"================================"
echo
"Joule started, waiting 5 seconds"
echo
"================================"
sleep 5
joule module list
echo
"================================"
echo
"Demo Reader:"
joule module logs
"Demo Reader"
echo
"Demo Filter:"
joule module logs
"Demo Filter"
echo
"LabJack:"
joule module logs
"LabJack"
echo
"meter1 process:"
joule module logs
"meter1 process"
echo
"meter1 capture:"
joule module logs
"meter1 capture"
echo
"meter2 process:"
joule module logs
"meter2 process"
echo
"meter2 capture:"
joule module logs
"meter2 capture"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment