Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

Metadata

Release files for volttron-threshold-detection 2.0.0rc0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for volttron-threshold-detection 2.0.0rc0
File Size Uploaded Provenance Actions
volttron_threshold_detection-2.0.0rc0.tar.gz 8.7 kB Without provenance Details for volttron_threshold_detection-2.0.0rc0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for volttron-threshold-detection 2.0.0rc0
File Interpreter ABI Platform Actions
volttron_threshold_detection-2.0.0rc0-py3-none-any.whl Python 3 none any Details for volttron_threshold_detection-2.0.0rc0-py3-none-any.whl

Total release size: 18.6 kB

Release files / volttron_threshold_detection-2.0.0rc0.tar.gz

Download URL volttron_threshold_detection-2.0.0rc0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d195c6a6014d3ef6deb7d5a798ded60cf9fd2579624df79646b9affe559e0e59
BLAKE2b-256 checksum
How to use checksums
f1a2b505b1056aff18b5dcbdaae45167babccc62da565e1536cbc3007479d0c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

Release files / volttron_threshold_detection-2.0.0rc0-py3-none-any.whl

Download URL volttron_threshold_detection-2.0.0rc0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81e84a849923005733f8cc4081caa742d6b66a1c15b4dbc3c73699fbab3bd410
BLAKE2b-256 checksum
How to use checksums
c771d8212e3dbd3584f55badf77db5edc128e2af56fb4aefb38f5d290af9e471
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

Security for volttron-threshold-detection 2.0.0rc0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page