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
cyrillecc commented 1 week ago

Same here too.

git-jhs commented 1 week ago

+1

Smith166 commented 1 week ago

same here, I'm hoping that fckng Vaillant didn't close the API for 3rd party apps...

sparks1372 commented 1 week ago

Same :( following

signalkraft commented 1 week ago

https://github.com/signalkraft/mypyllant-component/releases/tag/v0.8.15

This may fix the zone cooling issue, but it's a stab in the dark. Let me know how it goes. If it's still broken, someone needs to attach full test data.

signalkraft commented 1 week ago

@Krzysztonek https://github.com/signalkraft/mypyllant-component/releases/tag/v0.8.16 this should fix your original issue.

Ejatier commented 1 week ago

Same problem here. No Data in HA. Vaillant App works. v0.8.16 running

Krzysztonek commented 1 week ago

someone needs to attach full test data.

I already attached the result of full test data. Please, see my initial comment.

signalkraft commented 1 week ago

@Krzysztonek I know, but there's two issues going on in one ticket. Everyone else seems to have another problem. If yours is fixed, I would move everyone else over to this ticket for the cooling stuff: https://github.com/signalkraft/mypyllant-component/issues/216

sgbossinga commented 1 week ago

v0.8.16 running but no data

signalkraft commented 1 week ago

Try https://github.com/signalkraft/mypyllant-component/releases/tag/v0.8.17 please

camhef commented 1 week ago

v0.8.17 shows everything I expect to see. It looks (to me) that you've sorted it. Many thanks.

h4wk1234 commented 1 week ago

Works Like a Charme. Thank you 🤩

sgbossinga commented 1 week ago

it's fixed, thanks

r3n3l33 commented 1 week ago

it works, very nice thanks !!!

hdaboul commented 1 week ago

it works again.. many thanks <3

Ejatier commented 1 week ago

it works. Thank you !!!

Cameleon99 commented 1 week ago

All good for me now! Many thanks.

matschl43 commented 1 week ago

This is my first experience with GitHub, and I'm thrilled with how you solve these problems. A big thank you to everyone who contributed to solving this issue! The Vaillant integration is fantastic and has taken (or will take ;) ) my heating optimization to the next level. Thank you, thank you, thank you!

mzaufl commented 1 week ago

v0.8.17 works perfect for me, many thx

on5bac commented 1 week ago

v0.8.17 works perfect for me too, many thanks for that quick solution!!

glebdzyuba commented 1 week ago

v0.8.17 works great! Thanks @signalkraft!

mastersteve1 commented 1 week ago

many thanks to your quick support. Great Project.

R1200G commented 1 week ago

Thanks for the quick fix!!

Flori1007 commented 1 week ago

After update to 8.17 the problem is still available. All Sensors are not available in HA

nakedfoot commented 1 week ago

All is good for me now. Thx

ffxxavier commented 1 week ago

Thanks for the fix! Appreciate your work.

ralphbk commented 1 week ago

All good here too. Thanks very much!

Flori1007 commented 1 week ago

Try https://github.com/signalkraft/mypyllant-component/releases/tag/v0.8.17 please

Unfortunately still not working..... The Integration stopped yesterday 9.10.2024 8:16 AM in Germany

Krzysztonek commented 1 week ago

Indeed, this 8.17 version worked fine for me yesterday evening (Poland) for a while. I was so happy. However, today morning this issue occurred again. Please see my full log file (sanitized): home-assistant_mypyllant_2024-10-10T06-44-49.989Z.log

Cameleon99 commented 1 week ago

Odd, its all still working for me in the UK, maybe something to do with different configs?

boelle commented 1 week ago

Also working in Denmark, i only updated this morning and used the app in the evening to set the heatpump to a happy avg. setting

froggi1930 commented 1 week ago

not working here for me in Germany - I am on 8.17

salzrat commented 1 week ago

Working in Austria on 8.17

boelle commented 1 week ago

@Krzysztonek maybe it would help @signalkraft to know which countries where it does not work?

  1. Germany
  2. Poland
Krzysztonek commented 1 week ago

which countries where it does not work

Sorry for such an off-topic, but so far I was pretty sure that I live in a Happy Country. Seems I was wrong.. 😄

sbeier23 commented 1 week ago

Working for me in Germany: VRC700 + VR920 + EcoFit Exclusiv 226/4

hdaboul commented 1 week ago

V8.17 solved the problem from yesterday and still working for me as a charm in Germany: Arotherm plus with VRC700 and VR921

h4wk1234 commented 1 week ago

8.17 also solved the problem for me in Germany.

To all, who still have problems: Did your restart your HA after the update?

Xerbo commented 1 week ago

v0.8.17 fixed the problem in the UK.

Flori1007 commented 1 week ago

8.17 also solved the problem for me in Germany.

To all, who still have problems: Did your restart your HA after the update?

Restarted the Integration and Also HA......NOT working 😭

boelle commented 1 week ago

Restarted the Integration and Also HA......NOT WORKING

no need to SHOUT

and you forgot to attach log file

froggi1930 commented 1 week ago

full restart

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: 14:32:59 (2 Vorkommnisse)
Zuletzt protokolliert: 14:32:59

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'
dardennejf commented 1 week ago

all is ok since the last version, very good joob and many thanks

Flori1007 commented 1 week ago

I am still not able to get data in HA but I can create test data and then for example the temperature for hot water is shown as in the vaillant original app and its correct.

this is in the logs:

2024-10-10 20:12:26.483 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 213, in _async_update_data async for system in await self.hass.async_add_executor_job( 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' 2024-10-10 20:12:26.515 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up mypyllant.binary_sensor 2024-10-10 20:12:26.515 WARNING (MainThread) [custom_components.mypyllant.binary_sensor] No system data, skipping binary sensors 2024-10-10 20:12:26.515 INFO (MainThread) [homeassistant.components.calendar] Setting up mypyllant.calendar 2024-10-10 20:12:26.515 WARNING (MainThread) [custom_components.mypyllant.calendar] No system data, skipping calendar entities 2024-10-10 20:12:26.515 INFO (MainThread) [homeassistant.setup] Setting up climate 2024-10-10 20:12:26.517 INFO (MainThread) [homeassistant.setup] Setup of domain climate took 0.00 seconds 2024-10-10 20:12:26.517 INFO (MainThread) [homeassistant.components.climate] Setting up mypyllant.climate 2024-10-10 20:12:26.517 WARNING (MainThread) [custom_components.mypyllant.climate] No system data, skipping climate 2024-10-10 20:12:26.517 INFO (MainThread) [homeassistant.setup] Setting up datetime 2024-10-10 20:12:26.518 INFO (MainThread) [homeassistant.setup] Setup of domain datetime took 0.00 seconds 2024-10-10 20:12:26.518 INFO (MainThread) [homeassistant.components.datetime] Setting up mypyllant.datetime 2024-10-10 20:12:26.518 WARNING (MainThread) [custom_components.mypyllant.datetime] No system data, skipping date time entities 2024-10-10 20:12:26.518 INFO (MainThread) [homeassistant.components.number] Setting up mypyllant.number 2024-10-10 20:12:26.518 WARNING (MainThread) [custom_components.mypyllant.number] No system data, skipping number entities 2024-10-10 20:12:26.518 INFO (MainThread) [homeassistant.components.sensor] Setting up mypyllant.sensor 2024-10-10 20:12:26.518 WARNING (MainThread) [custom_components.mypyllant.sensor] No system data, skipping sensors 2024-10-10 20:12:26.518 WARNING (MainThread) [custom_components.mypyllant.sensor] No daily data, skipping sensors 2024-10-10 20:12:26.518 INFO (MainThread) [homeassistant.components.switch] Setting up mypyllant.switch 2024-10-10 20:12:26.518 WARNING (MainThread) [custom_components.mypyllant.switch] No system data, skipping switch entities

andyx87 commented 1 week ago

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'

smmoroz commented 1 week 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
Flori1007 commented 1 week 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?

froggi1930 commented 6 days ago

Anything we can do about it?

froggi1930 commented 5 days ago

Anything we can do about it?

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