The `volttron-threshold-detection` agent will publish an alert when a value published to a topic exceeds or falls below a configured value.
Project description
volttron-threshold-detection
The ThresholdDetectionAgent will publish an alert when a value published to a topic exceeds or falls below a configured value.
The agent subscribes to the topics listed in the configuration file and publishes alerts when the callback receives a value for the point above the max (if configured) or below the min (if configured) corresponding to the point in the configuration file.
Requires
- python >= 3.10
- volttron >= 10.0
Installation
Before installing, VOLTTRON should be installed and running. Its virtual environment should be active. Information on how to install of the VOLTTRON platform can be found here.
Create a directory called config
and use the change directory command to enter it.
mkdir config
cd config
After entering the config directory, create a file called threshold_detection_config.json
, use the below JSON to populate your new file. Refer to the configuration overview if needed.
The Threshold Detection agent supports observing individual point values from their respective topics or from a device's all publish. Points to watch are configured as JSON key-value pairs as follows:
-
Key: The key is the point topic for the point to watch, or the device's "all" topic if watching points from the all publish (i.e. "devices/campus/building/device/point" or "devices/campus/building/device/all" if using the all topic)
-
Value: Using point topic: JSON object specifying the min ('threshold_min') and max ('threshold_max) threshold values for the point. Only one of the thresholds are required, but both may be used.
Example:
{ "point0": { "threshold_max": 10, "threshold_min": 0 }, "point1": { "threshold_max": 42 } }
Using device "all" topic: JSON object with the key as the point name and value being the threshold object described above.
Example 2:
{ "devices/fake/fakedevice/all": { "OutsideAirTemperature1": { "threshold_max": 60, "threshold_min": 0 }, "OutsideAirTemperature2": { "threshold_max": 42 } } }
After creating your configuration file. install and start the threshold detection agent in VOLTTRON.
vctl install volttron-threshold-detection --agent-config threshold_detection_config.json --vip-identity platform.threshold_detection --start
View the status of the installed agent.
vctl status
Development
Please see the following for contributing guidelines contributing.
Please see the following helpful guide about developing modular VOLTTRON agents
Disclaimer Notice
This material was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the United States Department of Energy, nor Battelle, nor any of their employees, nor any jurisdiction or organization that has cooperated in the development of these materials, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness or any information, apparatus, product, software, or process disclosed, or represents that its use would not infringe privately owned rights.
Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or Battelle Memorial Institute. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file volttron_threshold_detection-2.0.0rc0.tar.gz
.
File metadata
- Download URL: volttron_threshold_detection-2.0.0rc0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d195c6a6014d3ef6deb7d5a798ded60cf9fd2579624df79646b9affe559e0e59 |
|
MD5 | 69b5a1943eb14ff33ef1d945c3426e0c |
|
BLAKE2b-256 | f1a2b505b1056aff18b5dcbdaae45167babccc62da565e1536cbc3007479d0c6 |
File details
Details for the file volttron_threshold_detection-2.0.0rc0-py3-none-any.whl
.
File metadata
- Download URL: volttron_threshold_detection-2.0.0rc0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81e84a849923005733f8cc4081caa742d6b66a1c15b4dbc3c73699fbab3bd410 |
|
MD5 | 888e91bb52957eb32f86e9ac4927a476 |
|
BLAKE2b-256 | c771d8212e3dbd3584f55badf77db5edc128e2af56fb4aefb38f5d290af9e471 |