volttron read BACnet points to message bus

141 views Asked by At

I am setting up a rasp pi on a test bench with a MSTP BACnet controller with 2 temp sensors. How can I continuously read/publish these sensor readings to the VOLTTRON message bus?

RPi->ethernet->router->mstpdevice

I think I am missing some initial step with how to view VOLTTRON log file in the pi terminal. Is it possible to view through SSH the pi terminal and the tail of the VOLTTRON .log/message bus?

I have volttron setup and running on the pi, with running python3 bacnet_scan.py I can see my BACnet router & MSTP controller with the temp sensors:

Device Address        = <Address 192.168.0.190>
Device Id             = 0
maxAPDULengthAccepted = 1476
segmentationSupported = noSegmentation
vendorID              = 245

Device Address        = <RemoteStation 12345:2>
Device Id             = 201201
maxAPDULengthAccepted = 286
segmentationSupported = noSegmentation
vendorID              = 11

Running, python3 grab_bacnet_config.py 201201 --driver-out-file uhl.csv thru nano I can see this file:

{
    "driver_config": {
        "device_address": "12345:2",
        "device_id": 201201
    },
    "driver_type": "bacnet",
    "registry_config": "config://registry_configs/<stdout>"
}

Is it possible to view sensor readings (continout BACnet read's) on the message bus of analogInput 1 and analogInput 2?

Thank you!

EDIT

Watch this youTUBE video!

1

There are 1 answers

1
jklarson On BEST ANSWER

BACnet communication in VOLTTRON has at least 1 additional step over some of the other drivers, which is to configure and install the BACnet Proxy agent. I'd suggest reading up on the documentation, but it can installed the same as any other agent, and in many cases the only value you should need to change is the address, which is the address that the BACnet virtual device created by the proxy should bind to (often your local IP with default BACnet port).

Additionally, drivers in VOLTTRON require 2 configuration files: the driver config and registry config. 'uhl.csv' (really a JSON file) you've created above is the driver config which tells the master driver how to control the driver. The registry config is a CSV (actually a CSV) which tells the driver how to read the device (more info here). The same utility script which created your driver config can be used to create both configurations:

python3 grab_bacnet_config.py 201201 --driver-out-file uhl.json --registry-out-file uhl.csv

When both files have been created, they should be loaded into the config store using VOLTTRON-Control's config store sub-command (this guide shows steps for a fake driver, the steps are the same, the specifics of the driver are what differ).

Regarding SSH and viewing your environment, SSH (Secure Shell) connects you to a single shell instance. There are utilities such as tmux which will allow you to have multiple shells in a single SSH connection, but in lieu of learning how to use tmux, generally I make multiple SSH connections (there are likely other options as well, this is just my own method).