representations.rst 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612
  1. .. _representations:
  2. =======================
  3. Payload Representations
  4. =======================
  5. 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.
  6. 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.
  7. 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.
  8. The following general principles have been applied to representing OpenADR objects in OpenLEADR:
  9. - All property names are represented in snake_case instead of CamelCase or mixedCase names. For example: ``requestID`` becomes ``request_id``.
  10. - For all properties, the ``oadr*`` and ``Ei*`` prefixes have been stripped away. For example: ``eiResponse`` becomes ``response`` and ``oadrResponse`` becomes ``response``.
  11. - OpenADR timestamps are converted to Python ``datetime.datetime`` objects.
  12. - OpenADR time intervals are converted to Python ``datetime.timedelta`` objects.
  13. - 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:
  14. .. code-block:: xml
  15. <...>
  16. <signal>1234</signal>
  17. <signal>5678</signal>
  18. <...>
  19. Will become:
  20. .. code-block:: python3
  21. ...
  22. "signals": [1234, 5678],
  23. ...
  24. - 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.
  25. Below is an alphabetized overview of all payloads with their XML and Python representations.
  26. .. _oadrCanceledOpt:
  27. oadrCanceledOpt
  28. ===============
  29. OpenADR payload:
  30. .. code-block:: xml
  31. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  32. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  33. <oadr:oadrCanceledOpt xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  34. <ei:eiResponse>
  35. <ei:responseCode>200</ei:responseCode>
  36. <ei:responseDescription>OK</ei:responseDescription>
  37. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">8d4a231d-ded4-48ee-b236-df2a7c436a15</requestID>
  38. </ei:eiResponse>
  39. <ei:optID>72c8a37d-508c-438c-a721-12269c6ca70d</ei:optID>
  40. </oadr:oadrCanceledOpt>
  41. </oadr:oadrSignedObject>
  42. </oadr:oadrPayload>
  43. OpenLEADR representation:
  44. .. code-block:: python3
  45. {'opt_id': '72c8a37d-508c-438c-a721-12269c6ca70d',
  46. 'response': {'request_id': '8d4a231d-ded4-48ee-b236-df2a7c436a15',
  47. 'response_code': 200,
  48. 'response_description': 'OK'}}
  49. .. _oadrCanceledPartyRegistration:
  50. oadrCanceledPartyRegistration
  51. =============================
  52. OpenADR payload:
  53. .. code-block:: xml
  54. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  55. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  56. <oadr:oadrCanceledPartyRegistration xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  57. <ei:eiResponse>
  58. <ei:responseCode>200</ei:responseCode>
  59. <ei:responseDescription>OK</ei:responseDescription>
  60. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">ef7ed945-c7af-45ae-a930-4868713cb150</requestID>
  61. </ei:eiResponse>
  62. <ei:registrationID>b01be3d8-5337-4e6c-80b1-805f13bb51b2</ei:registrationID>
  63. <ei:venID>123ABC</ei:venID>
  64. </oadr:oadrCanceledPartyRegistration>
  65. </oadr:oadrSignedObject>
  66. </oadr:oadrPayload>
  67. OpenLEADR representation:
  68. .. code-block:: python3
  69. {'registration_id': 'b01be3d8-5337-4e6c-80b1-805f13bb51b2',
  70. 'response': {'request_id': 'ef7ed945-c7af-45ae-a930-4868713cb150',
  71. 'response_code': 200,
  72. 'response_description': 'OK'},
  73. 'ven_id': '123ABC'}
  74. .. _oadrCanceledReport:
  75. oadrCanceledReport
  76. ==================
  77. OpenADR payload:
  78. .. code-block:: xml
  79. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  80. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  81. <oadr:oadrCanceledReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  82. <ei:eiResponse>
  83. <ei:responseCode>200</ei:responseCode>
  84. <ei:responseDescription>OK</ei:responseDescription>
  85. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">845d63ae-c2a1-41e4-bd01-c4e8fc7743e2</requestID>
  86. </ei:eiResponse>
  87. <oadr:oadrPendingReports>
  88. <ei:reportRequestID>f63796ea-504f-4318-842b-86472873777f</ei:reportRequestID>
  89. <ei:reportRequestID>39ba35e5-6b3d-4b9e-8f29-d94a25e7079c</ei:reportRequestID>
  90. </oadr:oadrPendingReports>
  91. </oadr:oadrCanceledReport>
  92. </oadr:oadrSignedObject>
  93. </oadr:oadrPayload>
  94. OpenLEADR representation:
  95. .. code-block:: python3
  96. {'pending_reports': [{'request_id': 'f63796ea-504f-4318-842b-86472873777f'},
  97. {'request_id': '39ba35e5-6b3d-4b9e-8f29-d94a25e7079c'}],
  98. 'response': {'request_id': '845d63ae-c2a1-41e4-bd01-c4e8fc7743e2',
  99. 'response_code': 200,
  100. 'response_description': 'OK'}}
  101. .. _oadrCanceledReport:
  102. oadrCanceledReport
  103. ==================
  104. OpenADR payload:
  105. .. code-block:: xml
  106. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  107. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  108. <oadr:oadrCanceledReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  109. <ei:eiResponse>
  110. <ei:responseCode>200</ei:responseCode>
  111. <ei:responseDescription>OK</ei:responseDescription>
  112. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">15a398db-c313-4a30-a8fd-080b682e48ad</requestID>
  113. </ei:eiResponse>
  114. <oadr:oadrPendingReports>
  115. <ei:reportRequestID>43722761-4cc3-4684-ae79-8ad2c14e3c3c</ei:reportRequestID>
  116. <ei:reportRequestID>bf4c3dfb-1175-4a9a-976a-ae81b52b4082</ei:reportRequestID>
  117. </oadr:oadrPendingReports>
  118. <ei:venID>123ABC</ei:venID>
  119. </oadr:oadrCanceledReport>
  120. </oadr:oadrSignedObject>
  121. </oadr:oadrPayload>
  122. OpenLEADR representation:
  123. .. code-block:: python3
  124. {'pending_reports': [{'request_id': '43722761-4cc3-4684-ae79-8ad2c14e3c3c'},
  125. {'request_id': 'bf4c3dfb-1175-4a9a-976a-ae81b52b4082'}],
  126. 'response': {'request_id': '15a398db-c313-4a30-a8fd-080b682e48ad',
  127. 'response_code': 200,
  128. 'response_description': 'OK'},
  129. 'ven_id': '123ABC'}
  130. .. _oadrCancelOpt:
  131. oadrCancelOpt
  132. =============
  133. OpenADR payload:
  134. .. code-block:: xml
  135. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  136. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  137. <oadr:oadrCancelOpt xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  138. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">95448074-273c-4d13-a202-d6a7672d6cb9</requestID>
  139. <ei:optID>f3fd6b1d-dffd-4f30-962b-fb19b1dd5b70</ei:optID>
  140. <ei:venID>123ABC</ei:venID>
  141. </oadr:oadrCancelOpt>
  142. </oadr:oadrSignedObject>
  143. </oadr:oadrPayload>
  144. OpenLEADR representation:
  145. .. code-block:: python3
  146. {'opt_id': 'f3fd6b1d-dffd-4f30-962b-fb19b1dd5b70',
  147. 'request_id': '95448074-273c-4d13-a202-d6a7672d6cb9',
  148. 'ven_id': '123ABC'}
  149. .. _oadrCancelPartyRegistration:
  150. oadrCancelPartyRegistration
  151. ===========================
  152. OpenADR payload:
  153. .. code-block:: xml
  154. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  155. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  156. <oadr:oadrCancelPartyRegistration xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  157. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">4fb73f76-16ab-4c3c-8a04-bbb77bc637b7</requestID>
  158. <ei:registrationID>31c1113c-9512-4f42-a858-9a97b98f5597</ei:registrationID>
  159. <ei:venID>123ABC</ei:venID>
  160. </oadr:oadrCancelPartyRegistration>
  161. </oadr:oadrSignedObject>
  162. </oadr:oadrPayload>
  163. OpenLEADR representation:
  164. .. code-block:: python3
  165. {'registration_id': '31c1113c-9512-4f42-a858-9a97b98f5597',
  166. 'request_id': '4fb73f76-16ab-4c3c-8a04-bbb77bc637b7',
  167. 'ven_id': '123ABC'}
  168. .. _oadrCancelReport:
  169. oadrCancelReport
  170. ================
  171. OpenADR payload:
  172. .. code-block:: xml
  173. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  174. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  175. <oadr:oadrCancelReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  176. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">0571ae19-b935-47c3-b457-4a0aec9ada0f</requestID>
  177. <ei:reportRequestID>273cb2df-c4b0-4efe-bda3-2cf76f6a3538</ei:reportRequestID>
  178. <reportToFollow xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">true</reportToFollow>
  179. <ei:venID>123ABC</ei:venID>
  180. </oadr:oadrCancelReport>
  181. </oadr:oadrSignedObject>
  182. </oadr:oadrPayload>
  183. OpenLEADR representation:
  184. .. code-block:: python3
  185. {'report_request_id': '273cb2df-c4b0-4efe-bda3-2cf76f6a3538',
  186. 'report_to_follow': True,
  187. 'request_id': '0571ae19-b935-47c3-b457-4a0aec9ada0f',
  188. 'ven_id': '123ABC'}
  189. .. _oadrCreatedEvent:
  190. oadrCreatedEvent
  191. ================
  192. OpenADR payload:
  193. .. code-block:: xml
  194. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  195. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  196. <oadr:oadrCreatedEvent xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  197. <eiCreatedEvent xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">
  198. <ei:eiResponse>
  199. <ei:responseCode>200</ei:responseCode>
  200. <ei:responseDescription>OK</ei:responseDescription>
  201. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">a4740d85-7682-423c-b8c6-211117f087b6</requestID>
  202. </ei:eiResponse>
  203. <ei:eventResponses>
  204. <ei:eventResponse>
  205. <ei:responseCode>200</ei:responseCode>
  206. <ei:responseDescription>OK</ei:responseDescription>
  207. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">b9636992-8ce2-4f4b-aac3-ec6f1e42afd7</requestID>
  208. <ei:qualifiedEventID>
  209. <ei:eventID>011d969c-9481-4c03-af00-e9ec3c018ceb</ei:eventID>
  210. <ei:modificationNumber>1</ei:modificationNumber>
  211. </ei:qualifiedEventID>
  212. <ei:optType>optIn</ei:optType>
  213. </ei:eventResponse>
  214. <ei:eventResponse>
  215. <ei:responseCode>200</ei:responseCode>
  216. <ei:responseDescription>OK</ei:responseDescription>
  217. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">d77d6ed7-3bbb-4e7b-ae44-c816f9974a89</requestID>
  218. <ei:qualifiedEventID>
  219. <ei:eventID>4d66b7a2-e7ca-4eca-99d4-c67dda00f1f4</ei:eventID>
  220. <ei:modificationNumber>1</ei:modificationNumber>
  221. </ei:qualifiedEventID>
  222. <ei:optType>optIn</ei:optType>
  223. </ei:eventResponse>
  224. <ei:eventResponse>
  225. <ei:responseCode>200</ei:responseCode>
  226. <ei:responseDescription>OK</ei:responseDescription>
  227. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">b363c569-c459-4e84-8725-5388eabbf160</requestID>
  228. <ei:qualifiedEventID>
  229. <ei:eventID>b73bb2b5-3c5c-424c-93ec-23b36881f803</ei:eventID>
  230. <ei:modificationNumber>1</ei:modificationNumber>
  231. </ei:qualifiedEventID>
  232. <ei:optType>optIn</ei:optType>
  233. </ei:eventResponse>
  234. </ei:eventResponses>
  235. <ei:venID>123ABC</ei:venID>
  236. </eiCreatedEvent>
  237. </oadr:oadrCreatedEvent>
  238. </oadr:oadrSignedObject>
  239. </oadr:oadrPayload>
  240. OpenLEADR representation:
  241. .. code-block:: python3
  242. {'event_responses': [{'event_id': '011d969c-9481-4c03-af00-e9ec3c018ceb',
  243. 'modification_number': 1,
  244. 'opt_type': 'optIn',
  245. 'request_id': 'b9636992-8ce2-4f4b-aac3-ec6f1e42afd7',
  246. 'response_code': 200,
  247. 'response_description': 'OK'},
  248. {'event_id': '4d66b7a2-e7ca-4eca-99d4-c67dda00f1f4',
  249. 'modification_number': 1,
  250. 'opt_type': 'optIn',
  251. 'request_id': 'd77d6ed7-3bbb-4e7b-ae44-c816f9974a89',
  252. 'response_code': 200,
  253. 'response_description': 'OK'},
  254. {'event_id': 'b73bb2b5-3c5c-424c-93ec-23b36881f803',
  255. 'modification_number': 1,
  256. 'opt_type': 'optIn',
  257. 'request_id': 'b363c569-c459-4e84-8725-5388eabbf160',
  258. 'response_code': 200,
  259. 'response_description': 'OK'}],
  260. 'response': {'request_id': 'a4740d85-7682-423c-b8c6-211117f087b6',
  261. 'response_code': 200,
  262. 'response_description': 'OK'},
  263. 'ven_id': '123ABC'}
  264. .. _oadrCreatedReport:
  265. oadrCreatedReport
  266. =================
  267. OpenADR payload:
  268. .. code-block:: xml
  269. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  270. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  271. <oadr:oadrCreatedReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  272. <ei:eiResponse>
  273. <ei:responseCode>200</ei:responseCode>
  274. <ei:responseDescription>OK</ei:responseDescription>
  275. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">1bb8cdc4-5d02-4bf1-b78b-6d09db5c55f7</requestID>
  276. </ei:eiResponse>
  277. <oadr:oadrPendingReports>
  278. <ei:reportRequestID>8a04e06b-7836-4513-ae11-f1d08c248f4b</ei:reportRequestID>
  279. <ei:reportRequestID>9193998f-adf2-426d-8475-52e0553a997c</ei:reportRequestID>
  280. </oadr:oadrPendingReports>
  281. <ei:venID>123ABC</ei:venID>
  282. </oadr:oadrCreatedReport>
  283. </oadr:oadrSignedObject>
  284. </oadr:oadrPayload>
  285. OpenLEADR representation:
  286. .. code-block:: python3
  287. {'pending_reports': [{'request_id': '8a04e06b-7836-4513-ae11-f1d08c248f4b'},
  288. {'request_id': '9193998f-adf2-426d-8475-52e0553a997c'}],
  289. 'response': {'request_id': '1bb8cdc4-5d02-4bf1-b78b-6d09db5c55f7',
  290. 'response_code': 200,
  291. 'response_description': 'OK'},
  292. 'ven_id': '123ABC'}
  293. .. _oadrCreatedEvent:
  294. oadrCreatedEvent
  295. ================
  296. OpenADR payload:
  297. .. code-block:: xml
  298. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  299. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  300. <oadr:oadrCreatedEvent xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  301. <eiCreatedEvent xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">
  302. <ei:eiResponse>
  303. <ei:responseCode>200</ei:responseCode>
  304. <ei:responseDescription>OK</ei:responseDescription>
  305. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">cd07668c-f675-4859-ae2d-b32f218609a3</requestID>
  306. </ei:eiResponse>
  307. <ei:eventResponses>
  308. <ei:eventResponse>
  309. <ei:responseCode>200</ei:responseCode>
  310. <ei:responseDescription>OK</ei:responseDescription>
  311. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">cff4b658-b2dc-478b-a67c-9724c129ae1e</requestID>
  312. <ei:qualifiedEventID>
  313. <ei:eventID>9388d5e4-005e-46c3-b4d0-a3527f406a0e</ei:eventID>
  314. <ei:modificationNumber>1</ei:modificationNumber>
  315. </ei:qualifiedEventID>
  316. <ei:optType>optIn</ei:optType>
  317. </ei:eventResponse>
  318. <ei:eventResponse>
  319. <ei:responseCode>200</ei:responseCode>
  320. <ei:responseDescription>OK</ei:responseDescription>
  321. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">6b155b7c-b562-4774-9e80-ef94466376bb</requestID>
  322. <ei:qualifiedEventID>
  323. <ei:eventID>63aec037-6e13-4463-8000-119d2190bfdd</ei:eventID>
  324. <ei:modificationNumber>1</ei:modificationNumber>
  325. </ei:qualifiedEventID>
  326. <ei:optType>optOut</ei:optType>
  327. </ei:eventResponse>
  328. </ei:eventResponses>
  329. <ei:venID>123ABC</ei:venID>
  330. </eiCreatedEvent>
  331. </oadr:oadrCreatedEvent>
  332. </oadr:oadrSignedObject>
  333. </oadr:oadrPayload>
  334. OpenLEADR representation:
  335. .. code-block:: python3
  336. {'event_responses': [{'event_id': '9388d5e4-005e-46c3-b4d0-a3527f406a0e',
  337. 'modification_number': 1,
  338. 'opt_type': 'optIn',
  339. 'request_id': 'cff4b658-b2dc-478b-a67c-9724c129ae1e',
  340. 'response_code': 200,
  341. 'response_description': 'OK'},
  342. {'event_id': '63aec037-6e13-4463-8000-119d2190bfdd',
  343. 'modification_number': 1,
  344. 'opt_type': 'optOut',
  345. 'request_id': '6b155b7c-b562-4774-9e80-ef94466376bb',
  346. 'response_code': 200,
  347. 'response_description': 'OK'}],
  348. 'response': {'request_id': 'cd07668c-f675-4859-ae2d-b32f218609a3',
  349. 'response_code': 200,
  350. 'response_description': 'OK'},
  351. 'ven_id': '123ABC'}
  352. .. _oadrCreatedPartyRegistration:
  353. oadrCreatedPartyRegistration
  354. ============================
  355. OpenADR payload:
  356. .. code-block:: xml
  357. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  358. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  359. <oadr:oadrCreatedPartyRegistration xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  360. <ei:eiResponse>
  361. <ei:responseCode>200</ei:responseCode>
  362. <ei:responseDescription>OK</ei:responseDescription>
  363. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">14ab2770-c92a-4d11-b00f-129768d0964d</requestID>
  364. </ei:eiResponse>
  365. <ei:registrationID>0271323d-fd75-490f-ab05-4fcb846e00b8</ei:registrationID>
  366. <ei:venID>123ABC</ei:venID>
  367. <ei:vtnID>VTN123</ei:vtnID>
  368. <oadr:oadrProfiles>
  369. <oadr:oadrProfile>
  370. <oadr:oadrProfileName>2.0b</oadr:oadrProfileName>
  371. <oadr:oadrTransports>
  372. <oadr:oadrTransport>
  373. <oadr:oadrTransportName>simpleHttp</oadr:oadrTransportName>
  374. </oadr:oadrTransport>
  375. </oadr:oadrTransports>
  376. </oadr:oadrProfile>
  377. </oadr:oadrProfiles>
  378. </oadr:oadrCreatedPartyRegistration>
  379. </oadr:oadrSignedObject>
  380. </oadr:oadrPayload>
  381. OpenLEADR representation:
  382. .. code-block:: python3
  383. {'profiles': [{'profile_name': '2.0b',
  384. 'transports': [{'transport_name': 'simpleHttp'}]}],
  385. 'registration_id': '0271323d-fd75-490f-ab05-4fcb846e00b8',
  386. 'response': {'request_id': '14ab2770-c92a-4d11-b00f-129768d0964d',
  387. 'response_code': 200,
  388. 'response_description': 'OK'},
  389. 'ven_id': '123ABC',
  390. 'vtn_id': 'VTN123'}
  391. .. _oadrCreatedReport:
  392. oadrCreatedReport
  393. =================
  394. OpenADR payload:
  395. .. code-block:: xml
  396. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  397. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  398. <oadr:oadrCreatedReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  399. <ei:eiResponse>
  400. <ei:responseCode>200</ei:responseCode>
  401. <ei:responseDescription>OK</ei:responseDescription>
  402. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">5b14fda6-e7b6-492e-8a5b-8576e48b7c19</requestID>
  403. </ei:eiResponse>
  404. <oadr:oadrPendingReports>
  405. <ei:reportRequestID>05ac1205-bac7-4c41-8f61-7ff95e80deff</ei:reportRequestID>
  406. <ei:reportRequestID>9aa68adb-7b46-4e3d-850d-344e82484e06</ei:reportRequestID>
  407. </oadr:oadrPendingReports>
  408. </oadr:oadrCreatedReport>
  409. </oadr:oadrSignedObject>
  410. </oadr:oadrPayload>
  411. OpenLEADR representation:
  412. .. code-block:: python3
  413. {'pending_reports': [{'request_id': '05ac1205-bac7-4c41-8f61-7ff95e80deff'},
  414. {'request_id': '9aa68adb-7b46-4e3d-850d-344e82484e06'}],
  415. 'response': {'request_id': '5b14fda6-e7b6-492e-8a5b-8576e48b7c19',
  416. 'response_code': 200,
  417. 'response_description': 'OK'}}
  418. .. _oadrCreateOpt:
  419. oadrCreateOpt
  420. =============
  421. OpenADR payload:
  422. .. code-block:: xml
  423. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  424. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  425. <oadr:oadrCreateOpt xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06" ei:schemaVersion="2.0b">
  426. <ei:optID>745e589d-19d5-43fb-86fa-e499504339a6</ei:optID>
  427. <ei:optType>optIn</ei:optType>
  428. <ei:optReason>participating</ei:optReason>
  429. <ei:venID>VEN123</ei:venID>
  430. <ei:createdDateTime>2020-12-03T14:22:07.606847Z </ei:createdDateTime>
  431. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">a5590690-cb65-47a6-9eb7-4951c3d6d865</requestID>
  432. <ei:qualifiedEventID>
  433. <ei:eventID>36eb3e4e-3959-4f32-a2ed-725e54c11cb7</ei:eventID>
  434. <ei:modificationNumber>1</ei:modificationNumber>
  435. </ei:qualifiedEventID>
  436. <ei:eiTarget>
  437. <ei:venID>123ABC</ei:venID>
  438. </ei:eiTarget>
  439. </oadr:oadrCreateOpt>
  440. </oadr:oadrSignedObject>
  441. </oadr:oadrPayload>
  442. OpenLEADR representation:
  443. .. code-block:: python3
  444. {'created_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 606847, tzinfo=datetime.timezone.utc),
  445. 'event_id': '36eb3e4e-3959-4f32-a2ed-725e54c11cb7',
  446. 'modification_number': 1,
  447. 'opt_id': '745e589d-19d5-43fb-86fa-e499504339a6',
  448. 'opt_reason': 'participating',
  449. 'opt_type': 'optIn',
  450. 'request_id': 'a5590690-cb65-47a6-9eb7-4951c3d6d865',
  451. 'targets': [{'ven_id': '123ABC'}],
  452. 'targets_by_type': {'ven_id': ['123ABC']},
  453. 'ven_id': 'VEN123'}
  454. .. _oadrCreatePartyRegistration:
  455. oadrCreatePartyRegistration
  456. ===========================
  457. OpenADR payload:
  458. .. code-block:: xml
  459. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  460. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  461. <oadr:oadrCreatePartyRegistration xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  462. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">2774add6-fc64-4167-9dd1-602ce68639f2</requestID>
  463. <ei:venID>123ABC</ei:venID>
  464. <oadr:oadrProfileName>2.0b</oadr:oadrProfileName>
  465. <oadr:oadrTransportName>simpleHttp</oadr:oadrTransportName>
  466. <oadr:oadrTransportAddress>http://localhost</oadr:oadrTransportAddress>
  467. <oadr:oadrReportOnly>false</oadr:oadrReportOnly>
  468. <oadr:oadrXmlSignature>false</oadr:oadrXmlSignature>
  469. <oadr:oadrVenName>test</oadr:oadrVenName>
  470. <oadr:oadrHttpPullModel>true</oadr:oadrHttpPullModel>
  471. </oadr:oadrCreatePartyRegistration>
  472. </oadr:oadrSignedObject>
  473. </oadr:oadrPayload>
  474. OpenLEADR representation:
  475. .. code-block:: python3
  476. {'http_pull_model': True,
  477. 'profile_name': '2.0b',
  478. 'report_only': False,
  479. 'request_id': '2774add6-fc64-4167-9dd1-602ce68639f2',
  480. 'transport_address': 'http://localhost',
  481. 'transport_name': 'simpleHttp',
  482. 'ven_id': '123ABC',
  483. 'ven_name': 'test',
  484. 'xml_signature': False}
  485. .. _oadrCreateReport:
  486. oadrCreateReport
  487. ================
  488. OpenADR payload:
  489. .. code-block:: xml
  490. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  491. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  492. <oadr:oadrCreateReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  493. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">365e7ddd-7193-4a6a-8a48-7632f32e772a</requestID>
  494. <oadr:oadrReportRequest>
  495. <ei:reportRequestID>d2b7bade5f</ei:reportRequestID>
  496. <ei:reportSpecifier xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
  497. <ei:reportSpecifierID>9c8bdc00e7</ei:reportSpecifierID>
  498. <xcal:granularity>
  499. <xcal:duration>PT15M</xcal:duration>
  500. </xcal:granularity>
  501. <ei:reportBackDuration>
  502. <xcal:duration>PT15M</xcal:duration>
  503. </ei:reportBackDuration>
  504. <ei:reportInterval>
  505. <xcal:properties>
  506. <xcal:dtstart>
  507. <xcal:date-time>2019-11-19T11:00:18.672768Z</xcal:date-time>
  508. </xcal:dtstart>
  509. <xcal:duration>
  510. <xcal:duration>PT2H</xcal:duration>
  511. </xcal:duration>
  512. </xcal:properties>
  513. </ei:reportInterval>
  514. <ei:specifierPayload>
  515. <ei:rID>d6e2e07485</ei:rID>
  516. <ei:readingType>Direct Read</ei:readingType>
  517. </ei:specifierPayload>
  518. </ei:reportSpecifier>
  519. </oadr:oadrReportRequest>
  520. <ei:venID>123ABC</ei:venID>
  521. </oadr:oadrCreateReport>
  522. </oadr:oadrSignedObject>
  523. </oadr:oadrPayload>
  524. OpenLEADR representation:
  525. .. code-block:: python3
  526. {'report_requests': [{'report_request_id': 'd2b7bade5f',
  527. 'report_specifier': {'granularity': datetime.timedelta(seconds=900),
  528. 'report_back_duration': datetime.timedelta(seconds=900),
  529. 'report_interval': {'dtstart': datetime.datetime(2019, 11, 19, 11, 0, 18, 672768, tzinfo=datetime.timezone.utc),
  530. 'duration': datetime.timedelta(seconds=7200)},
  531. 'report_specifier_id': '9c8bdc00e7',
  532. 'specifier_payloads': [{'r_id': 'd6e2e07485',
  533. 'reading_type': 'Direct '
  534. 'Read'}]}}],
  535. 'request_id': '365e7ddd-7193-4a6a-8a48-7632f32e772a',
  536. 'ven_id': '123ABC'}
  537. .. _oadrDistributeEvent:
  538. oadrDistributeEvent
  539. ===================
  540. OpenADR payload:
  541. .. code-block:: xml
  542. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  543. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  544. <oadr:oadrDistributeEvent xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  545. <ei:eiResponse>
  546. <ei:responseCode>200</ei:responseCode>
  547. <ei:responseDescription>OK</ei:responseDescription>
  548. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">123</requestID>
  549. </ei:eiResponse>
  550. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">2f888a2c-dcc2-4424-8084-57c26a49fa06</requestID>
  551. <ei:vtnID>VTN123</ei:vtnID>
  552. <oadr:oadrEvent>
  553. <ei:eiEvent>
  554. <ei:eventDescriptor>
  555. <ei:eventID>541c76cb-36db-4ece-bf06-1ec80d06aa5d</ei:eventID>
  556. <ei:modificationNumber>1</ei:modificationNumber>
  557. <ei:modificationDateTime>2020-12-03T14:22:07.606894Z</ei:modificationDateTime>
  558. <ei:priority>1</ei:priority>
  559. <ei:eiMarketContext>
  560. <marketContext xmlns="http://docs.oasis-open.org/ns/emix/2011/06">http://MarketContext1</marketContext>
  561. </ei:eiMarketContext>
  562. <ei:createdDateTime>2020-12-03T14:22:07.606894Z</ei:createdDateTime>
  563. <ei:eventStatus>near</ei:eventStatus>
  564. <ei:testEvent>false</ei:testEvent>
  565. <ei:vtnComment>This is an event</ei:vtnComment>
  566. </ei:eventDescriptor>
  567. <ei:eiActivePeriod>
  568. <properties xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  569. <dtstart>
  570. <date-time>2020-12-03T14:23:07.606894Z</date-time>
  571. </dtstart>
  572. <duration>
  573. <duration>PT9M</duration>
  574. </duration>
  575. </properties>
  576. <components xmlns="urn:ietf:params:xml:ns:icalendar-2.0"/>
  577. </ei:eiActivePeriod>
  578. <ei:eiEventSignals>
  579. <ei:eiEventSignal>
  580. <strm:intervals xmlns:strm="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
  581. <ei:interval>
  582. <xcal:duration>
  583. <xcal:duration>PT1M</xcal:duration>
  584. </xcal:duration>
  585. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  586. <text>0</text>
  587. </uid>
  588. <ei:signalPayload>
  589. <ei:payloadFloat>
  590. <ei:value>8.0</ei:value>
  591. </ei:payloadFloat>
  592. </ei:signalPayload>
  593. </ei:interval>
  594. <ei:interval>
  595. <xcal:duration>
  596. <xcal:duration>PT1M</xcal:duration>
  597. </xcal:duration>
  598. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  599. <text>1</text>
  600. </uid>
  601. <ei:signalPayload>
  602. <ei:payloadFloat>
  603. <ei:value>10.0</ei:value>
  604. </ei:payloadFloat>
  605. </ei:signalPayload>
  606. </ei:interval>
  607. <ei:interval>
  608. <xcal:duration>
  609. <xcal:duration>PT1M</xcal:duration>
  610. </xcal:duration>
  611. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  612. <text>2</text>
  613. </uid>
  614. <ei:signalPayload>
  615. <ei:payloadFloat>
  616. <ei:value>12.0</ei:value>
  617. </ei:payloadFloat>
  618. </ei:signalPayload>
  619. </ei:interval>
  620. <ei:interval>
  621. <xcal:duration>
  622. <xcal:duration>PT1M</xcal:duration>
  623. </xcal:duration>
  624. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  625. <text>3</text>
  626. </uid>
  627. <ei:signalPayload>
  628. <ei:payloadFloat>
  629. <ei:value>14.0</ei:value>
  630. </ei:payloadFloat>
  631. </ei:signalPayload>
  632. </ei:interval>
  633. <ei:interval>
  634. <xcal:duration>
  635. <xcal:duration>PT1M</xcal:duration>
  636. </xcal:duration>
  637. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  638. <text>4</text>
  639. </uid>
  640. <ei:signalPayload>
  641. <ei:payloadFloat>
  642. <ei:value>16.0</ei:value>
  643. </ei:payloadFloat>
  644. </ei:signalPayload>
  645. </ei:interval>
  646. <ei:interval>
  647. <xcal:duration>
  648. <xcal:duration>PT1M</xcal:duration>
  649. </xcal:duration>
  650. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  651. <text>5</text>
  652. </uid>
  653. <ei:signalPayload>
  654. <ei:payloadFloat>
  655. <ei:value>18.0</ei:value>
  656. </ei:payloadFloat>
  657. </ei:signalPayload>
  658. </ei:interval>
  659. <ei:interval>
  660. <xcal:duration>
  661. <xcal:duration>PT1M</xcal:duration>
  662. </xcal:duration>
  663. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  664. <text>6</text>
  665. </uid>
  666. <ei:signalPayload>
  667. <ei:payloadFloat>
  668. <ei:value>20.0</ei:value>
  669. </ei:payloadFloat>
  670. </ei:signalPayload>
  671. </ei:interval>
  672. <ei:interval>
  673. <xcal:duration>
  674. <xcal:duration>PT1M</xcal:duration>
  675. </xcal:duration>
  676. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  677. <text>7</text>
  678. </uid>
  679. <ei:signalPayload>
  680. <ei:payloadFloat>
  681. <ei:value>10.0</ei:value>
  682. </ei:payloadFloat>
  683. </ei:signalPayload>
  684. </ei:interval>
  685. <ei:interval>
  686. <xcal:duration>
  687. <xcal:duration>PT1M</xcal:duration>
  688. </xcal:duration>
  689. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  690. <text>8</text>
  691. </uid>
  692. <ei:signalPayload>
  693. <ei:payloadFloat>
  694. <ei:value>20.0</ei:value>
  695. </ei:payloadFloat>
  696. </ei:signalPayload>
  697. </ei:interval>
  698. </strm:intervals>
  699. <ei:signalName>LOAD_CONTROL</ei:signalName>
  700. <ei:signalType>x-loadControlCapacity</ei:signalType>
  701. <ei:signalID>ca5a2b4b-69b4-40ee-93ca-dbfa23da545d</ei:signalID>
  702. <power:voltage xmlns:scale="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:power="http://docs.oasis-open.org/ns/emix/2011/06/power">
  703. <power:itemDescription>Voltage</power:itemDescription>
  704. <power:itemUnits>V</power:itemUnits>
  705. <scale:siScaleCode>none</scale:siScaleCode>
  706. </power:voltage>
  707. <ei:currentValue>
  708. <ei:payloadFloat>
  709. <ei:value>0.0</ei:value>
  710. </ei:payloadFloat>
  711. </ei:currentValue>
  712. </ei:eiEventSignal>
  713. </ei:eiEventSignals>
  714. <ei:eiTarget>
  715. <ei:venID>VEN001</ei:venID>
  716. <ei:venID>VEN002</ei:venID>
  717. </ei:eiTarget>
  718. </ei:eiEvent>
  719. <oadr:oadrResponseRequired>always</oadr:oadrResponseRequired>
  720. </oadr:oadrEvent>
  721. </oadr:oadrDistributeEvent>
  722. </oadr:oadrSignedObject>
  723. </oadr:oadrPayload>
  724. OpenLEADR representation:
  725. .. code-block:: python3
  726. {'events': [{'active_period': {'dtstart': datetime.datetime(2020, 12, 3, 14, 23, 7, 606894, tzinfo=datetime.timezone.utc),
  727. 'duration': datetime.timedelta(seconds=540)},
  728. 'event_descriptor': {'created_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 606894, tzinfo=datetime.timezone.utc),
  729. 'event_id': '541c76cb-36db-4ece-bf06-1ec80d06aa5d',
  730. 'event_status': 'near',
  731. 'market_context': 'http://MarketContext1',
  732. 'modification_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 606894, tzinfo=datetime.timezone.utc),
  733. 'modification_number': 1,
  734. 'priority': 1,
  735. 'test_event': False,
  736. 'vtn_comment': 'This is an event'},
  737. 'event_signals': [{'current_value': 0.0,
  738. 'intervals': [{'duration': datetime.timedelta(seconds=60),
  739. 'signal_payload': 8.0,
  740. 'uid': 0},
  741. {'duration': datetime.timedelta(seconds=60),
  742. 'signal_payload': 10.0,
  743. 'uid': 1},
  744. {'duration': datetime.timedelta(seconds=60),
  745. 'signal_payload': 12.0,
  746. 'uid': 2},
  747. {'duration': datetime.timedelta(seconds=60),
  748. 'signal_payload': 14.0,
  749. 'uid': 3},
  750. {'duration': datetime.timedelta(seconds=60),
  751. 'signal_payload': 16.0,
  752. 'uid': 4},
  753. {'duration': datetime.timedelta(seconds=60),
  754. 'signal_payload': 18.0,
  755. 'uid': 5},
  756. {'duration': datetime.timedelta(seconds=60),
  757. 'signal_payload': 20.0,
  758. 'uid': 6},
  759. {'duration': datetime.timedelta(seconds=60),
  760. 'signal_payload': 10.0,
  761. 'uid': 7},
  762. {'duration': datetime.timedelta(seconds=60),
  763. 'signal_payload': 20.0,
  764. 'uid': 8}],
  765. 'measurement': {'description': 'Voltage',
  766. 'name': 'voltage',
  767. 'scale': 'none',
  768. 'unit': 'V'},
  769. 'signal_id': 'ca5a2b4b-69b4-40ee-93ca-dbfa23da545d',
  770. 'signal_name': 'LOAD_CONTROL',
  771. 'signal_type': 'x-loadControlCapacity'}],
  772. 'response_required': 'always',
  773. 'targets': [{'ven_id': 'VEN001'}, {'ven_id': 'VEN002'}],
  774. 'targets_by_type': {'ven_id': ['VEN001', 'VEN002']}}],
  775. 'request_id': '2f888a2c-dcc2-4424-8084-57c26a49fa06',
  776. 'response': {'request_id': 123,
  777. 'response_code': 200,
  778. 'response_description': 'OK'},
  779. 'vtn_id': 'VTN123'}
  780. .. _oadrPoll:
  781. oadrPoll
  782. ========
  783. OpenADR payload:
  784. .. code-block:: xml
  785. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  786. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  787. <oadr:oadrPoll xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  788. <ei:venID>123ABC</ei:venID>
  789. </oadr:oadrPoll>
  790. </oadr:oadrSignedObject>
  791. </oadr:oadrPayload>
  792. OpenLEADR representation:
  793. .. code-block:: python3
  794. {'ven_id': '123ABC'}
  795. .. _oadrQueryRegistration:
  796. oadrQueryRegistration
  797. =====================
  798. OpenADR payload:
  799. .. code-block:: xml
  800. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  801. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  802. <oadr:oadrQueryRegistration xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  803. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">455dd699-ab81-4df6-8f74-79100db81082</requestID>
  804. </oadr:oadrQueryRegistration>
  805. </oadr:oadrSignedObject>
  806. </oadr:oadrPayload>
  807. OpenLEADR representation:
  808. .. code-block:: python3
  809. {'request_id': '455dd699-ab81-4df6-8f74-79100db81082'}
  810. .. _oadrRegisteredReport:
  811. oadrRegisteredReport
  812. ====================
  813. OpenADR payload:
  814. .. code-block:: xml
  815. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  816. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  817. <oadr:oadrRegisteredReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  818. <ei:eiResponse>
  819. <ei:responseCode>200</ei:responseCode>
  820. <ei:responseDescription>OK</ei:responseDescription>
  821. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">19906000-b93a-4c09-a828-2cfed5b46232</requestID>
  822. </ei:eiResponse>
  823. <oadr:oadrReportRequest>
  824. <ei:reportRequestID>7b72a678-950a-48fd-9885-359af6a30033</ei:reportRequestID>
  825. <ei:reportSpecifier xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
  826. <ei:reportSpecifierID>f5b4071e-1825-4ddf-8100-3d487e3744ff</ei:reportSpecifierID>
  827. <xcal:granularity>
  828. <xcal:duration>PT15M</xcal:duration>
  829. </xcal:granularity>
  830. <ei:reportBackDuration>
  831. <xcal:duration>PT15M</xcal:duration>
  832. </ei:reportBackDuration>
  833. <ei:reportInterval>
  834. <xcal:properties>
  835. <xcal:dtstart>
  836. <xcal:date-time>2020-12-03T14:22:07.606944Z</xcal:date-time>
  837. </xcal:dtstart>
  838. <xcal:duration>
  839. <xcal:duration>PT2H</xcal:duration>
  840. </xcal:duration>
  841. </xcal:properties>
  842. </ei:reportInterval>
  843. <ei:specifierPayload>
  844. <ei:rID>7616cdd8-c54b-4060-985f-05b033d2a97e</ei:rID>
  845. <ei:readingType>Direct Read</ei:readingType>
  846. </ei:specifierPayload>
  847. </ei:reportSpecifier>
  848. </oadr:oadrReportRequest>
  849. <oadr:oadrReportRequest>
  850. <ei:reportRequestID>d157baf8-db5f-44b7-9f2c-5e18b4b4799b</ei:reportRequestID>
  851. <ei:reportSpecifier xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
  852. <ei:reportSpecifierID>811d8648-2f81-48ee-85f0-6c45613a2736</ei:reportSpecifierID>
  853. <xcal:granularity>
  854. <xcal:duration>PT15M</xcal:duration>
  855. </xcal:granularity>
  856. <ei:reportBackDuration>
  857. <xcal:duration>PT15M</xcal:duration>
  858. </ei:reportBackDuration>
  859. <ei:reportInterval>
  860. <xcal:properties>
  861. <xcal:dtstart>
  862. <xcal:date-time>2020-12-03T14:22:07.606964Z</xcal:date-time>
  863. </xcal:dtstart>
  864. <xcal:duration>
  865. <xcal:duration>PT2H</xcal:duration>
  866. </xcal:duration>
  867. </xcal:properties>
  868. </ei:reportInterval>
  869. <ei:specifierPayload>
  870. <ei:rID>81cbec7c-01a8-4d80-a99a-0957cce79839</ei:rID>
  871. <ei:readingType>Direct Read</ei:readingType>
  872. </ei:specifierPayload>
  873. </ei:reportSpecifier>
  874. </oadr:oadrReportRequest>
  875. <ei:venID>VEN123</ei:venID>
  876. </oadr:oadrRegisteredReport>
  877. </oadr:oadrSignedObject>
  878. </oadr:oadrPayload>
  879. OpenLEADR representation:
  880. .. code-block:: python3
  881. {'report_requests': [{'report_request_id': '7b72a678-950a-48fd-9885-359af6a30033',
  882. 'report_specifier': {'granularity': datetime.timedelta(seconds=900),
  883. 'report_back_duration': datetime.timedelta(seconds=900),
  884. 'report_interval': {'dtstart': datetime.datetime(2020, 12, 3, 14, 22, 7, 606944, tzinfo=datetime.timezone.utc),
  885. 'duration': datetime.timedelta(seconds=7200)},
  886. 'report_specifier_id': 'f5b4071e-1825-4ddf-8100-3d487e3744ff',
  887. 'specifier_payloads': [{'r_id': '7616cdd8-c54b-4060-985f-05b033d2a97e',
  888. 'reading_type': 'Direct '
  889. 'Read'}]}},
  890. {'report_request_id': 'd157baf8-db5f-44b7-9f2c-5e18b4b4799b',
  891. 'report_specifier': {'granularity': datetime.timedelta(seconds=900),
  892. 'report_back_duration': datetime.timedelta(seconds=900),
  893. 'report_interval': {'dtstart': datetime.datetime(2020, 12, 3, 14, 22, 7, 606964, tzinfo=datetime.timezone.utc),
  894. 'duration': datetime.timedelta(seconds=7200)},
  895. 'report_specifier_id': '811d8648-2f81-48ee-85f0-6c45613a2736',
  896. 'specifier_payloads': [{'r_id': '81cbec7c-01a8-4d80-a99a-0957cce79839',
  897. 'reading_type': 'Direct '
  898. 'Read'}]}}],
  899. 'response': {'request_id': '19906000-b93a-4c09-a828-2cfed5b46232',
  900. 'response_code': 200,
  901. 'response_description': 'OK'},
  902. 'ven_id': 'VEN123'}
  903. .. _oadrRequestEvent:
  904. oadrRequestEvent
  905. ================
  906. OpenADR payload:
  907. .. code-block:: xml
  908. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  909. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  910. <oadr:oadrRequestEvent xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  911. <eiRequestEvent xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">
  912. <requestID>58b56698-20e3-43f1-bae2-aa95e2cea367</requestID>
  913. <ei:venID>123ABC</ei:venID>
  914. </eiRequestEvent>
  915. </oadr:oadrRequestEvent>
  916. </oadr:oadrSignedObject>
  917. </oadr:oadrPayload>
  918. OpenLEADR representation:
  919. .. code-block:: python3
  920. {'request_id': '58b56698-20e3-43f1-bae2-aa95e2cea367', 'ven_id': '123ABC'}
  921. .. _oadrRequestReregistration:
  922. oadrRequestReregistration
  923. =========================
  924. OpenADR payload:
  925. .. code-block:: xml
  926. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  927. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  928. <oadr:oadrRequestReregistration xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  929. <ei:venID>123ABC</ei:venID>
  930. </oadr:oadrRequestReregistration>
  931. </oadr:oadrSignedObject>
  932. </oadr:oadrPayload>
  933. OpenLEADR representation:
  934. .. code-block:: python3
  935. {'ven_id': '123ABC'}
  936. .. _oadrRegisterReport:
  937. oadrRegisterReport
  938. ==================
  939. OpenADR payload:
  940. .. code-block:: xml
  941. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  942. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  943. <oadr:oadrRegisterReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  944. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">d37a5398-50f0-45bd-9b19-6b5b6bb61c02</requestID>
  945. <oadr:oadrReport xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:strm="urn:ietf:params:xml:ns:icalendar-2.0:stream">
  946. <ei:eiReportID>62ae2f36-49b8-49c9-8ffc-4af19a536b17</ei:eiReportID>
  947. <oadr:oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06">
  948. <ei:rID>08dd7433-2798-4a9f-a030-0a0b5021fdc8</ei:rID>
  949. <ei:reportSubject>
  950. <ei:resourceID>123ABC</ei:resourceID>
  951. </ei:reportSubject>
  952. <ei:reportDataSource>
  953. <ei:resourceID>123ABC</ei:resourceID>
  954. </ei:reportDataSource>
  955. <ei:reportType>reading</ei:reportType>
  956. <ei:readingType>Direct Read</ei:readingType>
  957. <emix:marketContext>http://localhost</emix:marketContext>
  958. <oadr:oadrSamplingRate>
  959. <oadr:oadrMinPeriod>PT1M</oadr:oadrMinPeriod>
  960. <oadr:oadrMaxPeriod>PT1M</oadr:oadrMaxPeriod>
  961. <oadr:oadrOnChange>true</oadr:oadrOnChange>
  962. </oadr:oadrSamplingRate>
  963. </oadr:oadrReportDescription>
  964. <ei:reportRequestID>f585d124-96ee-46f4-b882-c106dbc0d90e</ei:reportRequestID>
  965. <ei:reportSpecifierID>96e61860-b171-4ce4-8715-5a47894f59d3</ei:reportSpecifierID>
  966. <ei:reportName>METADATA_HISTORY_USAGE</ei:reportName>
  967. <ei:createdDateTime>2020-12-03T14:22:07.607003Z</ei:createdDateTime>
  968. </oadr:oadrReport>
  969. <ei:venID>123ABC</ei:venID>
  970. <ei:reportRequestID>54451870-32f1-4ad1-b9c4-27120f8b354c</ei:reportRequestID>
  971. </oadr:oadrRegisterReport>
  972. </oadr:oadrSignedObject>
  973. </oadr:oadrPayload>
  974. OpenLEADR representation:
  975. .. code-block:: python3
  976. {'report_request_id': '54451870-32f1-4ad1-b9c4-27120f8b354c',
  977. 'reports': [{'created_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 607003, tzinfo=datetime.timezone.utc),
  978. 'report_descriptions': [{'market_context': 'http://localhost',
  979. 'r_id': '08dd7433-2798-4a9f-a030-0a0b5021fdc8',
  980. 'reading_type': 'Direct Read',
  981. 'report_data_source': {'resource_id': '123ABC'},
  982. 'report_subject': {'resource_id': '123ABC'},
  983. 'report_type': 'reading',
  984. 'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
  985. 'min_period': datetime.timedelta(seconds=60),
  986. 'on_change': True}}],
  987. 'report_id': '62ae2f36-49b8-49c9-8ffc-4af19a536b17',
  988. 'report_name': 'METADATA_HISTORY_USAGE',
  989. 'report_request_id': 'f585d124-96ee-46f4-b882-c106dbc0d90e',
  990. 'report_specifier_id': '96e61860-b171-4ce4-8715-5a47894f59d3'}],
  991. 'request_id': 'd37a5398-50f0-45bd-9b19-6b5b6bb61c02',
  992. 'ven_id': '123ABC'}
  993. .. _oadrRegisterReport:
  994. oadrRegisterReport
  995. ==================
  996. OpenADR payload:
  997. .. code-block:: xml
  998. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  999. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  1000. <oadr:oadrRegisterReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  1001. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">8a4f859883</requestID>
  1002. <oadr:oadrReport xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:strm="urn:ietf:params:xml:ns:icalendar-2.0:stream">
  1003. <xcal:duration>
  1004. <xcal:duration>PT2H</xcal:duration>
  1005. </xcal:duration>
  1006. <ei:eiReportID>622e2178-afa1-46e5-89ec-f00387fea5b0</ei:eiReportID>
  1007. <oadr:oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06">
  1008. <ei:rID>1aed6a1f-f8c9-4fc1-9de1-1a0c5e1cd67a</ei:rID>
  1009. <ei:reportDataSource>
  1010. <ei:resourceID>resource1</ei:resourceID>
  1011. </ei:reportDataSource>
  1012. <ei:reportType>x-resourceStatus</ei:reportType>
  1013. <ei:readingType>x-notApplicable</ei:readingType>
  1014. <emix:marketContext>http://MarketContext1</emix:marketContext>
  1015. <oadr:oadrSamplingRate>
  1016. <oadr:oadrMinPeriod>PT1M</oadr:oadrMinPeriod>
  1017. <oadr:oadrMaxPeriod>PT1M</oadr:oadrMaxPeriod>
  1018. <oadr:oadrOnChange>false</oadr:oadrOnChange>
  1019. </oadr:oadrSamplingRate>
  1020. </oadr:oadrReportDescription>
  1021. <ei:reportRequestID>fd27d669-9917-4096-ba1e-c3f5ae8a6886</ei:reportRequestID>
  1022. <ei:reportSpecifierID>789ed6cd4e_telemetry_status</ei:reportSpecifierID>
  1023. <ei:reportName>METADATA_TELEMETRY_STATUS</ei:reportName>
  1024. <ei:createdDateTime>2019-11-20T15:04:52.638621Z</ei:createdDateTime>
  1025. </oadr:oadrReport>
  1026. <oadr:oadrReport xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:strm="urn:ietf:params:xml:ns:icalendar-2.0:stream">
  1027. <xcal:duration>
  1028. <xcal:duration>PT2H</xcal:duration>
  1029. </xcal:duration>
  1030. <ei:eiReportID>584d3b60-a8c6-4967-9f32-599a615a57c6</ei:eiReportID>
  1031. <oadr:oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06">
  1032. <ei:rID>resource1_energy</ei:rID>
  1033. <ei:reportDataSource>
  1034. <ei:resourceID>resource1</ei:resourceID>
  1035. </ei:reportDataSource>
  1036. <ei:reportType>usage</ei:reportType>
  1037. <power:energyReal xmlns:scale="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:power="http://docs.oasis-open.org/ns/emix/2011/06/power">
  1038. <power:itemDescription>RealEnergy</power:itemDescription>
  1039. <power:itemUnits>Wh</power:itemUnits>
  1040. <scale:siScaleCode>n</scale:siScaleCode>
  1041. </power:energyReal>
  1042. <ei:readingType>Direct Read</ei:readingType>
  1043. <emix:marketContext>http://MarketContext1</emix:marketContext>
  1044. <oadr:oadrSamplingRate>
  1045. <oadr:oadrMinPeriod>PT1M</oadr:oadrMinPeriod>
  1046. <oadr:oadrMaxPeriod>PT1M</oadr:oadrMaxPeriod>
  1047. <oadr:oadrOnChange>false</oadr:oadrOnChange>
  1048. </oadr:oadrSamplingRate>
  1049. </oadr:oadrReportDescription>
  1050. <oadr:oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06">
  1051. <ei:rID>resource1_power</ei:rID>
  1052. <ei:reportDataSource>
  1053. <ei:resourceID>resource1</ei:resourceID>
  1054. </ei:reportDataSource>
  1055. <ei:reportType>usage</ei:reportType>
  1056. <power:powerReal xmlns:scale="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:power="http://docs.oasis-open.org/ns/emix/2011/06/power">
  1057. <power:itemDescription>RealPower</power:itemDescription>
  1058. <power:itemUnits>W</power:itemUnits>
  1059. <scale:siScaleCode>n</scale:siScaleCode>
  1060. <power:powerAttributes>
  1061. <power:hertz>50</power:hertz>
  1062. <power:voltage>230</power:voltage>
  1063. <power:ac>true</power:ac>
  1064. </power:powerAttributes>
  1065. </power:powerReal>
  1066. <ei:readingType>Direct Read</ei:readingType>
  1067. <emix:marketContext>http://MarketContext1</emix:marketContext>
  1068. <oadr:oadrSamplingRate>
  1069. <oadr:oadrMinPeriod>PT1M</oadr:oadrMinPeriod>
  1070. <oadr:oadrMaxPeriod>PT1M</oadr:oadrMaxPeriod>
  1071. <oadr:oadrOnChange>false</oadr:oadrOnChange>
  1072. </oadr:oadrSamplingRate>
  1073. </oadr:oadrReportDescription>
  1074. <ei:reportRequestID>538cf64f-901f-4bdf-ac7c-f5f72d4b4682</ei:reportRequestID>
  1075. <ei:reportSpecifierID>789ed6cd4e_telemetry_usage</ei:reportSpecifierID>
  1076. <ei:reportName>METADATA_TELEMETRY_USAGE</ei:reportName>
  1077. <ei:createdDateTime>2019-11-20T15:04:52.638621Z</ei:createdDateTime>
  1078. </oadr:oadrReport>
  1079. <oadr:oadrReport xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0" xmlns:strm="urn:ietf:params:xml:ns:icalendar-2.0:stream">
  1080. <xcal:duration>
  1081. <xcal:duration>PT2H</xcal:duration>
  1082. </xcal:duration>
  1083. <ei:eiReportID>41907ef1-2f5b-45aa-b5fb-171098145438</ei:eiReportID>
  1084. <oadr:oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06">
  1085. <ei:rID>resource1_energy</ei:rID>
  1086. <ei:reportDataSource>
  1087. <ei:resourceID>resource1</ei:resourceID>
  1088. </ei:reportDataSource>
  1089. <ei:reportType>usage</ei:reportType>
  1090. <power:energyReal xmlns:scale="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:power="http://docs.oasis-open.org/ns/emix/2011/06/power">
  1091. <power:itemDescription>RealEnergy</power:itemDescription>
  1092. <power:itemUnits>Wh</power:itemUnits>
  1093. <scale:siScaleCode>n</scale:siScaleCode>
  1094. </power:energyReal>
  1095. <ei:readingType>Direct Read</ei:readingType>
  1096. <emix:marketContext>http://MarketContext1</emix:marketContext>
  1097. <oadr:oadrSamplingRate>
  1098. <oadr:oadrMinPeriod>PT1M</oadr:oadrMinPeriod>
  1099. <oadr:oadrMaxPeriod>PT1M</oadr:oadrMaxPeriod>
  1100. <oadr:oadrOnChange>false</oadr:oadrOnChange>
  1101. </oadr:oadrSamplingRate>
  1102. </oadr:oadrReportDescription>
  1103. <oadr:oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06">
  1104. <ei:rID>resource1_power</ei:rID>
  1105. <ei:reportDataSource>
  1106. <ei:resourceID>resource1</ei:resourceID>
  1107. </ei:reportDataSource>
  1108. <ei:reportType>usage</ei:reportType>
  1109. <power:powerReal xmlns:scale="http://docs.oasis-open.org/ns/emix/2011/06/siscale" xmlns:power="http://docs.oasis-open.org/ns/emix/2011/06/power">
  1110. <power:itemDescription>RealPower</power:itemDescription>
  1111. <power:itemUnits>W</power:itemUnits>
  1112. <scale:siScaleCode>n</scale:siScaleCode>
  1113. <power:powerAttributes>
  1114. <power:hertz>50</power:hertz>
  1115. <power:voltage>230</power:voltage>
  1116. <power:ac>true</power:ac>
  1117. </power:powerAttributes>
  1118. </power:powerReal>
  1119. <ei:readingType>Direct Read</ei:readingType>
  1120. <emix:marketContext>http://MarketContext1</emix:marketContext>
  1121. <oadr:oadrSamplingRate>
  1122. <oadr:oadrMinPeriod>PT1M</oadr:oadrMinPeriod>
  1123. <oadr:oadrMaxPeriod>PT1M</oadr:oadrMaxPeriod>
  1124. <oadr:oadrOnChange>false</oadr:oadrOnChange>
  1125. </oadr:oadrSamplingRate>
  1126. </oadr:oadrReportDescription>
  1127. <ei:reportRequestID>2244c5fd-44e2-4354-8aa0-97618cb1aa3a</ei:reportRequestID>
  1128. <ei:reportSpecifierID>789ed6cd4e_history_usage</ei:reportSpecifierID>
  1129. <ei:reportName>METADATA_HISTORY_USAGE</ei:reportName>
  1130. <ei:createdDateTime>2019-11-20T15:04:52.638621Z</ei:createdDateTime>
  1131. </oadr:oadrReport>
  1132. <ei:venID>s3cc244ee6</ei:venID>
  1133. </oadr:oadrRegisterReport>
  1134. </oadr:oadrSignedObject>
  1135. </oadr:oadrPayload>
  1136. OpenLEADR representation:
  1137. .. code-block:: python3
  1138. {'reports': [{'created_date_time': datetime.datetime(2019, 11, 20, 15, 4, 52, 638621, tzinfo=datetime.timezone.utc),
  1139. 'duration': datetime.timedelta(seconds=7200),
  1140. 'report_descriptions': [{'market_context': 'http://MarketContext1',
  1141. 'r_id': '1aed6a1f-f8c9-4fc1-9de1-1a0c5e1cd67a',
  1142. 'reading_type': 'x-notApplicable',
  1143. 'report_data_source': {'resource_id': 'resource1'},
  1144. 'report_type': 'x-resourceStatus',
  1145. 'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
  1146. 'min_period': datetime.timedelta(seconds=60),
  1147. 'on_change': False}}],
  1148. 'report_id': '622e2178-afa1-46e5-89ec-f00387fea5b0',
  1149. 'report_name': 'METADATA_TELEMETRY_STATUS',
  1150. 'report_request_id': 'fd27d669-9917-4096-ba1e-c3f5ae8a6886',
  1151. 'report_specifier_id': '789ed6cd4e_telemetry_status'},
  1152. {'created_date_time': datetime.datetime(2019, 11, 20, 15, 4, 52, 638621, tzinfo=datetime.timezone.utc),
  1153. 'duration': datetime.timedelta(seconds=7200),
  1154. 'report_descriptions': [{'market_context': 'http://MarketContext1',
  1155. 'measurement': {'description': 'RealEnergy',
  1156. 'name': 'energyReal',
  1157. 'scale': 'n',
  1158. 'unit': 'Wh'},
  1159. 'r_id': 'resource1_energy',
  1160. 'reading_type': 'Direct Read',
  1161. 'report_data_source': {'resource_id': 'resource1'},
  1162. 'report_type': 'usage',
  1163. 'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
  1164. 'min_period': datetime.timedelta(seconds=60),
  1165. 'on_change': False}},
  1166. {'market_context': 'http://MarketContext1',
  1167. 'measurement': {'description': 'RealPower',
  1168. 'name': 'powerReal',
  1169. 'power_attributes': {'ac': True,
  1170. 'hertz': 50,
  1171. 'voltage': 230},
  1172. 'scale': 'n',
  1173. 'unit': 'W'},
  1174. 'r_id': 'resource1_power',
  1175. 'reading_type': 'Direct Read',
  1176. 'report_data_source': {'resource_id': 'resource1'},
  1177. 'report_type': 'usage',
  1178. 'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
  1179. 'min_period': datetime.timedelta(seconds=60),
  1180. 'on_change': False}}],
  1181. 'report_id': '584d3b60-a8c6-4967-9f32-599a615a57c6',
  1182. 'report_name': 'METADATA_TELEMETRY_USAGE',
  1183. 'report_request_id': '538cf64f-901f-4bdf-ac7c-f5f72d4b4682',
  1184. 'report_specifier_id': '789ed6cd4e_telemetry_usage'},
  1185. {'created_date_time': datetime.datetime(2019, 11, 20, 15, 4, 52, 638621, tzinfo=datetime.timezone.utc),
  1186. 'duration': datetime.timedelta(seconds=7200),
  1187. 'report_descriptions': [{'market_context': 'http://MarketContext1',
  1188. 'measurement': {'description': 'RealEnergy',
  1189. 'name': 'energyReal',
  1190. 'scale': 'n',
  1191. 'unit': 'Wh'},
  1192. 'r_id': 'resource1_energy',
  1193. 'reading_type': 'Direct Read',
  1194. 'report_data_source': {'resource_id': 'resource1'},
  1195. 'report_type': 'usage',
  1196. 'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
  1197. 'min_period': datetime.timedelta(seconds=60),
  1198. 'on_change': False}},
  1199. {'market_context': 'http://MarketContext1',
  1200. 'measurement': {'description': 'RealPower',
  1201. 'name': 'powerReal',
  1202. 'power_attributes': {'ac': True,
  1203. 'hertz': 50,
  1204. 'voltage': 230},
  1205. 'scale': 'n',
  1206. 'unit': 'W'},
  1207. 'r_id': 'resource1_power',
  1208. 'reading_type': 'Direct Read',
  1209. 'report_data_source': {'resource_id': 'resource1'},
  1210. 'report_type': 'usage',
  1211. 'sampling_rate': {'max_period': datetime.timedelta(seconds=60),
  1212. 'min_period': datetime.timedelta(seconds=60),
  1213. 'on_change': False}}],
  1214. 'report_id': '41907ef1-2f5b-45aa-b5fb-171098145438',
  1215. 'report_name': 'METADATA_HISTORY_USAGE',
  1216. 'report_request_id': '2244c5fd-44e2-4354-8aa0-97618cb1aa3a',
  1217. 'report_specifier_id': '789ed6cd4e_history_usage'}],
  1218. 'request_id': '8a4f859883',
  1219. 'ven_id': 's3cc244ee6'}
  1220. .. _oadrResponse:
  1221. oadrResponse
  1222. ============
  1223. OpenADR payload:
  1224. .. code-block:: xml
  1225. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  1226. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  1227. <oadr:oadrResponse xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  1228. <ei:eiResponse>
  1229. <ei:responseCode>200</ei:responseCode>
  1230. <ei:responseDescription>OK</ei:responseDescription>
  1231. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">c798c95c-08ee-4aab-bbb6-f37709ac0dbe</requestID>
  1232. </ei:eiResponse>
  1233. <ei:venID>123ABC</ei:venID>
  1234. </oadr:oadrResponse>
  1235. </oadr:oadrSignedObject>
  1236. </oadr:oadrPayload>
  1237. OpenLEADR representation:
  1238. .. code-block:: python3
  1239. {'response': {'request_id': 'c798c95c-08ee-4aab-bbb6-f37709ac0dbe',
  1240. 'response_code': 200,
  1241. 'response_description': 'OK'},
  1242. 'ven_id': '123ABC'}
  1243. .. _oadrResponse:
  1244. oadrResponse
  1245. ============
  1246. OpenADR payload:
  1247. .. code-block:: xml
  1248. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  1249. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  1250. <oadr:oadrResponse xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  1251. <ei:eiResponse>
  1252. <ei:responseCode>200</ei:responseCode>
  1253. <ei:responseDescription>OK</ei:responseDescription>
  1254. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads"/>
  1255. </ei:eiResponse>
  1256. <ei:venID>123ABC</ei:venID>
  1257. </oadr:oadrResponse>
  1258. </oadr:oadrSignedObject>
  1259. </oadr:oadrPayload>
  1260. OpenLEADR representation:
  1261. .. code-block:: python3
  1262. {'response': {'request_id': None,
  1263. 'response_code': 200,
  1264. 'response_description': 'OK'},
  1265. 'ven_id': '123ABC'}
  1266. .. _oadrUpdatedReport:
  1267. oadrUpdatedReport
  1268. =================
  1269. OpenADR payload:
  1270. .. code-block:: xml
  1271. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  1272. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" oadr:Id="oadrSignedObject">
  1273. <oadr:oadrUpdatedReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" xmlns:pyld="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" ei:schemaVersion="2.0b">
  1274. <ei:eiResponse>
  1275. <ei:responseCode>200</ei:responseCode>
  1276. <ei:responseDescription>OK</ei:responseDescription>
  1277. <pyld:requestID>16f0ba0e-6962-48dc-8d7d-66a126d46760</pyld:requestID>
  1278. </ei:eiResponse>
  1279. <oadr:oadrCancelReport>
  1280. <pyld:requestID>5328e42f-ae89-43fe-968a-3918997ed21c</pyld:requestID>
  1281. <ei:reportRequestID>b41c5e66-907e-4f21-a023-480d1ce0f08a</ei:reportRequestID>
  1282. <ei:reportRequestID>5862716f-87a4-4cd8-9bdd-3a036171c73c</ei:reportRequestID>
  1283. <ei:reportRequestID>a631252e-5c6e-4c79-9485-c45f2dc86b5a</ei:reportRequestID>
  1284. <pyld:reportToFollow>false</pyld:reportToFollow>
  1285. <ei:venID>123ABC</ei:venID>
  1286. </oadr:oadrCancelReport>
  1287. <ei:venID>123ABC</ei:venID>
  1288. </oadr:oadrUpdatedReport>
  1289. </oadr:oadrSignedObject>
  1290. </oadr:oadrPayload>
  1291. OpenLEADR representation:
  1292. .. code-block:: python3
  1293. {'cancel_report': {'report_request_id': ['b41c5e66-907e-4f21-a023-480d1ce0f08a',
  1294. '5862716f-87a4-4cd8-9bdd-3a036171c73c',
  1295. 'a631252e-5c6e-4c79-9485-c45f2dc86b5a'],
  1296. 'report_to_follow': False,
  1297. 'request_id': '5328e42f-ae89-43fe-968a-3918997ed21c',
  1298. 'ven_id': '123ABC'},
  1299. 'response': {'request_id': '16f0ba0e-6962-48dc-8d7d-66a126d46760',
  1300. 'response_code': 200,
  1301. 'response_description': 'OK'},
  1302. 'ven_id': '123ABC'}
  1303. .. _oadrUpdateReport:
  1304. oadrUpdateReport
  1305. ================
  1306. OpenADR payload:
  1307. .. code-block:: xml
  1308. <oadr:oadrPayload xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07">
  1309. <oadr:oadrSignedObject xmlns:oadr="http://openadr.org/oadr-2.0b/2012/07" xmlns:pyld="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06" oadr:Id="oadrSignedObject">
  1310. <oadr:oadrUpdateReport xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110" ei:schemaVersion="2.0b">
  1311. <pyld:requestID>4875efec-522c-4990-9455-0d829a9032d8</pyld:requestID>
  1312. <oadr:oadrReport xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
  1313. <ei:eiReportID>f2b55629-fa99-4e48-903b-c2f4e1f9b589</ei:eiReportID>
  1314. <oadr:oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06">
  1315. <ei:rID>297b0a89-a674-4e6a-8543-2f50c91ffea9</ei:rID>
  1316. <ei:reportSubject>
  1317. <ei:resourceID>123ABC</ei:resourceID>
  1318. </ei:reportSubject>
  1319. <ei:reportDataSource>
  1320. <ei:resourceID>123ABC</ei:resourceID>
  1321. </ei:reportDataSource>
  1322. <ei:reportType>availableEnergyStorage</ei:reportType>
  1323. <ei:readingType>Allocated</ei:readingType>
  1324. <emix:marketContext>http://localhost</emix:marketContext>
  1325. <oadr:oadrSamplingRate>
  1326. <oadr:oadrMinPeriod>PT1M</oadr:oadrMinPeriod>
  1327. <oadr:oadrMaxPeriod>PT2M</oadr:oadrMaxPeriod>
  1328. <oadr:oadrOnChange>false</oadr:oadrOnChange>
  1329. </oadr:oadrSamplingRate>
  1330. </oadr:oadrReportDescription>
  1331. <ei:reportRequestID>253918be-08cf-4888-9c0b-d49a96136e54</ei:reportRequestID>
  1332. <ei:reportSpecifierID>74ab5dae-95b9-4ba5-a68f-6e789ca41769</ei:reportSpecifierID>
  1333. <ei:reportName>HISTORY_GREENBUTTON</ei:reportName>
  1334. <ei:createdDateTime>2020-12-03T14:22:07.607232Z</ei:createdDateTime>
  1335. </oadr:oadrReport>
  1336. <ei:venID>123ABC</ei:venID>
  1337. </oadr:oadrUpdateReport>
  1338. </oadr:oadrSignedObject>
  1339. </oadr:oadrPayload>
  1340. OpenLEADR representation:
  1341. .. code-block:: python3
  1342. {'reports': [{'created_date_time': datetime.datetime(2020, 12, 3, 14, 22, 7, 607232, tzinfo=datetime.timezone.utc),
  1343. 'report_descriptions': [{'market_context': 'http://localhost',
  1344. 'r_id': '297b0a89-a674-4e6a-8543-2f50c91ffea9',
  1345. 'reading_type': 'Allocated',
  1346. 'report_data_source': {'resource_id': '123ABC'},
  1347. 'report_subject': {'resource_id': '123ABC'},
  1348. 'report_type': 'availableEnergyStorage',
  1349. 'sampling_rate': {'max_period': datetime.timedelta(seconds=120),
  1350. 'min_period': datetime.timedelta(seconds=60),
  1351. 'on_change': False}}],
  1352. 'report_id': 'f2b55629-fa99-4e48-903b-c2f4e1f9b589',
  1353. 'report_name': 'HISTORY_GREENBUTTON',
  1354. 'report_request_id': '253918be-08cf-4888-9c0b-d49a96136e54',
  1355. 'report_specifier_id': '74ab5dae-95b9-4ba5-a68f-6e789ca41769'}],
  1356. 'request_id': '4875efec-522c-4990-9455-0d829a9032d8',
  1357. 'ven_id': '123ABC'}