representations.rst 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366
  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. <?xml version="1.0" encoding="utf-8"?>
  32. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  33. <oadrSignedObject>
  34. <oadrCanceledOpt ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  35. <ei:eiResponse>
  36. <ei:responseCode>200</ei:responseCode>
  37. <ei:responseDescription>OK</ei:responseDescription>
  38. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">f48e3b7e78</requestID>
  39. </ei:eiResponse>
  40. <ei:optID>pc1e8ace47</ei:optID>
  41. </oadrCanceledOpt>
  42. </oadrSignedObject>
  43. </oadrPayload>
  44. OpenLEADR representation:
  45. .. code-block:: python3
  46. {'opt_id': 'pc1e8ace47',
  47. 'response': {'request_id': 'f48e3b7e78',
  48. 'response_code': 200,
  49. 'response_description': 'OK'}}
  50. .. _oadrCanceledPartyRegistration:
  51. oadrCanceledPartyRegistration
  52. =============================
  53. OpenADR payload:
  54. .. code-block:: xml
  55. <?xml version="1.0" encoding="utf-8"?>
  56. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  57. <oadrSignedObject>
  58. <oadrCanceledPartyRegistration ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  59. <ei:eiResponse>
  60. <ei:responseCode>200</ei:responseCode>
  61. <ei:responseDescription>OK</ei:responseDescription>
  62. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">aba0a805de</requestID>
  63. </ei:eiResponse>
  64. <ei:registrationID>zf68abb5c2</ei:registrationID>
  65. <ei:venID>123ABC</ei:venID>
  66. </oadrCanceledPartyRegistration>
  67. </oadrSignedObject>
  68. </oadrPayload>
  69. OpenLEADR representation:
  70. .. code-block:: python3
  71. {'registration_id': 'zf68abb5c2',
  72. 'response': {'request_id': 'aba0a805de',
  73. 'response_code': 200,
  74. 'response_description': 'OK'},
  75. 'ven_id': '123ABC'}
  76. .. _oadrCanceledReport:
  77. oadrCanceledReport
  78. ==================
  79. OpenADR payload:
  80. .. code-block:: xml
  81. <?xml version="1.0" encoding="utf-8"?>
  82. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  83. <oadrSignedObject>
  84. <oadrCanceledReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  85. <ei:eiResponse>
  86. <ei:responseCode>200</ei:responseCode>
  87. <ei:responseDescription>OK</ei:responseDescription>
  88. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">e4dfe735ea</requestID>
  89. </ei:eiResponse>
  90. <oadrPendingReports>
  91. <ei:reportRequestID>v5d42c35e6</ei:reportRequestID>
  92. <ei:reportRequestID>e8bf753e31</ei:reportRequestID>
  93. </oadrPendingReports>
  94. </oadrCanceledReport>
  95. </oadrSignedObject>
  96. </oadrPayload>
  97. OpenLEADR representation:
  98. .. code-block:: python3
  99. {'pending_reports': [{'request_id': 'v5d42c35e6'},
  100. {'request_id': 'e8bf753e31'}],
  101. 'response': {'request_id': 'e4dfe735ea',
  102. 'response_code': 200,
  103. 'response_description': 'OK'}}
  104. OpenADR payload:
  105. .. code-block:: xml
  106. <?xml version="1.0" encoding="utf-8"?>
  107. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  108. <oadrSignedObject>
  109. <oadrCanceledReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  110. <ei:eiResponse>
  111. <ei:responseCode>200</ei:responseCode>
  112. <ei:responseDescription>OK</ei:responseDescription>
  113. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">c36bce5dcb</requestID>
  114. </ei:eiResponse>
  115. <oadrPendingReports>
  116. <ei:reportRequestID>b04cbfb723</ei:reportRequestID>
  117. <ei:reportRequestID>ra6231a650</ei:reportRequestID>
  118. </oadrPendingReports>
  119. <ei:venID>123ABC</ei:venID>
  120. </oadrCanceledReport>
  121. </oadrSignedObject>
  122. </oadrPayload>
  123. OpenLEADR representation:
  124. .. code-block:: python3
  125. {'pending_reports': [{'request_id': 'b04cbfb723'},
  126. {'request_id': 'ra6231a650'}],
  127. 'response': {'request_id': 'c36bce5dcb',
  128. 'response_code': 200,
  129. 'response_description': 'OK'},
  130. 'ven_id': '123ABC'}
  131. .. _oadrCancelOpt:
  132. oadrCancelOpt
  133. =============
  134. OpenADR payload:
  135. .. code-block:: xml
  136. <?xml version="1.0" encoding="utf-8"?>
  137. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  138. <oadrSignedObject>
  139. <oadrCancelOpt ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  140. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">u07a26b1cc</requestID>
  141. <ei:optID>b1ef7afecc</ei:optID>
  142. <ei:venID>123ABC</ei:venID>
  143. </oadrCancelOpt>
  144. </oadrSignedObject>
  145. </oadrPayload>
  146. OpenLEADR representation:
  147. .. code-block:: python3
  148. {'opt_id': 'b1ef7afecc', 'request_id': 'u07a26b1cc', 'ven_id': '123ABC'}
  149. .. _oadrCancelPartyRegistration:
  150. oadrCancelPartyRegistration
  151. ===========================
  152. OpenADR payload:
  153. .. code-block:: xml
  154. <?xml version="1.0" encoding="utf-8"?>
  155. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  156. <oadrSignedObject>
  157. <oadrCancelPartyRegistration ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  158. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">z05e4ff0aa</requestID>
  159. <ei:registrationID>pfe04d8439</ei:registrationID>
  160. <ei:venID>123ABC</ei:venID>
  161. </oadrCancelPartyRegistration>
  162. </oadrSignedObject>
  163. </oadrPayload>
  164. OpenLEADR representation:
  165. .. code-block:: python3
  166. {'registration_id': 'pfe04d8439',
  167. 'request_id': 'z05e4ff0aa',
  168. 'ven_id': '123ABC'}
  169. .. _oadrCancelReport:
  170. oadrCancelReport
  171. ================
  172. OpenADR payload:
  173. .. code-block:: xml
  174. <?xml version="1.0" encoding="utf-8"?>
  175. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  176. <oadrSignedObject>
  177. <oadrCancelReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  178. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">kcb7b5cf7a</requestID>
  179. <ei:reportRequestID>u1ebe92deb</ei:reportRequestID>
  180. <reportToFollow xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">true</reportToFollow>
  181. <ei:venID>123ABC</ei:venID>
  182. </oadrCancelReport>
  183. </oadrSignedObject>
  184. </oadrPayload>
  185. OpenLEADR representation:
  186. .. code-block:: python3
  187. {'report_request_id': 'u1ebe92deb',
  188. 'report_to_follow': True,
  189. 'request_id': 'kcb7b5cf7a',
  190. 'ven_id': '123ABC'}
  191. .. _oadrCreatedEvent:
  192. oadrCreatedEvent
  193. ================
  194. OpenADR payload:
  195. .. code-block:: xml
  196. <?xml version="1.0" encoding="utf-8"?>
  197. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  198. <oadrSignedObject>
  199. <oadrCreatedEvent ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  200. <eiCreatedEvent xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">
  201. <ei:eiResponse>
  202. <ei:responseCode>200</ei:responseCode>
  203. <ei:responseDescription>OK</ei:responseDescription>
  204. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">yaa3ee03b1</requestID>
  205. </ei:eiResponse>
  206. <ei:eventResponses>
  207. <ei:eventResponse>
  208. <ei:responseCode>200</ei:responseCode>
  209. <ei:responseDescription>OK</ei:responseDescription>
  210. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">ycab9acb9f</requestID>
  211. <ei:qualifiedEventID>
  212. <ei:eventID>od864b4ea6</ei:eventID>
  213. <ei:modificationNumber>1</ei:modificationNumber>
  214. </ei:qualifiedEventID>
  215. <ei:optType>optIn</ei:optType>
  216. </ei:eventResponse>
  217. <ei:eventResponse>
  218. <ei:responseCode>200</ei:responseCode>
  219. <ei:responseDescription>OK</ei:responseDescription>
  220. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">bf2aad9af8</requestID>
  221. <ei:qualifiedEventID>
  222. <ei:eventID>hc6cf67dab</ei:eventID>
  223. <ei:modificationNumber>1</ei:modificationNumber>
  224. </ei:qualifiedEventID>
  225. <ei:optType>optIn</ei:optType>
  226. </ei:eventResponse>
  227. <ei:eventResponse>
  228. <ei:responseCode>200</ei:responseCode>
  229. <ei:responseDescription>OK</ei:responseDescription>
  230. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">jefb88dcbd</requestID>
  231. <ei:qualifiedEventID>
  232. <ei:eventID>qdff0da955</ei:eventID>
  233. <ei:modificationNumber>1</ei:modificationNumber>
  234. </ei:qualifiedEventID>
  235. <ei:optType>optIn</ei:optType>
  236. </ei:eventResponse>
  237. </ei:eventResponses>
  238. <ei:venID>123ABC</ei:venID>
  239. </eiCreatedEvent>
  240. </oadrCreatedEvent>
  241. </oadrSignedObject>
  242. </oadrPayload>
  243. OpenLEADR representation:
  244. .. code-block:: python3
  245. {'event_responses': [{'event_id': 'od864b4ea6',
  246. 'modification_number': 1,
  247. 'opt_type': 'optIn',
  248. 'request_id': 'ycab9acb9f',
  249. 'response_code': 200,
  250. 'response_description': 'OK'},
  251. {'event_id': 'hc6cf67dab',
  252. 'modification_number': 1,
  253. 'opt_type': 'optIn',
  254. 'request_id': 'bf2aad9af8',
  255. 'response_code': 200,
  256. 'response_description': 'OK'},
  257. {'event_id': 'qdff0da955',
  258. 'modification_number': 1,
  259. 'opt_type': 'optIn',
  260. 'request_id': 'jefb88dcbd',
  261. 'response_code': 200,
  262. 'response_description': 'OK'}],
  263. 'response': {'request_id': 'yaa3ee03b1',
  264. 'response_code': 200,
  265. 'response_description': 'OK'},
  266. 'ven_id': '123ABC'}
  267. OpenADR payload:
  268. .. code-block:: xml
  269. <?xml version="1.0" encoding="utf-8"?>
  270. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  271. <oadrSignedObject>
  272. <oadrCreatedEvent ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  273. <eiCreatedEvent xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">
  274. <ei:eiResponse>
  275. <ei:responseCode>200</ei:responseCode>
  276. <ei:responseDescription>OK</ei:responseDescription>
  277. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">yde9c0369d</requestID>
  278. </ei:eiResponse>
  279. <ei:eventResponses>
  280. <ei:eventResponse>
  281. <ei:responseCode>200</ei:responseCode>
  282. <ei:responseDescription>OK</ei:responseDescription>
  283. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">zc9523b16d</requestID>
  284. <ei:qualifiedEventID>
  285. <ei:eventID>fefaa2b0f2</ei:eventID>
  286. <ei:modificationNumber>1</ei:modificationNumber>
  287. </ei:qualifiedEventID>
  288. <ei:optType>optIn</ei:optType>
  289. </ei:eventResponse>
  290. <ei:eventResponse>
  291. <ei:responseCode>200</ei:responseCode>
  292. <ei:responseDescription>OK</ei:responseDescription>
  293. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">tbeecb7c97</requestID>
  294. <ei:qualifiedEventID>
  295. <ei:eventID>t63a63fea4</ei:eventID>
  296. <ei:modificationNumber>1</ei:modificationNumber>
  297. </ei:qualifiedEventID>
  298. <ei:optType>optOut</ei:optType>
  299. </ei:eventResponse>
  300. </ei:eventResponses>
  301. <ei:venID>123ABC</ei:venID>
  302. </eiCreatedEvent>
  303. </oadrCreatedEvent>
  304. </oadrSignedObject>
  305. </oadrPayload>
  306. OpenLEADR representation:
  307. .. code-block:: python3
  308. {'event_responses': [{'event_id': 'fefaa2b0f2',
  309. 'modification_number': 1,
  310. 'opt_type': 'optIn',
  311. 'request_id': 'zc9523b16d',
  312. 'response_code': 200,
  313. 'response_description': 'OK'},
  314. {'event_id': 't63a63fea4',
  315. 'modification_number': 1,
  316. 'opt_type': 'optOut',
  317. 'request_id': 'tbeecb7c97',
  318. 'response_code': 200,
  319. 'response_description': 'OK'}],
  320. 'response': {'request_id': 'yde9c0369d',
  321. 'response_code': 200,
  322. 'response_description': 'OK'},
  323. 'ven_id': '123ABC'}
  324. .. _oadrCreatedReport:
  325. oadrCreatedReport
  326. =================
  327. OpenADR payload:
  328. .. code-block:: xml
  329. <?xml version="1.0" encoding="utf-8"?>
  330. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  331. <oadrSignedObject>
  332. <oadrCreatedReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  333. <ei:eiResponse>
  334. <ei:responseCode>200</ei:responseCode>
  335. <ei:responseDescription>OK</ei:responseDescription>
  336. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">ie8ff94fbc</requestID>
  337. </ei:eiResponse>
  338. <oadrPendingReports>
  339. <ei:reportRequestID>p8c56f9ed9</ei:reportRequestID>
  340. <ei:reportRequestID>hab1cced95</ei:reportRequestID>
  341. </oadrPendingReports>
  342. <ei:venID>123ABC</ei:venID>
  343. </oadrCreatedReport>
  344. </oadrSignedObject>
  345. </oadrPayload>
  346. OpenLEADR representation:
  347. .. code-block:: python3
  348. {'pending_reports': [{'request_id': 'p8c56f9ed9'},
  349. {'request_id': 'hab1cced95'}],
  350. 'response': {'request_id': 'ie8ff94fbc',
  351. 'response_code': 200,
  352. 'response_description': 'OK'},
  353. 'ven_id': '123ABC'}
  354. OpenADR payload:
  355. .. code-block:: xml
  356. <?xml version="1.0" encoding="utf-8"?>
  357. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  358. <oadrSignedObject>
  359. <oadrCreatedReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  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">gde557fcae</requestID>
  364. </ei:eiResponse>
  365. <oadrPendingReports>
  366. <ei:reportRequestID>e1e16137f3</ei:reportRequestID>
  367. <ei:reportRequestID>d0f2bcbe89</ei:reportRequestID>
  368. </oadrPendingReports>
  369. </oadrCreatedReport>
  370. </oadrSignedObject>
  371. </oadrPayload>
  372. OpenLEADR representation:
  373. .. code-block:: python3
  374. {'pending_reports': [{'request_id': 'e1e16137f3'},
  375. {'request_id': 'd0f2bcbe89'}],
  376. 'response': {'request_id': 'gde557fcae',
  377. 'response_code': 200,
  378. 'response_description': 'OK'}}
  379. .. _oadrCreatedPartyRegistration:
  380. oadrCreatedPartyRegistration
  381. ============================
  382. This message is used by the VTN in two scenarios:
  383. 1. The VEN has just sent an :ref:`oadrQueryRegistration` request, and the VTN makes its available profiles and transport mechanisms known to the VEN
  384. 2. The VEN has just sent an :ref:`oadrCreatePartyRegistration` request, and the VTN responds by sending the registrationId to the VEN.
  385. OpenADR payload:
  386. .. code-block:: xml
  387. <?xml version="1.0" encoding="utf-8"?>
  388. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  389. <oadrSignedObject>
  390. <oadrCreatedPartyRegistration ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  391. <ei:eiResponse>
  392. <ei:responseCode>200</ei:responseCode>
  393. <ei:responseDescription>OK</ei:responseDescription>
  394. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">k6565d9280</requestID>
  395. </ei:eiResponse>
  396. <ei:registrationID>o852fdbac9</ei:registrationID>
  397. <ei:venID>123ABC</ei:venID>
  398. <ei:vtnID>VTN123</ei:vtnID>
  399. <oadrProfiles>
  400. <oadrProfile>
  401. <oadrProfileName>2.0b</oadrProfileName>
  402. <oadrTransports>
  403. <oadrTransport>
  404. <oadrTransportName>simpleHttp</oadrTransportName>
  405. </oadrTransport>
  406. </oadrTransports>
  407. </oadrProfile>
  408. </oadrProfiles>
  409. </oadrCreatedPartyRegistration>
  410. </oadrSignedObject>
  411. </oadrPayload>
  412. OpenLEADR representation:
  413. .. code-block:: python3
  414. {'profiles': [{'profile_name': '2.0b',
  415. 'transports': [{'transport_name': 'simpleHttp'}]}],
  416. 'registration_id': 'o852fdbac9',
  417. 'response': {'request_id': 'k6565d9280',
  418. 'response_code': 200,
  419. 'response_description': 'OK'},
  420. 'ven_id': '123ABC',
  421. 'vtn_id': 'VTN123'}
  422. .. _oadrCreateOpt:
  423. oadrCreateOpt
  424. =============
  425. OpenADR payload:
  426. .. code-block:: xml
  427. <?xml version="1.0" encoding="utf-8"?>
  428. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  429. <oadrSignedObject>
  430. <oadrCreateOpt ei:schemaVersion="2.0b" 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">
  431. <ei:optID>l170fb7ea4</ei:optID>
  432. <ei:optType>optIn</ei:optType>
  433. <ei:optReason>participating</ei:optReason>
  434. <ei:venID>VEN123</ei:venID>
  435. <ei:createdDateTime>2020-07-09T15:54:03.151236Z </ei:createdDateTime>
  436. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">k6dc07ece8</requestID>
  437. <ei:qualifiedEventID>
  438. <ei:eventID>sdfe18dd5c</ei:eventID>
  439. <ei:modificationNumber>1</ei:modificationNumber>
  440. </ei:qualifiedEventID>
  441. <ei:eiTarget>
  442. <ei:venID>123ABC</ei:venID>
  443. </ei:eiTarget>
  444. </oadrCreateOpt>
  445. </oadrSignedObject>
  446. </oadrPayload>
  447. OpenLEADR representation:
  448. .. code-block:: python3
  449. {'created_date_time': datetime.datetime(2020, 7, 9, 15, 54, 3, 151236, tzinfo=datetime.timezone.utc),
  450. 'event_id': 'sdfe18dd5c',
  451. 'modification_number': 1,
  452. 'opt_id': 'l170fb7ea4',
  453. 'opt_reason': 'participating',
  454. 'opt_type': 'optIn',
  455. 'request_id': 'k6dc07ece8',
  456. 'targets': [{'ven_id': '123ABC'}],
  457. 'ven_id': 'VEN123'}
  458. .. _oadrCreatePartyRegistration:
  459. oadrCreatePartyRegistration
  460. ===========================
  461. OpenADR payload:
  462. .. code-block:: xml
  463. <?xml version="1.0" encoding="utf-8"?>
  464. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07">
  465. <oadrSignedObject>
  466. <oadrCreatePartyRegistration ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  467. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">g31f3a2aae</requestID>
  468. <ei:venID>123ABC</ei:venID>
  469. <oadrProfileName>2.0b</oadrProfileName>
  470. <oadrTransportName>simpleHttp</oadrTransportName>
  471. <oadrTransportAddress>http://localhost</oadrTransportAddress>
  472. <oadrReportOnly>false</oadrReportOnly>
  473. <oadrXmlSignature>false</oadrXmlSignature>
  474. <oadrVenName>test</oadrVenName>
  475. <oadrHttpPullModel>true</oadrHttpPullModel>
  476. </oadrCreatePartyRegistration>
  477. </oadrSignedObject>
  478. </oadrPayload>
  479. OpenLEADR representation:
  480. .. code-block:: python3
  481. {'http_pull_model': True,
  482. 'profile_name': '2.0b',
  483. 'report_only': False,
  484. 'request_id': 'g31f3a2aae',
  485. 'transport_address': 'http://localhost',
  486. 'transport_name': 'simpleHttp',
  487. 'ven_id': '123ABC',
  488. 'ven_name': 'test',
  489. 'xml_signature': False}
  490. .. _oadrCreateReport:
  491. oadrCreateReport
  492. ================
  493. OpenADR payload:
  494. .. code-block:: xml
  495. <?xml version="1.0" encoding="utf-8"?>
  496. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07">
  497. <oadrSignedObject>
  498. <oadrCreateReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  499. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">sdbbdefaad</requestID>
  500. <oadrReportRequest>
  501. <ei:reportRequestID>d2b7bade5f</ei:reportRequestID>
  502. <ei:reportSpecifier xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
  503. <ei:reportSpecifierID>9c8bdc00e7</ei:reportSpecifierID>
  504. <xcal:granularity>
  505. <xcal:duration>PT15M</xcal:duration>
  506. </xcal:granularity>
  507. <ei:reportBackDuration>
  508. <xcal:duration>PT15M</xcal:duration>
  509. </ei:reportBackDuration>
  510. <ei:reportInterval>
  511. <xcal:properties>
  512. <xcal:dtstart>
  513. <xcal:date-time>2019-11-19T11:00:18.672768Z</xcal:date-time>
  514. </xcal:dtstart>
  515. <xcal:duration>
  516. <xcal:duration>PT2H</xcal:duration>
  517. </xcal:duration>
  518. <xcal:tolerance>
  519. <xcal:tolerate>
  520. <xcal:startafter>PT5M</xcal:startafter>
  521. </xcal:tolerate>
  522. </xcal:tolerance>
  523. </xcal:properties>
  524. </ei:reportInterval>
  525. <ei:specifierPayload>
  526. <ei:rID>d6e2e07485</ei:rID>
  527. <ei:readingType>Direct Read</ei:readingType>
  528. </ei:specifierPayload>
  529. </ei:reportSpecifier>
  530. </oadrReportRequest>
  531. <ei:venID>123ABC</ei:venID>
  532. </oadrCreateReport>
  533. </oadrSignedObject>
  534. </oadrPayload>
  535. OpenLEADR representation:
  536. .. code-block:: python3
  537. {'report_requests': [{'report_request_id': 'd2b7bade5f',
  538. 'report_specifier': {'granularity': datetime.timedelta(seconds=900),
  539. 'report_back_duration': datetime.timedelta(seconds=900),
  540. 'report_interval': {'dtstart': datetime.datetime(2019, 11, 19, 11, 0, 18, 672768, tzinfo=datetime.timezone.utc),
  541. 'duration': datetime.timedelta(seconds=7200),
  542. 'tolerance': {'tolerate': {'startafter': datetime.timedelta(seconds=300)}}},
  543. 'report_specifier_id': '9c8bdc00e7',
  544. 'specifier_payload': {'r_id': 'd6e2e07485',
  545. 'reading_type': 'Direct '
  546. 'Read'}}}],
  547. 'request_id': 'sdbbdefaad',
  548. 'ven_id': '123ABC'}
  549. .. _oadrDistributeEvent:
  550. oadrDistributeEvent
  551. ===================
  552. This message is sent by the VTN when it delivers an Event to a VEN. This is the main communication of the Event, and it contains myriad options to precisely define the event.
  553. The VEN responds with either an :ref:`oadrCreatedEvent` message, indicating its 'opt' status ("Opt In" or "Opt Out").
  554. OpenADR payload:
  555. .. code-block:: xml
  556. <?xml version="1.0" encoding="utf-8"?>
  557. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  558. <oadrSignedObject>
  559. <oadrDistributeEvent ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  560. <ei:eiResponse>
  561. <ei:responseCode>200</ei:responseCode>
  562. <ei:responseDescription>OK</ei:responseDescription>
  563. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">123</requestID>
  564. </ei:eiResponse>
  565. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">i5fea744ae</requestID>
  566. <ei:vtnID>VTN123</ei:vtnID>
  567. <oadrEvent>
  568. <ei:eiEvent>
  569. <ei:eventDescriptor>
  570. <ei:eventID>ifdda7aff6</ei:eventID>
  571. <ei:modificationNumber>1</ei:modificationNumber>
  572. <ei:modificationDateTime>2020-07-09T15:54:03.166717Z</ei:modificationDateTime>
  573. <ei:priority>1</ei:priority>
  574. <ei:eiMarketContext>
  575. <marketContext xmlns="http://docs.oasis-open.org/ns/emix/2011/06">http://MarketContext1</marketContext>
  576. </ei:eiMarketContext>
  577. <ei:createdDateTime>2020-07-09T15:54:03.166717Z</ei:createdDateTime>
  578. <ei:eventStatus>near</ei:eventStatus>
  579. <ei:testEvent>false</ei:testEvent>
  580. <ei:vtnComment>This is an event</ei:vtnComment>
  581. </ei:eventDescriptor>
  582. <ei:eiActivePeriod>
  583. <properties xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  584. <dtstart>
  585. <date-time>2020-07-09T15:55:03.166717Z</date-time>
  586. </dtstart>
  587. <duration>
  588. <duration>PT10M</duration>
  589. </duration>
  590. </properties>
  591. <components xsi:nil="true" xmlns="urn:ietf:params:xml:ns:icalendar-2.0" />
  592. </ei:eiActivePeriod>
  593. <ei:eiEventSignals>
  594. <ei:eiEventSignal>
  595. <intervals xmlns="urn:ietf:params:xml:ns:icalendar-2.0:stream">
  596. <ei:interval>
  597. <duration xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  598. <duration>PT1M</duration>
  599. </duration>
  600. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  601. <text>1</text>
  602. </uid>
  603. <ei:signalPayload>
  604. <ei:payloadFloat>
  605. <ei:value>8</ei:value>
  606. </ei:payloadFloat>
  607. </ei:signalPayload>
  608. </ei:interval>
  609. <ei:interval>
  610. <duration xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  611. <duration>PT1M</duration>
  612. </duration>
  613. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  614. <text>2</text>
  615. </uid>
  616. <ei:signalPayload>
  617. <ei:payloadFloat>
  618. <ei:value>10</ei:value>
  619. </ei:payloadFloat>
  620. </ei:signalPayload>
  621. </ei:interval>
  622. <ei:interval>
  623. <duration xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  624. <duration>PT1M</duration>
  625. </duration>
  626. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  627. <text>3</text>
  628. </uid>
  629. <ei:signalPayload>
  630. <ei:payloadFloat>
  631. <ei:value>12</ei:value>
  632. </ei:payloadFloat>
  633. </ei:signalPayload>
  634. </ei:interval>
  635. <ei:interval>
  636. <duration xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  637. <duration>PT1M</duration>
  638. </duration>
  639. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  640. <text>4</text>
  641. </uid>
  642. <ei:signalPayload>
  643. <ei:payloadFloat>
  644. <ei:value>14</ei:value>
  645. </ei:payloadFloat>
  646. </ei:signalPayload>
  647. </ei:interval>
  648. <ei:interval>
  649. <duration xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  650. <duration>PT1M</duration>
  651. </duration>
  652. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  653. <text>5</text>
  654. </uid>
  655. <ei:signalPayload>
  656. <ei:payloadFloat>
  657. <ei:value>16</ei:value>
  658. </ei:payloadFloat>
  659. </ei:signalPayload>
  660. </ei:interval>
  661. <ei:interval>
  662. <duration xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  663. <duration>PT1M</duration>
  664. </duration>
  665. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  666. <text>6</text>
  667. </uid>
  668. <ei:signalPayload>
  669. <ei:payloadFloat>
  670. <ei:value>18</ei:value>
  671. </ei:payloadFloat>
  672. </ei:signalPayload>
  673. </ei:interval>
  674. <ei:interval>
  675. <duration xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  676. <duration>PT1M</duration>
  677. </duration>
  678. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  679. <text>7</text>
  680. </uid>
  681. <ei:signalPayload>
  682. <ei:payloadFloat>
  683. <ei:value>20</ei:value>
  684. </ei:payloadFloat>
  685. </ei:signalPayload>
  686. </ei:interval>
  687. <ei:interval>
  688. <duration xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  689. <duration>PT1M</duration>
  690. </duration>
  691. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  692. <text>8</text>
  693. </uid>
  694. <ei:signalPayload>
  695. <ei:payloadFloat>
  696. <ei:value>10</ei:value>
  697. </ei:payloadFloat>
  698. </ei:signalPayload>
  699. </ei:interval>
  700. <ei:interval>
  701. <duration xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  702. <duration>PT1M</duration>
  703. </duration>
  704. <uid xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
  705. <text>9</text>
  706. </uid>
  707. <ei:signalPayload>
  708. <ei:payloadFloat>
  709. <ei:value>20</ei:value>
  710. </ei:payloadFloat>
  711. </ei:signalPayload>
  712. </ei:interval>
  713. </intervals>
  714. <ei:signalName>LOAD_CONTROL</ei:signalName>
  715. <ei:signalType>x-loadControlCapacity</ei:signalType>
  716. <ei:signalID>zccf1b86ee</ei:signalID>
  717. <ei:currentValue>
  718. <ei:payloadFloat>
  719. <ei:value>9.99</ei:value>
  720. </ei:payloadFloat>
  721. </ei:currentValue>
  722. </ei:eiEventSignal>
  723. </ei:eiEventSignals>
  724. <ei:eiTarget>
  725. <ei:venID>VEN001</ei:venID>
  726. <ei:venID>VEN002</ei:venID>
  727. </ei:eiTarget>
  728. </ei:eiEvent>
  729. <oadrResponseRequired>always</oadrResponseRequired>
  730. </oadrEvent>
  731. </oadrDistributeEvent>
  732. </oadrSignedObject>
  733. </oadrPayload>
  734. OpenLEADR representation:
  735. .. code-block:: python3
  736. {'events': [{'active_period': {'dtstart': datetime.datetime(2020, 7, 9, 15, 55, 3, 166717, tzinfo=datetime.timezone.utc),
  737. 'duration': datetime.timedelta(seconds=600)},
  738. 'event_descriptor': {'created_date_time': datetime.datetime(2020, 7, 9, 15, 54, 3, 166717, tzinfo=datetime.timezone.utc),
  739. 'event_id': 'ifdda7aff6',
  740. 'event_status': 'near',
  741. 'market_context': 'http://MarketContext1',
  742. 'modification_date_time': datetime.datetime(2020, 7, 9, 15, 54, 3, 166717, tzinfo=datetime.timezone.utc),
  743. 'modification_number': 1,
  744. 'priority': 1,
  745. 'test_event': 'false',
  746. 'vtn_comment': 'This is an event'},
  747. 'event_signals': [{'current_value': 9.99,
  748. 'intervals': [{'duration': datetime.timedelta(seconds=60),
  749. 'signal_payload': 8,
  750. 'uid': 1},
  751. {'duration': datetime.timedelta(seconds=60),
  752. 'signal_payload': 10,
  753. 'uid': 2},
  754. {'duration': datetime.timedelta(seconds=60),
  755. 'signal_payload': 12,
  756. 'uid': 3},
  757. {'duration': datetime.timedelta(seconds=60),
  758. 'signal_payload': 14,
  759. 'uid': 4},
  760. {'duration': datetime.timedelta(seconds=60),
  761. 'signal_payload': 16,
  762. 'uid': 5},
  763. {'duration': datetime.timedelta(seconds=60),
  764. 'signal_payload': 18,
  765. 'uid': 6},
  766. {'duration': datetime.timedelta(seconds=60),
  767. 'signal_payload': 20,
  768. 'uid': 7},
  769. {'duration': datetime.timedelta(seconds=60),
  770. 'signal_payload': 10,
  771. 'uid': 8},
  772. {'duration': datetime.timedelta(seconds=60),
  773. 'signal_payload': 20,
  774. 'uid': 9}],
  775. 'signal_id': 'zccf1b86ee',
  776. 'signal_name': 'LOAD_CONTROL',
  777. 'signal_type': 'x-loadControlCapacity'}],
  778. 'response_required': 'always',
  779. 'targets': [{'ven_id': 'VEN001'}, {'ven_id': 'VEN002'}]}],
  780. 'request_id': 'i5fea744ae',
  781. 'response': {'request_id': 123,
  782. 'response_code': 200,
  783. 'response_description': 'OK'},
  784. 'vtn_id': 'VTN123'}
  785. .. _oadrPoll:
  786. oadrPoll
  787. ========
  788. This message is sent by the VEN to the VTN to poll for new messages. The VTN responds by sending an empty :ref:`oadrResponse`, a :ref:`oadrDistributeEvent` in case there is an Event for the VEN, a :ref:`oadrRequestReregistration` message in case the VTN want the VEN to register again.
  789. In case the VEN wants to hear only about new Events, it can send a :ref:`oadrRequestEvent` message to the VTN.
  790. OpenADR payload:
  791. .. code-block:: xml
  792. <?xml version="1.0" encoding="utf-8"?>
  793. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07">
  794. <oadrSignedObject>
  795. <oadrPoll ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  796. <ei:venID>123ABC</ei:venID>
  797. </oadrPoll>
  798. </oadrSignedObject>
  799. </oadrPayload>
  800. OpenLEADR representation:
  801. .. code-block:: python3
  802. {'ven_id': '123ABC'}
  803. .. _oadrQueryRegistration:
  804. oadrQueryRegistration
  805. =====================
  806. This message is used by the VEN to request information on the VTN's capabilities before registering. The VTN will respond with a :ref:`oadrCreatedPartyRegistration` message.
  807. OpenADR payload:
  808. .. code-block:: xml
  809. <?xml version="1.0" encoding="utf-8"?>
  810. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  811. <oadrSignedObject>
  812. <oadrQueryRegistration ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  813. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">i8cf15d21f</requestID>
  814. </oadrQueryRegistration>
  815. </oadrSignedObject>
  816. </oadrPayload>
  817. OpenLEADR representation:
  818. .. code-block:: python3
  819. {'request_id': 'i8cf15d21f'}
  820. .. _oadrRegisteredReport:
  821. oadrRegisteredReport
  822. ====================
  823. OpenADR payload:
  824. .. code-block:: xml
  825. <?xml version="1.0" encoding="utf-8"?>
  826. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07">
  827. <oadrSignedObject>
  828. <oadrRegisteredReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  829. <ei:eiResponse>
  830. <ei:responseCode>200</ei:responseCode>
  831. <ei:responseDescription>OK</ei:responseDescription>
  832. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">uadb7d5fe5</requestID>
  833. </ei:eiResponse>
  834. <oadrReportRequest>
  835. <ei:reportRequestID>f5308f6138</ei:reportRequestID>
  836. <ei:reportSpecifier xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
  837. <ei:reportSpecifierID>se40c348d9</ei:reportSpecifierID>
  838. <xcal:granularity>
  839. <xcal:duration>PT15M</xcal:duration>
  840. </xcal:granularity>
  841. <ei:reportBackDuration>
  842. <xcal:duration>PT15M</xcal:duration>
  843. </ei:reportBackDuration>
  844. <ei:reportInterval>
  845. <xcal:properties>
  846. <xcal:dtstart>
  847. <xcal:date-time>2020-07-09T15:54:03.184498Z</xcal:date-time>
  848. </xcal:dtstart>
  849. <xcal:duration>
  850. <xcal:duration>PT2H</xcal:duration>
  851. </xcal:duration>
  852. <xcal:tolerance>
  853. <xcal:tolerate>
  854. <xcal:startafter>PT5M</xcal:startafter>
  855. </xcal:tolerate>
  856. </xcal:tolerance>
  857. <ei:x-eiNotification>
  858. <xcal:duration>PT30M</xcal:duration>
  859. </ei:x-eiNotification>
  860. <ei:x-eiRampUp>
  861. <xcal:duration>PT15M</xcal:duration>
  862. </ei:x-eiRampUp>
  863. <ei:x-eiRecovery>
  864. <xcal:duration>PT5M</xcal:duration>
  865. </ei:x-eiRecovery>
  866. </xcal:properties>
  867. </ei:reportInterval>
  868. <ei:specifierPayload>
  869. <ei:rID>u461c6e37e</ei:rID>
  870. <ei:readingType>Direct Read</ei:readingType>
  871. </ei:specifierPayload>
  872. </ei:reportSpecifier>
  873. </oadrReportRequest>
  874. <oadrReportRequest>
  875. <ei:reportRequestID>tc88cf616d</ei:reportRequestID>
  876. <ei:reportSpecifier xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0">
  877. <ei:reportSpecifierID>le65d1bd2e</ei:reportSpecifierID>
  878. <xcal:granularity>
  879. <xcal:duration>PT15M</xcal:duration>
  880. </xcal:granularity>
  881. <ei:reportBackDuration>
  882. <xcal:duration>PT15M</xcal:duration>
  883. </ei:reportBackDuration>
  884. <ei:reportInterval>
  885. <xcal:properties>
  886. <xcal:dtstart>
  887. <xcal:date-time>2020-07-09T15:54:03.184526Z</xcal:date-time>
  888. </xcal:dtstart>
  889. <xcal:duration>
  890. <xcal:duration>PT2H</xcal:duration>
  891. </xcal:duration>
  892. <xcal:tolerance>
  893. <xcal:tolerate>
  894. <xcal:startafter>PT5M</xcal:startafter>
  895. </xcal:tolerate>
  896. </xcal:tolerance>
  897. <ei:x-eiNotification>
  898. <xcal:duration>PT30M</xcal:duration>
  899. </ei:x-eiNotification>
  900. <ei:x-eiRampUp>
  901. <xcal:duration>PT15M</xcal:duration>
  902. </ei:x-eiRampUp>
  903. <ei:x-eiRecovery>
  904. <xcal:duration>PT5M</xcal:duration>
  905. </ei:x-eiRecovery>
  906. </xcal:properties>
  907. </ei:reportInterval>
  908. <ei:specifierPayload>
  909. <ei:rID>caaff64e5a</ei:rID>
  910. <ei:readingType>Direct Read</ei:readingType>
  911. </ei:specifierPayload>
  912. </ei:reportSpecifier>
  913. </oadrReportRequest>
  914. <ei:venID>VEN123</ei:venID>
  915. </oadrRegisteredReport>
  916. </oadrSignedObject>
  917. </oadrPayload>
  918. OpenLEADR representation:
  919. .. code-block:: python3
  920. {'report_requests': [{'report_request_id': 'f5308f6138',
  921. 'report_specifier': {'granularity': datetime.timedelta(seconds=900),
  922. 'report_back_duration': datetime.timedelta(seconds=900),
  923. 'report_interval': {'dtstart': datetime.datetime(2020, 7, 9, 15, 54, 3, 184498, tzinfo=datetime.timezone.utc),
  924. 'duration': datetime.timedelta(seconds=7200),
  925. 'notification': datetime.timedelta(seconds=1800),
  926. 'ramp_up': datetime.timedelta(seconds=900),
  927. 'recovery': datetime.timedelta(seconds=300),
  928. 'tolerance': {'tolerate': {'startafter': datetime.timedelta(seconds=300)}}},
  929. 'report_specifier_id': 'se40c348d9',
  930. 'specifier_payload': {'r_id': 'u461c6e37e',
  931. 'reading_type': 'Direct '
  932. 'Read'}}},
  933. {'report_request_id': 'tc88cf616d',
  934. 'report_specifier': {'granularity': datetime.timedelta(seconds=900),
  935. 'report_back_duration': datetime.timedelta(seconds=900),
  936. 'report_interval': {'dtstart': datetime.datetime(2020, 7, 9, 15, 54, 3, 184526, tzinfo=datetime.timezone.utc),
  937. 'duration': datetime.timedelta(seconds=7200),
  938. 'notification': datetime.timedelta(seconds=1800),
  939. 'ramp_up': datetime.timedelta(seconds=900),
  940. 'recovery': datetime.timedelta(seconds=300),
  941. 'tolerance': {'tolerate': {'startafter': datetime.timedelta(seconds=300)}}},
  942. 'report_specifier_id': 'le65d1bd2e',
  943. 'specifier_payload': {'r_id': 'caaff64e5a',
  944. 'reading_type': 'Direct '
  945. 'Read'}}}],
  946. 'response': {'request_id': 'uadb7d5fe5',
  947. 'response_code': 200,
  948. 'response_description': 'OK'},
  949. 'ven_id': 'VEN123'}
  950. .. _oadrRequestEvent:
  951. oadrRequestEvent
  952. ================
  953. OpenADR payload:
  954. .. code-block:: xml
  955. <?xml version="1.0" encoding="utf-8"?>
  956. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07">
  957. <oadrSignedObject>
  958. <oadrRequestEvent ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  959. <eiRequestEvent xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">
  960. <requestID>oa1c52db3f</requestID>
  961. <ei:venID>123ABC</ei:venID>
  962. </eiRequestEvent>
  963. </oadrRequestEvent>
  964. </oadrSignedObject>
  965. </oadrPayload>
  966. OpenLEADR representation:
  967. .. code-block:: python3
  968. {'request_id': 'oa1c52db3f', 'ven_id': '123ABC'}
  969. .. _oadrRequestReregistration:
  970. oadrRequestReregistration
  971. =========================
  972. This message is sent by the VTN whenever it want the VEN to go through the registration procedure again. Usually sent in reply to a :ref:`oadrPoll` message.
  973. OpenADR payload:
  974. .. code-block:: xml
  975. <?xml version="1.0" encoding="utf-8"?>
  976. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  977. <oadrSignedObject>
  978. <oadrRequestReregistration ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  979. <ei:venID>123ABC</ei:venID>
  980. </oadrRequestReregistration>
  981. </oadrSignedObject>
  982. </oadrPayload>
  983. OpenLEADR representation:
  984. .. code-block:: python3
  985. {'ven_id': '123ABC'}
  986. .. _oadrResponse:
  987. oadrResponse
  988. ============
  989. This is a generic message that the VTN sends to the VEN if there is no other message for the VEN. Usually sent in response to an :ref:`oadrPoll` or :ref:`oadrRequestEvent` message.
  990. OpenADR payload:
  991. .. code-block:: xml
  992. <?xml version="1.0" encoding="utf-8"?>
  993. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  994. <oadrSignedObject>
  995. <oadrResponse ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  996. <ei:eiResponse>
  997. <ei:responseCode>200</ei:responseCode>
  998. <ei:responseDescription>OK</ei:responseDescription>
  999. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">i4a4d03ae5</requestID>
  1000. </ei:eiResponse>
  1001. <ei:venID>123ABC</ei:venID>
  1002. </oadrResponse>
  1003. </oadrSignedObject>
  1004. </oadrPayload>
  1005. OpenLEADR representation:
  1006. .. code-block:: python3
  1007. {'response': {'request_id': 'i4a4d03ae5',
  1008. 'response_code': 200,
  1009. 'response_description': 'OK'},
  1010. 'ven_id': '123ABC'}
  1011. OpenADR payload:
  1012. .. code-block:: xml
  1013. <?xml version="1.0" encoding="utf-8"?>
  1014. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  1015. <oadrSignedObject>
  1016. <oadrResponse ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  1017. <ei:eiResponse>
  1018. <ei:responseCode>200</ei:responseCode>
  1019. <ei:responseDescription>OK</ei:responseDescription>
  1020. <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" />
  1021. </ei:eiResponse>
  1022. <ei:venID>123ABC</ei:venID>
  1023. </oadrResponse>
  1024. </oadrSignedObject>
  1025. </oadrPayload>
  1026. OpenLEADR representation:
  1027. .. code-block:: python3
  1028. {'response': {'request_id': None,
  1029. 'response_code': 200,
  1030. 'response_description': 'OK'},
  1031. 'ven_id': '123ABC'}
  1032. .. _oadrUpdatedReport:
  1033. oadrUpdatedReport
  1034. =================
  1035. OpenADR payload:
  1036. .. code-block:: xml
  1037. <?xml version="1.0" encoding="utf-8"?>
  1038. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://openadr.org/oadr-2.0b/2012/07" xmlns:pyld="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  1039. <oadrSignedObject>
  1040. <oadrUpdatedReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  1041. <ei:eiResponse>
  1042. <ei:responseCode>200</ei:responseCode>
  1043. <ei:responseDescription>OK</ei:responseDescription>
  1044. <pyld:requestID>icaffaa44f</pyld:requestID>
  1045. </ei:eiResponse>
  1046. <oadrCancelReport>
  1047. <pyld:requestID>ra11e4fee3</pyld:requestID>
  1048. <ei:reportRequestID>kbf16facdd</ei:reportRequestID>
  1049. <ei:reportRequestID>kfbae403c3</ei:reportRequestID>
  1050. <ei:reportRequestID>k91557da99</ei:reportRequestID>
  1051. <pyld:reportToFollow>false</pyld:reportToFollow>
  1052. <ei:venID>123ABC</ei:venID>
  1053. </oadrCancelReport>
  1054. <ei:venID>123ABC</ei:venID>
  1055. </oadrUpdatedReport>
  1056. </oadrSignedObject>
  1057. </oadrPayload>
  1058. OpenLEADR representation:
  1059. .. code-block:: python3
  1060. {'cancel_report': {'report_request_id': ['kbf16facdd',
  1061. 'kfbae403c3',
  1062. 'k91557da99'],
  1063. 'report_to_follow': False,
  1064. 'request_id': 'ra11e4fee3',
  1065. 'ven_id': '123ABC'},
  1066. 'response': {'request_id': 'icaffaa44f',
  1067. 'response_code': 200,
  1068. 'response_description': 'OK'},
  1069. 'ven_id': '123ABC'}
  1070. .. _oadrUpdateReport:
  1071. oadrUpdateReport
  1072. ================
  1073. This message contains a report.
  1074. OpenADR payload:
  1075. .. code-block:: xml
  1076. <?xml version="1.0" encoding="utf-8"?>
  1077. <oadrPayload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="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" xsi:schemaLocation="http://openadr.org/oadr-2.0b/2012/07 oadr_20b.xsd">
  1078. <oadrSignedObject>
  1079. <oadrUpdateReport ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
  1080. <pyld:requestID>bfbaaa469c</pyld:requestID>
  1081. <oadrReport>
  1082. <ei:eiReportID>z4edcf6f9d</ei:eiReportID>
  1083. <oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06">
  1084. <ei:rID>s1167debd8</ei:rID>
  1085. <ei:reportSubject>
  1086. <ei:venID>123ABC</ei:venID>
  1087. <ei:venID>DEF456</ei:venID>
  1088. </ei:reportSubject>
  1089. <ei:reportDataSource>
  1090. <ei:venID>123ABC</ei:venID>
  1091. </ei:reportDataSource>
  1092. <ei:reportType>x-resourceStatus</ei:reportType>
  1093. <ei:readingType>x-RMS</ei:readingType>
  1094. <emix:marketContext>http://localhost</emix:marketContext>
  1095. <oadrSamplingRate>
  1096. <oadrMinPeriod>PT1M</oadrMinPeriod>
  1097. <oadrMaxPeriod>PT2M</oadrMaxPeriod>
  1098. <oadrOnChange>false</oadrOnChange>
  1099. </oadrSamplingRate>
  1100. </oadrReportDescription>
  1101. <ei:reportRequestID>m04fa486ef</ei:reportRequestID>
  1102. <ei:reportSpecifierID>w5fdcab8d0</ei:reportSpecifierID>
  1103. <ei:reportName>TELEMETRY_USAGE</ei:reportName>
  1104. <ei:createdDateTime>2020-07-10T09:24:38.606626Z</ei:createdDateTime>
  1105. </oadrReport>
  1106. <ei:venID>123ABC</ei:venID>
  1107. </oadrUpdateReport>
  1108. </oadrSignedObject>
  1109. </oadrPayload>
  1110. OpenLEADR representation:
  1111. .. code-block:: python3
  1112. {'reports': [{'created_date_time': datetime.datetime(2020, 7, 10, 9, 24, 38, 606626, tzinfo=datetime.timezone.utc),
  1113. 'report_descriptions': [{'market_context': 'http://localhost',
  1114. 'r_id': 's1167debd8',
  1115. 'reading_type': 'x-RMS',
  1116. 'report_data_sources': [{'ven_id': '123ABC'}],
  1117. 'report_subjects': [{'ven_id': '123ABC'},
  1118. {'ven_id': 'DEF456'}],
  1119. 'report_type': 'x-resourceStatus',
  1120. 'sampling_rate': {'max_period': datetime.timedelta(seconds=120),
  1121. 'min_period': datetime.timedelta(seconds=60),
  1122. 'on_change': False}}],
  1123. 'report_id': 'z4edcf6f9d',
  1124. 'report_name': 'TELEMETRY_USAGE',
  1125. 'report_request_id': 'm04fa486ef',
  1126. 'report_specifier_id': 'w5fdcab8d0'}],
  1127. 'request_id': 'bfbaaa469c',
  1128. 'ven_id': '123ABC'}