Configuring Plaid
The config file contains important configurations that will need to be updated for every implementation of Plaid. At a minimum, fields such as vtnID
, venID
and tls
fields within the oadr section will need to be updated for each new VEN.
A sample configuration can be found in nova-source-root/nova/config/config.json.sample
.
Using the default configuration file, Plaid won't be configured to connect to a VTN. At a minimum, the venName and vtnUrl will need to be modified.
Config in the command line
Settings in the config file can be overridden from the command line by passing additional parameters after the configuration file parameter. The config override options have the following format:
--object.path.in.config=value
Here's an example of setting the vtnUrl
and venName
from the command line:
nova <path/to/schema.json> <path/to/config.json> --oadr.vtnUrl=http://localhost:3000 --oadr.venName=newVenName
Config file description
The remainder of this document provides a description for each field in the configuration file.
- startPollThread (boolean) : if
true
, start the poll thread on startup - ignoreEventRandomization (boolean) : Plaid will ignore event randomization if
true
. Iffalse
, Plaid will determine the random start and end event times within the randomization window when randomization is present, and set off the start and end event callbacks accordingly. We recommend keeping this tofalse
unless you have a good reason. - persistIds (boolean) : Reuse VEN ID and Registration ID received from the VTN on subsequent registrations, and persist to the config file
- statusCallback : The following parameters relate to the status callback
- oadr : The following parameters are related to the oadr communication
- venName (string) : VEN name supplied by VTN maintainer.
- venId (string) : VEN ID supplied by the VTN maintainer. If included, this VEN ID will always be present when registering with the VTN.
- registrationId (string) : Registration ID supplied by the VTN maintainer. If included, this registration ID will be present when registering with the VTN.
- vtnId (string) : Not used; ignore this parameter.
- vtnUrl (string) : HTTP path to the VTN. This string must begin with http or https.
- tls : The following fields refer to subfields of the tls object
- enable (boolean) : Set to
true
to enable TLS security. If enabled, all of the following fields should have values and the VTN URL should begin with https. - capath (string) : File system path to the CA file in PEM format. These will be provided in your source code in the
cacerts
folder. - keypath (string) : File system path to the key file in PEM format. This will be added after downloading from kyrio (explained here), the suggestion is to put it in a
certs
folder. - certpath (string) : File system path the certificate file in PEM format (This is a concatenation of 3 PEM files). This will be added after downloading from kyrio (explained here), the suggestion is to put it in a
certs
folder. - verifyHostname (boolean) : If
true
, the TLS library will validate the expiration date of the server certificate, and that the common name in the certificate matches the host part of the VTN URL parameter. - cipherList (string) : List of supported cipher suites. Under most circumstances this field should be left to the default value of:
AES128-SHA256:ECDHE-ECDSA-AES128-SHA256
. If curl is built with an SSL library other than OpenSSL, this list may need to be updated accordingly. - tlsVersion (string) : Selects the TLS version. Under most circumstances, this field should be left at the default value of
TLSv1_2
. Other supported values are: TLSv1, SSLv2, SSLv3, TLSv1_0, TLSv1_1, and TLSv1_2
- enable (boolean) : Set to
- marketContexts (array of RegEx strings) : Lists the MarketContexts the VEN matches against. Market contexts which don't match the list will be rejected.
- signals (array of RegEx strings) : Lists the signalName.signalType the VEN matches against. Signals not matched by the list will be rejected by the VEN. When searching for a match, the signal name and type from the event are concatenated with a period separator. A signal with name SIMPLE and type x-Custom becomes: SIMPLE.x-Custom. Regular expressions should match that format. The signals supported by OpenADR are included by default.
- plugin : Plaid is extended through plugins which implement an interface that accepts callbacks from Plaid
- listener : The listener listens for API requests. Messages exchanged over the listener are formatted as json. WARNING: there is no security placed on the listener: care should be taken in securing access to this port.
- log : Log file settings
- timeouts : Timeouts in seconds
- retries