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
136 stars 20 forks source link

Unexpected error fetching myVAILLANT data #218

Open Krzysztonek opened 1 week ago

Krzysztonek commented 1 week 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 5 days ago

Anything we can do about it?

Anybody looking into this? Some feedback would be nice ,😀

Pretty sure this is fixed pal. Have you updated the Integration?

Krzysztonek commented 5 days ago

Pretty sure this is fixed pal.

Not true... I'm still facing this issue, even after updating this integration to the last available version. All myPyllant sensors are being skipped:

This error originated from a custom integration.

Logger: custom_components.mypyllant.coordinator
Source: helpers/update_coordinator.py:386
integration: myVAILLANT (documentation, issues)
First occurred: October 15, 2024 at 7:00:41 PM (440 occurrences)
Last logged: 12:15:52 AM

Error fetching myVAILLANT data: Quota Exceeded on https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes, skipping update of myVAILLANT data for another 10800s
froggi1930 commented 5 days ago

Anything we can do about it?

Anybody looking into this? Some feedback would be nice ,😀

Pretty sure this is fixed pal. Have you updated the Integration?

It is not fixed, otherwise I would not ask for it ;-)

I am on v0.8.17 and the same errors since 1 week.

I know it is a private project and involves a lot of work, but it would be nice to let us know if at least someone works on a solution.

Flori1007 commented 5 days ago

I am Also on 8.17 and other HA versions are updated as well. Unfortunately same existing issue on the Integration.....

Richardstables commented 5 days ago

Pretty sure this is fixed pal.

Not true... I'm still facing this issue, even after updating this integration to the last available version.

All myPyllant sensors are being skipped:


This error originated from a custom integration.

Logger: custom_components.mypyllant.coordinator

Source: helpers/update_coordinator.py:386

integration: myVAILLANT (documentation, issues)

First occurred: October 15, 2024 at 7:00:41 PM (440 occurrences)

Last logged: 12:15:52 AM

Error fetching myVAILLANT data: Quota Exceeded on https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes, skipping update of myVAILLANT data for another 10800s

Isn't this issue due to your code calling the api too often and so getting blocked. There are some options on the configuration of the integration that govern how often the integration polls the api. Maybe you have amended these and it is requesting data too often?

Krzysztonek commented 5 days ago

Isn't this issue due to your code calling the api too often and so getting blocked. There are some options on the configuration of the integration that govern how often the integration polls the api. Maybe you have amended these and it is requesting data too often?

I don't think I'm exceeding any of the api parameters. They are my current settings: obraz

Even if I set them to the longer values, nothing changes and all myPyllant sensor remain unavailable.

Flori1007 commented 5 days ago

Isn't this issue due to your code calling the api too often and so getting blocked. There are some options on the configuration of the integration that govern how often the integration polls the api. Maybe you have amended these and it is requesting data too often?

I don't think I'm exceeding any of the api parameters. They are my current settings: obraz

Even if I set them to the longer values, nothing changes and all myPyllant sensor remain unavailable.

Not that's Not the same. If too many calls to the API then the vaillant own app ist available too. But in iur case you get all data and functikns working with the vaillant app so its another API failure of the own HA INTEGRATION

froggi1930 commented 4 days ago

Pretty sure this is fixed pal.

Not true... I'm still facing this issue, even after updating this integration to the last available version.

All myPyllant sensors are being skipped:


This error originated from a custom integration.

Logger: custom_components.mypyllant.coordinator

Source: helpers/update_coordinator.py:386

integration: myVAILLANT (documentation, issues)

First occurred: October 15, 2024 at 7:00:41 PM (440 occurrences)

Last logged: 12:15:52 AM

Error fetching myVAILLANT data: Quota Exceeded on https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes, skipping update of myVAILLANT data for another 10800s

Isn't this issue due to your code calling the api too often and so getting blocked. There are some options on the configuration of the integration that govern how often the integration polls the api. Maybe you have amended these and it is requesting data too often?

The settings are the same as before, so obviously this hint is not useful at all. It is a bug in the integration which needs to be fixed, so that we can all enjoy the data again.

Boeroer commented 3 days ago

I encountered the same problem yesterday. When I restart the integration I will receive values from the api, but once the next call is made (after 60 secs following the configuration) I will get the error above: Quota exceeded. My version is 0.8.17

tstraetgen commented 3 days ago

I have had the same problem for a few days. Is it possible that Vaillant API is blocking our IP address? When I am connected to my own wifi, I have the same problems with the Vaillant app. Without my wifi, the app works fine.

During the second request I get the following message in HA The action climate/set_hvac_mode could not be executed. expected HVASMode or one of "üff", "heat", "cool", "heat_coll", "auto", "dry", "fan_only" for dictionary value @ data["havac_mode!]

Boeroer commented 3 days ago

I don't think so. The myVailliant app works for me. I forced a new IP but nothing changes: integration fetches the data properly once I reload the integration. But shortly after all entities become unavailable. I have two identical Vaillant heat pumps in the app and both also show up in the integration - both with the same faulty behavior.

rprdan commented 2 days ago

I think Vaillant may have forced some kind of reset for some users. Here is my situation, it may not be relevant but there is no such thing as too much information:

Make of this what you will!

Boeroer commented 2 days ago

Thanky you - very interesting. Same error message as mine, same behavior (single time success then failure). I will mess with the passwords on app and website and see where that leads.

Boeroer commented 2 days ago

I altered my password for website & app and then also had to change it for the integration obviously. But it didn't matter: still the same failure. When I reload or even re-install the integration I will get a one-time reading - and then the aforementioned error strikes. It worked totally fine until yesterday afternoon.

Edit: I just realized that the myVaillant app generally works, but the energy info overview (bottom right bar graph symbol) where you can look up the energy consumtion etc. doesn't load and the app then crashes. May this be related?

rprdan commented 2 days ago

Quick update. It's lasted an hour, and now I'm in the same situation as you. Even deleting the integration and putting it back in does little.

However I've tried playing with the python module, specifically "generate.test.data" and I get this

>python -m myPyllant.tests.generate_test_data myusername mypassword vaillant --country unitedkingdom

Generating test data for 8d2cd2b7d4426296cd8be75e66868f03ed8fb8dd...
Error fetching https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/bf7981f6-08ad-40ba-b81a-52a1e3f7df6d/devices/ab67a924-6cc4-5829-b91b-e0b812f469ce/buckets?resolution=HOUR&operationMode=DOMESTIC_HOT_WATER&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2024-10-17T00%3A00%3A00Z&endDate=2024-10-18T00%3A00%3A00Z: 403, message='Quota Exceeded', url='https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/GUID/devices/GUID/buckets?resolution=HOUR&operationMode=DOMESTIC_HOT_WATER&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2024-10-17T00:00:00Z&endDate=2024-10-18T00:00:00Z'

This seems to indicate (along with the fact a reload gets a single data point) that this is Vaillant doing something rather than anything wrong with the integration. I'm going to disable it for an hour or two and see what happens over the next day or 3.

rprdan commented 2 days ago

@Boeroer yes my app crashes too in the energy section. (I see they've also added heating curve adjustment?)

Based on what we have learned, my complete and utter guess is this. Vaillant has a problem with the energy consumed data API. Because of this the app crashes when trying to access it Because of this the integration has different behaviour and instead keeps repeatedly polling for it. Until at least it hits API limits and then the whole integration starts to fail.

(I have no idea what my password situation had to do with it)

I'm going to disable my energy consumption entities and see what happens

Boeroer commented 2 days ago

@rprdan - I agree: I also think it's something that Vaillant did to their api.

Polling: I didn't alter code but I disabled the option (in the integration's config) to pull the energy consumption data. That had no effect unfortunately. But I don't know (yet) how that's implemented...

rprdan commented 2 days ago

To be fair, I've noticed that the Vaillant API has been very bad of late. It's made me consider doing it local only with EEBUS! It looks a bit of a project but the way Vaillant seem to be handling their API it could be a better long term solution.

I have a huge amount of appreciation to @signalkraft for this integration and the work they and the other contributors have put into this integration. I love it and it's my most useful integration in Home Assistant by far.

Boeroer commented 2 days ago

I agree. @signalkraft did a great job. I mainly used the integration to ramp up the hot water temperature and activate the boost as soon as I had enough unused solar power and also to pause when electricity prices went high (Tibber) - while I was able to monitor the temperature and so on. That was very convenient (no need to wire some relay to the circuit board and all that) and made it the most impactful part of my Home Assistant system so far (besides the evcc addon + integration).

Vaillant, like so many hardware manufacturers with a long tradition, seems to struggle with solid software engineering and development. Too bad. I still hope it gets fixed somehow...

I would be interested in a EEBUS solution as well.

froggi1930 commented 2 days ago

The last notes do not seem to be related to the originally reported error of the integration. This integration needs to be fixed.

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.mypyllant.coordinator
Quelle: helpers/update_coordinator.py:354
Integration: myVAILLANT (Dokumentation, Probleme)
Erstmals aufgetreten: 08:39:50 (2 Vorkommnisse)
Zuletzt protokolliert: 08:39:51

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
    Circuit.from_api(system_id=system.id, timezone=system.timezone, **c)
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 83, in from_api
    return cls(**data)
           ^^^^^^^^^^^
  File "pydantic/dataclasses.py", line 329, in pydantic.dataclasses._add_pydantic_validation_attributes.new_init
  File "pydantic/dataclasses.py", line 293, in pydantic.dataclasses._add_pydantic_validation_attributes.handle_extra_init
TypeError: Circuit.__init__() missing 1 required positional argument: 'circuit_state'
@dataclass(config=MyPyllantConfig)                                      
class Circuit(MyPyllantDataClass):
    system_id: str                  
    index: int
    circuit_state: CircuitState | None = None
    mixer_circuit_type_external: str | None = None
    set_back_mode_enabled: bool | None = None
    zones: list = field(default_factory=list)
    is_cooling_allowed: bool | None = None
    current_circuit_flow_temperature: float | None = None
    heating_curve: float | None = None
    heating_flow_temperature_minimum_setpoint: float | None = None
    heating_flow_temperature_maximum_setpoint: float | None = None
    min_flow_temperature_setpoint: float | None = None
    calculated_energy_manager_state: str | None = None

This seems to work, but I’m not a programmer and unfortunately cannot implement it myself.

smmoroz commented 23 hours ago

I updated my system to version 0.8.17, but I still unable to fetch myVAILLANT data. Here is the traceback:

2024-10-10 07:46:42.998 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 312, 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
    Circuit.from_api(system_id=system.id, timezone=system.timezone, **c)
  File "/usr/local/lib/python3.12/site-packages/myPyllant/models.py", line 83, in from_api
    return cls(**data)
           ^^^^^^^^^^^
  File "pydantic/dataclasses.py", line 329, in pydantic.dataclasses._add_pydantic_validation_attributes.new_init
  File "pydantic/dataclasses.py", line 293, in pydantic.dataclasses._add_pydantic_validation_attributes.handle_extra_init
TypeError: Circuit.__init__() missing 1 required positional argument: 'circuit_state'

Here is the output of mypyllant.generate_test_data

 system:
    state:
      system:
        outdoorTemperature: 14.125
        outdoorTemperatureAverage24h: 11.0703125
        systemFlowTemperature: 29.8125
        systemWaterPressure: 1.3
        legionellaProtectionStartWeekday: MONDAY
        energyManagerState: HEATING
        systemOff: false
      zones:
        - index: 0
          desiredRoomTemperatureSetpointHeating: 0
          desiredRoomTemperatureSetpoint: 0
          currentRoomTemperature: 29.8125
          currentRoomHumidity: 31
          currentSpecialFunction: NONE
      circuits:
        - index: 0
          circuitState: STANDBY
          currentCircuitFlowTemperature: 29.8125
          heatingCircuitFlowSetpoint: 0
          calculatedEnergyManagerState: HEATING_STANDBY
        - index: 2
          circuitState: STANDBY
          heatingCircuitFlowSetpoint: 0
          calculatedEnergyManagerState: HEATING_STANDBY
        - index: 1
          calculatedEnergyManagerState: HEATING_STANDBY
      domesticHotWater:
        - index: 255
          currentSpecialFunction: NONE
          currentDomesticHotWaterTemperature: 47.5
      ventilations: []
    properties:
      system:
        controllerType: VRC700
        controllerRevision: R4
        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
        - index: 2
        - index: 1
          mixerCircuitTypeExternal: FIX_VALUE
          heatingCircuitType: DIRECT_HEATING_CIRCUIT
          isCoolingAllowed: false
      domesticHotWater:
        - index: 255
          minSetpoint: 35
          maxSetpoint: 65
      ventilations: []

Indeed, here is a circuit with index 1, which has no state and other properties data. I don't know what is this. I made circuit_state positional argument optional, and now it works like a charm!

@dataclass(config=MyPyllantConfig)                                      
class Circuit(MyPyllantDataClass):
    system_id: str                  
    index: int
    circuit_state: CircuitState | None = None
    mixer_circuit_type_external: str | None = None
    set_back_mode_enabled: bool | None = None
    zones: list = field(default_factory=list)
    is_cooling_allowed: bool | None = None
    current_circuit_flow_temperature: float | None = None
    heating_curve: float | None = None
    heating_flow_temperature_minimum_setpoint: float | None = None
    heating_flow_temperature_maximum_setpoint: float | None = None
    min_flow_temperature_setpoint: float | None = None
    calculated_energy_manager_state: str | None = None

Where did you change that?

docker exec -it homeassistant /bin/bash

vi /usr/local/lib/python3.12/site-packages/myPyllant/models.py
dhavaldesai-HA commented 20 hours ago

I encountered the same problem yesterday. When I restart the integration I will receive values from the api, but once the next call is made (after 60 secs following the configuration) I will get the error above: Quota exceeded. My version is 0.8.17

Exactly same thing here since 2 weeks. Updates to 0.8.17 and HA core is upgrade to 2024.10.3.

MSGH11 commented 17 hours ago

I’ve been experiencing more outages again over the past few days. Version 8.17 and the latest Home Assistant installation. It’s unfortunate, especially now that the heating season is starting here. I use the integration a lot.

jstott1070 commented 10 hours ago

Ditto.. 8.17 & latest available HA and pretty much all sensors unavailable.. oddly I can still see the basic sensors of the remote thermostat controller (sensoHOME) but everything else is currently dead.