All Projects → VOLTTRON → Volttron

VOLTTRON / Volttron

Licence: other
VOLTTRON Distributed Control System Platform

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Volttron

ioBroker.modbus
Modbus adapter for ioBroker
Stars: ✭ 31 (-90.66%)
Mutual labels:  modbus
modbus
No description or website provided.
Stars: ✭ 17 (-94.88%)
Mutual labels:  modbus
Node Modbus
Modbus TCP Client/Server implementation for Node.JS
Stars: ✭ 313 (-5.72%)
Mutual labels:  modbus
STM32 HAL FREEMODBUS RTU
FreeMODBUS RTU port for STM32 HAL library
Stars: ✭ 111 (-66.57%)
Mutual labels:  modbus
Process-Simulator-2-OpenSource
Open source code of Process Simulator 2
Stars: ✭ 20 (-93.98%)
Mutual labels:  modbus
Home Assistant EDP Box
Integração das EDP Box com Home Assistant Core
Stars: ✭ 91 (-72.59%)
Mutual labels:  modbus
telephone-ts
Telephone-ts: The "Event Emitter-less" TypeScript Event Architecture.
Stars: ✭ 22 (-93.37%)
Mutual labels:  message-bus
Plc4x
PLC4X The Industrial IoT adapter
Stars: ✭ 317 (-4.52%)
Mutual labels:  modbus
modbusone
A modbus library for Go, with unified client and server APIs. One implementation to rule them all.
Stars: ✭ 50 (-84.94%)
Mutual labels:  modbus
Benthos
Fancy stream processing made operationally mundane
Stars: ✭ 3,705 (+1015.96%)
Mutual labels:  message-bus
reactive-pipes
A thin library around Reactive Extensions to simplify writing evented applications in C#.
Stars: ✭ 12 (-96.39%)
Mutual labels:  message-bus
OpenSleigh
OpenSleigh is a Saga management library for .NET Core.
Stars: ✭ 198 (-40.36%)
Mutual labels:  message-bus
ng-radio
RxJS-based message bus service for Angular2
Stars: ✭ 12 (-96.39%)
Mutual labels:  message-bus
IoT-Technical-Guide
🐝 IoT Technical Guide --- 从零搭建高性能物联网平台及物联网解决方案和Thingsboard源码分析 ✨ ✨ ✨ (IoT Platform, SaaS, MQTT, CoAP, HTTP, Modbus, OPC, WebSocket, 物模型,Protobuf, PostgreSQL, MongoDB, Spring Security, OAuth2, RuleEngine, Kafka, Docker)
Stars: ✭ 2,565 (+672.59%)
Mutual labels:  modbus
Iotclient
这是一个物联网设备通讯协议实现客户端,将会包括主流PLC通信读取、ModBus协议、Bacnet协议等常用工业通讯协议。本组件终身开源免费,采用最宽松的MIT开源协议,您可以随意修改和商业使用(商业使用请做好评估和测试)。
Stars: ✭ 311 (-6.33%)
Mutual labels:  modbus
data-transport
A generic and responsible communication transporter(iframe/Broadcast/Web Worker/Service Worker/Shared Worker/WebRTC/Electron, etc.)
Stars: ✭ 27 (-91.87%)
Mutual labels:  message-bus
solaredge modbus
SolarEdge Modbus data collection library
Stars: ✭ 49 (-85.24%)
Mutual labels:  modbus
Modbus
High-performance, non-blocking, zero-buffer-copying Modbus for Java
Stars: ✭ 327 (-1.51%)
Mutual labels:  modbus
Libplctag
This C library provides a portable and simple API for accessing Allen-Bradley and Modbus PLC data over Ethernet.
Stars: ✭ 314 (-5.42%)
Mutual labels:  modbus
Fuxa
Web-based Process Visualization (SCADA/HMI/Dashboard) software
Stars: ✭ 262 (-21.08%)
Mutual labels:  modbus

image Codacy Badge

VOLTTRON™ is an open source platform for distributed sensing and control. The platform provides services for collecting and storing data from buildings and devices and provides an environment for developing applications which interact with that data.

Build Status

Features

Installation

VOLTTRON is written in Python 3.6+ and runs on Linux Operating Systems. For users unfamiliar with those technologies, the following resources are recommended:

1. Install prerequisites

(https://volttron.readthedocs.io/en/latest/setup/VOLTTRON-Prerequisites.html#volttron-prerequisites).

From version 7.0, VOLTTRON requires python 3 with a minimum version of 3.6; it is tested only systems supporting that as a native package. On Debian-based systems (Ubuntu bionic, debian buster, raspbian buster), these can all be installed with the following commands:

sudo apt-get update
sudo apt-get install build-essential libffi-dev python3-dev python3-venv openssl libssl-dev libevent-dev git

(Note: libffi-dev seems to only be required on arm-based systems.)

On Redhat or CENTOS systems, these can all be installed with the following command:

sudo yum update
sudo yum install make automake gcc gcc-c++ kernel-devel python3.6-devel pythone3.6-venv openssl openssl-devel libevent-devel git

2. Clone VOLTTRON code

From version 6.0, VOLTTRON supports two message buses - ZMQ and RabbitMQ.

git clone https://github.com/VOLTTRON/volttron --branch <branch name>

3. Setup virtual environment

Steps for ZMQ

Run the following command to install all required packages

cd <volttron clone directory>
python3 bootstrap.py
source env/bin/activate

Proceed to step 4.

You can deactivate the environment at any time by running deactivate.

Steps for RabbitMQ

1. Install Erlang version 21 packages

For RabbitMQ based VOLTTRON, some of the RabbitMQ specific software packages have to be installed.

On Debian based systems and CentOS 6/7

If you are running an Debian or CentOS system, you can install the RabbitMQ dependencies by running the rabbit dependencies script, passing in the OS name and appropriate distribution as parameters. The following are supported:

  • debian bionic (for Ubuntu 18.04)

  • debian xenial (for Ubuntu 16.04)

  • debian xenial (for Linux Mint 18.04)

  • debian stretch (for Debian Stretch)

  • debian buster (for Debian Buster)

  • raspbian buster (for Raspbian/Raspberry Pi OS buster)

Example command:

./scripts/rabbit_dependencies.sh debian xenial
Alternatively

You can download and install Erlang from Erlang Solutions. Please include OTP/components - ssl, public_key, asn1, and crypto. Also lock your version of Erlang using the yum-plugin-versionlock

2. Configure hostname

Make sure that your hostname is correctly configured in /etc/hosts. See (https://stackoverflow.com/questions/24797947/os-x-and-rabbitmq-error-epmd-error-for-host-xxx-address-cannot-connect-to-ho). If you are testing with VMs make please make sure to provide unique host names for each of the VM you are using.

The hostname should be resolvable to a valid IP when running on bridged mode. RabbitMQ checks for this during initial boot. Without this (for example, when running on a VM in NAT mode) RabbitMQ start would fail with the error "unable to connect to empd (port 4369) on ." Note: RabbitMQ startup error would show up in syslog (/var/log/messages) file and not in RabbitMQ logs (/var/log/rabbitmq/[email protected])

3. Bootstrap
cd volttron
python3 bootstrap.py --rabbitmq [optional install directory. defaults to
<user_home>/rabbitmq_server]

This will build the platform and create a virtual Python environment and dependencies for RabbitMQ. It also installs RabbitMQ server as the current user. If an install path is provided, that path should exist and the user should have write permissions. RabbitMQ will be installed under <install dir>/rabbitmq_server-3.7.7. The rest of the documentation refers to the directory <install dir>/rabbitmq_server-3.7.7 as $RABBITMQ_HOME

You can check if the RabbitMQ server is installed by checking its status. Please note, the RABBITMQ_HOME environment variable can be set in ~/.bashrc. If doing so, it needs to be set to the RabbitMQ installation directory (default path is <user_home>/rabbitmq_server/rabbitmq_server-3.7.7)

echo 'export RABBITMQ_HOME=$HOME/rabbitmq_server/rabbitmq_server-3.7.7'|sudo tee --append ~/.bashrc
source ~/.bashrc

$RABBITMQ_HOME/sbin/rabbitmqctl status
4. Activate the environment
source env/bin/activate

You can deactivate the environment at any time by running deactivate.

5. Create RabbitMQ setup for VOLTTRON:
vcfg --rabbitmq single [optional path to rabbitmq_config.yml]

Refer to examples/configurations/rabbitmq/rabbitmq_config.yml for a sample configuration file. At a minimum you will need to provide the host name and a unique common-name (under certificate-data) in the configuration file. Note: common-name must be unique and the general convention is to use <voltttron instance name>-root-ca.

Running the above command without the optional configuration file parameter will cause the user user to be prompted for all the required data in the command prompt vcfg will use that data to generate a rabbitmq_config.yml file in the VOLTTRON_HOME directory.

If the above configuration file is being used as a basis, be sure to update it with the hostname of the deployment (this should be the fully qualified domain name of the system).

This script creates a new virtual host and creates SSL certificates needed for this VOLTTRON instance. These certificates get created under the subdirectory "certificates" in your VOLTTRON home (typically in ~/.volttron). It then creates the main VIP exchange named "volttron" to route message between the platform and agents and alternate exchange to capture unrouteable messages.

NOTE: We configure the RabbitMQ instance for a single volttron_home and volttron_instance. This script will confirm with the user the volttron_home to be configured. The VOLTTRON instance name will be read from volttron_home/config if available, if not the user will be prompted for VOLTTRON instance name. To run the scripts without any prompts, save the the VOLTTRON instance name in volttron_home/config file and pass the VOLTTRON home directory as a command line argument. For example: vcfg --vhome /home/vdev/.new_vhome --rabbitmq single

The Following are the example inputs for vcfg --rabbitmq single command. Since no config file is passed the script prompts for necessary details.

Your VOLTTRON_HOME currently set to: /home/vdev/new_vhome2

Is this the volttron you are attempting to setup?  [Y]:
Creating rmq config yml
RabbitMQ server home: [/home/vdev/rabbitmq_server/rabbitmq_server-3.7.7]:
Fully qualified domain name of the system: [cs_cbox.pnl.gov]:

Enable SSL Authentication: [Y]:

Please enter the following details for root CA certificates
Country: [US]:
State: Washington
Location: Richland
Organization: PNNL
Organization Unit: Volttron-Team
Common Name: [volttron1-root-ca]:
Do you want to use default values for RabbitMQ home, ports, and virtual host: [Y]: N
Name of the virtual host under which RabbitMQ VOLTTRON will be running: [volttron]:
AMQP port for RabbitMQ: [5672]:
http port for the RabbitMQ management plugin: [15672]:
AMQPS (SSL) port RabbitMQ address: [5671]:
https port for the RabbitMQ management plugin: [15671]:
INFO:rmq_setup.pyc:Starting rabbitmq server
Warning: PID file not written; -detached was passed.
INFO:rmq_setup.pyc:**Started rmq server at /home/vdev/rabbitmq_server/rabbitmq_server-3.7.7
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost
INFO:rmq_setup.pyc:
Checking for CA certificate

INFO:rmq_setup.pyc:
Root CA (/home/vdev/new_vhome2/certificates/certs/volttron1-root-ca.crt) NOT Found. Creating root ca for volttron instance
Created CA cert
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost
INFO:rmq_setup.pyc:**Stopped rmq server
Warning: PID file not written; -detached was passed.
INFO:rmq_setup.pyc:**Started rmq server at /home/vdev/rabbitmq_server/rabbitmq_server-3.7.7
INFO:rmq_setup.pyc:

#######################

Setup complete for volttron home /home/vdev/new_vhome2 with instance name=volttron1
Notes:

-   Please set environment variable `VOLTTRON_HOME` to `/home/vdev/new_vhome2` before starting volttron

-   On production environments, restrict write access to
    /home/vdev/new_vhome2/certificates/certs/volttron1-root-ca.crt to only admin user. For example: sudo chown root /home/vdev/new_vhome2/certificates/certs/volttron1-root-ca.crt

-   A new admin user was created with user name: volttron1-admin and password=default_passwd.
    You could change this user's password by logging into <https://cs_cbox.pnl.gov:15671/> Please update /home/vdev/new_vhome2/rabbitmq_config.yml if you change password

#######################

4. Test

We are now ready to start the VOLTTRON instance. If configured with a RabbitMQ message bus a config file would have been generated in $VOLTTRON\_HOME/config with the entry message-bus=rmq. If you need to revert back to ZeroMQ based VOLTTRON, you will have to either remove "message-bus" parameter or set it to default "zmq" in $VOLTTRON\_HOME/config and restart the volttron process. The following command starts the VOLTTORN process in the background:

volttron -vv -l volttron.log &

This command causes the shell to enter the virtual Python environment and then starts the platform in debug (vv) mode with a log file named volttron.log.

Next, start an example listener to see it publish and subscribe to the message bus:

scripts/core/upgrade-listener

This script handles several different commands for installing and starting an agent after removing an old copy. This simple agent publishes a heartbeat message and listens to everything on the message bus. Look at the VOLTTRON log to see the activity:

tail volttron.log

Listener agent heartbeat publishes appear in the logs as:

2020-04-20 18:49:31,395 (listeneragent-3.3 13458) __main__ INFO: Peer: pubsub, Sender: listeneragent-3.2_1:, Bus: , Topic: heartbeat/listeneragent-3.2_1, Headers: {'TimeStamp': '2020-04-20T18:49:31.393651+00:00', 'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
'GOOD'
2020-04-20 18:49:36,394 (listeneragent-3.3 13458) __main__ INFO: Peer: pubsub, Sender: listeneragent-3.2_1:, Bus: , Topic: heartbeat/listeneragent-3.2_1, Headers: {'TimeStamp': '2020-04-20T18:49:36.392294+00:00', 'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
'GOOD'

To top the platform run the following command:

./stop-volttron

Next Steps

There are several walkthroughs to explore additional aspects of the platform:

Acquiring Third Party Agent Code

Third party agents are available under the volttron-applications repository. In order to use those agents, clone the volttron-applications repository into the same directory as the VOLTTRON source code:

cd <parent directory of volttron>
git clone https://github.com/VOLTTRON/volttron-applications.git develop

Contribute

How to contribute back:

Support

There are several options for VOLTTRONTM support.

License

The project is licensed under Apache 2.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].