Commit 87602c38 by John Donnal

auto doc rebuild

parent d101dbd3
......@@ -3,7 +3,7 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Joule: Modular Data Processing
=================================
......@@ -21,23 +21,22 @@ bugs and find bottlenecks in processing pipelines.
.. toctree::
:maxdepth: 2
:maxdepth: 3
concepts
install
getting_started
writing_modules
testing_modules
nilm
nilmdb
reference
Contributing & Running Tests
----------------------------
Contribution is always welcome. Please include tests with your pull request.
Contribution is always welcome. Please include tests with your pull request.
Unittests can be run using nose2, see **joule/htmlcov** for code coverage.
.. code-block:: bash
$> cd joule
$> nose2 # run all unittests
......@@ -47,8 +46,8 @@ https://docs.docker.com/compose/install/ for details on installing
docker-compose. The NilmDB container is available by request on `Docker Hub`_.
.. code-block:: bash
$> cd test/e2e
$> ./runner.sh # run end-to-end tests
.. _Docker Hub: https://hub.docker.com/
......@@ -141,6 +141,14 @@ Download and Install Source
This will install python3.5 into **/usr/local/bin**
Install matplotlib, numpy and scipy. These must be built from source so you need to
get the dependencies before running pip. Edit ``/etc/apt/sources.list`` to include a
source entry like ``deb-src``. Then run the following commands:
.. code-block:: bash
$> sudo apt-get build-dep python3-scipy python3-numpy python3-matplotlib
$> sudo pip3 install numpy matplotlib scipy
VirtualEnv
^^^^^^^^^^
......
.. toctree::
Introduction
Database Reference
==================
Joule uses a NilmDB database instance to store data streams. NilmDB was developed
at MIT by Dr. James Paris. Full documentation is available in his thesis available
at `MIT DSpace <https://dspace.mit.edu/handle/1721.1/84720>`_. This documentation
covers the command line interface for interacting the the Joule NilmDB instance.
Command-line arguments can often be supplied in both short and long
forms, and many arguments are optional. The following documentation uses these
conventions:
* An argument that takes an additional parameter is denoted ``-f FILE``.
* The syntax ``-f FILE, --file FILE`` indicates that either the short form (-f) or long form (--file) can be used interchangeably.
* Square brackets (``[]``) denote optional arguments.
* Pipes (``A|B``) indicate that either ``A`` or ``B`` can be specified, but not both.
* Curly braces (``{}``) indicate a list of mutually-exclusive argument choices.
Many of the programs support arguments that represent a NilmDB timestamp. This
timestamp is specified as a free-form string, as supported by the **parse_time**
client library function, described in Section 3.2.2.4 of the NilmDB reference
guide. Examples of accepted formats are shown in Table 3-19 on page 133 of that
document.
``nilmtool``
------------
Tools for interacting with the database are wrapped in ``nilmtool``, a
monolithic multi-purpose program that provides command-line access to most of
the NilmDB functionality. Global operation is described first followed by
specific documentation for each subcommand.
The command-line syntax provides the ability to execute sub- commands: first,
global arguments that affect the behavior of all subcommands can be specified,
followed by one subcommand name, followed by arguments for that subcommand. Each
defines its own arguments and is documented below.
Usage::
nilmtool [-h] [-v] [-u URL]
{help,info,create,rename,list,intervals,metadata,insert,extract,remove,destroy}
...
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd> (default: http://localhost/nilmdb/) NilmDB server URL. Must be specified before the subcommand.</dd>
<dt>subcommand ...</dt><dd>The subcommand to run, followed by its arguments. This is required.</dd>
<dt>-h, --help</dt><dd>Print a help message with Usage information and details on all supported command-line arguments. This can also be specified after the subcom- mand, in which case the Usage and arguments of the subcommand are shown instead.</dd>
<dt>-v, --version</dt><dd>Print the nilmtool version.</dd>
</dl>
</div>
Environment Variables:
Some behaviors of nilmtool subcommands can be configured via environment variables.
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>NILMDB_URL</dt><dd> (default: http://localhost/nilmdb/) The default URL of the NilmDB server. This is used if --url is not specified, and can be set as an environment variable to avoid the need to specify it on each invocation of nilmtool.</dd>
<dt>TZ</dt><dd>(default: system default timezone) The timezone to use when parsing or displaying times. This is usually of the form America/New_York, using the standard TZ names from the IANA
Time Zone Database</dd>
</dl>
</div>
``nilmtool help``
+++++++++++++++++
Print more specific help for a subcommand. nilmtool help subcommand is the same as nilmtool subcommand ``--help``.
Usage::
nilmtool help [-h] subcommand
``nilmtool info``
+++++++++++++++++
Print server information such as software versions, database location, and disk space Usage.
Usage::
nilmtool info [-h]
Example
.. code-block:: bash
$> nilmtool info
Client version: 1.9.7
Server version: 1.9.7
Server URL: http://localhost/nilmdb/
Server database path: /home/nilmdb/db
Server disk space used by NilmDB: 143.87 GiB
Server disk space used by other: 378.93 GiB
Server disk space reserved: 6.86 GiB
Server disk space free: 147.17 GiB
``nilmtool create``
+++++++++++++++++++
Create a new empty stream at the specified path and with the specified layout.
Usage::
nilmtool create [-h] PATH LAYOUT
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the new stream. Stream paths are similar to filesystem paths and must contain at least two components. For example, /foo/bar.</dd>
<dt>LAYOUT</dt><dd>Layout for the new stream. Layouts are of the form &lt;type&gt;_&lt;count&gt;. The &lt;type&gt; is one of those described in Section 2.2.3 of the <a href="#">NilmDB Reference Guide</a>, such as uint16, int64, or float32. &lt;count&gt; is a numeric count of how many data elements there are, per row. Streams store rows of homogeneous data only, and the largest supported &lt;count&gt; is 1024. Generally, counts should fall within a much lower range, typically between 1 and 32. For example, float32_8.</dd>
</dl>
</div>
``nilmtool rename``
+++++++++++++++++++
Rename or relocate a stream in the database from one path to another. Metadata and intervals, if any, are relocated to the new path name.
Usage::
nilmtool rename [-h] OLDPATH NEWPATH
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>OLDPATH</dt><dd>Old existing stream path, e.g. /foo/old</dd>
<dt>NEWPATH</dt><dd>New stream path, e.g. /foo/bar/new</dd>
</dl>
</div>
Notes
Metadata contents are not changed by this operation. Any software tools that
store and use path names stored in metadata keys or values will need to update
them accordingly.
``nilmtool list``
+++++++++++++++++
List streams available in the database, optionally filtering by path, and
optionally including extended stream info and intervals.
Usage::
nilmtool list [-h] [-E] [-d] [-s TIME] [-e TIME] [-T] [-l] [-n]
[PATH [PATH ...]]
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>(default: *) If paths are specified, only streams that
match the given paths are shown. Wildcards are accepted; for example,
/sharon/* will list all streams with a path beginning with /sharon/.
Note that, to prevent wildcards from being interpreted by the shell,
they should be quoted at the command line; for example:
<pre>
$> nilmtool list "/sharon/*"
$> nilmtool list "*raw"</textarea></pre>
</dd>
<dt>-E, --ext</dt><dd>Show extended stream information, like interval extents, total rows of data present, and total amount of time covered by the stream’s intervals.</dd>
<dt>-T, --timestamp-raw</dt><dd>When displaying timestamps in the output, show raw timestamp values from the NilmDB database rather than converting to human-readable times. Raw values are typically measured in microseconds since the Unix time epoch (1970/01/01 00:00 UTC).</dd>
<dt>-l, --layout</dt><dd>Display the stream layout next to the path name.</dd>
<dt>-n, --no-decim</dt><dd>Omit streams with paths containing the string ``~decim-``, to avoid cluttering the output with decimated streams.</dd>
<dt>-d, --detail</dt><dd>In addition to the normal output, show the time intervals present in each stream. See also nilmtool intervals in Section 3.2.3.7 of the <a href="#">NilmDB Reference Guide</a>, which can display more details about the intervals.</dd>
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp for intervals (free-form, inclusive).</dd>
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp for intervals (free-form, noninclusive).</dd>
</dl>
</div>
``nilmtool intervals``
++++++++++++++++++++++
List intervals in a stream, similar to ``nilmtool list --detail``, but with
options for calculating set-differences between intervals of two streams, and
for optimizing the output by joining adjacent intervals.
Usage::
nilmtool intervals [-h] [-d PATH] [-s TIME] [-e TIME] [-T] [-o] PATH
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>List intervals for this path.</dd>
<dt>-d DIFFPATH, --diff DIFFPATH</dt><dd>(default: none) If specified, perform a set-difference by subtract the intervals in this path; that is, only show interval ranges that are present in the original path but not present in diffpath.</dd>
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp for intervals (free-form, inclusive).</dd>
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp for intervals (free-form, noninclusive).</dd>
<dt>-T, --timestamp-raw</dt><dd>(default: min) (default: max) When displaying timestamps in the output, show raw timestamp values from the NilmDB database rather than converting to human-readable times. Raw values are typically measured in microseconds since the Unix time epoch (1970/01/01 00:00 UTC).</dd>
<dt>-o, --optimize</dt><dd>Optimize the interval output by merging adjacent intervals. For example, the two intervals [1 → 2⟩ and [2 → 5⟩ would be displayed as one interval [1 → 5⟩.</dd>
</dl>
</div>
``nilmtool metadata``
+++++++++++++++++++++
Get, set, update, or delete the key/value metadata associated with a stream.
Usage::
nilmtool metadata path [-g [key ...] | -s key=value [...] | -u key=value [...]] | -d [key ...]
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the stream for which to manage metadata. Required, and must be specified before the action arguments.</dd>
</dl>
</div>
Action Arguments: These actions are mutually exclusive.
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>-g [KEY ...], --get [KEY ...]</dt><dd>(default: all) Get and print metadata for the specified key(s). If none are specified, print metadata for all keys. Keys are printed as key=value, one per line.</dd>
<dt>-s [KEY=VALUE ...], --set [KEY=VALUE ...]</dt><dd>Set metadata. Keys and values are specified as a key=value string. This replaces all existing metadata on the stream with the provided keys; any keys present in the database but not specified on the command line are removed.</dd>
<dt>-u [KEY=VALUE ...], --update [KEY=VALUE ...]</dt><dd>Update metadata. Keys and values are specified as a key=value string. This is similar to --set, but only adds or changes metadata keys; keys that are present in the database but not specified on the command line are left unchanged.</dd>
<dt>-d [KEY ...], --delete [KEY ...]</dt><dd>(default: all) Delete metadata for the specified key(s). If none are specified, delete all metadata for the stream. </dd>
</dl>
</div>
Example::
$> nilmtool metadata /temp/raw --set "location=Honolulu, HI" "source=NOAA"
$> nilmtool metadata /temp/raw --get
location=Honolulu, HI
source=NOAA
$> nilmtool metadata /temp/raw --update "units=F"
location=Honolulu, HI
source=NOAA
units=F
``nilmtool insert``
+++++++++++++++++++
Insert data into a stream. This is a relatively low-level interface analogous to
the /stream/insert HTTP interface described in Section 3.2.1.13 on the <a
href="#">NilmDB Reference Guide</a>. This is the program that should be used
when a fixed quantity of text-based data is being inserted into a single
interval, with a known start and end time. If the input data does not already
have timestamps, they can be optionally added based on the start time and a
known data rate. In many cases, using the separate ``nilm-insert`` program is
preferable, particularly when dealing with large amounts of pre-recorded data,
or when streaming data from a live source.
Usage::
nilmtool insert [-h] [-q] [-t] [-r RATE] [-s TIME | -f] [-e TIME]
path [file]
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the stream into which to insert data. The format of the input data must match the layout of the stream.</dd>
<dt>FILE</dt><dd>(default: standard input) Input data filename, which must be formatted as uncompressed plain text. Default is to read the input from stdin.</dd>
<dt>-q, --quiet</dt><dd>Suppress printing unnecessary messages.</dd>
</dl>
</div>
<i>Timestamping</i>: To add timestamps to data that does not already have it, specify both of these arguments. The added timestamps are based on the interval start time and the given data rate.
<div class="block-indent">
<dl class="arglist">
<dt>-t, --timestamp</dt><dd>Add timestamps to each line</dd>
<dt>-r RATE, --rate RATE</dt><dd> Data rate, in Hz</dd>
</dl>
</div>
<i>Start Time</i>: The start time may be manually specified, or it can be determined from the input filename, based on the following options.
<div class="block-indent">
<dl class="arglist">
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp for the new interval (free-form, inclusive)</dd>
<dt>-f, --filename</dt><dd>Use filename to determine start time</dd>
</dl>
</div>
<i>End Time</i>: The ending time should be manually specified. If timestamps are being added, this can be omitted, in which case the end of the interval is set to the last timestamp plus one microsecond.
<div class="block-indent">
<dl class="arglist">
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp for the new interval (free-form, noninclusive)</dd>
</dl>
</div>
``nilmtool extract``
++++++++++++++++++++
Extract rows of data from a specified time interval in a stream, or output a
count of how many rows are present in the interval.
Usage::
nilmtool extract [-h] -s TIME -e TIME [-B] [-b] [-a] [-m] [-T] [-c]
path
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the stream from which to extract data.</dd>
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp to extract (free-form, inclusive)</dd>
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp to extract (free-form, noninclusive)</dd>
</dl>
</div>
<i>Output Formatting</i>
<div class="block-indent">
<dl class="arglist">
<dt>-B, --binary</dt><dd>Output raw binary data instead of the usual text format. For details on the text and binary formatting, see the documentation of HTTP call /stream/insert in Section 3.2.1.13.</dd>
<dt>-b, --bare</dt><dd>Omit timestamps from each line of the output.</dd>
<dt>-a, --annotate</dt><dd>Include comments at the beginning of the output with information about the stream. Comments are lines beginning with #.</dd>
<dt>-m, --markup</dt><dd>Include comments in the output with information that denotes where the stream’s internal intervals begin and end. See the documentation of the markup parameter to HTTP call /stream/extract in Section 3.2.1.14 for details on the format of the comments.</dd>
<dt>-T, --timestamp-raw</dt><dd>Use raw integer timestamps in the --annotate output instead of human- readable strings.</dd>
<dt>-c, --count</dt><dd>Instead of outputting the data, output a count of how many rows are present in the given time interval. This is fast as it does not transfer the data from the server.</dd>
</dl>
</div>
``nilmtool remove``
+++++++++++++++++++
Remove all data from a specified time range within the stream at /PATH/.
Multiple streams may be specified, and wildcards are supported; the same time
range will be removed from all matching streams.
Usage::
nilmtool remove [-h] -s TIME -e TIME [-q] [-c] path [path ...]
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd> Path(s) of streams. Wildcards are supported. At least one path must provided.</dd>
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp of data to remove (free-form, inclusive, required).</dd>
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp of data to remove (free-form, noninclusive, required).</dd>
</dl>
</div>
<i>Output Format</i>
<div class="block-indent">
<dl class="arglist">
<dt>-q, --quiet</dt><dd>By default, matching path names are printed when removing from multiple paths. With this option, path names are not printed.</dd>
<dt>-c, --count</dt><dd>Display a count of the number of rows of data that were removed from each path.</dd>
</dl>
</div>
Example::
$ nilmtool remove -s @1364140671600000 -e @1364141576585000 -c "/sh/raw*"
Removing from /sh/raw
7239364
Removing from /sh/raw~decim-4
1809841
Removing from /sh/raw~decim-16
452460
``nilmtool destroy``
++++++++++++++++++++
Destroy the stream at the specified path(s); the opposite of nilmtool create.
Metadata related to the stream is permanently deleted. All data must be removed
before a stream can be destroyed. Wildcards are supported.
Usage::
nilmtool destroy [-h] [-R] [-q] path [path ...]
Arguments
.. raw:: html
<div class="block-indent" style="padding-bottom: 30px">
<dl class="arglist">
<dt>PATH</dt><dd>Path(s) of streams. Wildcards are supported. At least one path must provided.</dd>
<dt>-R, --remove</dt><dd>If specified, all data is removed before destroying the stream. Equivalent to first running <span class="mono">nilmtool remove -s min -e max path``.</dd>
<dt>-q, --quiet</dt><dd>Don’t display names when destroying multiple paths</dd>
</dl>
</div>
``nilm-copy``
-------------
Copy data and metadata from one stream to another. The source and destination
streams can reside on different servers. Both streams must have the same layout.
Only regions of time that are present in the source, and not yet present in the
destination, are processed. This program can therefore be re-run with the same
command-line arguments multiple times, and it will only process the newly
available data each time.
Usage::
nilm-copy [-h] [-v] [-u URL] [-U DEST_URL] [-D] [-F] [-s TIME]
[-e TIME] [-n] [-x]
srcpath destpath
Arguments
.. raw-html::
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd> (default: http://localhost/nilmdb/) NilmDB server URL for the source stream.</dd>
<dt>-U DESTURL, --dest-url DESTURL</dt><dd> (default: same as URL) NilmDB server URL for the destination stream. If unspecified, the same URL is used for both source and destination.</dd>
<dt>-D, --dry-run</dt><dd>Just print intervals that would be processed, and exit.</dd>
<dt>-F, --force-metadata</dt><dd>Metadata is copied from the source to the destination. By default, an error is returned if the destination stream metadata conflicts with the source stream metadata. Specify this flag to always overwrite the destination values with those from the source stream.</dd>
<dt>-n, --nometa</dt><dd>Don’t copy or check metadata at all.</dd>
<dt>-s TIME, --start TIME</dt><dd>(default: min) Starting timestamp of data to copy (free-form, inclusive).</dd>
<dt>-e TIME, --end TIME</dt><dd>(default: max) Ending timestamp of data to copy (free-form, noninclusive).</dd>
<dt>SRCPATH</dt><dd>Path of the source stream (on the source server).</dd>
<dt>DESTPATH</dt><dd>Path of the destination stream (on the destination server).</dd>
</dl>
</div>
``nilm-copy-wildcard``
----------------------
Copy data and metadata, from multiple streams, between two servers. Similar to nilm-copy, except:
* Wildcards and multiple paths are supported in the stream names.
* Streams must always be copied between two servers.
* Stream paths must match on the source and destination server.
* If a stream does not exist on the destination server, it is created with the correct layout automatically.
Usage::
nilm-copy-wildcard [-h] [-v] [-u URL] [-U DEST_URL] [-D] [-F] [-s TIME]
[-e TIME] [-n] [-x]
path [path ...]
Arguments
.. raw-html::
<div class="block-indent">
Most arguments are identical to those of nilm-copy (reference it for more details).
<dl class="arglist">
<dt>PATHS</dt><dd>Path(s) to copy from the source server to the destination server. Wildcards are accepted.</dd>
</dl>
</div>
Example::
$ nilm-copy-wildcard -u http://bucket/nilmdb -U http://pilot/nilmdb /bp/startup*
Source URL: http://bucket/nilmdb/
Dest URL: http://pilot/nilmdb/
Creating destination stream /bp/startup/info
Creating destination stream /bp/startup/prep-a
Creating destination stream /bp/startup/prep-a~decim-4
Creating destination stream /bp/startup/prep-a~decim-16
# ... etc
``nilm-decimate``
-----------------
Decimate the stream at SRCPATH and write the output to DESTPATH. The
decimation operation is described in Section 2.4.1; in short, every FACTOR rows
in the source are consolidated into one row in the destination, by calculating
the mean, minimum, and maximum values for each column. This program
detects if the stream at SRCPATH is already decimated, by the presence of a
decimate_source metadata key. If present, subsequent decimations take the
existing mean, minimum, and maximum values into account, and the output has the
same number of columns as the input. Otherwise, for the first level of
decimation, the output has three times as many columns as the input. See
also nilm-decimate-auto (Section 3.4.2.5) for a simpler method of decimating a
stream by multiple levels.
Usage::
nilm-decimate [-h] [-v] [-u URL] [-U DEST_URL] [-D] [-F] [-s TIME]
[-e TIME] [-n] [-f FACTOR]
srcpath destpath
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd>(default: http://localhost/nilmdb/) NilmDB server URL for the source stream.</dd>
<dt>-U DESTURL, --dest-url DESTURL</dt><dd>(default: same as URL) NilmDB server URL for the destination stream. If unspecified, the same URL is used for both source and destination.</dd>
<dt>-D, --dry-run</dt><dd>Just print intervals that would be processed, and exit.</dd>
<dt>-F, --force-metadata</dt><dd>Overwrite destination metadata even if it conflicts with the values in the “metadata” section below.</dd>
<dt>-s TIME, --start TIME</dt><dd>(default: min) Starting timestamp of data to decimate (free-form, inclusive).</dd>
<dt>-e TIME, --end TIME</dt><dd>(default: max) Ending timestamp of data to decimate (free-form, noninclusive).</dd>
<dt>-f FACTOR, --factor FACTOR</dt><dd>(default: 4) Set the decimation factor. For a source stream with n rows, the output stream will have n/FACTOR rows.</dd>
<dt>SRCPATH</dt><dd>Path of the source stream (on the source server).</dd>
<dt>DESTPATH</dt><dd>Path of the destination stream (on the destination server).</dd>
</dl>
</div>
The destination stream has the following metadata keys added:
decimate_source
The source stream from which this data was decimated.
decimate_factor
The decimation factor used.
``nilm-decimate-auto``
----------------------
Automatically create multiple decimation levels using from a single source
stream, continuing until the last decimated level contains fewer than 500 rows
total. Decimations are performed using nilm-decimate (Section 3.4.2.4).
Wildcards and multiple paths are accepted. Destination streams are automatically
named based on the source stream name and the total decimation factor; for
example, ``/test/raw~decim-4``, ``/test/raw~decim-16``, etc. Streams containing
the string "``~decim-``" are ignored when matching wildcards.
Usage::
nilm-decimate-auto [-h] [-v] [-u URL] [-f FACTOR] [-F] [--fast]
path [path ...]
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd> (default: http://localhost/nilmdb/) NilmDB server URL for the source and destination streams.</dd>
<dt>-F, --force-metadata</dt><dd>Overwrite destination metadata even if it conflicts with the values in the “metadata” section above.</dd>
<dt>-f FACTOR, --factor FACTOR</dt><dd>(default: 4) Set the decimation factor. Each decimation level will have 1/FACTOR as many rows as the previous level.</dd>
<dt>PATH [...]</dt><dd>One or more paths to decimate. Wildcards are accepted.</dd>
</dl>
</div>
``nilm-insert``
---------------
Insert a large amount of text-formatted data from an external source like
ethstream. This is a higher-level tool than nilmtool insert in that it attempts
to intelligently manage timestamps. The general concept is that it tracks two
timestamps:
1. The data timestamp is the precise timestamp corresponding to a particular row of data, and is the timestamp that gets inserted into the database. It increases by data_delta for every row of input. data_delta can come from one of two sources. If --delta is specified, it is pulled from the first column of data. If --rate is specified, data_delta is set to a fixed value of 1/RATE.
2. The clock timestamp is the less precise timestamp that gives the absolute time. It can come from two sources. If --live is specified, it is pulled directly from the system clock. If --file is specified, it is extracted from the input file every time a new file is opened for read, and from comments that appear in the files.
Small discrepancies between data and clock are ignored. If the data timestamp ever differs from the clock timestamp by more than max_gap seconds:
* If data is running behind, there is a gap in the data, so the timestamp is stepped forward to match clock.
* If data is running ahead, there is overlap in the data, and an error is returned. If --skip is specified, then instead of returning an error, data is dropped and the remainder of the current file is skipped.
Usage::
nilm-insert [-h] [-v] [-u URL] [-D] [-s] [-m SEC] [-r RATE | -d]
[-l | -f] [-o SEC] [-O SEC]
path [infile [infile ...]]
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd> (default: http://localhost/nilmdb/) NilmDB server URL.</dd>
<dt>-D, --dry-run</dt><dd>Parse files and print information, but don’t insert any data. Useful for verification before making changes to the database.</dd>
<dt>-s, --skip</dt><dd>Skip the remainder of input files if the data timestamp runs too far ahead of the clock timestamp. Useful when inserting a large directory of existing files with inaccurate timestamps.</dd>
<dt>-m SEC, --max-gap SEC</dt><dd>(default: 10.0) Maximum discrepancy between the clock and data timestamps.</dd>
</dl>
</div>
<i>Data timestamp</i>
<div class="block-indent">
<dl class="arglist">
<dt>-r RATE, --rate RATE</dt><dd>(default: 8000.0) data_delta is constant 1/RATE (in Hz).</dd>
<dt>-d, --delta</dt><dd>data_delta is provided as the first number on each input line.</dd>
</dl>
</div>
<i>Clock timestamp</i>
<div class="block-indent">
<dl class="arglist">
<dt>-l, --live</dt><dd>Use the live system time for the clock timestamp. This is most useful when piping in data live from a capture device.</dd>
<dt>-f, --file</dt><dd>Use filename and file comments for the clock timestamp. This is most useful when reading previously saved data.</dd>
<dt>-o SEC, --offset-filename SEC</dt><dd>(default: −3600.0) Offset to add to timestamps in filenames, when using --file. The default accounts for the existing practice of naming capture files based on the end of the hour in which they were recorded. The filename timestamp plus this offset should equal the time that the first row of data in the file was captured.</dd>
<dt>-O SEC, --offset-comment SEC</dt><dd>(default: 0.0) Offset to add to timestamps in comments, when using --file. The comment timestamp plus this offset should equal the time that the next row of data was captured.</dd>
</dl>
</div>
<i>Path and Input</i>
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the stream into which to insert data. The layout of the path must match the input data.</dd>
<dt>INFILE [...]</dt><dd>(default: standard input) Input data filename(s). Filenames ending with .gz are transparently decompressed as they are read. The default is to read the input from stdin.</dd>
</dl>
</div>
.. DANGER::
The following tools provide low level access to the NILM and are not
required for normal system use. Be careful running them as they may
corrupt the database or cause loss of data.
``nilmdb-server``
-----------------
Run a standalone NilmDB server. Note that the NilmDB server is typically run
as a WSGI process managed by Apache. This program runs NilmDB
using a built-in web server instead.
Usage::
nilmdb-server [-h] [-v] [-a ADDRESS] [-p PORT] [-d DATABASE] [-q] [-t]
[-y]
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>-v, --version</dt><dd> Print the installed NilmDB version.</dd>
<dt>-a ADDRESS, --address ADDRESS</dt><dd> (default: 0.0.0.0) Only listen on the given IP address. The default is to listen on all addresses.</dd>
<dt>-p PORT, --port PORT</dt><dd>(default: 12380) Listen on the given TCP port.</dd>
<dt>-d DATABASE, --database DATABASE</dt><dd>(default: ./db) Local filesystem directory of the NilmDB database.</dd>
<dt>-q, --quiet</dt><dd>Silence output.</dd>
</dl>
</div>
<i>Debug Options</i>
<div class="block-indent">
<dl class="arglist">
<dt>-t, --traceback</dt><dd>Provide tracebacks in the error response for client errors (HTTP status codes 400 - 499). Normally, tracebacks are only provided for server errors (HTTP status codes 500 - 599).</dd>
<dt>-y, --yappi</dt><dd>Run under the yappi profiler and invoke an interactive shell afterwards. Not intended for normal operation.</dd>
</dl>
</div>
``nilmdb-fsck``
---------------
Check database consistency, and optionally repair errors automatically, when
possible. Running this may be necessary after an improper shutdown or other
corruption has occurred. This program will refuse to run if the database is
currently locked by any other process, like the Apache webserver; such programs
should be stopped first. This is run automatically on system boot for the Joule
database.
Usage::
nilmdb-fsck [-h] [-v] [-f] [-n] database
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>DATABASE</dt><dd>Local filesystem directory of the NilmDB database to check.</dd>
<dt>-f, --fix</dt><dd>Attempt to fix errors when possible. Note that this may involve removing intervals or data.</dd>
<dt>-n, --no-data</dt><dd>Skip the slow full-data check. The earlier, faster checks are likely to find most database corruption, so the data checks may be unnecessary.</dd>
<dt>-h, --help</dt><dd>Print a help message with Usage information and details.</dd>
<dt>-v, --version</dt><dd>Print the installed NilmDB version. Generally, you should ensure that the version of nilmdb-fsck is newer than the NilmDB version that created, or last used, the given database.</dd>
</dl>
</div>
``nilm-cleanup``
----------------
Clean up old data from streams, using a configuration file to specify which data
to remove. The configuration file is a text file in the following format::
[/stream/path]
keep = 3w # keep up to 3 weeks of data
rate = 8000 # optional, used for the --estimate option
decimated = false # whether to delete decimated data too
[*/wildcard/path]
keep = 3.5m # or 2520h or 105d or 15w or 0.29y
Stream paths are specified inside square brackets (``[]``) and are followed by configuration
keywords for the matching streams. Paths can contain wildcards. Supported keywords are:
``keep``
How much data to keep. Supported suffixes are h for hours, d for days, w for weeks, m for months, and y for years.
``rate``
(default: automatic) Expected data rate. Only used by the ``--estimate option``. If not specified, the rate is guessed based on the existing data in the stream.
``decimated``
(default: true) If true, delete decimated data too. For stream path /A/B, this includes any stream matching the wildcard /A/B~decim*. If specified as false, no special treatment is applied to such streams.
The value keep is a maximum amount of data, not a cutoff time. When cleaning
data, the oldest data in the stream will be removed, until the total remaining
amount of data is less than or equal to keep. This means that data older than
keep will remain if insufficient newer data is present; for example, if new data
ceases to be inserted, old data will cease to be deleted.
Usage::
nilm-cleanup [-h] [-v] [-u URL] [-y] [-e] configfile
Arguments
.. raw:: html
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd> (default: http://localhost/nilmdb/) NilmDB server URL.</dd>
<dt>-y, --yes</dt><dd>Actually remove the data. By default, nilm-cleanup only prints what it would have removed, but leaves the data intact.</dd>
<dt>-e, --estimate</dt><dd>Instead of removing data, print an estimated report of the maximum amount of disk space that will be used by the cleaned-up streams. This uses the on-disk size of the stream layout, the estimated data rate, and the space required by decimation levels. Streams not matched in the con- figuration file are not included in the total.</dd>
<dt>CONFIGFILE</dt><dd> Path to the configuration file. </dd>
</dl>
</div>
.command-title {
background: #DDD;
padding: 8px;
border-radius: 4px;
margin-top: 40px;
border-top: black;
border-style: solid;
border-width: 1px
}
.command-title>i {
font-style: normal;
font-weight: bold;
font-family: monospace;
}
.text-mono {
font-family: monospace;
}
.block-indent {
margin-left: 20px;
}
.text-grey {
color: #808080;
}
.arglist>dd {
margin: 0px;
margin-left: 30px;
}
.arglist>dt {
color: #808080;
font-weight: normal;
font-family: monospace;
}
.arglist {
margin-top: 0px;
margin-bottom: 0px;
}
.plainlist {
margin-bottom: 0px;
}
.plainlist>dd {
margin-left: 30px;
}
.plainlist>dt {
font-weight: normal;
font-family: monospace;
}
.plug-cli {
font-family: monospace;
background: #DDD;
display: block;
margin: 5px;
padding: 5px;
border-radius: 4px;
border-style: solid;
border-width: 1px;
border-color: #BBB
}
.mono-dl>dt {
font-family: monospace;
}
.arglist.dl-horizontal>dt {
width: inherit;
}
.arglist.dl-horizontal>dd {
margin-left: 130px;
}
.command {
font-family: monospace;
color: #808080
}
.command>em {
font-weight: bold;
font-style: normal;
color: black;
}
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -157,7 +158,7 @@ with a consume module. See reference section for details on the pipe API.</p>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="writing_modules.html">Writing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
......
......@@ -11,6 +11,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -72,11 +73,10 @@
<h3>Navigation</h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="concepts.html">Joule Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="writing_modules.html">Writing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
......
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -247,7 +248,7 @@ $&gt; nilmtool list -E -n /demo/*
</li>
<li class="toctree-l1"><a class="reference internal" href="writing_modules.html">Writing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
......
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -62,13 +63,6 @@ bugs and find bottlenecks in processing pipelines.</p>
<li class="toctree-l2"><a class="reference internal" href="concepts.html#pipes">Pipes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="install.html#install-nilmdb">Install NilmDb</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#install-python-3-5">Install Python 3.5</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#install-joule">Install Joule</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#verify-installation">Verify Installation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a><ul>
<li class="toctree-l2"><a class="reference internal" href="getting_started.html#a-reader-module">A Reader Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="getting_started.html#a-filter-module">A Filter Module</a></li>
......@@ -80,21 +74,66 @@ bugs and find bottlenecks in processing pipelines.</p>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a><ul>
<li class="toctree-l2"><a class="reference internal" href="testing_modules.html#unit-testing">Unit Testing</a></li>
<li class="toctree-l2"><a class="reference internal" href="testing_modules.html#end-to-end-testing">End-to-End Testing</a></li>
<li class="toctree-l2"><a class="reference internal" href="testing_modules.html#unit-testing">Unit Testing</a><ul>
<li class="toctree-l3"><a class="reference internal" href="testing_modules.html#readermodules">ReaderModules</a></li>
<li class="toctree-l3"><a class="reference internal" href="testing_modules.html#filtermodules">FilterModules</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="testing_modules.html#end-to-end-testing">End-to-End Testing</a><ul>
<li class="toctree-l3"><a class="reference internal" href="testing_modules.html#configuration-files">Configuration Files</a></li>
<li class="toctree-l3"><a class="reference internal" href="testing_modules.html#test-py">test.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nilmdb.html#nilmtool"><code class="docutils literal"><span class="pre">nilmtool</span></code></a><ul>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-help"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">help</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-info"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">info</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-create"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">create</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-rename"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">rename</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-list"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">list</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-intervals"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">intervals</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-metadata"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">metadata</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-insert"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">insert</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-extract"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">extract</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-remove"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">remove</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="nilmdb.html#nilmtool-destroy"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">destroy</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nilm.html#installation">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="nilm.html#configuration">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="nilm.html#verify-operation">Verify Operation</a></li>
<li class="toctree-l2"><a class="reference internal" href="nilmdb.html#nilm-copy"><code class="docutils literal"><span class="pre">nilm-copy</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="nilmdb.html#nilm-copy-wildcard"><code class="docutils literal"><span class="pre">nilm-copy-wildcard</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="nilmdb.html#nilm-decimate"><code class="docutils literal"><span class="pre">nilm-decimate</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="nilmdb.html#nilm-decimate-auto"><code class="docutils literal"><span class="pre">nilm-decimate-auto</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="nilmdb.html#nilm-insert"><code class="docutils literal"><span class="pre">nilm-insert</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="nilmdb.html#nilmdb-server"><code class="docutils literal"><span class="pre">nilmdb-server</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="nilmdb.html#nilmdb-fsck"><code class="docutils literal"><span class="pre">nilmdb-fsck</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="nilmdb.html#nilm-cleanup"><code class="docutils literal"><span class="pre">nilm-cleanup</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="reference.html#command-line-utilities">Command Line Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#configuration-files">Configuration Files</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#numpy-pipes">Numpy Pipes</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#e2e-utilities">E2E Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#command-line-utilities">Command Line Utilities</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference.html#joule">joule</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference.html#jouled">jouled</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference.html#nilmtool">nilmtool</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#configuration-files">Configuration Files</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference.html#main-conf">main.conf</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference.html#stream-configs">stream configs</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference.html#module-configs">module configs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#numpy-pipes">Numpy Pipes</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference.html#concepts">Concepts</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#e2e-utilities">E2E Utilities</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference.html#id3">joule</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference.html#id4">nilmtool</a></li>
</ul>
</li>
</ul>
</li>
</ul>
......@@ -141,11 +180,10 @@ $&gt; ./runner.sh <span class="c1"># run end-to-end tests</span>
<h3>Navigation</h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="concepts.html">Joule Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="writing_modules.html">Writing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
......
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -26,8 +27,6 @@
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Getting Started" href="getting_started.html" />
<link rel="prev" title="Joule Concepts" href="concepts.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
......@@ -146,6 +145,13 @@ $&gt; sudo make install
</pre></div>
</div>
<p>This will install python3.5 into <strong>/usr/local/bin</strong></p>
<p>Install matplotlib, numpy and scipy. These must be built from source so you need to
get the dependencies before running pip. Edit <code class="docutils literal"><span class="pre">/etc/apt/sources.list</span></code> to include a
source entry like <code class="docutils literal"><span class="pre">deb-src</span></code>. Then run the following commands:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; sudo apt-get build-dep python3-scipy python3-numpy python3-matplotlib
$&gt; sudo pip3 install numpy matplotlib scipy
</pre></div>
</div>
<div class="section" id="virtualenv">
<h3>VirtualEnv<a class="headerlink" href="#virtualenv" title="Permalink to this headline"></a></h3>
<p>You may optionally install Joule into a virtual environment, this is
......@@ -283,19 +289,12 @@ the python3.5 binaries in <strong>/usr/local/bin/</strong></td></tr>
<h3>Navigation</h3>
<ul class="current">
<ul>
<li class="toctree-l1"><a class="reference internal" href="concepts.html">Joule Concepts</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#install-nilmdb">Install NilmDb</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-python-3-5">Install Python 3.5</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-joule">Install Joule</a></li>
<li class="toctree-l2"><a class="reference internal" href="#verify-installation">Verify Installation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="writing_modules.html">Writing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
......@@ -303,8 +302,6 @@ the python3.5 binaries in <strong>/usr/local/bin/</strong></td></tr>
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="concepts.html" title="previous chapter">Joule Concepts</a></li>
<li>Next: <a href="getting_started.html" title="next chapter">Getting Started</a></li>
</ul></li>
</ul>
</div>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Database Reference &#8212; Joule 1.0.0 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.0.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Reference" href="reference.html" />
<link rel="prev" title="Testing Modules" href="testing_modules.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="toctree-wrapper compound">
</div>
<div class="section" id="database-reference">
<h1>Database Reference<a class="headerlink" href="#database-reference" title="Permalink to this headline"></a></h1>
<p>Joule uses a NilmDB database instance to store data streams. NilmDB was developed
at MIT by Dr. James Paris. Full documentation is available in his thesis available
at <a class="reference external" href="https://dspace.mit.edu/handle/1721.1/84720">MIT DSpace</a>. This documentation
covers the command line interface for interacting the the Joule NilmDB instance.</p>
<p>Command-line arguments can often be supplied in both short and long
forms, and many arguments are optional. The following documentation uses these
conventions:</p>
<ul class="simple">
<li>An argument that takes an additional parameter is denoted <code class="docutils literal"><span class="pre">-f</span> <span class="pre">FILE</span></code>.</li>
<li>The syntax <code class="docutils literal"><span class="pre">-f</span> <span class="pre">FILE,</span> <span class="pre">--file</span> <span class="pre">FILE</span></code> indicates that either the short form (-f) or long form (–file) can be used interchangeably.</li>
<li>Square brackets (<code class="docutils literal"><span class="pre">[]</span></code>) denote optional arguments.</li>
<li>Pipes (<code class="docutils literal"><span class="pre">A|B</span></code>) indicate that either <code class="docutils literal"><span class="pre">A</span></code> or <code class="docutils literal"><span class="pre">B</span></code> can be specified, but not both.</li>
<li>Curly braces (<code class="docutils literal"><span class="pre">{}</span></code>) indicate a list of mutually-exclusive argument choices.</li>
</ul>
<p>Many of the programs support arguments that represent a NilmDB timestamp. This
timestamp is specified as a free-form string, as supported by the <strong>parse_time</strong>
client library function, described in Section 3.2.2.4 of the NilmDB reference
guide. Examples of accepted formats are shown in Table 3-19 on page 133 of that
document.</p>
<div class="section" id="nilmtool">
<h2><code class="docutils literal"><span class="pre">nilmtool</span></code><a class="headerlink" href="#nilmtool" title="Permalink to this headline"></a></h2>
<p>Tools for interacting with the database are wrapped in <code class="docutils literal"><span class="pre">nilmtool</span></code>, a
monolithic multi-purpose program that provides command-line access to most of
the NilmDB functionality. Global operation is described first followed by
specific documentation for each subcommand.</p>
<p>The command-line syntax provides the ability to execute sub- commands: first,
global arguments that affect the behavior of all subcommands can be specified,
followed by one subcommand name, followed by arguments for that subcommand. Each
defines its own arguments and is documented below.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">u</span> <span class="n">URL</span><span class="p">]</span>
<span class="p">{</span><span class="n">help</span><span class="p">,</span><span class="n">info</span><span class="p">,</span><span class="n">create</span><span class="p">,</span><span class="n">rename</span><span class="p">,</span><span class="nb">list</span><span class="p">,</span><span class="n">intervals</span><span class="p">,</span><span class="n">metadata</span><span class="p">,</span><span class="n">insert</span><span class="p">,</span><span class="n">extract</span><span class="p">,</span><span class="n">remove</span><span class="p">,</span><span class="n">destroy</span><span class="p">}</span>
<span class="o">...</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd> (default: http://localhost/nilmdb/) NilmDB server URL. Must be specified before the subcommand.</dd>
<dt>subcommand ...</dt><dd>The subcommand to run, followed by its arguments. This is required.</dd>
<dt>-h, --help</dt><dd>Print a help message with Usage information and details on all supported command-line arguments. This can also be specified after the subcom- mand, in which case the Usage and arguments of the subcommand are shown instead.</dd>
<dt>-v, --version</dt><dd>Print the nilmtool version.</dd>
</dl>
</div><p>Environment Variables:</p>
<p>Some behaviors of nilmtool subcommands can be configured via environment variables.</p>
<div class="block-indent">
<dl class="arglist">
<dt>NILMDB_URL</dt><dd> (default: http://localhost/nilmdb/) The default URL of the NilmDB server. This is used if --url is not specified, and can be set as an environment variable to avoid the need to specify it on each invocation of nilmtool.</dd>
<dt>TZ</dt><dd>(default: system default timezone) The timezone to use when parsing or displaying times. This is usually of the form America/New_York, using the standard TZ names from the IANA
Time Zone Database</dd>
</dl>
</div><div class="section" id="nilmtool-help">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">help</span></code><a class="headerlink" href="#nilmtool-help" title="Permalink to this headline"></a></h3>
<p>Print more specific help for a subcommand. nilmtool help subcommand is the same as nilmtool subcommand <code class="docutils literal"><span class="pre">--help</span></code>.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">help</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="n">subcommand</span>
</pre></div>
</div>
</div>
<div class="section" id="nilmtool-info">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">info</span></code><a class="headerlink" href="#nilmtool-info" title="Permalink to this headline"></a></h3>
<p>Print server information such as software versions, database location, and disk space Usage.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">info</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span>
</pre></div>
</div>
<p>Example</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$&gt; nilmtool info
Client version: <span class="m">1</span>.9.7
Server version: <span class="m">1</span>.9.7
Server URL: http://localhost/nilmdb/
Server database path: /home/nilmdb/db
Server disk space used by NilmDB: <span class="m">143</span>.87 GiB
Server disk space used by other: <span class="m">378</span>.93 GiB
Server disk space reserved: <span class="m">6</span>.86 GiB
Server disk space free: <span class="m">147</span>.17 GiB
</pre></div>
</div>
</div>
<div class="section" id="nilmtool-create">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">create</span></code><a class="headerlink" href="#nilmtool-create" title="Permalink to this headline"></a></h3>
<p>Create a new empty stream at the specified path and with the specified layout.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">create</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="n">PATH</span> <span class="n">LAYOUT</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the new stream. Stream paths are similar to filesystem paths and must contain at least two components. For example, /foo/bar.</dd>
<dt>LAYOUT</dt><dd>Layout for the new stream. Layouts are of the form &lt;type&gt;_&lt;count&gt;. The &lt;type&gt; is one of those described in Section 2.2.3 of the <a href="#">NilmDB Reference Guide</a>, such as uint16, int64, or float32. &lt;count&gt; is a numeric count of how many data elements there are, per row. Streams store rows of homogeneous data only, and the largest supported &lt;count&gt; is 1024. Generally, counts should fall within a much lower range, typically between 1 and 32. For example, float32_8.</dd>
</dl>
</div></div>
<div class="section" id="nilmtool-rename">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">rename</span></code><a class="headerlink" href="#nilmtool-rename" title="Permalink to this headline"></a></h3>
<p>Rename or relocate a stream in the database from one path to another. Metadata and intervals, if any, are relocated to the new path name.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">rename</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="n">OLDPATH</span> <span class="n">NEWPATH</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>OLDPATH</dt><dd>Old existing stream path, e.g. /foo/old</dd>
<dt>NEWPATH</dt><dd>New stream path, e.g. /foo/bar/new</dd>
</dl>
</div><p>Notes</p>
<blockquote>
<div>Metadata contents are not changed by this operation. Any software tools that
store and use path names stored in metadata keys or values will need to update
them accordingly.</div></blockquote>
</div>
<div class="section" id="nilmtool-list">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">list</span></code><a class="headerlink" href="#nilmtool-list" title="Permalink to this headline"></a></h3>
<p>List streams available in the database, optionally filtering by path, and
optionally including extended stream info and intervals.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="nb">list</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">E</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">d</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">TIME</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">e</span> <span class="n">TIME</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">T</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">l</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">n</span><span class="p">]</span>
<span class="p">[</span><span class="n">PATH</span> <span class="p">[</span><span class="n">PATH</span> <span class="o">...</span><span class="p">]]</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>(default: *) If paths are specified, only streams that
match the given paths are shown. Wildcards are accepted; for example,
/sharon/* will list all streams with a path beginning with /sharon/.
Note that, to prevent wildcards from being interpreted by the shell,
they should be quoted at the command line; for example:
<pre>
$> nilmtool list "/sharon/*"
$> nilmtool list "*raw"</textarea></pre>
</dd>
<dt>-E, --ext</dt><dd>Show extended stream information, like interval extents, total rows of data present, and total amount of time covered by the stream’s intervals.</dd>
<dt>-T, --timestamp-raw</dt><dd>When displaying timestamps in the output, show raw timestamp values from the NilmDB database rather than converting to human-readable times. Raw values are typically measured in microseconds since the Unix time epoch (1970/01/01 00:00 UTC).</dd>
<dt>-l, --layout</dt><dd>Display the stream layout next to the path name.</dd>
<dt>-n, --no-decim</dt><dd>Omit streams with paths containing the string ``~decim-``, to avoid cluttering the output with decimated streams.</dd>
<dt>-d, --detail</dt><dd>In addition to the normal output, show the time intervals present in each stream. See also nilmtool intervals in Section 3.2.3.7 of the <a href="#">NilmDB Reference Guide</a>, which can display more details about the intervals.</dd>
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp for intervals (free-form, inclusive).</dd>
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp for intervals (free-form, noninclusive).</dd>
</dl>
</div></div>
<div class="section" id="nilmtool-intervals">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">intervals</span></code><a class="headerlink" href="#nilmtool-intervals" title="Permalink to this headline"></a></h3>
<p>List intervals in a stream, similar to <code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">list</span> <span class="pre">--detail</span></code>, but with
options for calculating set-differences between intervals of two streams, and
for optimizing the output by joining adjacent intervals.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">intervals</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">d</span> <span class="n">PATH</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">TIME</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">e</span> <span class="n">TIME</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">T</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">o</span><span class="p">]</span> <span class="n">PATH</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>List intervals for this path.</dd>
<dt>-d DIFFPATH, --diff DIFFPATH</dt><dd>(default: none) If specified, perform a set-difference by subtract the intervals in this path; that is, only show interval ranges that are present in the original path but not present in diffpath.</dd>
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp for intervals (free-form, inclusive).</dd>
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp for intervals (free-form, noninclusive).</dd>
<dt>-T, --timestamp-raw</dt><dd>(default: min) (default: max) When displaying timestamps in the output, show raw timestamp values from the NilmDB database rather than converting to human-readable times. Raw values are typically measured in microseconds since the Unix time epoch (1970/01/01 00:00 UTC).</dd>
<dt>-o, --optimize</dt><dd>Optimize the interval output by merging adjacent intervals. For example, the two intervals [1 → 2⟩ and [2 → 5⟩ would be displayed as one interval [1 → 5⟩.</dd>
</dl>
</div></div>
<div class="section" id="nilmtool-metadata">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">metadata</span></code><a class="headerlink" href="#nilmtool-metadata" title="Permalink to this headline"></a></h3>
<p>Get, set, update, or delete the key/value metadata associated with a stream.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">metadata</span> <span class="n">path</span> <span class="p">[</span><span class="o">-</span><span class="n">g</span> <span class="p">[</span><span class="n">key</span> <span class="o">...</span><span class="p">]</span> <span class="o">|</span> <span class="o">-</span><span class="n">s</span> <span class="n">key</span><span class="o">=</span><span class="n">value</span> <span class="p">[</span><span class="o">...</span><span class="p">]</span> <span class="o">|</span> <span class="o">-</span><span class="n">u</span> <span class="n">key</span><span class="o">=</span><span class="n">value</span> <span class="p">[</span><span class="o">...</span><span class="p">]]</span> <span class="o">|</span> <span class="o">-</span><span class="n">d</span> <span class="p">[</span><span class="n">key</span> <span class="o">...</span><span class="p">]</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the stream for which to manage metadata. Required, and must be specified before the action arguments.</dd>
</dl>
</div><p>Action Arguments: These actions are mutually exclusive.</p>
<div class="block-indent">
<dl class="arglist">
<dt>-g [KEY ...], --get [KEY ...]</dt><dd>(default: all) Get and print metadata for the specified key(s). If none are specified, print metadata for all keys. Keys are printed as key=value, one per line.</dd>
<dt>-s [KEY=VALUE ...], --set [KEY=VALUE ...]</dt><dd>Set metadata. Keys and values are specified as a key=value string. This replaces all existing metadata on the stream with the provided keys; any keys present in the database but not specified on the command line are removed.</dd>
<dt>-u [KEY=VALUE ...], --update [KEY=VALUE ...]</dt><dd>Update metadata. Keys and values are specified as a key=value string. This is similar to --set, but only adds or changes metadata keys; keys that are present in the database but not specified on the command line are left unchanged.</dd>
<dt>-d [KEY ...], --delete [KEY ...]</dt><dd>(default: all) Delete metadata for the specified key(s). If none are specified, delete all metadata for the stream. </dd>
</dl>
</div><p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$&gt; nilmtool metadata /temp/raw --set &quot;location=Honolulu, HI&quot; &quot;source=NOAA&quot;
$&gt; nilmtool metadata /temp/raw --get
location=Honolulu, HI
source=NOAA
$&gt; nilmtool metadata /temp/raw --update &quot;units=F&quot;
location=Honolulu, HI
source=NOAA
units=F
</pre></div>
</div>
</div>
<div class="section" id="nilmtool-insert">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">insert</span></code><a class="headerlink" href="#nilmtool-insert" title="Permalink to this headline"></a></h3>
<p>Insert data into a stream. This is a relatively low-level interface analogous to
the /stream/insert HTTP interface described in Section 3.2.1.13 on the &lt;a
href=”#”&gt;NilmDB Reference Guide&lt;/a&gt;. This is the program that should be used
when a fixed quantity of text-based data is being inserted into a single
interval, with a known start and end time. If the input data does not already
have timestamps, they can be optionally added based on the start time and a
known data rate. In many cases, using the separate <code class="docutils literal"><span class="pre">nilm-insert</span></code> program is
preferable, particularly when dealing with large amounts of pre-recorded data,
or when streaming data from a live source.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">insert</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">q</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">t</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">r</span> <span class="n">RATE</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">TIME</span> <span class="o">|</span> <span class="o">-</span><span class="n">f</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">e</span> <span class="n">TIME</span><span class="p">]</span>
<span class="n">path</span> <span class="p">[</span><span class="n">file</span><span class="p">]</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the stream into which to insert data. The format of the input data must match the layout of the stream.</dd>
<dt>FILE</dt><dd>(default: standard input) Input data filename, which must be formatted as uncompressed plain text. Default is to read the input from stdin.</dd>
<dt>-q, --quiet</dt><dd>Suppress printing unnecessary messages.</dd>
</dl>
</div>
<i>Timestamping</i>: To add timestamps to data that does not already have it, specify both of these arguments. The added timestamps are based on the interval start time and the given data rate.
<div class="block-indent">
<dl class="arglist">
<dt>-t, --timestamp</dt><dd>Add timestamps to each line</dd>
<dt>-r RATE, --rate RATE</dt><dd> Data rate, in Hz</dd>
</dl>
</div>
<i>Start Time</i>: The start time may be manually specified, or it can be determined from the input filename, based on the following options.
<div class="block-indent">
<dl class="arglist">
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp for the new interval (free-form, inclusive)</dd>
<dt>-f, --filename</dt><dd>Use filename to determine start time</dd>
</dl>
</div>
<i>End Time</i>: The ending time should be manually specified. If timestamps are being added, this can be omitted, in which case the end of the interval is set to the last timestamp plus one microsecond.
<div class="block-indent">
<dl class="arglist">
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp for the new interval (free-form, noninclusive)</dd>
</dl>
</div></div>
<div class="section" id="nilmtool-extract">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">extract</span></code><a class="headerlink" href="#nilmtool-extract" title="Permalink to this headline"></a></h3>
<p>Extract rows of data from a specified time interval in a stream, or output a
count of how many rows are present in the interval.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">extract</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="o">-</span><span class="n">s</span> <span class="n">TIME</span> <span class="o">-</span><span class="n">e</span> <span class="n">TIME</span> <span class="p">[</span><span class="o">-</span><span class="n">B</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">b</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">a</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">m</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">T</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">c</span><span class="p">]</span>
<span class="n">path</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the stream from which to extract data.</dd>
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp to extract (free-form, inclusive)</dd>
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp to extract (free-form, noninclusive)</dd>
</dl>
</div>
<i>Output Formatting</i>
<div class="block-indent">
<dl class="arglist">
<dt>-B, --binary</dt><dd>Output raw binary data instead of the usual text format. For details on the text and binary formatting, see the documentation of HTTP call /stream/insert in Section 3.2.1.13.</dd>
<dt>-b, --bare</dt><dd>Omit timestamps from each line of the output.</dd>
<dt>-a, --annotate</dt><dd>Include comments at the beginning of the output with information about the stream. Comments are lines beginning with #.</dd>
<dt>-m, --markup</dt><dd>Include comments in the output with information that denotes where the stream’s internal intervals begin and end. See the documentation of the markup parameter to HTTP call /stream/extract in Section 3.2.1.14 for details on the format of the comments.</dd>
<dt>-T, --timestamp-raw</dt><dd>Use raw integer timestamps in the --annotate output instead of human- readable strings.</dd>
<dt>-c, --count</dt><dd>Instead of outputting the data, output a count of how many rows are present in the given time interval. This is fast as it does not transfer the data from the server.</dd>
</dl>
</div></div>
<div class="section" id="nilmtool-remove">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">remove</span></code><a class="headerlink" href="#nilmtool-remove" title="Permalink to this headline"></a></h3>
<p>Remove all data from a specified time range within the stream at /PATH/.
Multiple streams may be specified, and wildcards are supported; the same time
range will be removed from all matching streams.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">remove</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="o">-</span><span class="n">s</span> <span class="n">TIME</span> <span class="o">-</span><span class="n">e</span> <span class="n">TIME</span> <span class="p">[</span><span class="o">-</span><span class="n">q</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">c</span><span class="p">]</span> <span class="n">path</span> <span class="p">[</span><span class="n">path</span> <span class="o">...</span><span class="p">]</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd> Path(s) of streams. Wildcards are supported. At least one path must provided.</dd>
<dt>-s TIME, --start TIME</dt><dd>Starting timestamp of data to remove (free-form, inclusive, required).</dd>
<dt>-e TIME, --end TIME</dt><dd>Ending timestamp of data to remove (free-form, noninclusive, required).</dd>
</dl>
</div>
<i>Output Format</i>
<div class="block-indent">
<dl class="arglist">
<dt>-q, --quiet</dt><dd>By default, matching path names are printed when removing from multiple paths. With this option, path names are not printed.</dd>
<dt>-c, --count</dt><dd>Display a count of the number of rows of data that were removed from each path.</dd>
</dl>
</div><p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ nilmtool remove -s @1364140671600000 -e @1364141576585000 -c &quot;/sh/raw*&quot;
Removing from /sh/raw
7239364
Removing from /sh/raw~decim-4
1809841
Removing from /sh/raw~decim-16
452460
</pre></div>
</div>
</div>
<div class="section" id="nilmtool-destroy">
<h3><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">destroy</span></code><a class="headerlink" href="#nilmtool-destroy" title="Permalink to this headline"></a></h3>
<p>Destroy the stream at the specified path(s); the opposite of nilmtool create.
Metadata related to the stream is permanently deleted. All data must be removed
before a stream can be destroyed. Wildcards are supported.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmtool</span> <span class="n">destroy</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">R</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">q</span><span class="p">]</span> <span class="n">path</span> <span class="p">[</span><span class="n">path</span> <span class="o">...</span><span class="p">]</span>
</pre></div>
</div>
<p>Arguments</p>
</div>
</div>
<div class="section" id="nilm-copy">
<h2><code class="docutils literal"><span class="pre">nilm-copy</span></code><a class="headerlink" href="#nilm-copy" title="Permalink to this headline"></a></h2>
<p>Copy data and metadata from one stream to another. The source and destination
streams can reside on different servers. Both streams must have the same layout.
Only regions of time that are present in the source, and not yet present in the
destination, are processed. This program can therefore be re-run with the same
command-line arguments multiple times, and it will only process the newly
available data each time.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilm</span><span class="o">-</span><span class="n">copy</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">u</span> <span class="n">URL</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">U</span> <span class="n">DEST_URL</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">D</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">F</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">TIME</span><span class="p">]</span>
<span class="p">[</span><span class="o">-</span><span class="n">e</span> <span class="n">TIME</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">n</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">x</span><span class="p">]</span>
<span class="n">srcpath</span> <span class="n">destpath</span>
</pre></div>
</div>
<p>Arguments</p>
</div>
<div class="section" id="nilm-copy-wildcard">
<h2><code class="docutils literal"><span class="pre">nilm-copy-wildcard</span></code><a class="headerlink" href="#nilm-copy-wildcard" title="Permalink to this headline"></a></h2>
<p>Copy data and metadata, from multiple streams, between two servers. Similar to nilm-copy, except:</p>
<ul class="simple">
<li>Wildcards and multiple paths are supported in the stream names.</li>
<li>Streams must always be copied between two servers.</li>
<li>Stream paths must match on the source and destination server.</li>
<li>If a stream does not exist on the destination server, it is created with the correct layout automatically.</li>
</ul>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilm</span><span class="o">-</span><span class="n">copy</span><span class="o">-</span><span class="n">wildcard</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">u</span> <span class="n">URL</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">U</span> <span class="n">DEST_URL</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">D</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">F</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">TIME</span><span class="p">]</span>
<span class="p">[</span><span class="o">-</span><span class="n">e</span> <span class="n">TIME</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">n</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">x</span><span class="p">]</span>
<span class="n">path</span> <span class="p">[</span><span class="n">path</span> <span class="o">...</span><span class="p">]</span>
</pre></div>
</div>
<p>Arguments</p>
<p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>$ nilm-copy-wildcard -u http://bucket/nilmdb -U http://pilot/nilmdb /bp/startup*
Source URL: http://bucket/nilmdb/
Dest URL: http://pilot/nilmdb/
Creating destination stream /bp/startup/info
Creating destination stream /bp/startup/prep-a
Creating destination stream /bp/startup/prep-a~decim-4
Creating destination stream /bp/startup/prep-a~decim-16
# ... etc
</pre></div>
</div>
</div>
<div class="section" id="nilm-decimate">
<h2><code class="docutils literal"><span class="pre">nilm-decimate</span></code><a class="headerlink" href="#nilm-decimate" title="Permalink to this headline"></a></h2>
<p>Decimate the stream at SRCPATH and write the output to DESTPATH. The
decimation operation is described in Section 2.4.1; in short, every FACTOR rows
in the source are consolidated into one row in the destination, by calculating
the mean, minimum, and maximum values for each column. This program
detects if the stream at SRCPATH is already decimated, by the presence of a
decimate_source metadata key. If present, subsequent decimations take the
existing mean, minimum, and maximum values into account, and the output has the
same number of columns as the input. Otherwise, for the first level of
decimation, the output has three times as many columns as the input. See
also nilm-decimate-auto (Section 3.4.2.5) for a simpler method of decimating a
stream by multiple levels.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilm</span><span class="o">-</span><span class="n">decimate</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">u</span> <span class="n">URL</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">U</span> <span class="n">DEST_URL</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">D</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">F</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">TIME</span><span class="p">]</span>
<span class="p">[</span><span class="o">-</span><span class="n">e</span> <span class="n">TIME</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">n</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">f</span> <span class="n">FACTOR</span><span class="p">]</span>
<span class="n">srcpath</span> <span class="n">destpath</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd>(default: http://localhost/nilmdb/) NilmDB server URL for the source stream.</dd>
<dt>-U DESTURL, --dest-url DESTURL</dt><dd>(default: same as URL) NilmDB server URL for the destination stream. If unspecified, the same URL is used for both source and destination.</dd>
<dt>-D, --dry-run</dt><dd>Just print intervals that would be processed, and exit.</dd>
<dt>-F, --force-metadata</dt><dd>Overwrite destination metadata even if it conflicts with the values in the “metadata” section below.</dd>
<dt>-s TIME, --start TIME</dt><dd>(default: min) Starting timestamp of data to decimate (free-form, inclusive).</dd>
<dt>-e TIME, --end TIME</dt><dd>(default: max) Ending timestamp of data to decimate (free-form, noninclusive).</dd>
<dt>-f FACTOR, --factor FACTOR</dt><dd>(default: 4) Set the decimation factor. For a source stream with n rows, the output stream will have n/FACTOR rows.</dd>
<dt>SRCPATH</dt><dd>Path of the source stream (on the source server).</dd>
<dt>DESTPATH</dt><dd>Path of the destination stream (on the destination server).</dd>
</dl>
</div><p>The destination stream has the following metadata keys added:</p>
<dl class="docutils">
<dt>decimate_source</dt>
<dd>The source stream from which this data was decimated.</dd>
<dt>decimate_factor</dt>
<dd>The decimation factor used.</dd>
</dl>
</div>
<div class="section" id="nilm-decimate-auto">
<h2><code class="docutils literal"><span class="pre">nilm-decimate-auto</span></code><a class="headerlink" href="#nilm-decimate-auto" title="Permalink to this headline"></a></h2>
<p>Automatically create multiple decimation levels using from a single source
stream, continuing until the last decimated level contains fewer than 500 rows
total. Decimations are performed using nilm-decimate (Section 3.4.2.4).
Wildcards and multiple paths are accepted. Destination streams are automatically
named based on the source stream name and the total decimation factor; for
example, <code class="docutils literal"><span class="pre">/test/raw~decim-4</span></code>, <code class="docutils literal"><span class="pre">/test/raw~decim-16</span></code>, etc. Streams containing
the string “<code class="docutils literal"><span class="pre">~decim-</span></code>” are ignored when matching wildcards.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilm</span><span class="o">-</span><span class="n">decimate</span><span class="o">-</span><span class="n">auto</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">u</span> <span class="n">URL</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">f</span> <span class="n">FACTOR</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">F</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">fast</span><span class="p">]</span>
<span class="n">path</span> <span class="p">[</span><span class="n">path</span> <span class="o">...</span><span class="p">]</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd> (default: http://localhost/nilmdb/) NilmDB server URL for the source and destination streams.</dd>
<dt>-F, --force-metadata</dt><dd>Overwrite destination metadata even if it conflicts with the values in the “metadata” section above.</dd>
<dt>-f FACTOR, --factor FACTOR</dt><dd>(default: 4) Set the decimation factor. Each decimation level will have 1/FACTOR as many rows as the previous level.</dd>
<dt>PATH [...]</dt><dd>One or more paths to decimate. Wildcards are accepted.</dd>
</dl>
</div></div>
<div class="section" id="nilm-insert">
<h2><code class="docutils literal"><span class="pre">nilm-insert</span></code><a class="headerlink" href="#nilm-insert" title="Permalink to this headline"></a></h2>
<p>Insert a large amount of text-formatted data from an external source like
ethstream. This is a higher-level tool than nilmtool insert in that it attempts
to intelligently manage timestamps. The general concept is that it tracks two
timestamps:</p>
<ol class="arabic simple">
<li>The data timestamp is the precise timestamp corresponding to a particular row of data, and is the timestamp that gets inserted into the database. It increases by data_delta for every row of input. data_delta can come from one of two sources. If –delta is specified, it is pulled from the first column of data. If –rate is specified, data_delta is set to a fixed value of 1/RATE.</li>
<li>The clock timestamp is the less precise timestamp that gives the absolute time. It can come from two sources. If –live is specified, it is pulled directly from the system clock. If –file is specified, it is extracted from the input file every time a new file is opened for read, and from comments that appear in the files.</li>
</ol>
<p>Small discrepancies between data and clock are ignored. If the data timestamp ever differs from the clock timestamp by more than max_gap seconds:</p>
<ul class="simple">
<li>If data is running behind, there is a gap in the data, so the timestamp is stepped forward to match clock.</li>
<li>If data is running ahead, there is overlap in the data, and an error is returned. If –skip is specified, then instead of returning an error, data is dropped and the remainder of the current file is skipped.</li>
</ul>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilm</span><span class="o">-</span><span class="n">insert</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">u</span> <span class="n">URL</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">D</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">m</span> <span class="n">SEC</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">r</span> <span class="n">RATE</span> <span class="o">|</span> <span class="o">-</span><span class="n">d</span><span class="p">]</span>
<span class="p">[</span><span class="o">-</span><span class="n">l</span> <span class="o">|</span> <span class="o">-</span><span class="n">f</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">o</span> <span class="n">SEC</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">O</span> <span class="n">SEC</span><span class="p">]</span>
<span class="n">path</span> <span class="p">[</span><span class="n">infile</span> <span class="p">[</span><span class="n">infile</span> <span class="o">...</span><span class="p">]]</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>-u URL, --url URL</dt><dd> (default: http://localhost/nilmdb/) NilmDB server URL.</dd>
<dt>-D, --dry-run</dt><dd>Parse files and print information, but don’t insert any data. Useful for verification before making changes to the database.</dd>
<dt>-s, --skip</dt><dd>Skip the remainder of input files if the data timestamp runs too far ahead of the clock timestamp. Useful when inserting a large directory of existing files with inaccurate timestamps.</dd>
<dt>-m SEC, --max-gap SEC</dt><dd>(default: 10.0) Maximum discrepancy between the clock and data timestamps.</dd>
</dl>
</div>
<i>Data timestamp</i>
<div class="block-indent">
<dl class="arglist">
<dt>-r RATE, --rate RATE</dt><dd>(default: 8000.0) data_delta is constant 1/RATE (in Hz).</dd>
<dt>-d, --delta</dt><dd>data_delta is provided as the first number on each input line.</dd>
</dl>
</div>
<i>Clock timestamp</i>
<div class="block-indent">
<dl class="arglist">
<dt>-l, --live</dt><dd>Use the live system time for the clock timestamp. This is most useful when piping in data live from a capture device.</dd>
<dt>-f, --file</dt><dd>Use filename and file comments for the clock timestamp. This is most useful when reading previously saved data.</dd>
<dt>-o SEC, --offset-filename SEC</dt><dd>(default: −3600.0) Offset to add to timestamps in filenames, when using --file. The default accounts for the existing practice of naming capture files based on the end of the hour in which they were recorded. The filename timestamp plus this offset should equal the time that the first row of data in the file was captured.</dd>
<dt>-O SEC, --offset-comment SEC</dt><dd>(default: 0.0) Offset to add to timestamps in comments, when using --file. The comment timestamp plus this offset should equal the time that the next row of data was captured.</dd>
</dl>
</div>
<i>Path and Input</i>
<div class="block-indent">
<dl class="arglist">
<dt>PATH</dt><dd>Path of the stream into which to insert data. The layout of the path must match the input data.</dd>
<dt>INFILE [...]</dt><dd>(default: standard input) Input data filename(s). Filenames ending with .gz are transparently decompressed as they are read. The default is to read the input from stdin.</dd>
</dl>
</div><div class="admonition danger">
<p class="first admonition-title">Danger</p>
<p class="last">The following tools provide low level access to the NILM and are not
required for normal system use. Be careful running them as they may
corrupt the database or cause loss of data.</p>
</div>
</div>
<div class="section" id="nilmdb-server">
<h2><code class="docutils literal"><span class="pre">nilmdb-server</span></code><a class="headerlink" href="#nilmdb-server" title="Permalink to this headline"></a></h2>
<p>Run a standalone NilmDB server. Note that the NilmDB server is typically run
as a WSGI process managed by Apache. This program runs NilmDB
using a built-in web server instead.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmdb</span><span class="o">-</span><span class="n">server</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">a</span> <span class="n">ADDRESS</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">p</span> <span class="n">PORT</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">d</span> <span class="n">DATABASE</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">q</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">t</span><span class="p">]</span>
<span class="p">[</span><span class="o">-</span><span class="n">y</span><span class="p">]</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>-v, --version</dt><dd> Print the installed NilmDB version.</dd>
<dt>-a ADDRESS, --address ADDRESS</dt><dd> (default: 0.0.0.0) Only listen on the given IP address. The default is to listen on all addresses.</dd>
<dt>-p PORT, --port PORT</dt><dd>(default: 12380) Listen on the given TCP port.</dd>
<dt>-d DATABASE, --database DATABASE</dt><dd>(default: ./db) Local filesystem directory of the NilmDB database.</dd>
<dt>-q, --quiet</dt><dd>Silence output.</dd>
</dl>
</div>
<i>Debug Options</i>
<div class="block-indent">
<dl class="arglist">
<dt>-t, --traceback</dt><dd>Provide tracebacks in the error response for client errors (HTTP status codes 400 - 499). Normally, tracebacks are only provided for server errors (HTTP status codes 500 - 599).</dd>
<dt>-y, --yappi</dt><dd>Run under the yappi profiler and invoke an interactive shell afterwards. Not intended for normal operation.</dd>
</dl>
</div></div>
<div class="section" id="nilmdb-fsck">
<h2><code class="docutils literal"><span class="pre">nilmdb-fsck</span></code><a class="headerlink" href="#nilmdb-fsck" title="Permalink to this headline"></a></h2>
<p>Check database consistency, and optionally repair errors automatically, when
possible. Running this may be necessary after an improper shutdown or other
corruption has occurred. This program will refuse to run if the database is
currently locked by any other process, like the Apache webserver; such programs
should be stopped first. This is run automatically on system boot for the Joule
database.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilmdb</span><span class="o">-</span><span class="n">fsck</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">f</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">n</span><span class="p">]</span> <span class="n">database</span>
</pre></div>
</div>
<p>Arguments</p>
<div class="block-indent">
<dl class="arglist">
<dt>DATABASE</dt><dd>Local filesystem directory of the NilmDB database to check.</dd>
<dt>-f, --fix</dt><dd>Attempt to fix errors when possible. Note that this may involve removing intervals or data.</dd>
<dt>-n, --no-data</dt><dd>Skip the slow full-data check. The earlier, faster checks are likely to find most database corruption, so the data checks may be unnecessary.</dd>
<dt>-h, --help</dt><dd>Print a help message with Usage information and details.</dd>
<dt>-v, --version</dt><dd>Print the installed NilmDB version. Generally, you should ensure that the version of nilmdb-fsck is newer than the NilmDB version that created, or last used, the given database.</dd>
</dl>
</div></div>
<div class="section" id="nilm-cleanup">
<h2><code class="docutils literal"><span class="pre">nilm-cleanup</span></code><a class="headerlink" href="#nilm-cleanup" title="Permalink to this headline"></a></h2>
<p>Clean up old data from streams, using a configuration file to specify which data
to remove. The configuration file is a text file in the following format:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">[</span><span class="o">/</span><span class="n">stream</span><span class="o">/</span><span class="n">path</span><span class="p">]</span>
<span class="n">keep</span> <span class="o">=</span> <span class="mi">3</span><span class="n">w</span> <span class="c1"># keep up to 3 weeks of data</span>
<span class="n">rate</span> <span class="o">=</span> <span class="mi">8000</span> <span class="c1"># optional, used for the --estimate option</span>
<span class="n">decimated</span> <span class="o">=</span> <span class="n">false</span> <span class="c1"># whether to delete decimated data too</span>
<span class="p">[</span><span class="o">*/</span><span class="n">wildcard</span><span class="o">/</span><span class="n">path</span><span class="p">]</span>
<span class="n">keep</span> <span class="o">=</span> <span class="mf">3.5</span><span class="n">m</span> <span class="c1"># or 2520h or 105d or 15w or 0.29y</span>
</pre></div>
</div>
<p>Stream paths are specified inside square brackets (<code class="docutils literal"><span class="pre">[]</span></code>) and are followed by configuration
keywords for the matching streams. Paths can contain wildcards. Supported keywords are:
<code class="docutils literal"><span class="pre">keep</span></code></p>
<blockquote>
<div>How much data to keep. Supported suffixes are h for hours, d for days, w for weeks, m for months, and y for years.</div></blockquote>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">rate</span></code></dt>
<dd>(default: automatic) Expected data rate. Only used by the <code class="docutils literal"><span class="pre">--estimate</span> <span class="pre">option</span></code>. If not specified, the rate is guessed based on the existing data in the stream.</dd>
<dt><code class="docutils literal"><span class="pre">decimated</span></code></dt>
<dd>(default: true) If true, delete decimated data too. For stream path /A/B, this includes any stream matching the wildcard /A/B~decim*. If specified as false, no special treatment is applied to such streams.</dd>
</dl>
<p>The value keep is a maximum amount of data, not a cutoff time. When cleaning
data, the oldest data in the stream will be removed, until the total remaining
amount of data is less than or equal to keep. This means that data older than
keep will remain if insufficient newer data is present; for example, if new data
ceases to be inserted, old data will cease to be deleted.</p>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">nilm</span><span class="o">-</span><span class="n">cleanup</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">v</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">u</span> <span class="n">URL</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">y</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">e</span><span class="p">]</span> <span class="n">configfile</span>
</pre></div>
</div>
<p>Arguments</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo">
<a href="index.html">
<img class="logo" src="_static/logo.png" alt="Logo"/>
</a>
</p>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="concepts.html">Joule Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="writing_modules.html">Writing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Database Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#nilmtool"><code class="docutils literal"><span class="pre">nilmtool</span></code></a><ul>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-help"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">help</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-info"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">info</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-create"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">create</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-rename"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">rename</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-list"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">list</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-intervals"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">intervals</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-metadata"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">metadata</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-insert"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">insert</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-extract"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">extract</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-remove"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">remove</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool-destroy"><code class="docutils literal"><span class="pre">nilmtool</span> <span class="pre">destroy</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#nilm-copy"><code class="docutils literal"><span class="pre">nilm-copy</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#nilm-copy-wildcard"><code class="docutils literal"><span class="pre">nilm-copy-wildcard</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#nilm-decimate"><code class="docutils literal"><span class="pre">nilm-decimate</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#nilm-decimate-auto"><code class="docutils literal"><span class="pre">nilm-decimate-auto</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#nilm-insert"><code class="docutils literal"><span class="pre">nilm-insert</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#nilmdb-server"><code class="docutils literal"><span class="pre">nilmdb-server</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#nilmdb-fsck"><code class="docutils literal"><span class="pre">nilmdb-fsck</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#nilm-cleanup"><code class="docutils literal"><span class="pre">nilm-cleanup</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="testing_modules.html" title="previous chapter">Testing Modules</a></li>
<li>Next: <a href="reference.html" title="next chapter">Reference</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2017, John Donnal.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.2</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
|
<a href="_sources/nilmdb.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>
\ No newline at end of file
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -26,7 +27,7 @@
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="NILM Modules" href="nilm.html" />
<link rel="prev" title="Database Reference" href="nilmdb.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
......@@ -218,12 +219,30 @@ full set of options and their default settings:</p>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="writing_modules.html">Writing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#command-line-utilities">Command Line Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="#configuration-files">Configuration Files</a></li>
<li class="toctree-l2"><a class="reference internal" href="#numpy-pipes">Numpy Pipes</a></li>
<li class="toctree-l2"><a class="reference internal" href="#e2e-utilities">E2E Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="#command-line-utilities">Command Line Utilities</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#joule">joule</a></li>
<li class="toctree-l3"><a class="reference internal" href="#jouled">jouled</a></li>
<li class="toctree-l3"><a class="reference internal" href="#nilmtool">nilmtool</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#configuration-files">Configuration Files</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#main-conf">main.conf</a></li>
<li class="toctree-l3"><a class="reference internal" href="#stream-configs">stream configs</a></li>
<li class="toctree-l3"><a class="reference internal" href="#module-configs">module configs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#numpy-pipes">Numpy Pipes</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#concepts">Concepts</a></li>
<li class="toctree-l3"><a class="reference internal" href="#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#e2e-utilities">E2E Utilities</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id3">joule</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id4">nilmtool</a></li>
</ul>
</li>
</ul>
</li>
</ul>
......@@ -232,7 +251,7 @@ full set of options and their default settings:</p>
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="nilm.html" title="previous chapter">NILM Modules</a></li>
<li>Previous: <a href="nilmdb.html" title="previous chapter">Database Reference</a></li>
</ul></li>
</ul>
</div>
......
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -95,11 +96,10 @@
<h3>Navigation</h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="concepts.html">Joule Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="writing_modules.html">Writing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
......
Search.setIndex({docnames:["concepts","getting_started","index","install","nilm","reference","testing_modules","writing_modules"],envversion:52,filenames:["concepts.rst","getting_started.rst","index.rst","install.rst","nilm.rst","reference.rst","testing_modules.rst","writing_modules.rst"],objects:{},objnames:{},objtypes:{},terms:{"0hz":1,"1e6":6,"case":[5,7],"class":[6,7],"default":[1,3,5,6,7],"export":3,"final":7,"float":[6,7],"function":[6,7],"import":[3,6,7],"new":[0,1,3,6],"null":5,"return":[3,6,7],"short":[5,7],"super":7,"true":[6,7],"try":6,"while":[0,6,7],E2E:[2,6],Not:6,That:1,The:[0,2,3,4,5,6,7],Then:4,There:6,These:[3,5,6,7],Use:[4,6],Using:0,__init__:7,__main__:6,__name__:6,_captur:4,_process:4,about:6,abov:[1,3,6],absolut:5,accept:7,access:[3,4,6,7],accord:4,acquisit:2,act:2,activ:3,actual:7,adc:4,add:[1,3,7],add_argu:7,added:6,adding:7,addit:[5,7],addition:7,address:5,addus:3,adjust:3,after:[3,6],ago:3,ahead:3,all:[1,2,3,6],alloc:1,allow:[0,2,6,7],alreadi:3,also:[2,3,6,7],altern:5,although:4,alwai:[2,3,6,7],amplitud:4,ani:[0,4,6,7],anim:0,apach:3,apache2:3,apache2ctl:3,apart:6,api:[0,6],appgroup:3,appli:7,applic:3,appropri:6,apt:3,arang:6,arg:[5,6],argpars:[6,7],argument:[6,7],arithmet:6,arrai:[6,7],assembl:6,assert:6,assert_array_almost_equ:6,assert_array_equ:6,associ:6,assum:3,assur:6,async:[6,7],asynchron:[0,6,7],asyncio:[6,7],asynctest:[6,7],attach:6,automat:[3,4,5,6],avaiabl:1,avail:[2,3,6,7],averag:[1,7],await:[6,7],back:7,base:7,basic:3,becaus:7,befor:[1,6,7],begin:4,behavior:0,below:[0,3,5,6,7],best:7,between:3,bin:3,binari:3,block:[0,2],board:2,boilerpl:6,boot:[2,6],bootstrap:6,both:[1,6],bottleneck:2,brace:7,bug:2,build:[0,1,2,3],built:[3,6,7],builtin:1,call:[1,6,7],call_lat:6,can:[0,1,2,4,5,6,7],cancel:6,cancellederror:6,cannot:7,captur:[1,2,3,4],cgroup:3,chain:0,check:[1,3,4],check_data:6,check_log:6,check_modul:6,cherrypy3:3,chown:3,clean:6,cleanli:6,client:[3,7],clone:[3,4,7],close:6,code:[2,6,7],collect:2,column:6,com:2,combin:6,command:[1,2,3,4,6,7],common:6,commun:[0,3],compar:6,complet:6,complex:[0,2,7],compos:[2,6],comput:[1,2,7],concept:[1,2,7],conf:[1,3,4,6],confid:6,config:[4,6],configur:[1,2,3,7],confirm:1,conflict:3,connect:[0,1,2,3,6,7],consist:1,constraint:7,consum:[0,7],contact:[3,4,6],contain:[2,3,6,7],content:[0,6],continu:[1,7],copi:[1,3,6],coroutin:[0,6,7],correct:[3,7],correctli:6,count:7,counter:6,coverag:2,cpu:[1,4],creat:[1,3,6],creation:3,credenti:6,critic:7,cross:4,current:[0,4],custom:[1,2,5,6],custom_arg:[6,7],cython:3,daemon:3,data:[0,1,3,4,5,6,7],databas:[0,1,3,5],dataset:6,datastor:7,datatyp:[1,5,6],date:3,datetim:3,dateutil:3,dbpath:5,debug:7,decim:[5,6],decor:3,def:[6,7],default_max:5,default_min:5,defin:[2,7],degre:6,demo:[1,6,7],demo_filt:1,demo_random:1,demo_read:1,demonstr:1,depend:3,deploi:6,deriv:[0,7],describ:6,descript:[1,3,5,7],design:[4,6,7],desir:6,destin:[1,4,5,6,7],detail:[0,1,2,6,7],detect:[0,2],dev:3,develop:7,devic:0,dictionari:[6,7],diff:6,differ:[1,3],dimens:7,direct:3,directli:[0,6],directori:[2,3,6],disabl:6,discret:5,displai:1,distro:3,doc:2,docker:[2,6],docstr:6,documen:7,document:[6,7],doe:[0,6,7],donnal:[3,4,6],doubl:7,down:6,download:3,e2e:[2,6],e2e_joule_1:6,e2eutil:6,each:[2,4,5,6],eachoth:7,earlier:[3,6],easi:2,easiest:3,edit:[3,5],edu:[3,4,6],effeci:0,element1:[0,1,5,6],element2:[0,1],element:[0,1,5,6],elementn:[0,5],enabl:3,enclos:7,end:[2,7],enforc:0,engin:2,ensur:[2,6],ensure_futur:6,enter:[1,4],entri:4,env:3,envelop:4,environ:[3,6,7],error:[4,6],especi:7,essenti:3,est:3,etc:[1,3,4,5,7],everi:7,exactli:6,exampl:[1,2,5,6,7],example_modul:[6,7],except:6,exec:6,exec_cmd:[1,5,6,7],execstart:3,execut:5,exist:[1,3],exit:6,expect:[1,3,6],explain:[6,7],extend:7,extent:[1,4],fail:[2,6],fake:6,familiar:1,few:6,field:6,file:[1,2,3,4,7],filter:[0,2,4],filterdemo:[6,7],filtered1:1,filtered2:1,filtermodul:7,find:2,first:[1,3,6],flag:5,flat:7,flatten:[6,7],float32:[1,4,5],float32_1:6,flow:0,folder:[5,6],follow:[1,3,4,6,7],form:3,four:4,framework:[6,7],freq:4,fresh:3,fri:1,from:[0,1,2,3,4,6,7],ftp:3,full:[1,3,5],gener:[0,1,6,7],get:[2,3,6],get_event_loop:6,gfortran:3,git:[3,4,7],give:3,given:6,global:6,good:6,grant:3,greater:3,greatli:6,group:3,guid:6,guidelin:[3,4],harmon:[0,4],has:[0,1,4,6,7],have:[3,4,6,7],help:[1,3,6,7],here:[1,3,7],high:6,hold:1,homepag:3,host:3,how:[5,6,7],hstack:6,htmlcov:2,http:[1,2,3,4,5,7],hub:[2,3,6],ignor:6,impact:3,implement:7,impos:7,improv:6,includ:[1,2,3,6],increas:6,increment:7,independ:4,index:7,indic:[6,7],inexact:6,info:3,inform:[3,5],infrastructur:[6,7],initi:[6,7],inner:6,input:[0,1,5,6,7],ins:7,insert:[4,7],insertionperiod:[4,5],instal:[1,2,6,7],instanc:[3,6],instead:[3,6],instruct:3,int32:6,intern:5,interpret:6,interrog:6,interv:[1,4],intrus:4,isol:[6,7],jan:[1,4],jdonnal:3,joul:[1,4,6,7],journal:3,just:6,keep:[1,5,6],keyword:[6,7],larg:6,later:3,layout:[1,6],len:7,libapache2:3,libbla:3,libbz2:3,liblapack:3,librari:6,libsqlite3:3,libssl:3,light:0,like:[2,6,7],line:[1,2,3,4,6,7],linear:7,list:[1,4,5],live:6,load:3,local:[3,6],localhost:[1,3,5],localnumpypip:6,locat:[3,4,5],log:[1,2,3,4,5,6],logic:6,longer:7,look:3,mai:[0,3,6,7],mail:3,main:[1,3,4,6,7],make:[1,2,3],manag:[0,2,3,7],mani:[0,3],manual:6,match:6,matrix:7,max:5,maxloglin:[4,5],mean:[1,7],measur:0,median:[1,7],mem:[1,4],meter4:4,meter:4,method:7,mimic:6,mkdir:3,mkvirtualenv:3,mock:[6,7],mod:3,modul:[2,3],module_config:[1,3,5,6],moduledirectori:5,mon:4,monitor:4,more:[0,1,3,6,7],most:[5,6,7],move:[1,7],much:7,multi:3,multilin:7,multipurpos:1,must:[1,3,6,7],my_filt:6,my_read:6,my_task:6,name:[1,3,5,6,7],namespac:[6,7],necessari:[3,6],need:[1,6],net:[3,4,7],network:3,newli:4,next:[1,7],nilm:2,nilmdb:[1,2,4,5,6,7],nilmtool:[1,3,4,6],non:4,noncontact:4,none:6,normal:7,nose2:[2,7],note:[1,3,6,7],noth:3,now:[1,3],number:[1,5,6],numpi:[2,3,6,7],numpypip:[6,7],object:[1,7],occup:0,occur:3,offset:[4,5,6,7],often:5,omit:6,onc:[0,6],one:[0,6,7],ones:6,onli:[6,7],oper:[1,2,6,7],opt:[3,4],option:[1,3,5,7],order:6,org:3,other:[3,6],otherwis:3,ouput:7,our:[1,6],output:[0,1,3,5,6,7],over:3,overrid:7,own:6,paragraph:7,paramet:[4,6,7],parent:7,parsed_arg:7,parser:7,part:[6,7],pass:[6,7],path1:5,path2:5,path:[1,3,5,6],pattern:7,per:1,perform:[1,3,6,7],period:[4,7],permiss:3,phase:4,pid:3,pip2:3,pip3:[3,7],pip:3,pipe:[1,2,6,7],pipe_in:6,pipe_out:6,pipelin:[0,1,2],platform:2,pleas:2,plottabl:5,point:[3,6],port:[1,7],portion:7,possibl:6,power:4,practic:7,prefer:[6,7],prep:4,prepend:7,prescript:6,prevent:6,previou:7,primari:0,print:[1,3,4,6,7],proc:5,procdb:[4,5],process:[0,4,6,7],procgroup:3,produc:[0,6],product:6,progressbar:3,project:6,prompt:6,proper:7,properli:6,properti:7,provid:[1,4,6,7],psutil:3,pull:[2,3],python2:3,python3:[3,4,6,7],python:2,rand1:1,rand2:1,random:1,rang:6,raspberri:2,raspbian:3,rate:[4,6,7],rather:6,raw:[4,6,7],reactiv:4,read:[0,1,3,4,6,7],read_nowait:6,reader:[0,2,4],readerdemo:[6,7],readermodul:7,readi:3,real:4,receiv:[0,6,7],recent:4,recogn:6,recommend:[3,7],reconstruct:4,reduc:6,refactor:6,refer:[0,2,3,6,7],regress:6,remot:3,remov:1,report:4,repositori:[1,3,4,6,7],repres:0,request:[2,3,4],requir:[2,3,5,6,7],rest:6,restart:[1,2,3,4],resul:6,retriev:6,reusabl:0,robust:2,roll:5,room:0,rotat:4,routin:6,row:[1,4],run:[1,3,4,7],run_until_complet:6,runner:[2,6],runtim:2,safe:6,same:6,sampl:[4,7],sarrai:7,scale_factor:5,schedul:6,scipi:3,script:[3,6],second:[1,4,5,6,7],section:[0,1,6,7],see:[0,1,2,3,4,5,6,7],seed:6,seem:6,self:[6,7],send:[1,3,5],sensor:[0,2,4],sequenc:6,serial:[1,4,7],serv:6,server:[3,5],servic:[1,3,4],set:[1,4,5,6,7],setup:[1,3,4],setuptool:3,sever:[1,6],ship:3,should:[3,5,6,7],show:[0,5,6,7],shown:[1,3,6],signal:2,similar:6,simpl:[0,1,2,3],simplejson:3,simpli:1,sinc:3,sinefit:4,singl:[2,6,7],site:3,size:1,skip:3,sleep:[6,7],slice:3,slower:6,snippet:7,some:3,sourc:[1,3,4,5,6,7],special:7,specifi:[3,6,7],spuriou:6,sqlite:5,standalon:7,standard:6,standarderror:3,standardoutput:3,start:[2,3,4,5,6],starter:7,startup:3,statist:2,statu:[1,3,4],stdout:[1,7],step:6,stop:6,storag:3,store:[1,3,6],stream1:5,stream2:5,stream:[1,2,3,4,6,7],stream_config:[1,3,5,6],stream_in:7,stream_out:7,streamdirectori:5,strictli:3,string:[6,7],structur:[0,3,6,7],subdirectori:6,sudo:[1,3,4,7],suggest:0,suit:[4,6],summari:7,sure:[1,3],synchron:6,syntax:[6,7],syslog:3,system:[1,2,3,4,6,7],systemctl:[1,3,4],systemd:3,tabl:0,take:[0,6,7],tar:3,target:3,task:6,tear:6,tediou:6,temperatur:0,termin:[3,4],test:[3,7],test_:6,test_filt:[6,7],test_input:6,test_read:[6,7],testcas:6,testfilt:6,testread:6,text:3,tgz:3,than:[3,6],thei:[0,2,3,6,7],them:[3,6],therefor:6,thi:[1,3,4,6,7],thing:6,though:6,thread:3,three:[6,7],through:3,time:[6,7],time_now:7,timestamp:[0,6,7],tmp:5,togeth:[0,2],tool:[3,6],top:6,total:[1,4],touch:3,treat:7,tty:0,tue:3,turn:2,two:[0,1,6,7],type:[0,1,3,6,7],unconsum:7,understand:6,unit:[2,3,7],unittest:[2,6,7],unlik:7,unset:6,until:6,updat:3,upgrad:3,url:5,usag:7,usb:0,use:[1,5,6,7],used:[5,6,7],user:[2,3,6,7],uses:[2,5,6],using:[0,1,2,3,4,6,7],usna:[3,4,6],usr:3,util:2,val1:7,val2:7,val3:7,val:7,valn:7,valu:[0,1,3,4,6,7],vari:6,verifi:[2,7],version:[3,6],view:0,virtual:3,virtualenvwrapp:3,virtualhost:3,voltag:4,wai:[3,6],wait:6,want:6,wantedbi:3,wattsworth:[3,4,7],waveform:4,welcom:2,well:[6,7],wget:3,what:[6,7],when:[1,6],which:[0,1,6,7],window:1,within:3,work:[3,5,6,7],workflow:2,workon:3,workon_hom:3,would:[6,7],write:[0,1,2,3,6],write_nowait:6,written:6,wsgi:3,wsgi_appl:3,wsgiapplicationgroup:3,wsgidaemonprocess:3,wsgiprocessgroup:3,wsgiscriptalia:3,www:3,xvf:3,yaml:[3,4],yes:[5,6],yml:[4,6],you:[1,2,3,6,7],your:[0,1,2,3,6,7],zero:[0,4,7]},titles:["Joule Concepts","Getting Started","Joule: Modular Data Processing","Installation","NILM Modules","Reference","Testing Modules","Writing Modules"],titleterms:{E2E:5,build:6,check:6,command:5,concept:[0,5],conf:5,config:5,configur:[4,5,6],contribut:2,custom:7,data:2,docker:3,end:6,event:6,exampl:0,file:[5,6],filter:[1,6,7],filtermodul:6,get:1,instal:[3,4],joul:[0,2,3,5],line:5,loop:6,main:5,method:5,modul:[0,1,4,5,6,7],modular:2,nilm:4,nilmdb:3,nilmtool:5,numpi:5,object:6,oper:4,pipe:[0,5],process:2,python:3,reader:[1,6,7],readermodul:6,refer:5,result:6,run:[2,6],start:1,stream:[0,5],test:[2,6],unit:6,util:5,verifi:[3,4],virtualenv:3,write:7}})
\ No newline at end of file
Search.setIndex({docnames:["concepts","getting_started","index","install","nilmdb","reference","testing_modules","writing_modules"],envversion:52,filenames:["concepts.rst","getting_started.rst","index.rst","install.rst","nilmdb.rst","reference.rst","testing_modules.rst","writing_modules.rst"],objects:{},objnames:{},objtypes:{},terms:{"00000000255c":[],"0hz":1,"105d":4,"11e2":[],"15w":4,"1e6":6,"2520h":4,"29y":4,"30px":[],"76d81854":[],"8168f08f":[],"87fe":[],"9b2c":[],"\u03c6":[],"\u03c6a":[],"\u03c6b":[],"\u03c6c":[],"\u03c6extra":[],"byte":[],"case":[4,5,7],"class":[6,7],"default":[1,3,4,5,6,7],"export":3,"final":7,"float":[6,7],"function":[4,6,7],"import":[3,6,7],"long":4,"new":[0,1,3,4,6],"null":5,"return":[3,4,6,7],"short":[4,5,7],"super":7,"true":[4,6,7],"try":6,"while":[0,6,7],E2E:[2,6],For:4,IDs:[],NOT:[],Not:[4,6],One:4,That:1,The:[0,2,3,4,5,6,7],Then:3,There:6,These:[3,4,5,6,7],Use:6,Useful:4,Using:0,With:4,__init__:7,__main__:6,__name__:6,abbrevi:[],abil:4,about:[4,6],abov:[1,3,4,6],absolut:[4,5],accept:[4,7],access:[3,4,6,7],accordingli:4,account:4,acquisit:2,act:2,action:4,activ:3,actual:7,add:[1,3,4,7],add_argu:7,added:[4,6],adding:7,addit:[4,5,7],addition:7,address:[4,5],addus:3,adjac:4,adjust:3,advanc:[],affect:4,after:[3,4,6],afterward:4,against:[],ago:3,ahead:[3,4],alert:[],algorithm:[],aliv:[],all:[1,2,3,4,6],alloc:1,allow:[0,2,6,7],alreadi:[3,4],also:[2,3,4,6,7],altern:5,alwai:[2,3,4,6,7],america:4,amount:4,amp:[],amplitud:[],analog:4,analyz:[],ani:[0,4,6,7],anim:0,annot:4,annotateinclud:4,anoth:4,anywher:[],apach:[3,4],apache2:3,apache2ctl:3,apart:6,api:[0,6],appear:4,append:[],appgroup:3,appli:[4,7],applic:3,appropri:6,approxim:[],apt:3,arang:6,arg:[5,6],arglist:[],argpars:[6,7],argument:[4,6,7],aris:[],arithmet:6,arrai:[6,7],assembl:6,assert:6,assert_array_almost_equ:6,assert_array_equ:6,associ:[4,6],assum:3,assur:6,async:[6,7],asynchron:[0,6,7],asyncio:[6,7],asynctest:[6,7],attach:6,attempt:4,attribut:[],authent:[],auto:2,autom:[],automat:[3,4,5,6],avaiabl:1,avail:[2,3,4,6,7],averag:[1,7],avoid:4,await:[6,7],back:7,backup:[],bar:4,bare:[],bareomit:4,base:[4,7],bash:[],basic:3,becaus:7,befor:[1,3,4,6,7],begin:4,behavior:[0,4],behind:4,being:4,below:[0,3,4,5,6,7],best:7,between:[3,4],bin:3,binari:[3,4],binaryoutput:4,bit:[],blank:[],block:[0,2],board:2,boilerpl:6,boot:[2,4,6],bootstrap:6,both:[1,4,6],bottleneck:2,bottom:[],bound:[],boundari:[],brace:[4,7],bracket:4,broken:[],bucket:4,buffer_s:[],bug:2,build:[0,1,2,3],built:[3,4,6,7],builtin:1,calcul:4,call:[1,4,6,7],call_lat:6,can:[0,1,2,4,5,6,7],cancel:6,cancellederror:6,cannot:7,captur:[1,2,3,4],care:4,caus:4,ceas:4,certif:[],cgroup:3,chain:0,chang:4,check:[1,3,4],check_data:6,check_log:6,check_modul:6,cherrypy3:3,choic:4,chown:3,clean:[4,6],cleanli:6,cleanup:2,client:[3,4,7],clock:4,clone:[3,7],close:6,clutter:4,cmd:[],code:[2,4,6,7],coeffici:[],collect:2,column:[4,6],com:2,combin:6,come:4,command:[1,2,3,4,6,7],comment:4,common:6,commun:[0,3],compar:6,complet:6,complex:[0,2,7],compon:4,compos:[2,6],comput:[1,2,7],con:[],concept:[1,2,4,7],conf:[1,2,3,6],confid:6,config:[2,6],config_fil:[],configfil:4,configur:[1,2,3,4,7],confirm:1,conflict:[3,4],connect:[0,1,2,3,6,7],consist:[1,4],consolid:4,constant:4,constraint:7,consum:[0,7],contact:[3,6],contain:[2,3,4,6,7],content:[0,4,6],continu:[1,4,7],control:[],convent:4,convert:4,copi:[1,2,3,6],core:[],coroutin:[0,6,7],correct:[3,4,7],correctli:6,correspond:4,corrupt:4,cosin:[],count:[4,7],countdisplai:4,counter:6,countinstead:4,cover:4,coverag:2,cpu:1,creat:[1,2,3,6],creation:3,credenti:6,critic:7,cross:[],curli:4,current:[0,4],custom:[1,2,5,6],custom_arg:[6,7],cutoff:4,cython:3,daemon:3,dai:4,data:[0,1,3,4,5,6,7],data_delta:4,databas:[0,1,2,3,5],databaseloc:4,dataset:6,dataskip:4,datastor:7,datatyp:[1,5,6],date:3,datetim:3,dateutil:3,db_path:[],dbpath:5,deal:4,deb:3,debug:[4,7],decim:[2,5,6],decimate_factor:4,decimate_sourc:4,decimomit:4,decompress:4,decor:3,def:[6,7],default_max:5,default_min:5,default_valu:[],defin:[2,4,7],deg:[],degre:6,delet:4,delta:4,deltadata_delta:4,demo:[1,6,7],demo_filt:1,demo_random:1,demo_read:1,demonstr:1,denot:4,dep:3,depend:3,deploi:6,deriv:[0,7],describ:[4,6],descript:[1,3,5,7],design:[6,7],desir:6,dest:4,dest_url:4,destin:[1,4,5,6,7],destpath:4,destpathpath:4,destroi:2,desturl:4,detach:[],detail:[0,1,2,4,6,7],detailin:4,detect:[0,2,4],determin:4,dev:3,develop:[4,7],devic:[0,4],dictionari:[6,7],diff:[4,6],differ:[1,3,4],diffpath:4,dimens:7,direct:3,directli:[0,4,6],directori:[2,3,4,6],disabl:6,discrep:4,discret:5,disk:4,displai:[1,4],distro:3,div:[],doc:2,docker:[2,6],docstr:6,documen:7,document:[4,6,7],doe:[0,4,6,7],don:4,done:[],donnal:[3,6],doubl:7,down:6,download:3,drop:4,dry:4,dspace:4,dure:[],e2e:[2,6],e2e_joule_1:6,e2eutil:6,each:[2,4,5,6],eachoth:7,earlier:[3,4,6],easi:2,easiest:3,edit:[3,5],edu:[3,6],effeci:0,either:4,element1:[0,1,5,6],element2:[0,1],element:[0,1,4,5,6],elementn:[0,5],empti:4,enabl:3,enclos:7,end:[2,4,7],enforc:0,engin:2,ensur:[2,4,6],ensure_futur:6,enter:1,entri:3,env:3,envelop:[],environ:[3,4,6,7],epoch:4,equal:4,equival:[],error:[4,6],especi:7,essenti:3,est:3,estim:4,etc:[1,3,4,5,7],eth:[],ethstream:4,even:4,ever:4,everi:[4,7],exactli:6,exampl:[1,2,4,5,6,7],example_modul:[6,7],except:[4,6],exclus:4,exec:6,exec_cmd:[1,5,6,7],execstart:3,execut:[4,5],exist:[1,3,4],exit:[4,6],expect:[1,3,4,6],explain:[6,7],explor:[],ext:[],extend:[4,7],extent:[1,4],extern:4,extract:2,extshow:4,factor:4,fail:[2,6],fake:6,fall:4,fals:4,familiar:1,far:4,fast:4,faster:4,feca:[],fest:[],few:6,fewer:4,fft:[],field:6,fifo:[],figur:[],file:[1,2,3,4,7],filenam:4,filenameus:4,filesystem:4,fileus:4,filter:[0,2,4],filterdemo:[6,7],filtered1:1,filtered2:1,filtermodul:[2,7],find:[2,4],finish:[],first:[1,3,4,6],fit:[],fix:4,fixattempt:4,flag:5,flat:7,flatten:[6,7],float32:[1,4,5],float32_1:6,float32_8:4,flow:0,folder:[5,6],follow:[1,3,4,6,7],foo:4,forc:4,form:[3,4],format:4,forward:4,framework:[6,7],free:4,freq:[],frequenc:[],fresh:3,fri:1,from:[0,1,2,3,4,6,7],fsck:2,ftp:3,full:[1,3,4,5],gap:4,gener:[0,1,4,6,7],get:[2,3,4,6],get_event_loop:6,gfortran:3,gib:4,git:[3,7],give:[3,4],given:[4,6],global:[4,6],good:6,grant:3,greater:3,greatli:6,grei:[],group:3,guess:4,guid:[4,6],guidelin:3,handl:[],harmon:0,has:[0,1,4,6,7],have:[3,4,6,7],header:[],help:[1,2,3,6,7],helpprint:4,here:[1,3,7],hide:[],high:6,higher:4,his:4,hold:1,home:4,homepag:3,homogen:4,honolulu:4,host:3,hour:4,how:[4,5,6,7],howev:[],href:4,hstack:6,htmlcov:2,http:[1,2,3,4,5,7],hub:[2,3,6],human:4,iana:4,ident:[],ignor:[4,6],immedi:[],impact:3,implement:7,impos:7,improp:4,improv:6,inaccur:4,includ:[1,2,3,4,6],inclus:4,increas:[4,6],increment:7,incur:[],ind:[],indent:[],index:7,indic:[4,6,7],inexact:6,infil:4,info:[2,3],inform:[3,4,5],infrastructur:[6,7],initi:[6,7],inner:6,inp:[],input:[0,1,4,5,6,7],ins:7,insecur:[],insert:[2,7],insertionperiod:5,insid:4,instal:[1,2,4,6,7],instanc:[3,4,6],instead:[3,4,6],instruct:3,insuffici:4,int32:6,int64:4,intact:[],integ:4,intellig:4,intend:4,interact:4,interchang:4,interfac:4,intern:[4,5],interpret:[4,6],interrog:6,interv:[1,2],introduct:[],invoc:4,invok:4,involv:4,isol:[6,7],its:4,jame:4,jan:1,jdonnal:3,join:4,joul:[1,4,6,7],journal:3,just:6,kalman:[],keep:[1,4,5,6],kei:4,keyword:[4,6,7],kill:[],known:4,lag:[],larg:[4,6],largest:4,last:4,later:3,layout:[1,4,6],layoutdisplai:4,layoutlayout:4,lead:[],least:4,leav:[],left:4,len:7,length:[],less:4,level:4,libapache2:3,libbla:3,libbz2:3,liblapack:3,librari:[4,6],libsqlite3:3,libssl:3,light:0,like:[2,3,4,6,7],limit:[],line:[1,2,3,4,6,7],linear:7,linux:[],list:[1,2,3,5],listen:4,live:[4,6],liveus:4,load:3,local:[3,4,6],localhost:[1,3,4,5],localnumpypip:6,locat:[3,4,5],lock:4,log:[1,2,3,5,6],logic:6,longer:7,look:3,loss:4,low:4,lower:4,mai:[0,3,4,6,7],mail:3,main:[1,2,3,6,7],make:[1,2,3,4],manag:[0,2,3,4,7],mand:4,mani:[0,3,4],manual:[4,6],mark:[],markup:4,markupinclud:4,match:[4,6],matplotlib:3,matrix:7,max:[4,5],max_freq:[],max_gap:4,maximum:4,maxloglin:5,mean:[1,4,7],measur:[0,4],median:[1,7],mem:1,memori:[],merg:4,messag:4,metadata:2,metadataoverwrit:4,meter:[],method:[2,4,7],mib:[],microsecond:4,middl:[],might:[],mimic:6,min:4,min_amp:[],min_freq:[],minimum:4,mit:4,mkdir:3,mkfifo:[],mkvirtualenv:3,mock:[6,7],mod:3,mode:[],modul:[2,3],module_config:[1,3,5,6],moduledirectori:5,mono:[],monolith:4,month:4,more:[0,1,3,4,6,7],most:[4,5,6,7],move:[1,7],much:[4,7],multi:[3,4],multilin:7,multipl:4,multipurpos:1,must:[1,3,4,6,7],mutual:4,my_filt:6,my_read:6,my_task:6,name:[1,3,4,5,6,7],namespac:[6,7],nativ:[],necessari:[3,4,6],need:[1,3,4,6],net:[3,7],network:3,new_york:4,newer:4,newli:4,newpath:4,newpathnew:4,next:[1,4,7],nharm:[],nilm:2,nilmdb:[1,2,5,6,7],nilmdb_url:4,nilmrun:[],nilmrun_url:[],nilmtool:[1,2,3,6],noaa:4,nometa:[],non:[],none:[4,6],noninclus:4,normal:[4,7],nose2:[2,7],note:[1,3,4,6,7],noth:3,noverifi:[],now:[1,3],nshift:[],number:[1,4,5,6],numer:4,numpi:[2,3,6,7],numpypip:[6,7],object:[1,7],occup:0,occur:[3,4],odd:[],off:[],offer:[],offset:[4,5,6,7],often:[4,5],old:4,older:4,oldest:4,oldpath:4,oldpathold:4,omit:[4,6],onc:[0,6],one:[0,4,6,7],ones:6,onli:[4,6,7],open:4,oper:[1,4,6,7],opposit:4,opt:3,optim:4,optimizeoptim:4,option:[1,3,4,5,7],order:6,org:3,origin:4,other:[3,4,6],otherwis:[3,4],ouput:7,our:[1,6],output:[0,1,3,4,5,6,7],outsid:[],over:3,overal:[],overlap:4,overrid:7,overwrit:[],overwritten:[],own:[4,6],pad:[],page:4,paragraph:7,paramet:[4,6,7],parent:7,pari:4,pars:4,parse_tim:4,parsed_arg:7,parser:7,part:[6,7],particular:4,particularli:4,pass:[6,7],password:[],path1:5,path2:5,path:[1,3,4,5,6],pathlist:4,pathpath:4,pattern:7,pendent:[],per:[1,4],percentag:[],perform:[1,3,4,6,7],period:7,perman:4,permiss:3,permit:[],phase:[],pid:3,pilot:4,pip2:3,pip3:[3,7],pip:3,pipe:[1,2,4,6,7],pipe_in:6,pipe_out:6,pipelin:[0,1,2],plain:4,plainlist:[],platform:2,pleas:2,plot:[],plottabl:5,plu:4,point:[3,6],poll:[],popul:[],port:[1,4,7],portion:7,posit:[],possibl:[4,6],powerloss:[],practic:[4,7],pre:4,precis:4,prefer:[4,6,7],prefix:[],prep:4,prep_column:[],prep_nshift:[],prep_raw_sourc:[],prep_rot:[],prep_sinefit_sourc:[],prepend:7,preprocessor:[],prescript:6,presenc:4,present:4,prevent:[4,6],previou:[4,7],previous:4,primari:0,print:[1,3,4,6,7],problem:[],proc:5,procdb:5,process:[0,4,6,7],procgroup:3,produc:[0,6],product:6,profil:4,program:4,progressbar:3,project:6,prompt:6,proper:7,properli:6,properti:7,provid:[1,4,6,7],psutil:3,pull:[2,3,4],purpos:4,python2:3,python3:[3,6,7],python:[],quantiti:4,quiet:[],quietbi:4,quietsil:4,quietsuppress:4,quot:4,rad:[],radian:[],rand1:1,rand2:1,random:1,rang:[4,6],raspberri:2,raspbian:3,rate:[4,6,7],rather:[4,6],raw:[4,6,7],rawus:4,rawwhen:4,read:[0,1,3,4,6,7],read_nowait:6,readabl:4,reader:[0,2],readerdemo:[6,7],readermodul:[2,7],readi:3,receiv:[0,6,7],recogn:6,recommend:[3,7],record:4,reduc:6,refactor:6,refer:[0,2,3,6,7],refus:4,region:4,regress:6,rel:4,relat:4,reloc:4,remain:4,remaind:4,remot:3,remov:[1,2],renam:2,repair:4,replac:4,report:[],repositori:[1,3,6,7],repres:[0,4],request:[2,3],requir:[2,3,4,5,6,7],reserv:4,resid:4,respons:4,rest:6,restart:[1,2,3],resul:6,retriev:6,reusabl:0,robust:2,roll:5,room:0,rotat:[],rough:[],routin:6,row:[1,4],run:[1,3,4,7],run_until_complet:6,runjust:4,runner:[2,6],runpars:4,runtim:2,safe:6,same:[4,6],sampl:7,sarrai:7,save:4,scale:[],scale_factor:5,schedul:6,schema:[],scipi:3,script:[3,6],sec:4,second:[1,4,5,6,7],secondari:[],section:[0,1,4,6,7],see:[0,1,2,3,4,5,6,7],seed:6,seem:6,segment:[],self:[6,7],send:[1,3,5],sensor1:[],sensor:[0,2],separ:4,sequenc:6,sequenti:[],serial:[1,7],serv:6,server:[2,3,5],servic:[1,3],set:[1,4,5,6,7],setup:[1,3],setuptool:3,sever:[1,6],sharon:4,shell:4,shift:[],ship:3,should:[3,4,5,6,7],show:[0,4,5,6,7],shown:[1,3,4,6],shutdown:4,signal:2,silenc:[],similar:[4,6],simpl:[0,1,2,3],simplejson:3,simpler:4,simpli:1,sinc:[3,4],sine:[],sinefit:[],sinefit_column:[],sinefit_sourc:[],sinepath:[],singl:[2,4,6,7],sinusoid:[],site:3,size:1,skip:[3,4],skipskip:4,sleep:[6,7],slice:3,slide:[],slow:4,slower:6,small:4,snippet:7,softwar:4,some:[3,4],sourc:[1,3,4,5,6,7],space:4,span:[],special:[4,7],specif:4,specifi:[3,4,6,7],spectral:[],spuriou:6,sqlite:5,squar:4,src:3,srcpath:4,srcpathpath:4,ssl:[],standalon:[4,7],standard:[4,6],standarderror:3,standardoutput:3,start:[2,3,4,5,6],starter:7,startup:[3,4],state:[],statist:2,statu:[1,3,4],stdin:4,stdout:[1,7],step:[4,6],still:[],stop:[4,6],storag:3,store:[1,3,4,6],stream1:5,stream2:5,stream:[1,2,3,4,6,7],stream_config:[1,3,5,6],stream_in:7,stream_out:7,streamdirectori:5,strictli:3,string:[4,6,7],structur:[0,3,6,7],style:[],sub:4,subcom:4,subcommand:4,subdirectori:6,subject:[],subsequ:4,substitut:[],subtract:4,success:[],successfulli:[],sudo:[1,3,7],suffix:4,suggest:0,suit:6,summari:7,suppli:4,support:4,suppress:[],sure:[1,3],synchron:6,syntax:[4,6,7],syslog:3,system:[1,2,3,4,6,7],systemctl:[1,3],systemd:3,tabl:[0,4],take:[0,4,6,7],tar:3,target:3,task:6,tcp:4,tear:6,tediou:6,temp:4,temperatur:0,termin:3,test:[3,4,7],test_:6,test_filt:[6,7],test_input:6,test_read:[6,7],testcas:6,testfilt:6,testread:6,text:[3,4],textarea:[],tgz:3,than:[3,4,6],thei:[0,2,3,4,6,7],them:[3,4,6],therefor:[4,6],thesi:4,thi:[1,3,4,6,7],thing:6,those:4,though:6,thread:3,three:[4,6,7],through:3,time:[4,6,7],time_now:7,timeend:4,timestamp:[0,4,6,7],timestampadd:4,timestart:4,timezon:4,tion:[],titl:[],tmp:5,togeth:[0,2],too:4,tool:[3,4,6],top:6,total:[1,4],touch:3,traceback:4,tracebackprovid:4,track:4,transfer:4,transpar:4,treat:7,treatment:4,ts_format:[],tty:0,tue:3,turn:2,two:[0,1,4,6,7],type:[0,1,3,4,6,7],typic:4,uint16:4,unchang:4,uncompress:4,unconsum:7,under:4,understand:6,uniqu:[],unit:[2,3,4,7],unittest:[2,6,7],unix:4,unlik:7,unnecessari:4,unset:6,unspecifi:4,until:[4,6],updat:[3,4],upgrad:3,url:[4,5],usag:[4,7],usb:0,use:[1,4,5,6,7],used:[4,5,6,7],useful:4,user:[2,3,6,7],uses:[2,4,5,6],using:[0,1,2,3,4,6,7],usna:[3,6],usr:3,usual:4,utc:4,util:2,val1:7,val2:7,val3:7,val:7,valid:[],valn:7,valu:[0,1,3,4,6,7],vari:6,variabl:4,varieti:[],veri:[],verif:4,verifi:7,version:[3,4,6],versionprint:4,via:4,view:0,virtual:3,virtualenv:[],virtualenvwrapp:3,virtualhost:3,voltag:[],wai:[3,6],wait:6,want:6,wantedbi:3,warn:[],wattsworth:[3,7],wave:[],waveform:[],web:4,webserv:4,week:4,welcom:2,well:[6,7],were:4,wget:3,what:[6,7],when:[1,4,6],where:4,whether:4,which:[0,1,4,6,7],wildcard:2,window:1,within:[3,4],without:[],work:[3,5,6,7],workflow:2,workon:3,workon_hom:3,would:[4,6,7],wrap:4,write:[0,1,2,3,4,6],write_nowait:6,written:6,wsgi:[3,4],wsgi_appl:3,wsgiapplicationgroup:3,wsgidaemonprocess:3,wsgiprocessgroup:3,wsgiscriptalia:3,www:3,xvf:3,yaml:3,yappi:4,yappirun:4,year:4,yes:[5,6],yet:4,yml:6,you:[1,2,3,4,6,7],your:[0,1,2,3,6,7],zero:[0,7],zone:4},titles:["Joule Concepts","Getting Started","Joule: Modular Data Processing","Installation","Database Reference","Reference","Testing Modules","Writing Modules"],titleterms:{E2E:5,auto:4,build:6,check:6,cleanup:4,command:5,concept:[0,5],conf:5,config:5,configur:[5,6],contribut:2,copi:4,creat:4,custom:7,data:2,databas:4,decim:4,destroi:4,docker:3,end:6,event:6,exampl:0,extract:4,file:[5,6],filter:[1,6,7],filtermodul:6,fsck:4,get:1,help:4,info:4,inform:[],insert:4,instal:3,interv:4,introduct:[],joul:[0,2,3,5],line:5,list:4,loop:6,main:5,manag:[],metadata:4,method:5,modul:[0,1,5,6,7],modular:2,multipurpos:[],nilm:4,nilmdb:[3,4],nilmtool:[4,5],numpi:5,object:6,pipe:[0,5],print:[],process:2,python:3,reader:[1,6,7],readermodul:6,refer:[4,5],remov:4,renam:4,result:6,run:[2,6],server:4,start:1,stream:[0,5],subcommand:[],test:[2,6],tool:[],unit:6,util:5,verifi:3,virtualenv:3,wildcard:4,write:7}})
\ No newline at end of file
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -26,7 +27,7 @@
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="NILM Modules" href="nilm.html" />
<link rel="next" title="Database Reference" href="nilmdb.html" />
<link rel="prev" title="Writing Modules" href="writing_modules.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
......@@ -481,11 +482,19 @@ and the e2eutils reference for details on the testing API.</p>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="writing_modules.html">Writing Modules</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Testing Modules</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#unit-testing">Unit Testing</a></li>
<li class="toctree-l2"><a class="reference internal" href="#end-to-end-testing">End-to-End Testing</a></li>
<li class="toctree-l2"><a class="reference internal" href="#unit-testing">Unit Testing</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#readermodules">ReaderModules</a></li>
<li class="toctree-l3"><a class="reference internal" href="#filtermodules">FilterModules</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a></li>
<li class="toctree-l2"><a class="reference internal" href="#end-to-end-testing">End-to-End Testing</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#configuration-files">Configuration Files</a></li>
<li class="toctree-l3"><a class="reference internal" href="#test-py">test.py</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
......@@ -494,7 +503,7 @@ and the e2eutils reference for details on the testing API.</p>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="writing_modules.html" title="previous chapter">Writing Modules</a></li>
<li>Next: <a href="nilm.html" title="next chapter">NILM Modules</a></li>
<li>Next: <a href="nilmdb.html" title="next chapter">Database Reference</a></li>
</ul></li>
</ul>
</div>
......
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
......@@ -277,7 +278,7 @@ modules in isolation. An example is provided in <strong>test_filter.py</strong>.
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="testing_modules.html">Testing Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilm.html">NILM Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="nilmdb.html">Database Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
......
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