representations.rst 52 KB

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