This release is a pre-release and may not be stable for production use.
VOLTTRON Fake Driver Interface
The FakeDriver is a way to quickly see data published to the message bus in a format that mimics what a true Driver would produce. This is an extremely simple implementation of the VOLTTRON Driver Framework. This driver does not connect to any actual device and instead produces random and or pre-configured values.
Requires
- python >= 3.10
- volttron-core >= 2.0.0rc0
- volttron-lib-base-driver >= 2.0.0rc0
Documentation
More detailed documentation can be found on ReadTheDocs. The RST source of the documentation for this component is located in the "docs" directory of this repository.
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.
-
If it is not already, install the VOLTTRON Platform Driver Agent:
vctl install volttron-platform-driver --vip-identity platform.driver
-
Install the volttron fake driver library:
poetry add --directory $VOLTTRON_HOME volttron-lib-fake-driver
-
Create configurations for a fake device:
-
Create a file called
fake.configand add the following JSON to it:{ "driver_config": {}, "registry_config": "config://fake.csv", "interval": 5, "timezone": "US/Pacific", "heart_beat_point": "Heartbeat", "driver_type": "fake", "publish_breadth_first_all": false, "publish_depth_first": false, "publish_breadth_first": false }
-
Create another file called
fake.csvand add the following contents to it:Point Name,Volttron Point Name,Units,Units Details,Writable,Starting Value,Type,Notes EKG,EKG,waveform,waveform,TRUE,sin,float,Sine wave for baseline output Heartbeat,Heartbeat,On/Off,On/Off,TRUE,0,boolean,Point for heartbeat toggle OutsideAirTemperature1,OutsideAirTemperature1,F,-100 to 300,FALSE,50,float,CO2 Reading 0.00-2000.0 ppm SampleWritableFloat1,SampleWritableFloat1,PPM,1000.00 (default),TRUE,10,float,Setpoint to enable demand control ventilation SampleLong1,SampleLong1,Enumeration,1 through 13,FALSE,50,int,Status indicator of service switch SampleWritableShort1,SampleWritableShort1,%,0.00 to 100.00 (20 default),TRUE,20,int,Minimum damper position during the standard mode SampleBool1,SampleBool1,On / Off,on/off,FALSE,TRUE,boolean,Status indidcator of cooling stage 1 SampleWritableBool1,SampleWritableBool1,On / Off,on/off,TRUE,TRUE,boolean,Status indicator OutsideAirTemperature2,OutsideAirTemperature2,F,-100 to 300,FALSE,50,float,CO2 Reading 0.00-2000.0 ppm SampleWritableFloat2,SampleWritableFloat2,PPM,1000.00 (default),TRUE,10,float,Setpoint to enable demand control ventilation SampleLong2,SampleLong2,Enumeration,1 through 13,FALSE,50,int,Status indicator of service switch SampleWritableShort2,SampleWritableShort2,%,0.00 to 100.00 (20 default),TRUE,20,int,Minimum damper position during the standard mode SampleBool2,SampleBool2,On / Off,on/off,FALSE,TRUE,boolean,Status indidcator of cooling stage 1 SampleWritableBool2,SampleWritableBool2,On / Off,on/off,TRUE,TRUE,boolean,Status indicator OutsideAirTemperature3,OutsideAirTemperature3,F,-100 to 300,FALSE,50,float,CO2 Reading 0.00-2000.0 ppm SampleWritableFloat3,SampleWritableFloat3,PPM,1000.00 (default),TRUE,10,float,Setpoint to enable demand control ventilation SampleLong3,SampleLong3,Enumeration,1 through 13,FALSE,50,int,Status indicator of service switch SampleWritableShort3,SampleWritableShort3,%,0.00 to 100.00 (20 default),TRUE,20,int,Minimum damper position during the standard mode SampleBool3,SampleBool3,On / Off,on/off,FALSE,TRUE,boolean,Status indidcator of cooling stage 1 SampleWritableBool3,SampleWritableBool3,On / Off,on/off,TRUE,TRUE,boolean,Status indicator HPWH_Phy0_PowerState,PowerState,1/0,1/0,TRUE,0,int,Power on off status ERWH_Phy0_ValveState,ValveState,1/0,1/0,TRUE,0,int,power on off status EKG_Sin,EKG_Sin,1-0,SIN Wave,TRUE,sin,float,SIN wave EKG_Cos,EKG_Cos,1-0,COS Wave,TRUE,sin,float,COS wave
-
Add fake.csv and fake.config to the configuration store:
vctl config store platform.driver devices/campus/building/fake fake.config vctl config store platform.driver fake.csv fake.csv --csv
-
-
Observe Data
To see data being published to the bus, install a Listener Agent:
vctl install volttron-listener --startOnce installed, you should see the data being published by viewing the Volttron logs file that was created in step 2. To watch the logs, open a separate terminal and run the following command:
tail -f <path to folder containing volttron.log>/volttron.log
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-lib-fake-driver 2.0.0rc0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| volttron_lib_fake_driver-2.0.0rc0.tar.gz | 9.3 kB | Without provenance | Details for volttron_lib_fake_driver-2.0.0rc0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| volttron_lib_fake_driver-2.0.0rc0-py3-none-any.whl | Python 3 | none | any | Details for volttron_lib_fake_driver-2.0.0rc0-py3-none-any.whl |
Total release size: 19.5 kB
Release files / volttron_lib_fake_driver-2.0.0rc0.tar.gz
| Download URL | volttron_lib_fake_driver-2.0.0rc0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d60505197932a212123864d19ac4886adbb69027443e564279cf39889714443b
|
|
BLAKE2b-256 checksum How to use checksums |
b411fbebf4c021a0c859b875eb18ea568941cd60a6a9fbae956d3100ee1bbc85
|
| 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_lib_fake_driver-2.0.0rc0-py3-none-any.whl
| Download URL | volttron_lib_fake_driver-2.0.0rc0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e22761e7a507059d7dd582dfe26362d05218bd9a8a00606d75e12a2e03574d5
|
|
BLAKE2b-256 checksum How to use checksums |
03b0653719034622c4827c1c5f835441755b8202f9e645628072579bb0e8b767
|
| 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-lib-fake-driver 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.