VEN Custom Component

We are developing our VEN as a HomeAssistant component. It implements a PULL model to request pending service operations from the VTN.

The Home Assistant component is called openadr_ven. It relies on pyoadr-ven, a python library that we are developing. Details of this are available in the VEN Client Application section of this documentation. This requirement must be included in the manifest.json file.

Configuration

Configuration YAML File

The configuration of the OpenADR VEN is stored in the Home Assistant configuration.yaml file.

Example configuration.yaml

openadr_ven:
    vtn_id: "ccoopvtn01"
    vtn_address: "https://openadr-staging.carbon.coop"
    security_level: "standard"
    log_xml: False
    opt_in_timeout_secs: 3
    opt_in_default_decision: "optIn"
    request_events_on_startup: True
    report_parameters: {}
    client_pem_bundle_filepath: "/carboncoop-hems-shared-data/client.pem"
    ca_cert_filepath: "/carboncoop-hems-shared-data/ca.crt"
    ca_cert_url: "http://openadr-staging.carbon.coop/api/ca/certificate"
    hub_hems_registration_url: "https://hub-staging.carbon.coop/api/dsr/register-hems"

Config Flow

The final step required to configure the OpenADR VEN component occurs during Home Assistant onboarding.

At the Integrations setup file, the installer must search the integrations list for OpenADR VEN. The installer is then required to input a shortcode - four words. This shortcode is created on the PowerShaper site during customer registration.

Inputting a shortcode will make an api call to the PowerShaper site. If the code is valid, PowerShaper will make API calls to the VTN. This will create a customer and site, and generate certificates.

The config flow process will then download the client pem and ca cert and store them in the file paths specified in the configuration yaml.