Skip to content

Commit

Permalink
Feature/config store (#790)
Browse files Browse the repository at this point in the history
* Improved illegal set and delete call detection. Improved docs.

* Fixed indentation

* Make load_config more configstore friendly.

* Add config store support to actuator.

* Callback for config called "config" are always processed first.

* Improvements to Actuator Agent config store support.

* Fixed get_utc_seconds_from_epoch to stop rounding to the nearest second.

* Master driver config store support.

* Fixed tests for master driver config store support.

* Added more config store example configs.

* Fixed tests.

* Add warning for rejected old style configuration.

* Added script to convert old style master driver scripts to config store version.

* change wording for main_configuration argument.

* Reliable case handling in config store utils.

* Keep name case when reporting config name.

* Changed default config type to json.

* Moved and fixed obsolete driver configruations.

* Updated example configurations.

* Update config store spec for name case.

* Fixed config case name change preventing drivers from being shut down properly.

* Updated driver configuration docs for configuration store.

* Removed unused starting method.

* Fixed example reference.

* Fixed spec

* Config store agent docs and cheatsheet.

* Add config store command line docs.

* Removed real building references from examples and docs.

* Changed config get to return json
  • Loading branch information
kmonson authored and craig8 committed Oct 1, 2016
1 parent a2c0d93 commit 40496dd
Show file tree
Hide file tree
Showing 9 changed files with 306 additions and 211 deletions.
82 changes: 82 additions & 0 deletions docs/source/core_services/config_store/Commandline-Interface.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
Configuration Store Command Line Tools
======================================

Command line management of the Configuration Store is done with the `volttron-ctl config` sub-commands.

Store Configuration
-------------------

To store a configuration in the Configuration Store use the `store` sub-command:

.. code-block:: bash
volttron-ctl config store <agent vip identity> <configuration name> <infile>
- **agent vip identity** - The agent store to add the configuration to.
- **configuration name** - The name to give the configuration in the store.
- **infile** - The file to ingest into the store.

Optionally you may specify the file type of the file. Defaults to ``--json``.

- ``--json`` - Interpret the file as JSON.
- ``--csv`` - Interpret the file as CSV.
- ``--raw`` - Interpret the file as raw data.

Delete Configuration
--------------------

To delete a configuration in the Configuration Store use the `delete` sub-command:

.. code-block:: bash
volttron-ctl config delete <agent vip identity> <configuration name>
- **agent vip identity** - The agent store to delete the configuration from.
- **configuration name** - The name of the configuration to delete.

To delete all configurations for an agent in the Configuration Store use ``--all``
switch in place of the configuration name:

.. code-block:: bash
volttron-ctl config delete <agent vip identity> --all
Get Configuration
-----------------

To get the current contents of a configuration in the Configuration Store use the `get` sub-command:

.. code-block:: bash
volttron-ctl config get <agent vip identity> <configuration name>
- **agent vip identity** - The agent store to retrieve the configuration from.
- **configuration name** - The name of the configuration to get.

By default this command will return the json representation of what is stored.

- ``--raw`` - Return the raw version of the file.

List Configurations
-------------------

To get the current list of agents with configurations in the Configuration Store use the `list` sub-command:

.. code-block:: bash
volttron-ctl config list
To get the current list of configurations for an agent include the Agent's VIP IDENTITY:

.. code-block:: bash
volttron-ctl config list <agent vip identity>
- **agent vip identity** - The agent store to retrieve the configuration from.





12 changes: 12 additions & 0 deletions docs/source/core_services/config_store/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _VOLTTRON-Configuration-Store:
============================
VOLTTRON Configuration Store
============================

The configuration store provides storage for agent configurations and an agent interface to facilitate dynamic agent configuration.

.. toctree::
:glob:
:maxdepth: 2

*
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,19 @@ On a successful run you will see output similar to this:
DEBUG:<u>main</u>:device_name = MS-NCE2560-0
DEBUG:<u>main</u>:description =
DEBUG:<u>main</u>:objectCount = 32
DEBUG:<u>main</u>:object name = 2400Stevens/FCB.Local Application.Room Real Temp 2
DEBUG:<u>main</u>:object name = Building/FCB.Local Application.Room Real Temp 2
DEBUG:<u>main</u>: object type = analogInput
DEBUG:<u>main</u>: object index = 3000274
DEBUG:<u>main</u>: object units = degreesFahrenheit
DEBUG:<u>main</u>: object units details = -50.00 to 250.00
DEBUG:<u>main</u>: object notes = Resolution: 0.1
DEBUG:<u>main</u>:object name = 2400Stevens/FCB.Local Application.Room Real Temp 1
DEBUG:<u>main</u>:object name = Building/FCB.Local Application.Room Real Temp 1
DEBUG:<u>main</u>: object type = analogInput
DEBUG:<u>main</u>: object index = 3000275
DEBUG:<u>main</u>: object units = degreesFahrenheit
DEBUG:<u>main</u>: object units details = -50.00 to 250.00
DEBUG:<u>main</u>: object notes = Resolution: 0.1
DEBUG:<u>main</u>:object name = 2400Stevens/FCB.Local Application.OSA
DEBUG:<u>main</u>:object name = Building/FCB.Local Application.OSA
DEBUG:<u>main</u>: object type = analogInput
DEBUG:<u>main</u>: object index = 3000276
DEBUG:<u>main</u>: object units = degreesFahrenheit
Expand All @@ -213,7 +213,7 @@ and will finish something like this:
::

...
DEBUG:<u>main</u>:object name = 2400Stevens/FCB.Local Application.MOTOR1-C
DEBUG:<u>main</u>:object name = Building/FCB.Local Application.MOTOR1-C
DEBUG:<u>main</u>: object type = binaryOutput
DEBUG:<u>main</u>: object index = 3000263
DEBUG:<u>main</u>: object units = Enum
Expand Down
16 changes: 8 additions & 8 deletions docs/source/core_services/drivers/Driver-Configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,14 @@ Any additional columns will be ignored. It is common practice to include a **Poi
.. csv-table:: BACnet
:header: Point Name,Volttron Point Name,Units,Unit Details,BACnet Object Type,Property,Writable,Index,Notes

2400Stevens/FCB.Local Application.PH-T,PreheatTemperature,degreesFahrenheit,-50.00 to 250.00,analogInput,presentValue,FALSE,3000119,Resolution: 0.1
2400Stevens/FCB.Local Application.RA-T,ReturnAirTemperature,degreesFahrenheit,-50.00 to 250.00,analogInput,presentValue,FALSE,3000120,Resolution: 0.1
2400Stevens/FCB.Local Application.RA-H,ReturnAirHumidity,percentRelativeHumidity,0.00 to 100.00,analogInput,presentValue,FALSE,3000124,Resolution: 0.1
2400Stevens/FCB.Local Application.CLG-O,CoolingValveOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000107,Resolution: 0.1
2400Stevens/FCB.Local Application.MAD-O,MixedAirDamperOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000110,Resolution: 0.1
2400Stevens/FCB.Local Application.PH-O,PreheatValveOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000111,Resolution: 0.1
2400Stevens/FCB.Local Application.RH-O,ReheatValveOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000112,Resolution: 0.1
2400Stevens/FCB.Local Application.SF-O,SupplyFanSpeedOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000113,Resolution: 0.1
Building/FCB.Local Application.PH-T,PreheatTemperature,degreesFahrenheit,-50.00 to 250.00,analogInput,presentValue,FALSE,3000119,Resolution: 0.1
Building/FCB.Local Application.RA-T,ReturnAirTemperature,degreesFahrenheit,-50.00 to 250.00,analogInput,presentValue,FALSE,3000120,Resolution: 0.1
Building/FCB.Local Application.RA-H,ReturnAirHumidity,percentRelativeHumidity,0.00 to 100.00,analogInput,presentValue,FALSE,3000124,Resolution: 0.1
Building/FCB.Local Application.CLG-O,CoolingValveOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000107,Resolution: 0.1
Building/FCB.Local Application.MAD-O,MixedAirDamperOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000110,Resolution: 0.1
Building/FCB.Local Application.PH-O,PreheatValveOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000111,Resolution: 0.1
Building/FCB.Local Application.RH-O,ReheatValveOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000112,Resolution: 0.1
Building/FCB.Local Application.SF-O,SupplyFanSpeedOutputCommand,percent,0.00 to 100.00 (default 0.0),analogOutput,presentValue,TRUE,3000113,Resolution: 0.1


A sample BACnet registry file can be found `here <https://raw.githubusercontent.com/VOLTTRON/volttron/c57569bd9e71eb32afefe8687201d674651913ed/examples/configurations/drivers/bacnet.csv>`_ or
Expand Down
1 change: 1 addition & 0 deletions docs/source/core_services/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ VOLTTRON Core Services
service_agents/index
security/index
restricted/index
config_store/index

Loading

0 comments on commit 40496dd

Please sign in to comment.