> ## Documentation Index
> Fetch the complete documentation index at: https://developer.energy-hub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh HVAC data

> Updates HVAC with newest data from vendor system.



## OpenAPI

````yaml get /v1.0.0/hvacs/{hvacId}/refresh
openapi: 3.0.1
info:
  description: A service used for HVAC devices
  title: hvac-service
  version: 1.0.0
servers:
  - description: Generated server url
    url: https://api.energy-hub.io
security: []
paths:
  /v1.0.0/hvacs/{hvacId}/refresh:
    get:
      tags:
        - Hvac Controller
      summary: Refresh HVAC data
      description: Updates HVAC with newest data from vendor system.
      operationId: refreshHvac
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: hvacId
          description: Hvac ID
          required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HvacResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorMessageDto'
              examples:
                BAD_REQUEST:
                  $ref: '#/components/examples/BAD_REQUEST'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
              examples:
                UNAUTHORIZED:
                  $ref: '#/components/examples/UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
              examples:
                HVAC_SCHEDULES_NOT_AVAILABLE:
                  $ref: '#/components/examples/HVAC_SCHEDULES_NOT_AVAILABLE'
                HVAC_NOT_FOUND:
                  $ref: '#/components/examples/HVAC_NOT_FOUND'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
              examples:
                VENDOR_ACCOUNT_IS_DISCONNECTED:
                  $ref: '#/components/examples/VENDOR_ACCOUNT_IS_DISCONNECTED'
                VENDOR_COMMUNICATION_ERROR:
                  $ref: '#/components/examples/VENDOR_COMMUNICATION_ERROR'
                DEVICE_IS_DISCONNECTED:
                  $ref: '#/components/examples/DEVICE_IS_DISCONNECTED'
                VENDOR_AUTHENTICATION_ERROR:
                  $ref: '#/components/examples/VENDOR_AUTHENTICATION_ERROR'
                VENDOR_CONNECTION_ERROR:
                  $ref: '#/components/examples/VENDOR_CONNECTION_ERROR'
      security:
        - API_Key: []
components:
  schemas:
    HvacResponse:
      description: Object of HVAC response.
      type: object
      required:
        - id
        - isOnline
        - staticData
        - userId
      properties:
        lastUpdated:
          format: date-time
          description: The timestamp of the last update of any variable of the HVAC.
          type: string
        powerState:
          $ref: '#/components/schemas/PowerState'
        locationId:
          format: uuid
          description: The location ID of the HVAC.
          type: string
        isOnline:
          description: Indicates if the HVAC is reachable trough the vendor system.
          type: boolean
          example: true
        id:
          format: uuid
          description: The ID of the HVAC.
          type: string
          example: 6eb5497d-c6bb-4290-84ef-4409fe9501f1
        climateState:
          $ref: '#/components/schemas/ClimateState'
        userId:
          description: The ID of the user.
          type: string
          example: 896f9d5a-b618-48a2-98ae-957059bf1bc9
        staticData:
          $ref: '#/components/schemas/StaticData'
    ValidationErrorMessageDto:
      allOf:
        - $ref: '#/components/schemas/ErrorMessageDto'
        - type: object
          properties:
            errorCode:
              description: The error code
              type: string
              example: EXAMPLE_ERROR_CODE
            validationErrors:
              description: List of validation errors
              type: array
              items:
                $ref: '#/components/schemas/ValidationError'
            id:
              format: uuid
              description: The error identifier
              type: string
              example: 7958818d-64d2-4ede-b12b-4786dd2f348b
            message:
              description: The error message
              type: string
              example: Example error message
      type: object
      required:
        - errorCode
        - id
        - message
    ErrorMessageDto:
      type: object
      required:
        - errorCode
        - id
        - message
      properties:
        errorCode:
          description: The error code
          type: string
          example: EXAMPLE_ERROR_CODE
        id:
          format: uuid
          description: The error identifier
          type: string
          example: 7958818d-64d2-4ede-b12b-4786dd2f348b
        message:
          description: The error message
          type: string
          example: Example error message
    PowerState:
      description: Object of power state of HVAC device.
      type: object
      required:
        - lastUpdated
        - powerConsumption
      properties:
        lastUpdated:
          format: date-time
          description: The timestamp of the last update of the power state.
          type: string
        powerConsumption:
          format: double
          description: The current power consumption of the HVAC device in kW.
          type: number
    ClimateState:
      description: Object of climate state of HVAC device.
      type: object
      required:
        - lastUpdated
        - mode
      properties:
        mode:
          description: Indicates which mode is currently active.
          type: string
          enum:
            - HEAT
            - COOL
            - DRY
            - AUTO
            - REDUCED
            - 'OFF'
          example: HEAT
        lastUpdated:
          format: date-time
          description: The timestamp of the last update of the climate state data.
          type: string
        temperatureTargets:
          description: Object of temperature targets of the HVAC.
          type: array
          items:
            $ref: '#/components/schemas/TemperatureTarget'
        isActive:
          description: Indicates if the HVAC is on.
          type: boolean
          example: true
        temperatureCurrent:
          format: double
          description: The current temperature measured inside in °C.
          type: number
          example: 20.3
        temperatureOutside:
          format: double
          description: The current temperature measured outside in °C.
          type: number
          example: 12.1
    StaticData:
      description: Object of static data of a HVAC.
      type: object
      required:
        - capableModes
        - lastUpdated
        - model
        - vendor
      properties:
        lastUpdated:
          format: date-time
          description: The timestamp of the last update of the static data.
          type: string
        vendor:
          description: The vendor of the HVAC.
          type: string
          enum:
            - VIESSMANN
            - DAIKIN
            - VAILLANT
        name:
          description: The name of the HVAC in human-readable format.
          type: string
          example: Viessmann Vitotronic 200
        model:
          description: The model of the HVAC.
          type: string
          example: Vitotronic 200
        type:
          description: The type of the HVAC.
          type: string
          enum:
            - AC
            - HEATING_CIRCUIT
            - DHW
            - THERMOSTAT
        capableModes:
          description: The list of capable modes of the HVAC device.
          type: array
          items:
            description: The list of capable modes of the HVAC device.
            type: string
            enum:
              - HEAT
              - COOL
              - DRY
              - AUTO
              - REDUCED
              - 'OFF'
        room:
          description: The room of the HVAC.
          type: string
          example: Living room
    ValidationError:
      type: object
      properties:
        field:
          description: Affected field
          type: string
        message:
          description: Validation message
          type: string
    TemperatureTarget:
      description: Object of temperature target of HVAC device.
      type: object
      required:
        - mode
      properties:
        mode:
          description: The mode of the temperature target.
          type: string
          enum:
            - HEAT
            - COOL
            - DRY
            - AUTO
            - REDUCED
            - 'OFF'
          example: HEAT
        temperature:
          format: double
          description: The target temperature set by the user in °C.
          type: number
          example: 18.1
  examples:
    BAD_REQUEST:
      value:
        errorCode: BAD_REQUEST
        validationErrors:
          - field: Affected field
            message: Validation message
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: Bad request
    UNAUTHORIZED:
      value:
        errorCode: UNAUTHORIZED
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: Unauthorized
    HVAC_SCHEDULES_NOT_AVAILABLE:
      value:
        errorCode: HVAC_SCHEDULES_NOT_AVAILABLE
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: '[HVAC] HVAC schedules not available'
    HVAC_NOT_FOUND:
      value:
        errorCode: HVAC_NOT_FOUND
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: '[HVAC] HVAC not found'
    VENDOR_ACCOUNT_IS_DISCONNECTED:
      value:
        errorCode: VENDOR_ACCOUNT_IS_DISCONNECTED
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: '[VENDOR_ACCOUNT] Vendor account is disconnected'
    VENDOR_COMMUNICATION_ERROR:
      value:
        errorCode: VENDOR_COMMUNICATION_ERROR
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: '[VENDOR API] Communication error with Vendor API'
    DEVICE_IS_DISCONNECTED:
      value:
        errorCode: DEVICE_IS_DISCONNECTED
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: Device disconnected
    VENDOR_AUTHENTICATION_ERROR:
      value:
        errorCode: VENDOR_AUTHENTICATION_ERROR
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: '[VENDOR API] Authentication error with Vendor API'
    VENDOR_CONNECTION_ERROR:
      value:
        errorCode: VENDOR_CONNECTION_ERROR
        id: 4c30ae83-182e-4c92-a108-b6ee12619de8
        message: '[VENDOR API] Connection cannot be established with Vendor API'
  securitySchemes:
    API_Key:
      in: header
      name: X-API-KEY
      description: API key used for authorization and authentication.
      type: apiKey

````