When following the README and tested on Python3.10.9, observed the following successful log (at the test toy vtn side)
Using the same process and tested on Python3.8.14, but couldn't reproduced the same result--Observed different log (Not sure if it is considered fails since the connection was established.)
Steps to reproduce
(Note: using conda for virtualenvironment management but essentially the same as venv)
create a virtualenv called openadr-py310 conda create -n openadr-py310 python=3.10
conda activate openadr-py310
pip install volttron==10.0.3a3 (pin to volttron==10.0.3a3 for reproducibility)
pip install poetry==1.3.2
volttron -vv -l volttron.log &
(assuming git clone the aforedmentioned repo with commit and at a proper path) vctl install /home/kefei/project-local/volttron-modular/volttron-openadr-ven/ --agent-config /home/kefei/project-local/volttron-modular/volttron-openadr-ven/utils/config_toy_ven.json --vip-identity openadr.ven --start
vctl status
(openadr-py310) kefei@ubuntu-20-ws ~/project-local/volttron-modular $ vctl status
UUID AGENT IDENTITY TAG STATUS HEALTH
8 volttron-listener-0.2.0rc0 volttron-listener-0.2.0rc0_2
5 volttron-openadr-ven-0.0.0 openadr.ven.py38_16 running [6745] GOOD
Open another terminal (same virtualenv)
check openadr version
(openadr-py310) kefei@ubuntu-20-ws ~/project-local/volttron-modular/volttron-openadr-ven $ pip list | grep open
openleadr 0.5.27
volttron-openadr-ven 0.0.0
start the toy vtn by running python utils/vtn.py (Need to make sure the openadr agent start/restart after the toy vtn.)
Saw the desired output.
(openadr-py310) kefei@ubuntu-20-ws ~/project-local/volttron-modular/volttron-openadr-ven ((HEAD detached at mark-repo/oadr-temp)) $ python utils/vtn.py
If you provide a 'ven_lookup' to your OpenADRServer() init, OpenLEADR can automatically issue ReregistrationRequests for VENs that don't exist in your system. Please see https://openleadr.org/docs/server.html#things-you-should-implement.
Responding to oadrPoll with a oadrResponse message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': None, 'response_code': 200, 'response_description': 'OK'}, 'request_id': '70e07992-0815-4500-aef7-7e8635deaac6'}.
You should implement and register your own on_update_report handler to deal with reports that your receive from the VEN. This ...
...
REGISTERING VEN...
Responding to oadrCreatePartyRegistration with a oadrCreatedPartyRegistration message: {'ven_id': 'ven_id_123', 'registration_id': 'reg_id_123', 'profiles': [{'profile_name': '2.0b', 'transports': [{'transport_name': 'simpleHttp'}]}], 'requested_oadr_poll_freq': datetime.timedelta(seconds=10), 'vtn_id': 'myvtn', 'response': {'request_id': '96b3dba7-1267-453d-9bbc-c681f26ad24e', 'response_code': 200, 'response_description': 'OK'}, 'request_id': 'ac75f6be-f5e2-489a-9fb6-199f2ad3374c'}.
Responding to oadrRegisterReport with a oadrRegisteredReport message: {'report_requests': [ReportRequest(report_request_id='72386a1c-a79a-49b5-b919-0461e85e9b45', report_specifier=ReportSpecifier(report_specifier_id='17155986-09e7-4d2b-9faf-b690d3e0b93b', granularity=datetime.timedelta(seconds=10), specifier_payloads=[SpecifierPayload(r_id='ad1f6787-fbfe-4c77-85e2-805f5a2b45b6', reading_type='Direct Read', measurement=None)], report_interval=None, report_back_duration=datetime.timedelta(seconds=10)))], 'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': '9814fb5f-9318-458c-996a-a8cd06c3b3f5', 'response_code': 200, 'response_description': 'OK'}, 'request_id': 'f114f5ae-e890-4ff9-8e50-2195f77281ad'}.
Responding to oadrCreatedReport with a oadrResponse message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': None, 'response_code': 200, 'response_description': 'OK'}, 'request_id': '5c70f473-023a-4e34-8731-9b9aca2487e8'}.
Responding to oadrPoll with a oadrResponse message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': None, 'response_code': 200, 'response_description': 'OK'}, 'request_id': '8b77045e-aa27-44a4-810c-b014a6d0f807'}.
Responding to oadrPoll with a oadrResponse message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': None, 'response_code': 200, 'response_description': 'OK'}, 'request_id': '93504e58-7005-43e8-b68c-a2e54faca618'}.
RECEIVED REPORT FROM VEN
ven_id: ven_id_123
Device: Device001
Measurement: Voltage
Value: 42.0
Time: 2023-02-06 18:11:15.105862+00:00
PROCESSING REPORT DATA
SENDING EVENT TO VEN
Responding to oadrUpdateReport with a oadrUpdatedReport message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': '596a58ca-6e2b-4ace-827b-49c424372189', 'response_code': 200, 'response_description': 'OK'}, 'request_id': 'bbde21c3-ebba-4fa4-a325-522e6c718b95'}.
##### same process for python3.8 but didn't work.
### Note:
From the above log it justifis that the workflow is sufficient without installing a volttron-listener-agent.
Cannot reproduce README quick-start in Python3.8 (Same process success for Python3.10) due to potential Python version compatibility
issue description
When following the README and tested on Python3.10.9, observed the following successful log (at the test toy vtn side)![image](https://user-images.githubusercontent.com/28743873/217046037-aec50615-31b9-45d0-b6c2-0e9e87cb4831.png)
Using the same process and tested on Python3.8.14, but couldn't reproduced the same result--Observed different log (Not sure if it is considered fails since the connection was established.)![image](https://user-images.githubusercontent.com/28743873/217046174-d28c76aa-513e-4fa1-8182-8267839752ca.png)
Steps to reproduce
(Note: using conda for virtualenvironment management but essentially the same as venv)
create a virtualenv called openadr-py310
conda create -n openadr-py310 python=3.10
conda activate openadr-py310
pip install volttron==10.0.3a3
(pin to volttron==10.0.3a3 for reproducibility)pip install poetry==1.3.2
volttron -vv -l volttron.log &
(assuming git clone the aforedmentioned repo with commit and at a proper path)
vctl install /home/kefei/project-local/volttron-modular/volttron-openadr-ven/ --agent-config /home/kefei/project-local/volttron-modular/volttron-openadr-ven/utils/config_toy_ven.json --vip-identity openadr.ven --start
vctl status
Open another terminal (same virtualenv)
check openadr version
start the toy vtn by running
python utils/vtn.py
(Need to make sure the openadr agent start/restart after the toy vtn.) Saw the desired output.**** Your VTN Server is now running at
http://127.0.0.1:8080/OpenADR2/Simple/2.0b
****
Responding to oadrPoll with a oadrResponse message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': None, 'response_code': 200, 'response_description': 'OK'}, 'request_id': '70e07992-0815-4500-aef7-7e8635deaac6'}. You should implement and register your own on_update_report handler to deal with reports that your receive from the VEN. This ... ...
REGISTERING VEN... Responding to oadrCreatePartyRegistration with a oadrCreatedPartyRegistration message: {'ven_id': 'ven_id_123', 'registration_id': 'reg_id_123', 'profiles': [{'profile_name': '2.0b', 'transports': [{'transport_name': 'simpleHttp'}]}], 'requested_oadr_poll_freq': datetime.timedelta(seconds=10), 'vtn_id': 'myvtn', 'response': {'request_id': '96b3dba7-1267-453d-9bbc-c681f26ad24e', 'response_code': 200, 'response_description': 'OK'}, 'request_id': 'ac75f6be-f5e2-489a-9fb6-199f2ad3374c'}. Responding to oadrRegisterReport with a oadrRegisteredReport message: {'report_requests': [ReportRequest(report_request_id='72386a1c-a79a-49b5-b919-0461e85e9b45', report_specifier=ReportSpecifier(report_specifier_id='17155986-09e7-4d2b-9faf-b690d3e0b93b', granularity=datetime.timedelta(seconds=10), specifier_payloads=[SpecifierPayload(r_id='ad1f6787-fbfe-4c77-85e2-805f5a2b45b6', reading_type='Direct Read', measurement=None)], report_interval=None, report_back_duration=datetime.timedelta(seconds=10)))], 'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': '9814fb5f-9318-458c-996a-a8cd06c3b3f5', 'response_code': 200, 'response_description': 'OK'}, 'request_id': 'f114f5ae-e890-4ff9-8e50-2195f77281ad'}. Responding to oadrCreatedReport with a oadrResponse message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': None, 'response_code': 200, 'response_description': 'OK'}, 'request_id': '5c70f473-023a-4e34-8731-9b9aca2487e8'}. Responding to oadrPoll with a oadrResponse message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': None, 'response_code': 200, 'response_description': 'OK'}, 'request_id': '8b77045e-aa27-44a4-810c-b014a6d0f807'}. Responding to oadrPoll with a oadrResponse message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': None, 'response_code': 200, 'response_description': 'OK'}, 'request_id': '93504e58-7005-43e8-b68c-a2e54faca618'}.
RECEIVED REPORT FROM VEN ven_id: ven_id_123 Device: Device001 Measurement: Voltage Value: 42.0 Time: 2023-02-06 18:11:15.105862+00:00
PROCESSING REPORT DATA
SENDING EVENT TO VEN Responding to oadrUpdateReport with a oadrUpdatedReport message: {'vtn_id': 'myvtn', 'ven_id': 'ven_id_123', 'response': {'request_id': '596a58ca-6e2b-4ace-827b-49c424372189', 'response_code': 200, 'response_description': 'OK'}, 'request_id': 'bbde21c3-ebba-4fa4-a325-522e6c718b95'}.