Commit 8256d078 by source_reader

reduce image size for nilm install, bug fixes

parent fb14bedd
......@@ -6,6 +6,7 @@ if [[ $# == 0 ]]; then
IMAGE_TYPE='default'
elif [[ $1 = "--nilm" ]]; then
echo "BUILDING NILM IMAGE"
apt remove --purge libreoffice-* -y
IMAGE_TYPE='nilm'
else
echo "Error, unknown type $1"
......
......@@ -3,7 +3,14 @@ set -e
# start a container with the following command:
# sudo systemd-nspawn -D squashfs-root/ -b --network-interface=enxd8eb97bdd8ed --bind-ro=/home/jdonnal/puppet:/home/ubuntu/puppet -M wattsworth
#if [ ! -f "/etc/hosts" ]; then
cat > /etc/hosts <<EOF
127.0.0.1 localhost
127.0.1.1 ubuntu-ww-builder
EOF
#fi
#echo "nameserver 172.31.33.1" > /etc/resolv.conf
apt-get update
apt-get upgrade -y
......
......@@ -25,4 +25,5 @@ rm -rf /root/.joule
rm -rf ~/.joule
echo "Remember to remove ubuntu user and /home/ubuntu!"
echo "Also check if any user with uid of 999 exists"
history -c
......@@ -4,12 +4,13 @@ View NILM documentation locally:
=== Source Code ===
--- Data Acquisition ---
nilm NILM data capture and analysis (sinefit, prep, etc)
nilmdb NilmDB timeseries database
nilmtools Utilities for NilmDB (Python 2.7)
ethstream Data acquistion from LabJack and NerdJack
labjack Joule module for LabJack U3
iv_sensor Firmware for noncontact sensors
wemo Software and Firmware for Belkin Smart plugs
*iv_sensor Firmware for noncontact sensors
*wemo Software and Firmware for Belkin Smart plugs
--- Wattsworth ---
joule Joule daemon and client
......@@ -25,4 +26,6 @@ metric_generator
--- Misc ---
puppet Scripts for building system images "sticks"
nilm_admin
\ No newline at end of file
nilm_admin
*To build these projects first extract /opt/asf.tar.gz to src/asf
\ No newline at end of file
......@@ -46,6 +46,12 @@ class docs::nilm(String $docs_path, String $owner){
source => "${git_cmd}/jim/nilmdb.git",
user => $owner,
}
vcsrepo{"${src_path}/nilm":
ensure => latest,
provider => git,
source => "${git_cmd}/wattsworth/nilm.git",
user => $owner,
}
vcsrepo{"${src_path}/ethstream":
ensure => latest,
provider => git,
......@@ -76,17 +82,15 @@ class docs::nilm(String $docs_path, String $owner){
source => "${git_cmd}/nilm/iv-sensor.git",
user => $owner,
}
$asf_cmd = "wget http://bucket.mit.edu/asf.tar.gz > /dev/null &&\
tar -xf asf.tar.gz -C ${src_path}/iv_sensor &&\
rm asf.tar.gz"
# $asf_cmd = "wget http://bucket.mit.edu/asf.tar.gz > /dev/null &&\
# tar -xf asf.tar.gz -C ${src_path}/iv_sensor &&\
# rm asf.tar.gz"
exec{"Atmel Software Framework":
command => $asf_cmd,
command => "curl http://bucket.mit.edu/asf.tar.gz > /opt/asf.tar.gz",
timeout => 0,
path => ['/bin', '/usr/sbin', '/usr/bin'],
require => Vcsrepo["${src_path}/iv_sensor"],
creates => "$src_path/iv_sensor/asf"
creates => "/opt/asf.tar.gz"
}
package{['gcc-arm-none-eabi','gdb-multiarch']:
ensure => present,
......
location /nilmdb {
include uwsgi_params;
uwsgi_pass unix:/tmp/nilmdb.sock;
client_max_body_size 0;
}
\ No newline at end of file
......@@ -4,10 +4,13 @@ class nilmdb::install{
package { $apt_pkgs:
ensure => present
}
package { 'python3-psutil': # this should be installed by pip
ensure => absent
}
package { $pip_pkgs:
provider => pip3,
ensure => present,
require => Package[$apt_pkgs]
require => Package[$apt_pkgs, 'python3-psutil']
}
$pip_url='https://pypi.wattsworth.net/'
......
#!/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
......@@ -135,6 +142,7 @@ 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:
......@@ -147,6 +155,8 @@ meter1:
sensor_indices: [2,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
......@@ -157,6 +167,8 @@ meter1:
prep:
decimate: true
keep: 3w
nshift: 1
goertzel: false
sensor:
keep: false
......@@ -175,6 +187,8 @@ meter2:
sensor_indices: [1,3,5,7] # 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:
......@@ -187,6 +201,8 @@ meter2:
prep:
decimate: true
keep: 3w
nshift: 1
goertzel: false
sensor:
keep: false
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