Skip to content
Jereme Haack edited this page Sep 12, 2014 · 2 revisions

Controller Access

There are configuration files you must edit to use keys generated for your lab. Do not check these files into the repository. You should keep them private.

The example smap driver ini file is "driver.ini" at the base of the project directory. Please edit this file to reflect your setup:

  • ReportDeliveryLocation: requires an admin key from sMAP
  • Metadata/SourceName: The name of the source for your catalyst
  • uuid: A unique identifier (can be any generated by any means)

When configuring a Modbus device be sure to setup the following:

  • ip_address: IP address of the Modbus device.
  • register_config: the csv file use to configure the Modbus device. You should specify the absolute path name of the configuration file. See [Configure Modbus sMAP driver] (ModbusDriver "wikilink")

When configuring a BACnet device be sure to setup the following:

  • target_address: Address of the BACnet device.
  • self_address: IP address of the network interface used to communicate with the device. This is required as the BACnet driver creates a virtual device to do it's communication and it communicates via UDP.
  • register_config: the csv file use to configure the Modbus device. You should specify the absolute path name of the configuration file. See Configure BACnet sMAP driver
[report 0]
#Insert your SMAP key after add
ReportDeliveryLocation = http://<SMAP URL>/backend/add/<INSERT YOUR KEY HERE>

[/]
type = Collection
Metadata/SourceName = <PUT YOUR NAME HERE> Catalyst Data 2
uuid = <PUT YOUR UUID HERE>

[/campus1]
type = Collection
Metadata/Location/Campus = Campus Number 1

[/campus1/building1]
type = Collection
Metadata/Location/Building = Building Number 1

[/campus1/building1/modbus1]
type = volttron.drivers.modbus.Modbus
ip_address = <PUT YOUR CATALYST IP HERE>
Metadata/Instrument/Manufacturer = <PUT INSTRUMENT MANUFACTURER HERE>
Metadata/Instrument/ModelName = <PUT INSTRUMENT MODEL HERE>
#port = <DEVICE PORT if needed, defaults to 502>
#slave_id = <SLAVE ID of modbus device if needed, defaults to 0>
#see volttron/drivers/example.csv
#for an example of a catalyst register config file
register_config = <PUT YOUR REGISTER CONFIG HERE>

[/campus1/building1/bacnet1]
type = volttron.drivers.bacnet.BACnet
target_address = <PUT YOUR BACNET DEVICE ADDRESS HERE>
self_address = <PUT IP OF INTERFACE USED TO COMMUNICATE WITH DEVICE (THIS COMPUTER IP)>
Metadata/Instrument/Manufacturer = <PUT INSTRUMENT MANUFACTURER HERE>
Metadata/Instrument/ModelName = <PUT INSTRUMENT MODEL HERE>
#see volttron/drivers/bacnet_example_config.csv
#for an example of a bacnet register config file
register_config = <PUT YOUR REGISTER CONFIG HERE>

[/campus1/building1/logger]
#Currently this will only write to the file specified.
#Hopefully logging to historian is forthcoming.
type = volttron.drivers.smap_logging.Logger
file = 'test.log'

Once the ini file is configured:

  • In a terminal from the rtunetwork directory
  • Activate the project python
    • . bin/activate (note the space)
  • The sMAP driver relies on Twistd. Start this now:
    • twistd -n smap <your config file's name>

Data should now be getting scraped from the Catalyst controller, published to the platform, and stored in the sMap historian. If you launch the ListenerAgent, you should see RTU data being published once a minute.

In order to set points, you must start the ActuatorAgent. Launch this as you would launch any other agent. In Eclipse, setup a run configuration with the following Program Arguments: {{--config Agents/ActuatorAgent/actuatoragent.launch.json --pub ipc:///tmp/volttron-lite-agent-publish --sub ipc:///tmp/volttron-lite-agent-subscribe

.

Please see the ExampleControllerAgent for making use of the ActuatorAgent .

Clone this wiki locally