OpenLEADR / openleadr-python

Python library for OpenADR 2.0b
https://openleadr.org/docs
Apache License 2.0
135 stars 55 forks source link

(VEN) Return EventResponse/OadrCreatedEvent with specific responseCode #165

Open alexcarnero97 opened 9 months ago

alexcarnero97 commented 9 months ago

Hi, I am using the OpenADR Test Tool to test my VEN and I am running some tests related to the EiEvent service. In some of them, the tool expects me to return an EventResponse/OadrCreatedEvent message with a specific error code in case of an event with a wrong ID or invalid signal type. According to this, I understand that the supposed VTN could receive an 'optIn' response to an event even though some of the above failures occur. However, I can't find how I can do this as in all the examples the event handler simply returns an 'optIn' or 'optOut' string. If, on the other hand, I throw a SignalNotSupportedError exception, for example, the handler detects the error and returns an 'optOut' directly. How could I manage to do this? Thanks in advance.