.. _representations:
=======================
Payload Representations
=======================
In OpenLEADR, the complex hierarchies of the OpenADR XML-payloads are represented as Python dictionaries. These have been simplified as much as possible, allowing for a more natural and more readable experience.
This means that you don't have to instantiate objects and sub-objects and sub-sub-objects, but that you can define the entire object in a single, declarative statement. This kan keep a simple implementation very compact. The downside is that there is little help from your IDE and there is little discoverability for what contents can be provided in the messages. This page can be used as a reference for that information.
To help you, all outgong messages are validated against the XML schema, and you will receive warnings if your messages don't comply to the schema.
The following general principles have been applied to representing OpenADR objects in OpenLEADR:
- All property names are represented in snake_case instead of CamelCase or mixedCase names. For example: ``requestID`` becomes ``request_id``.
- For all properties, the ``oadr*`` and ``Ei*`` prefixes have been stripped away. For example: ``eiResponse`` becomes ``response`` and ``oadrResponse`` becomes ``response``.
- OpenADR timestamps are converted to Python ``datetime.datetime`` objects.
- OpenADR time intervals are converted to Python ``datetime.timedelta`` objects.
- Properties that might have more than 1 copy in the XML representation are put in a list, even if there is just one. This list will be identified by the pluralized version of the original property name. For example:
.. code-block:: xml
<...>
1234
5678
<...>
Will become:
.. code-block:: python3
...
"signals": [1234, 5678],
...
- The messages are usually used as a ``message_name, message_payload`` tuple. The message name is kept, for instance, ``oadrCanceledOpt``, and the payload is given as a dict.
Below is an alphabetized overview of all payloads with their XML and Python representations.
.. _oadrCanceledOpt:
oadrCanceledOpt
===============
OpenADR payload:
.. code-block:: xml
200
OK
8d4a231d-ded4-48ee-b236-df2a7c436a15
72c8a37d-508c-438c-a721-12269c6ca70d
OpenLEADR representation:
.. code-block:: python3
{'opt_id': '72c8a37d-508c-438c-a721-12269c6ca70d',
'response': {'request_id': '8d4a231d-ded4-48ee-b236-df2a7c436a15',
'response_code': 200,
'response_description': 'OK'}}
.. _oadrCanceledPartyRegistration:
oadrCanceledPartyRegistration
=============================
OpenADR payload:
.. code-block:: xml
200
OK
ef7ed945-c7af-45ae-a930-4868713cb150
b01be3d8-5337-4e6c-80b1-805f13bb51b2
123ABC
OpenLEADR representation:
.. code-block:: python3
{'registration_id': 'b01be3d8-5337-4e6c-80b1-805f13bb51b2',
'response': {'request_id': 'ef7ed945-c7af-45ae-a930-4868713cb150',
'response_code': 200,
'response_description': 'OK'},
'ven_id': '123ABC'}
.. _oadrCanceledReport:
oadrCanceledReport
==================
OpenADR payload:
.. code-block:: xml
200
OK
845d63ae-c2a1-41e4-bd01-c4e8fc7743e2
f63796ea-504f-4318-842b-86472873777f
39ba35e5-6b3d-4b9e-8f29-d94a25e7079c
OpenLEADR representation:
.. code-block:: python3
{'pending_reports': [{'request_id': 'f63796ea-504f-4318-842b-86472873777f'},
{'request_id': '39ba35e5-6b3d-4b9e-8f29-d94a25e7079c'}],
'response': {'request_id': '845d63ae-c2a1-41e4-bd01-c4e8fc7743e2',
'response_code': 200,
'response_description': 'OK'}}
.. _oadrCanceledReport:
oadrCanceledReport
==================
OpenADR payload:
.. code-block:: xml
200
OK
15a398db-c313-4a30-a8fd-080b682e48ad
43722761-4cc3-4684-ae79-8ad2c14e3c3c
bf4c3dfb-1175-4a9a-976a-ae81b52b4082
123ABC
OpenLEADR representation:
.. code-block:: python3
{'pending_reports': [{'request_id': '43722761-4cc3-4684-ae79-8ad2c14e3c3c'},
{'request_id': 'bf4c3dfb-1175-4a9a-976a-ae81b52b4082'}],
'response': {'request_id': '15a398db-c313-4a30-a8fd-080b682e48ad',
'response_code': 200,
'response_description': 'OK'},
'ven_id': '123ABC'}
.. _oadrCancelOpt:
oadrCancelOpt
=============
OpenADR payload:
.. code-block:: xml
95448074-273c-4d13-a202-d6a7672d6cb9
f3fd6b1d-dffd-4f30-962b-fb19b1dd5b70
123ABC
OpenLEADR representation:
.. code-block:: python3
{'opt_id': 'f3fd6b1d-dffd-4f30-962b-fb19b1dd5b70',
'request_id': '95448074-273c-4d13-a202-d6a7672d6cb9',
'ven_id': '123ABC'}
.. _oadrCancelPartyRegistration:
oadrCancelPartyRegistration
===========================
OpenADR payload:
.. code-block:: xml
4fb73f76-16ab-4c3c-8a04-bbb77bc637b7
31c1113c-9512-4f42-a858-9a97b98f5597
123ABC
OpenLEADR representation:
.. code-block:: python3
{'registration_id': '31c1113c-9512-4f42-a858-9a97b98f5597',
'request_id': '4fb73f76-16ab-4c3c-8a04-bbb77bc637b7',
'ven_id': '123ABC'}
.. _oadrCancelReport:
oadrCancelReport
================
OpenADR payload:
.. code-block:: xml
0571ae19-b935-47c3-b457-4a0aec9ada0f
273cb2df-c4b0-4efe-bda3-2cf76f6a3538
true
123ABC
OpenLEADR representation:
.. code-block:: python3
{'report_request_id': '273cb2df-c4b0-4efe-bda3-2cf76f6a3538',
'report_to_follow': True,
'request_id': '0571ae19-b935-47c3-b457-4a0aec9ada0f',
'ven_id': '123ABC'}
.. _oadrCreatedEvent:
oadrCreatedEvent
================
OpenADR payload:
.. code-block:: xml
200
OK
a4740d85-7682-423c-b8c6-211117f087b6
200
OK
b9636992-8ce2-4f4b-aac3-ec6f1e42afd7
011d969c-9481-4c03-af00-e9ec3c018ceb
1
optIn
200
OK
d77d6ed7-3bbb-4e7b-ae44-c816f9974a89
4d66b7a2-e7ca-4eca-99d4-c67dda00f1f4
1
optIn
200
OK
b363c569-c459-4e84-8725-5388eabbf160
b73bb2b5-3c5c-424c-93ec-23b36881f803
1
optIn
123ABC
OpenLEADR representation:
.. code-block:: python3
{'event_responses': [{'event_id': '011d969c-9481-4c03-af00-e9ec3c018ceb',
'modification_number': 1,
'opt_type': 'optIn',
'request_id': 'b9636992-8ce2-4f4b-aac3-ec6f1e42afd7',
'response_code': 200,
'response_description': 'OK'},
{'event_id': '4d66b7a2-e7ca-4eca-99d4-c67dda00f1f4',
'modification_number': 1,
'opt_type': 'optIn',
'request_id': 'd77d6ed7-3bbb-4e7b-ae44-c816f9974a89',
'response_code': 200,
'response_description': 'OK'},
{'event_id': 'b73bb2b5-3c5c-424c-93ec-23b36881f803',
'modification_number': 1,
'opt_type': 'optIn',
'request_id': 'b363c569-c459-4e84-8725-5388eabbf160',
'response_code': 200,
'response_description': 'OK'}],
'response': {'request_id': 'a4740d85-7682-423c-b8c6-211117f087b6',
'response_code': 200,
'response_description': 'OK'},
'ven_id': '123ABC'}
.. _oadrCreatedReport:
oadrCreatedReport
=================
OpenADR payload:
.. code-block:: xml
200
OK
1bb8cdc4-5d02-4bf1-b78b-6d09db5c55f7
8a04e06b-7836-4513-ae11-f1d08c248f4b
9193998f-adf2-426d-8475-52e0553a997c
123ABC
OpenLEADR representation:
.. code-block:: python3
{'pending_reports': [{'request_id': '8a04e06b-7836-4513-ae11-f1d08c248f4b'},
{'request_id': '9193998f-adf2-426d-8475-52e0553a997c'}],
'response': {'request_id': '1bb8cdc4-5d02-4bf1-b78b-6d09db5c55f7',
'response_code': 200,
'response_description': 'OK'},
'ven_id': '123ABC'}
.. _oadrCreatedEvent:
oadrCreatedEvent
================
OpenADR payload:
.. code-block:: xml
200
OK
cd07668c-f675-4859-ae2d-b32f218609a3
200
OK
cff4b658-b2dc-478b-a67c-9724c129ae1e
9388d5e4-005e-46c3-b4d0-a3527f406a0e
1
optIn
200
OK
6b155b7c-b562-4774-9e80-ef94466376bb
63aec037-6e13-4463-8000-119d2190bfdd
1
optOut
123ABC
OpenLEADR representation:
.. code-block:: python3
{'event_responses': [{'event_id': '9388d5e4-005e-46c3-b4d0-a3527f406a0e',
'modification_number': 1,
'opt_type': 'optIn',
'request_id': 'cff4b658-b2dc-478b-a67c-9724c129ae1e',
'response_code': 200,
'response_description': 'OK'},
{'event_id': '63aec037-6e13-4463-8000-119d2190bfdd',
'modification_number': 1,
'opt_type': 'optOut',
'request_id': '6b155b7c-b562-4774-9e80-ef94466376bb',
'response_code': 200,
'response_description': 'OK'}],
'response': {'request_id': 'cd07668c-f675-4859-ae2d-b32f218609a3',
'response_code': 200,
'response_description': 'OK'},
'ven_id': '123ABC'}
.. _oadrCreatedPartyRegistration:
oadrCreatedPartyRegistration
============================
OpenADR payload:
.. code-block:: xml
200
OK
14ab2770-c92a-4d11-b00f-129768d0964d
0271323d-fd75-490f-ab05-4fcb846e00b8
123ABC
VTN123
2.0b
simpleHttp
OpenLEADR representation:
.. code-block:: python3
{'profiles': [{'profile_name': '2.0b',
'transports': [{'transport_name': 'simpleHttp'}]}],
'registration_id': '0271323d-fd75-490f-ab05-4fcb846e00b8',
'response': {'request_id': '14ab2770-c92a-4d11-b00f-129768d0964d',
'response_code': 200,
'response_description': 'OK'},
'ven_id': '123ABC',
'vtn_id': 'VTN123'}
.. _oadrCreatedReport:
oadrCreatedReport
=================
OpenADR payload:
.. code-block:: xml
200
OK
5b14fda6-e7b6-492e-8a5b-8576e48b7c19
05ac1205-bac7-4c41-8f61-7ff95e80deff
9aa68adb-7b46-4e3d-850d-344e82484e06
OpenLEADR representation:
.. code-block:: python3
{'pending_reports': [{'request_id': '05ac1205-bac7-4c41-8f61-7ff95e80deff'},
{'request_id': '9aa68adb-7b46-4e3d-850d-344e82484e06'}],
'response': {'request_id': '5b14fda6-e7b6-492e-8a5b-8576e48b7c19',
'response_code': 200,
'response_description': 'OK'}}
.. _oadrCreateOpt:
oadrCreateOpt
=============
OpenADR payload:
.. code-block:: xml
745e589d-19d5-43fb-86fa-e499504339a6
optIn
participating
VEN123
2020-12-03T14:22:07.606847Z
a5590690-cb65-47a6-9eb7-4951c3d6d865
36eb3e4e-3959-4f32-a2ed-725e54c11cb7
1
123ABC
OpenLEADR representation:
.. code-block:: python3
{'created_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 606847, tzinfo=datetime.timezone.utc),
'event_id': '36eb3e4e-3959-4f32-a2ed-725e54c11cb7',
'modification_number': 1,
'opt_id': '745e589d-19d5-43fb-86fa-e499504339a6',
'opt_reason': 'participating',
'opt_type': 'optIn',
'request_id': 'a5590690-cb65-47a6-9eb7-4951c3d6d865',
'targets': [{'ven_id': '123ABC'}],
'targets_by_type': {'ven_id': ['123ABC']},
'ven_id': 'VEN123'}
.. _oadrCreatePartyRegistration:
oadrCreatePartyRegistration
===========================
OpenADR payload:
.. code-block:: xml
2774add6-fc64-4167-9dd1-602ce68639f2
123ABC
2.0b
simpleHttp
http://localhost
false
false
test
true
OpenLEADR representation:
.. code-block:: python3
{'http_pull_model': True,
'profile_name': '2.0b',
'report_only': False,
'request_id': '2774add6-fc64-4167-9dd1-602ce68639f2',
'transport_address': 'http://localhost',
'transport_name': 'simpleHttp',
'ven_id': '123ABC',
'ven_name': 'test',
'xml_signature': False}
.. _oadrCreateReport:
oadrCreateReport
================
OpenADR payload:
.. code-block:: xml
365e7ddd-7193-4a6a-8a48-7632f32e772a
d2b7bade5f
9c8bdc00e7
PT15M
PT15M
2019-11-19T11:00:18.672768Z
PT2H
d6e2e07485
Direct Read
123ABC
OpenLEADR representation:
.. code-block:: python3
{'report_requests': [{'report_request_id': 'd2b7bade5f',
'report_specifier': {'granularity': datetime.timedelta(seconds=900),
'report_back_duration': datetime.timedelta(seconds=900),
'report_interval': {'dtstart': datetime.datetime(2019, 11, 19, 11, 0, 18, 672768, tzinfo=datetime.timezone.utc),
'duration': datetime.timedelta(seconds=7200)},
'report_specifier_id': '9c8bdc00e7',
'specifier_payloads': [{'r_id': 'd6e2e07485',
'reading_type': 'Direct '
'Read'}]}}],
'request_id': '365e7ddd-7193-4a6a-8a48-7632f32e772a',
'ven_id': '123ABC'}
.. _oadrDistributeEvent:
oadrDistributeEvent
===================
OpenADR payload:
.. code-block:: xml
200
OK
123
2f888a2c-dcc2-4424-8084-57c26a49fa06
VTN123
541c76cb-36db-4ece-bf06-1ec80d06aa5d
1
2020-12-03T14:22:07.606894Z
1
http://MarketContext1
2020-12-03T14:22:07.606894Z
near
false
This is an event
2020-12-03T14:23:07.606894Z
PT9M
PT1M
0
8.0
PT1M
1
10.0
PT1M
2
12.0
PT1M
3
14.0
PT1M
4
16.0
PT1M
5
18.0
PT1M
6
20.0
PT1M
7
10.0
PT1M
8
20.0
LOAD_CONTROL
x-loadControlCapacity
ca5a2b4b-69b4-40ee-93ca-dbfa23da545d
Voltage
V
none
0.0
VEN001
VEN002
always
OpenLEADR representation:
.. code-block:: python3
{'events': [{'active_period': {'dtstart': datetime.datetime(2020, 12, 3, 14, 23, 7, 606894, tzinfo=datetime.timezone.utc),
'duration': datetime.timedelta(seconds=540)},
'event_descriptor': {'created_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 606894, tzinfo=datetime.timezone.utc),
'event_id': '541c76cb-36db-4ece-bf06-1ec80d06aa5d',
'event_status': 'near',
'market_context': 'http://MarketContext1',
'modification_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 606894, tzinfo=datetime.timezone.utc),
'modification_number': 1,
'priority': 1,
'test_event': False,
'vtn_comment': 'This is an event'},
'event_signals': [{'current_value': 0.0,
'intervals': [{'duration': datetime.timedelta(seconds=60),
'signal_payload': 8.0,
'uid': 0},
{'duration': datetime.timedelta(seconds=60),
'signal_payload': 10.0,
'uid': 1},
{'duration': datetime.timedelta(seconds=60),
'signal_payload': 12.0,
'uid': 2},
{'duration': datetime.timedelta(seconds=60),
'signal_payload': 14.0,
'uid': 3},
{'duration': datetime.timedelta(seconds=60),
'signal_payload': 16.0,
'uid': 4},
{'duration': datetime.timedelta(seconds=60),
'signal_payload': 18.0,
'uid': 5},
{'duration': datetime.timedelta(seconds=60),
'signal_payload': 20.0,
'uid': 6},
{'duration': datetime.timedelta(seconds=60),
'signal_payload': 10.0,
'uid': 7},
{'duration': datetime.timedelta(seconds=60),
'signal_payload': 20.0,
'uid': 8}],
'measurement': {'description': 'Voltage',
'name': 'voltage',
'scale': 'none',
'unit': 'V'},
'signal_id': 'ca5a2b4b-69b4-40ee-93ca-dbfa23da545d',
'signal_name': 'LOAD_CONTROL',
'signal_type': 'x-loadControlCapacity'}],
'response_required': 'always',
'targets': [{'ven_id': 'VEN001'}, {'ven_id': 'VEN002'}],
'targets_by_type': {'ven_id': ['VEN001', 'VEN002']}}],
'request_id': '2f888a2c-dcc2-4424-8084-57c26a49fa06',
'response': {'request_id': 123,
'response_code': 200,
'response_description': 'OK'},
'vtn_id': 'VTN123'}
.. _oadrPoll:
oadrPoll
========
OpenADR payload:
.. code-block:: xml
123ABC
OpenLEADR representation:
.. code-block:: python3
{'ven_id': '123ABC'}
.. _oadrQueryRegistration:
oadrQueryRegistration
=====================
OpenADR payload:
.. code-block:: xml
455dd699-ab81-4df6-8f74-79100db81082
OpenLEADR representation:
.. code-block:: python3
{'request_id': '455dd699-ab81-4df6-8f74-79100db81082'}
.. _oadrRegisteredReport:
oadrRegisteredReport
====================
OpenADR payload:
.. code-block:: xml
200
OK
19906000-b93a-4c09-a828-2cfed5b46232
7b72a678-950a-48fd-9885-359af6a30033
f5b4071e-1825-4ddf-8100-3d487e3744ff
PT15M
PT15M
2020-12-03T14:22:07.606944Z
PT2H
7616cdd8-c54b-4060-985f-05b033d2a97e
Direct Read
d157baf8-db5f-44b7-9f2c-5e18b4b4799b
811d8648-2f81-48ee-85f0-6c45613a2736
PT15M
PT15M
2020-12-03T14:22:07.606964Z
PT2H
81cbec7c-01a8-4d80-a99a-0957cce79839
Direct Read
VEN123
OpenLEADR representation:
.. code-block:: python3
{'report_requests': [{'report_request_id': '7b72a678-950a-48fd-9885-359af6a30033',
'report_specifier': {'granularity': datetime.timedelta(seconds=900),
'report_back_duration': datetime.timedelta(seconds=900),
'report_interval': {'dtstart': datetime.datetime(2020, 12, 3, 14, 22, 7, 606944, tzinfo=datetime.timezone.utc),
'duration': datetime.timedelta(seconds=7200)},
'report_specifier_id': 'f5b4071e-1825-4ddf-8100-3d487e3744ff',
'specifier_payloads': [{'r_id': '7616cdd8-c54b-4060-985f-05b033d2a97e',
'reading_type': 'Direct '
'Read'}]}},
{'report_request_id': 'd157baf8-db5f-44b7-9f2c-5e18b4b4799b',
'report_specifier': {'granularity': datetime.timedelta(seconds=900),
'report_back_duration': datetime.timedelta(seconds=900),
'report_interval': {'dtstart': datetime.datetime(2020, 12, 3, 14, 22, 7, 606964, tzinfo=datetime.timezone.utc),
'duration': datetime.timedelta(seconds=7200)},
'report_specifier_id': '811d8648-2f81-48ee-85f0-6c45613a2736',
'specifier_payloads': [{'r_id': '81cbec7c-01a8-4d80-a99a-0957cce79839',
'reading_type': 'Direct '
'Read'}]}}],
'response': {'request_id': '19906000-b93a-4c09-a828-2cfed5b46232',
'response_code': 200,
'response_description': 'OK'},
'ven_id': 'VEN123'}
.. _oadrRequestEvent:
oadrRequestEvent
================
OpenADR payload:
.. code-block:: xml
58b56698-20e3-43f1-bae2-aa95e2cea367
123ABC
OpenLEADR representation:
.. code-block:: python3
{'request_id': '58b56698-20e3-43f1-bae2-aa95e2cea367', 'ven_id': '123ABC'}
.. _oadrRequestReregistration:
oadrRequestReregistration
=========================
OpenADR payload:
.. code-block:: xml
123ABC
OpenLEADR representation:
.. code-block:: python3
{'ven_id': '123ABC'}
.. _oadrRegisterReport:
oadrRegisterReport
==================
OpenADR payload:
.. code-block:: xml
d37a5398-50f0-45bd-9b19-6b5b6bb61c02
62ae2f36-49b8-49c9-8ffc-4af19a536b17
08dd7433-2798-4a9f-a030-0a0b5021fdc8
123ABC
123ABC
reading
Direct Read
http://localhost
PT1M
PT1M
true
f585d124-96ee-46f4-b882-c106dbc0d90e
96e61860-b171-4ce4-8715-5a47894f59d3
METADATA_HISTORY_USAGE
2020-12-03T14:22:07.607003Z
123ABC
54451870-32f1-4ad1-b9c4-27120f8b354c
OpenLEADR representation:
.. code-block:: python3
{'report_request_id': '54451870-32f1-4ad1-b9c4-27120f8b354c',
'reports': [{'created_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 607003, tzinfo=datetime.timezone.utc),
'report_descriptions': [{'market_context': 'http://localhost',
'r_id': '08dd7433-2798-4a9f-a030-0a0b5021fdc8',
'reading_type': 'Direct Read',
'report_data_source': {'resource_id': '123ABC'},
'report_subject': {'resource_id': '123ABC'},
'report_type': 'reading',
'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
'min_period': datetime.timedelta(seconds=60),
'on_change': True}}],
'report_id': '62ae2f36-49b8-49c9-8ffc-4af19a536b17',
'report_name': 'METADATA_HISTORY_USAGE',
'report_request_id': 'f585d124-96ee-46f4-b882-c106dbc0d90e',
'report_specifier_id': '96e61860-b171-4ce4-8715-5a47894f59d3'}],
'request_id': 'd37a5398-50f0-45bd-9b19-6b5b6bb61c02',
'ven_id': '123ABC'}
.. _oadrRegisterReport:
oadrRegisterReport
==================
OpenADR payload:
.. code-block:: xml
8a4f859883
PT2H
622e2178-afa1-46e5-89ec-f00387fea5b0
1aed6a1f-f8c9-4fc1-9de1-1a0c5e1cd67a
resource1
x-resourceStatus
x-notApplicable
http://MarketContext1
PT1M
PT1M
false
fd27d669-9917-4096-ba1e-c3f5ae8a6886
789ed6cd4e_telemetry_status
METADATA_TELEMETRY_STATUS
2019-11-20T15:04:52.638621Z
PT2H
584d3b60-a8c6-4967-9f32-599a615a57c6
resource1_energy
resource1
usage
RealEnergy
Wh
n
Direct Read
http://MarketContext1
PT1M
PT1M
false
resource1_power
resource1
usage
RealPower
W
n
50
230
true
Direct Read
http://MarketContext1
PT1M
PT1M
false
538cf64f-901f-4bdf-ac7c-f5f72d4b4682
789ed6cd4e_telemetry_usage
METADATA_TELEMETRY_USAGE
2019-11-20T15:04:52.638621Z
PT2H
41907ef1-2f5b-45aa-b5fb-171098145438
resource1_energy
resource1
usage
RealEnergy
Wh
n
Direct Read
http://MarketContext1
PT1M
PT1M
false
resource1_power
resource1
usage
RealPower
W
n
50
230
true
Direct Read
http://MarketContext1
PT1M
PT1M
false
2244c5fd-44e2-4354-8aa0-97618cb1aa3a
789ed6cd4e_history_usage
METADATA_HISTORY_USAGE
2019-11-20T15:04:52.638621Z
s3cc244ee6
OpenLEADR representation:
.. code-block:: python3
{'reports': [{'created_date_time': datetime.datetime(2019, 11, 20, 15, 4, 52, 638621, tzinfo=datetime.timezone.utc),
'duration': datetime.timedelta(seconds=7200),
'report_descriptions': [{'market_context': 'http://MarketContext1',
'r_id': '1aed6a1f-f8c9-4fc1-9de1-1a0c5e1cd67a',
'reading_type': 'x-notApplicable',
'report_data_source': {'resource_id': 'resource1'},
'report_type': 'x-resourceStatus',
'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
'min_period': datetime.timedelta(seconds=60),
'on_change': False}}],
'report_id': '622e2178-afa1-46e5-89ec-f00387fea5b0',
'report_name': 'METADATA_TELEMETRY_STATUS',
'report_request_id': 'fd27d669-9917-4096-ba1e-c3f5ae8a6886',
'report_specifier_id': '789ed6cd4e_telemetry_status'},
{'created_date_time': datetime.datetime(2019, 11, 20, 15, 4, 52, 638621, tzinfo=datetime.timezone.utc),
'duration': datetime.timedelta(seconds=7200),
'report_descriptions': [{'market_context': 'http://MarketContext1',
'measurement': {'description': 'RealEnergy',
'name': 'energyReal',
'scale': 'n',
'unit': 'Wh'},
'r_id': 'resource1_energy',
'reading_type': 'Direct Read',
'report_data_source': {'resource_id': 'resource1'},
'report_type': 'usage',
'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
'min_period': datetime.timedelta(seconds=60),
'on_change': False}},
{'market_context': 'http://MarketContext1',
'measurement': {'description': 'RealPower',
'name': 'powerReal',
'power_attributes': {'ac': True,
'hertz': 50,
'voltage': 230},
'scale': 'n',
'unit': 'W'},
'r_id': 'resource1_power',
'reading_type': 'Direct Read',
'report_data_source': {'resource_id': 'resource1'},
'report_type': 'usage',
'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
'min_period': datetime.timedelta(seconds=60),
'on_change': False}}],
'report_id': '584d3b60-a8c6-4967-9f32-599a615a57c6',
'report_name': 'METADATA_TELEMETRY_USAGE',
'report_request_id': '538cf64f-901f-4bdf-ac7c-f5f72d4b4682',
'report_specifier_id': '789ed6cd4e_telemetry_usage'},
{'created_date_time': datetime.datetime(2019, 11, 20, 15, 4, 52, 638621, tzinfo=datetime.timezone.utc),
'duration': datetime.timedelta(seconds=7200),
'report_descriptions': [{'market_context': 'http://MarketContext1',
'measurement': {'description': 'RealEnergy',
'name': 'energyReal',
'scale': 'n',
'unit': 'Wh'},
'r_id': 'resource1_energy',
'reading_type': 'Direct Read',
'report_data_source': {'resource_id': 'resource1'},
'report_type': 'usage',
'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
'min_period': datetime.timedelta(seconds=60),
'on_change': False}},
{'market_context': 'http://MarketContext1',
'measurement': {'description': 'RealPower',
'name': 'powerReal',
'power_attributes': {'ac': True,
'hertz': 50,
'voltage': 230},
'scale': 'n',
'unit': 'W'},
'r_id': 'resource1_power',
'reading_type': 'Direct Read',
'report_data_source': {'resource_id': 'resource1'},
'report_type': 'usage',
'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
'min_period': datetime.timedelta(seconds=60),
'on_change': False}}],
'report_id': '41907ef1-2f5b-45aa-b5fb-171098145438',
'report_name': 'METADATA_HISTORY_USAGE',
'report_request_id': '2244c5fd-44e2-4354-8aa0-97618cb1aa3a',
'report_specifier_id': '789ed6cd4e_history_usage'}],
'request_id': '8a4f859883',
'ven_id': 's3cc244ee6'}
.. _oadrResponse:
oadrResponse
============
OpenADR payload:
.. code-block:: xml
200
OK
c798c95c-08ee-4aab-bbb6-f37709ac0dbe
123ABC
OpenLEADR representation:
.. code-block:: python3
{'response': {'request_id': 'c798c95c-08ee-4aab-bbb6-f37709ac0dbe',
'response_code': 200,
'response_description': 'OK'},
'ven_id': '123ABC'}
.. _oadrResponse:
oadrResponse
============
OpenADR payload:
.. code-block:: xml
200
OK
123ABC
OpenLEADR representation:
.. code-block:: python3
{'response': {'request_id': None,
'response_code': 200,
'response_description': 'OK'},
'ven_id': '123ABC'}
.. _oadrUpdatedReport:
oadrUpdatedReport
=================
OpenADR payload:
.. code-block:: xml
200
OK
16f0ba0e-6962-48dc-8d7d-66a126d46760
5328e42f-ae89-43fe-968a-3918997ed21c
b41c5e66-907e-4f21-a023-480d1ce0f08a
5862716f-87a4-4cd8-9bdd-3a036171c73c
a631252e-5c6e-4c79-9485-c45f2dc86b5a
false
123ABC
123ABC
OpenLEADR representation:
.. code-block:: python3
{'cancel_report': {'report_request_id': ['b41c5e66-907e-4f21-a023-480d1ce0f08a',
'5862716f-87a4-4cd8-9bdd-3a036171c73c',
'a631252e-5c6e-4c79-9485-c45f2dc86b5a'],
'report_to_follow': False,
'request_id': '5328e42f-ae89-43fe-968a-3918997ed21c',
'ven_id': '123ABC'},
'response': {'request_id': '16f0ba0e-6962-48dc-8d7d-66a126d46760',
'response_code': 200,
'response_description': 'OK'},
'ven_id': '123ABC'}
.. _oadrUpdateReport:
oadrUpdateReport
================
OpenADR payload:
.. code-block:: xml
4875efec-522c-4990-9455-0d829a9032d8
f2b55629-fa99-4e48-903b-c2f4e1f9b589
297b0a89-a674-4e6a-8543-2f50c91ffea9
123ABC
123ABC
availableEnergyStorage
Allocated
http://localhost
PT1M
PT2M
false
253918be-08cf-4888-9c0b-d49a96136e54
74ab5dae-95b9-4ba5-a68f-6e789ca41769
HISTORY_GREENBUTTON
2020-12-03T14:22:07.607232Z
123ABC
OpenLEADR representation:
.. code-block:: python3
{'reports': [{'created_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 607232, tzinfo=datetime.timezone.utc),
'report_descriptions': [{'market_context': 'http://localhost',
'r_id': '297b0a89-a674-4e6a-8543-2f50c91ffea9',
'reading_type': 'Allocated',
'report_data_source': {'resource_id': '123ABC'},
'report_subject': {'resource_id': '123ABC'},
'report_type': 'availableEnergyStorage',
'sampling_rate': {'max_period': datetime.timedelta(seconds=120),
'min_period': datetime.timedelta(seconds=60),
'on_change': False}}],
'report_id': 'f2b55629-fa99-4e48-903b-c2f4e1f9b589',
'report_name': 'HISTORY_GREENBUTTON',
'report_request_id': '253918be-08cf-4888-9c0b-d49a96136e54',
'report_specifier_id': '74ab5dae-95b9-4ba5-a68f-6e789ca41769'}],
'request_id': '4875efec-522c-4990-9455-0d829a9032d8',
'ven_id': '123ABC'}