signalkraft / mypyllant-component

Home Assistant component for the myVAILLANT API, controls Vaillant devices such as aroTHERM heatpumps and ecoTEC boilers
https://signalkraft.com/mypyllant-component/
MIT License
145 stars 22 forks source link

Unexpected error fetching myVAILLANT data #218

Closed Krzysztonek closed 3 weeks ago

Krzysztonek commented 1 month ago

Before submitting a new issue

Problem description

Unexpected error fetching myVAILLANT data

Logs

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mypyllant/coordinator.py", line 177, in _async_update_data
    data = [
           ^
  File "/usr/local/lib/python3.12/site-packages/myPyllant/api.py", line 358, in get_systems
    system = System.from_api(
             ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 954, in from_api
    DomesticHotWater.from_api(
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 575, in from_api
    data["current_special_function"] = DHWCurrentSpecialFunctionVRC700(
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 757, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 1171, in __new__
    raise ve_exc
ValueError: 'ONE_DAY_BANK_HOLIDAY' is not a valid DHWCurrentSpecialFunctionVRC700

The app works fine for me. And what is strange, I'm able to run TEST DATA action from HA:

homes:
  - homeName: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    serialNumber: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    systemId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    productMetadata:
      productType: VR921
      productionYear: "22"
      productionWeek: "21"
      articleNumber: "0020260965"
    state: CLAIMED
    migrationState: FINISHED
    migrationFinishedAt: "2024-04-09T16:40:59.767070615Z"
    onlineState: ONLINE
    firmware:
      version: 0357.40.35
      connectedToOldIoTPlatform: null
      updateEnabled: true
      updateRequired: false
    nomenclature: VR 921
    cag: false
    countryCode: PL
    productInformation: VR921
    firmwareVersion: 0357.40.35

  control_identifier:
    controlIdentifier: vrc700
  time_zone:
    timeZone: Europe/Warsaw
  diagnostic_trouble_codes:
    - serialNumber: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      articleNumber: "0020171316"
      codes: []
    - serialNumber: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      articleNumber: "0010024648"
      codes: []
    - serialNumber: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      articleNumber: "0020260965"
      codes: []
  connection_status:
    connected: true
  system:
    state:
      system:
        outdoorTemperature: 23.875
        outdoorTemperatureAverage24h: 17.78125
        systemWaterPressure: 1.7
        legionellaProtectionStartWeekday: "OFF"
        energyManagerState: STANDBY
        systemOff: false
      zones:
        - index: 0
          desiredRoomTemperatureSetpointHeating: 0
          desiredRoomTemperatureSetpoint: 0
          currentRoomTemperature: 18.6875
          currentRoomHumidity: 68
          currentSpecialFunction: NONE
      circuits:
        - index: 0
          circuitState: STANDBY
          currentCircuitFlowTemperature: 20.5
          heatingCircuitFlowSetpoint: 0
          calculatedEnergyManagerState: HEATING_STANDBY
      domesticHotWater:
        - index: 255
          currentSpecialFunction: NONE
          currentDomesticHotWaterTemperature: 29
      ventilations: []
    properties:
      system:
        controllerType: VRC700
        controllerRevision: R6
        systemScheme: 1
        backupHeaterType: CONDENSING
        backupHeaterAllowedFor: DOMESTIC_HOT_WATER_AND_HEATING
        temporaryAllowBackupHeater: DISABLED
        moduleConfigurationVR71: 3
        energyProvidePowerCutBehavior: DISABLE_HEATPUMP
        smartPhotovoltaicBufferOffset: 10
        externalEnergyManagementActivation: false
        operationModeEffect: ALL
      zones:
        - index: 0
          isActive: true
          zoneBinding: CENTRAL_CONTROL
          associatedCircuitIndex: 0
      circuits:
        - index: 0
          mixerCircuitTypeExternal: HEATING
          heatingCircuitType: DIRECT_HEATING_CIRCUIT
          isCoolingAllowed: false
      domesticHotWater:
        - index: 255
          minSetpoint: 35
          maxSetpoint: 65
      ventilations: []
    configuration:
      system:
        continuousHeatingStartSetpoint: -26
        alternativePoint: -21
        heatingCircuitBivalencePoint: 0
        domesticHotWaterBivalencePoint: -7
        adaptiveHeatingCurve: true
        domesticHotWaterMaximumLoadingTime: 60
        domesticHotWaterHysteresis: 5
        domesticHotWaterFlowSetpointOffset: 25
        maxFlowSetpointHeatpumpError: 25
        domesticHotWaterMaximumTemperature: 80
        hybridControlStrategy: BIVALENCE_POINT
        paralellTankLoadingAllowed: false
      zones:
        - index: 0
          general:
            name: Ogrzewanie
            holidayStartDateTime: "2015-01-01T00:00:00Z"
            holidayEndDateTime: "2015-01-01T00:00:00Z"
            holidaySetpoint: 10
          heating:
            operationModeHeating: "OFF"
            setBackTemperature: 17.5
            dayTemperatureHeating: 20
            timeProgramHeating:
              metaInfo:
                minSlotsPerDay: 0
                maxSlotsPerDay: 3
                setpointRequiredPerSlot: false
              monday: []
              tuesday: []
              wednesday: []
              thursday: []
              friday: []
              saturday:
                - startTime: 600
                  endTime: 1320
              sunday:
                - startTime: 600
                  endTime: 1320
          cooling: {}
      circuits:
        - index: 0
          heatingCurve: 1.1500001
          heatingFlowTemperatureMinimumSetpoint: 15
          heatingFlowTemperatureMaximumSetpoint: 60
          heatDemandLimitedByOutsideTemperature: 17
          heatingCircuitFlowSetpointExcessOffset: 0
          epsilon: 2
          setbackModeEnabled: false
          roomTemperatureControlMode: NON
      domesticHotWater:
        - index: 255
          operationModeDomesticHotWater: "OFF"
          tappingSetpoint: 50
          holidayStartDateTime: "2015-01-01T00:00:00Z"
          holidayEndDateTime: "2015-01-01T00:00:00Z"
          timeProgramDomesticHotWater:
            metaInfo:
              minSlotsPerDay: 0
              maxSlotsPerDay: 3
              setpointRequiredPerSlot: false
            monday:
              - startTime: 1200
                endTime: 1310
            tuesday:
              - startTime: 1200
                endTime: 1310
            wednesday:
              - startTime: 1200
                endTime: 1310
            thursday:
              - startTime: 1200
                endTime: 1310
            friday:
              - startTime: 1200
                endTime: 1320
            saturday:
              - startTime: 600
                endTime: 1320
            sunday:
              - startTime: 600
                endTime: 1320
          timeProgramCirculationPump:
            metaInfo:
              minSlotsPerDay: 0
              maxSlotsPerDay: 3
              setpointRequiredPerSlot: false
            monday:
              - startTime: 540
                endTime: 1270
            tuesday:
              - startTime: 540
                endTime: 1270
            wednesday:
              - startTime: 540
                endTime: 1270
            thursday:
              - startTime: 540
                endTime: 1270
            friday:
              - startTime: 540
                endTime: 1270
            saturday:
              - startTime: 540
                endTime: 1270
            sunday:
              - startTime: 540
                endTime: 1270
      ventilations: []
  current_system:
    system_type: BOILER_OR_ELECTRIC_HEATER
    has_emf_capable_devices: true
    primary_heat_generator:
      device_uuid: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      ebus_id: BAI00
      spn: 376
      bus_coupler_address: 0
      article_number: "0010024648"
      emfValid: true
      device_serial_number: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      device_type: BOILER
      first_data: "2022-10-11T14:17:35Z"
      last_data: "2024-10-09T10:44:19.415Z"
      data:
        - operation_mode: DOMESTIC_HOT_WATER
          value_type: CONSUMED_ELECTRICAL_ENERGY
          calculated: false
          from: "2022-10-11T14:17:35Z"
          to: "2024-10-09T10:44:19.415Z"
        - operation_mode: HEATING
          value_type: CONSUMED_ELECTRICAL_ENERGY
          calculated: false
          from: "2022-10-11T14:17:35Z"
          to: "2024-10-09T10:44:19.087Z"
        - operation_mode: DOMESTIC_HOT_WATER
          value_type: CONSUMED_PRIMARY_ENERGY
          calculated: false
          from: "2022-10-11T14:17:35Z"
          to: "2024-10-09T10:44:18.212Z"
        - operation_mode: HEATING
          value_type: CONSUMED_PRIMARY_ENERGY
          calculated: false
          from: "2022-10-11T14:17:35Z"
          to: "2024-10-09T10:44:17.837Z"
      product_name: VC 25CS/1-5 (N-PL) ecoTEC plus
    secondary_heat_generators: []
    electric_backup_heater: null
    solar_station: null
    ventilation: null
    gateway: null
  mpc:
    devices: []
  rts:
    statistics: []
  device_buckets:
    startDate: "2024-10-08T00:00:00Z"
    endDate: "2024-10-09T00:00:00Z"
    resolution: HOUR
    operationMode: DOMESTIC_HOT_WATER
    energyType: CONSUMED_ELECTRICAL_ENERGY
    totalConsumption: 25.709258280988383
    data:
      - startDate: "2024-10-08T00:00:00Z"
        endDate: "2024-10-08T01:00:00Z"
        value: 0
      - startDate: "2024-10-08T01:00:00Z"
        endDate: "2024-10-08T02:00:00Z"
        value: 0
      - startDate: "2024-10-08T02:00:00Z"
        endDate: "2024-10-08T03:00:00Z"
        value: 0
      - startDate: "2024-10-08T03:00:00Z"
        endDate: "2024-10-08T04:00:00Z"
        value: 0
      - startDate: "2024-10-08T04:00:00Z"
        endDate: "2024-10-08T05:00:00Z"
        value: 0
      - startDate: "2024-10-08T05:00:00Z"
        endDate: "2024-10-08T06:00:00Z"
        value: 0
      - startDate: "2024-10-08T06:00:00Z"
        endDate: "2024-10-08T07:00:00Z"
        value: 0
      - startDate: "2024-10-08T07:00:00Z"
        endDate: "2024-10-08T08:00:00Z"
        value: 0
      - startDate: "2024-10-08T08:00:00Z"
        endDate: "2024-10-08T09:00:00Z"
        value: 0
      - startDate: "2024-10-08T09:00:00Z"
        endDate: "2024-10-08T10:00:00Z"
        value: 0
      - startDate: "2024-10-08T10:00:00Z"
        endDate: "2024-10-08T11:00:00Z"
        value: 0
      - startDate: "2024-10-08T11:00:00Z"
        endDate: "2024-10-08T12:00:00Z"
        value: 0
      - startDate: "2024-10-08T12:00:00Z"
        endDate: "2024-10-08T13:00:00Z"
        value: 0
      - startDate: "2024-10-08T13:00:00Z"
        endDate: "2024-10-08T14:00:00Z"
        value: 0
      - startDate: "2024-10-08T14:00:00Z"
        endDate: "2024-10-08T15:00:00Z"
        value: 0
      - startDate: "2024-10-08T15:00:00Z"
        endDate: "2024-10-08T16:00:00Z"
        value: 10.968487259579335
      - startDate: "2024-10-08T16:00:00Z"
        endDate: "2024-10-08T17:00:00Z"
        value: 13.869530781343732
      - startDate: "2024-10-08T17:00:00Z"
        endDate: "2024-10-08T18:00:00Z"
        value: 0.8514350840769347
      - startDate: "2024-10-08T18:00:00Z"
        endDate: "2024-10-08T19:00:00Z"
        value: 0
      - startDate: "2024-10-08T19:00:00Z"
        endDate: "2024-10-08T20:00:00Z"
        value: 0
      - startDate: "2024-10-08T20:00:00Z"
        endDate: "2024-10-08T21:00:00Z"
        value: 0.0029669536208675675
      - startDate: "2024-10-08T21:00:00Z"
        endDate: "2024-10-08T22:00:00Z"
        value: 0.0056127341225030184
      - startDate: "2024-10-08T22:00:00Z"
        endDate: "2024-10-08T23:00:00Z"
        value: 0.0056127341225030184
      - startDate: "2024-10-08T23:00:00Z"
        endDate: "2024-10-09T00:00:00Z"
        value: 0.0056127341225030184
  rbr:
    rbrCapable: true
  rooms: []
  energy_management:
    energyManager:
      available: false
      compatible: false
    energyManagementStatus:
      thermalStorage:
        domesticHotWater:
          available: false
          selected: false
        heatingBufferCylinder:
          available: false
          selected: true
  ship_self:
    ski: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    brand: Vaillant
    type: Gateway
    model: VR921
    spineEnabled: false
    spineEnabledStatus: DETERMINED
    spineCapable: true
dcw77 commented 1 month ago

I am also experiencing the exact same issue.

electricfire commented 1 month ago

I have the same issue as well just different variables.

rhgiter commented 1 month ago

same problem

aurelieng2009 commented 1 month ago

Same Here

Seliaks65 commented 1 month ago

Same here - all entities became unavailable since 7.16am UK time this morning. myVaillant App is still working fine.

Xerbo commented 1 month ago
2024-10-09 07:17:21.644 ERROR (MainThread) [custom_components.mypyllant.coordinator] Error fetching myVAILLANT data: 404, message='Not Found', url='https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/____/tli'
2024-10-09 07:23:22.242 ERROR (MainThread) [custom_components.mypyllant.coordinator] Unexpected error fetching myVAILLANT data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mypyllant/coordinator.py", line 177, in _async_update_data
    data = [
           ^
  File "/usr/local/lib/python3.12/site-packages/myPyllant/api.py", line 358, in get_systems
    system = System.from_api(
             ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 944, in from_api
    Zone.from_api(
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 430, in from_api
    data["cooling"] = ZoneCooling.from_api(
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 326, in from_api
    **data["time_program_cooling"]
      ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'time_program_cooling'

Seemingly same here but with a slightly different error

jan666 commented 1 month ago

KeyError: 'time_program_cooling'



Seemingly same here but with a slightly different error

same error here. Looks like it started today at 08:30

ecranbleu27 commented 1 month ago

Same here. Maybe an api issue on Vaillant side… both app and thermostats are up and running.

nakedfoot commented 1 month ago

Exactly the same here.

dardennejf commented 1 month ago

The same here

Merseybear commented 1 month ago

I'll join the list too!

mgiesl2s commented 1 month ago

Me too

R1200G commented 1 month ago

Same here since 08:15..

Richardstables commented 1 month ago

me too

lecocqe commented 1 month ago

same here since 8:16 CET but official phone app is starting but if i click on 1 VR50, i get "unknown error, please try again later"

jstott1070 commented 1 month ago

Ditto - looks to me like a possible change to the API as MyVailliant App is still functioning as expected today

lecocqe commented 1 month ago

now app is back. but intregation not yet

hkcrainer commented 1 month ago

Same issue here

h4wk1234 commented 1 month ago

same here :( app is working fine thow.

lecocqe commented 1 month ago

the most strange is that i could do "call service" test data image

sgbossinga commented 1 month ago

Since 8:16 no more data (Netherlands)

grahamsparrow-8451 commented 1 month ago

I also have the same problem. Interestingly, at the same time, Home Assistant recognised MyVaillant Connect Gateway as a HomeKit device. Could be a coincidence, since I also update Home Assistant yesteday.

ecranbleu27 commented 1 month ago

Does someone already try to contact [API-support@vaillant-group,com] ?

MSGH11 commented 1 month ago

Same here

Voyager08 commented 1 month ago

same here...

Cameleon99 commented 1 month ago

Ditto, same errors here, app still working fine.

Acey-yo commented 1 month ago

Push...same

Shortykiller commented 1 month ago

Same problem here i DK 08:17:06

nady2804 commented 1 month ago

Same issue from my side no Data i deinstall install the latest vesion again. NO Data can grab. Android App is already working...

Cameleon99 commented 1 month ago

Paging @signalkraft as this seems pretty major as this integration goes. Guessing Vaillant has changed some data on their side.

I can also call the service/action - Generate Test Data - and it returns what looks to be the correct data, I assume parsing it is failing somewhere now?

boelle commented 1 month ago

same here and same time as everyone else

EDIT: tried to downgrade, same thing

adrianuseless commented 1 month ago

glad its not just me then !!

mzaufl commented 1 month ago

Same issue. Android App is working fine.

joskohorvat commented 1 month ago

Same issue

glebdzyuba commented 1 month ago

same :(

iamgeert commented 1 month ago

same here

BuhJuhWuh commented 1 month ago

Likewise, as of 7:16 this morning. App still working fine.

kukuscha1809 commented 1 month ago

Same here

gthubflr commented 1 month ago

dirty quick fix which worked for me: change in ./.local/lib/python3.11/site-packages/myPyllant/models.py

class ZoneCooling

to (basically comment the most out):

class ZoneCooling(MyPyllantDataClass):
    control_identifier: ControlIdentifier
    #setpoint_cooling: float
    #operation_mode_cooling: ZoneOperatingMode | ZoneOperatingModeVRC700
    #time_program_cooling: ZoneTimeProgram
    manual_mode_setpoint_cooling: float | None = None

    @classmethod
    def from_api(cls, **data):
        #data["time_program_cooling"] = ZoneTimeProgram.from_api(
        #    **data["time_program_cooling"]
        #)
        control_identifier: ControlIdentifier = data["control_identifier"]
        #if control_identifier.is_vrc700:
         #   data["operation_mode_cooling"] = ZoneOperatingModeVRC700(
          #      data["operation_mode_cooling"]
           # )
       # else:
        #    data["operation_mode_cooling"] = ZoneOperatingMode(
         #       data["operation_mode_cooling"]
          #  )

        return super().from_api(**data)
sbeier23 commented 1 month ago

Ok, i tried everything to find the models.py on my ha install. I even tried to install it via pip. No freaking way. I cannot get this running anymore.

boelle commented 1 month ago

Ok, i tried everything to find the models.py on my ha install. I even tried to install it via pip. No freaking way. I cannot get this running anymore.

Suggestion: relax and wait for this to be fixed. Use the app until then

stefankoerner commented 1 month ago

dirty quick fix which worked for me: change in ./.local/lib/python3.11/site-packages/myPyllant/models.py

class ZoneCooling

to (basically comment the most out):

class ZoneCooling(MyPyllantDataClass):
    control_identifier: ControlIdentifier
    #setpoint_cooling: float
    #operation_mode_cooling: ZoneOperatingMode | ZoneOperatingModeVRC700
    #time_program_cooling: ZoneTimeProgram
    manual_mode_setpoint_cooling: float | None = None

    @classmethod
    def from_api(cls, **data):
        #data["time_program_cooling"] = ZoneTimeProgram.from_api(
        #    **data["time_program_cooling"]
        #)
        control_identifier: ControlIdentifier = data["control_identifier"]
        #if control_identifier.is_vrc700:
         #   data["operation_mode_cooling"] = ZoneOperatingModeVRC700(
          #      data["operation_mode_cooling"]
           # )
       # else:
        #    data["operation_mode_cooling"] = ZoneOperatingMode(
         #       data["operation_mode_cooling"]
          #  )

        return super().from_api(**data)

Works for me. Thanks

ianfdoit commented 1 month ago

Ok, i tried everything to find the models.py on my ha install. I even tried to install it via pip. No freaking way. I cannot get this running anymore.

I ran a bash shell in the container and ran "vi /usr/local/lib/python3.12/site-packages/myPyllant/models.py", hit '/' (search) entered 'Cool' (to get to the right spot), then hit 'I' and carefully matched the hash comments as described (most is not all!). Restarted HA and it works - dirty hack, but works and will get overwritten by HACS when a better fix is deployed

joskohorvat commented 1 month ago

Same with me. I prefer copy-overide existing (not working) file

sbeier23 commented 1 month ago

Ok, i tried everything to find the models.py on my ha install. I even tried to install it via pip. No freaking way. I cannot get this running anymore.

Suggestion: relax and wait for this to be fixed. Use the app until then

relax yes ok. i agree to this. but whats the point showing this code, when you cannot find the file in the filesystem... i dont even have a folder /local or /.local...

but to be honest, the app is crap as hell. i was so satisfied, that this integration even works better then the app. so im sorry if i was to rude in any manner.

matschl43 commented 1 month ago

same problem here

on5bac commented 1 month ago

same issue here in Belgium since 08:05 this morning (local time) The app from myVaillant is still working

Ric0981 commented 1 month ago

same issue since this morning

macruch2 commented 1 month ago

I use a docker compose file so I could add further commands (custom pyton files using the mypyllant lib within the container). There I added another volume entry:

When a fix is provided, I just need to remove the volume entry.

ralphbk commented 1 month ago

Same problem here.