Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing attributes heat_demand_limited_by_outside_temperature and request_count #237

Open
3 tasks done
prehor opened this issue Nov 6, 2024 · 1 comment
Open
3 tasks done

Comments

@prehor
Copy link

prehor commented Nov 6, 2024

Before submitting a new issue

Problem description

The HA logs are filled with errors related to missing attribute heat_demand_limited_by_outside_temperature. The attribute heatDemandLimitedByOutsideTemperature is received from the API call, but in HA, it appears as unavailable.

It is sometimes followed by the missing attribute request_count error.

Logs

2024-11-06 01:30:29.767 DEBUG (MainThread) [custom_components.mypyllant] Refreshing DailyDataCoordinator
2024-11-06 01:30:29.767 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Starting async update data for DailyDataCoordinator
2024-11-06 01:30:29.767 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Waiting 119s until token refresh for [email protected]
2024-11-06 01:30:29.768 DEBUG (MainThread) [myPyllant.http_client] Starting GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes
2024-11-06 01:30:29.816 DEBUG (MainThread) [myPyllant.http_client] Got response for GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes: ...
2024-11-06 01:30:29.816 DEBUG (MainThread) [myPyllant.http_client] Starting GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/XXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX/meta-info/time-zone
2024-11-06 01:30:29.884 DEBUG (MainThread) [myPyllant.http_client] Got response for GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/XXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX/meta-info/time-zone: ...
2024-11-06 01:30:29.885 DEBUG (MainThread) [myPyllant.http_client] Starting GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/XXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX/tli
2024-11-06 01:30:29.954 DEBUG (MainThread) [myPyllant.http_client] Got response for GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/XXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX/tli: 
{
    "state": {
        "system": {
            "outdoorTemperature": 3.3515625,
            "outdoorTemperatureAverage24h": 5.15625,
            "systemFlowTemperature": 36.25,
            "systemWaterPressure": 1.3,
            "cylinderTemperatureSensorBottomCH": 27.8125,
            "cylinderTemperatureSensorBottomDHW": 40.6875,
            "cylinderTemperatureSensorTopCH": 36.875,
            "cylinderTemperatureSensorTopDHW": 45.3125,
            "energyManagerState": "STANDBY",
            "systemOff": false
        },
        "zones": [
            {
                "index": 0,
                "desiredRoomTemperatureSetpointHeating": 19.0,
                "desiredRoomTemperatureSetpoint": 19.0,
                "currentSpecialFunction": "NONE",
                "heatingState": "IDLE",
                "quickVetoStartDateTime": "1970-01-01T00:00:00Z",
                "quickVetoEndDateTime": "1970-01-01T00:00:00Z"
            }
        ],
        "circuits": [
            {
                "index": 0,
                "circuitState": "HEATING",
                "currentCircuitFlowTemperature": 36.0625,
                "heatingCircuitFlowSetpoint": 33.681892,
                "calculatedEnergyManagerState": "HEATING_ACTIVE"
            }
        ],
        "dhw": [
            {
                "index": 255,
                "currentSpecialFunction": "REGULAR"
            }
        ],
        "ventilation": []
    },
    "properties": {
        "system": {
            "controllerType": "VRC720",
            "isLegionallaProtectionActivated": "OFF",
            "systemScheme": 8,
            "backupHeaterType": "CONDENSING",
            "backupHeaterAllowedFor": "DHW_AND_HEATING",
            "temporaryAllowBackupHeater": "DISABLED",
            "moduleConfigurationVR71": 6,
            "energyProvidePowerCutBehavior": "DISABLE_HEATPUMP_AND_BACKUP_HEATER",
            "smartPhotovoltaicBufferOffset": 10.0,
            "externalEnergyManagementActivation": false
        },
        "zones": [
            {
                "index": 0,
                "isActive": true,
                "zoneBinding": "NONE",
                "isCoolingAllowed": false,
                "associatedCircuitIndex": 0
            }
        ],
        "circuits": [
            {
                "index": 0,
                "mixerCircuitTypeExternal": "HEATING",
                "heatingCircuitType": "MIXER_CIRCUIT_EXTERNAL"
            }
        ],
        "dhw": [
            {
                "index": 255,
                "minSetpoint": 40.0,
                "maxSetpoint": 75.0
            }
        ],
        "ventilation": []
    },
    "configuration": {
        "system": {
            "continuousHeatingStartSetpoint": -26.0,
            "alternativePoint": -21.0,
            "heatingCircuitBivalencePoint": -20.0,
            "dhwBivalencePoint": -15.0,
            "adaptiveHeatingCurve": false,
            "dhwMaximumLoadingTime": 60,
            "dhwHysteresis": 5.0,
            "dhwFlowSetpointOffset": 25.0,
            "continuousHeatingRoomSetpoint": 20.0,
            "hybridControlStrategy": "BIVALENCE_POINT",
            "maxFlowSetpointHpError": 30.0,
            "dhwMaximumTemperature": 50.0,
            "maximumPreheatingTime": 10
        },
        "zones": [
            {
                "index": 0,
                "general": {
                    "name": "Topeni",
                    "holidayStartDateTime": "2015-01-01T00:00:00Z",
                    "holidayEndDateTime": "2015-01-01T00:00:00Z",
                    "holidaySetpoint": 15.0
                },
                "heating": {
                    "operationModeHeating": "MANUAL",
                    "setBackTemperature": 15.0,
                    "manualModeSetpointHeating": 19.0,
                    "timeProgramHeating": {
                        "metaInfo": {
                            "minSlotsPerDay": 0,
                            "maxSlotsPerDay": 12,
                            "setpointRequiredPerSlot": true
                        },
                        "monday": [
                            {
                                "startTime": 360,
                                "endTime": 1320,
                                "setpoint": 20.0
                            }
                        ],
                        "tuesday": [
                            {
                                "startTime": 360,
                                "endTime": 1320,
                                "setpoint": 20.0
                            }
                        ],
                        "wednesday": [
                            {
                                "startTime": 360,
                                "endTime": 1320,
                                "setpoint": 20.0
                            }
                        ],
                        "thursday": [
                            {
                                "startTime": 360,
                                "endTime": 1320,
                                "setpoint": 20.0
                            }
                        ],
                        "friday": [
                            {
                                "startTime": 360,
                                "endTime": 1320,
                                "setpoint": 20.0
                            }
                        ],
                        "saturday": [
                            {
                                "startTime": 420,
                                "endTime": 1380,
                                "setpoint": 20.0
                            }
                        ],
                        "sunday": [
                            {
                                "startTime": 420,
                                "endTime": 1380,
                                "setpoint": 20.0
                            }
                        ]
                    }
                },
                "cooling": {}
            }
        ],
        "circuits": [
            {
                "index": 0,
                "heatingCurve": 0.6,
                "heatingFlowTemperatureMinimumSetpoint": 20.0,
                "heatingFlowTemperatureMaximumSetpoint": 45.0,
                "heatDemandLimitedByOutsideTemperature": 20.0,
                "heatingCircuitFlowSetpointExcessOffset": 0.0,
                "setBackModeEnabled": true,
                "roomTemperatureControlMode": "NON",
                "epsilon": 2.0
            }
        ],
        "dhw": [
            {
                "index": 255,
                "operationModeDhw": "TIME_CONTROLLED",
                "tappingSetpoint": 50.0,
                "holidayStartDateTime": "2015-01-01T00:00:00Z",
                "holidayEndDateTime": "2015-01-01T00:00:00Z",
                "timeProgramDhw": {
                    "metaInfo": {
                        "minSlotsPerDay": 0,
                        "maxSlotsPerDay": 3,
                        "setpointRequiredPerSlot": false
                    },
                    "monday": [
                        {
                            "startTime": 900,
                            "endTime": 1440
                        }
                    ],
                    "tuesday": [
                        {
                            "startTime": 900,
                            "endTime": 1440
                        }
                    ],
                    "wednesday": [
                        {
                            "startTime": 900,
                            "endTime": 1440
                        }
                    ],
                    "thursday": [
                        {
                            "startTime": 900,
                            "endTime": 1440
                        }
                    ],
                    "friday": [
                        {
                            "startTime": 900,
                            "endTime": 1440
                        }
                    ],
                    "saturday": [
                        {
                            "startTime": 900,
                            "endTime": 1440
                        }
                    ],
                    "sunday": [
                        {
                            "startTime": 900,
                            "endTime": 1440
                        }
                    ]
                },
                "timeProgramCirculationPump": {
                    "metaInfo": {
                        "minSlotsPerDay": 0,
                        "maxSlotsPerDay": 3,
                        "setpointRequiredPerSlot": false
                    },
                    "monday": [
                        {
                            "startTime": 0,
                            "endTime": 1440
                        }
                    ],
                    "tuesday": [
                        {
                            "startTime": 0,
                            "endTime": 1440
                        }
                    ],
                    "wednesday": [
                        {
                            "startTime": 0,
                            "endTime": 1440
                        }
                    ],
                    "thursday": [
                        {
                            "startTime": 0,
                            "endTime": 1440
                        }
                    ],
                    "friday": [
                        {
                            "startTime": 0,
                            "endTime": 1440
                        }
                    ],
                    "saturday": [
                        {
                            "startTime": 0,
                            "endTime": 1440
                        }
                    ],
                    "sunday": [
                        {
                            "startTime": 0,
                            "endTime": 1440
                        }
                    ]
                }
            }
        ],
        "ventilation": []
    }
}

2024-11-06 01:30:29.956 DEBUG (MainThread) [myPyllant.http_client] Starting GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/XXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX/currentSystem
2024-11-06 01:30:30.019 DEBUG (MainThread) [myPyllant.http_client] Got response for GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/XXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX/currentSystem: ...
2024-11-06 01:30:30.021 DEBUG (MainThread) [myPyllant.http_client] Starting GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/api/v1/ambisense/facilities/XXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX/capability
2024-11-06 01:30:30.101 DEBUG (MainThread) [myPyllant.http_client] Got response for GET to https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/api/v1/ambisense/facilities/XXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX/capability: ...
2024-11-06 01:30:30.105 DEBUG (MainThread) [myPyllant.models] Creating related models from state: { ... 'heat_demand_limited_by_outside_temperature': 20.0, ... }
2024-11-06 01:30:30.122 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Getting daily data for XXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX from 2024-11-06 00:00:00+01:00 to 2024-11-07 00:00:00+01:00
...
2024-11-06 01:30:31.312 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Finished fetching myVAILLANT data in 1.545 seconds (success: True)
2024-11-06 01:30:31.357 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up mypyllant.binary_sensor
2024-11-06 01:30:31.371 INFO (MainThread) [homeassistant.setup] Setting up calendar
...
2024-11-06 01:30:31.416 INFO (MainThread) [homeassistant.components.climate] Setting up mypyllant.climate
...
2024-11-06 01:30:31.485 INFO (MainThread) [homeassistant.setup] Setting up datetime
2024-11-06 01:30:31.486 INFO (MainThread) [homeassistant.setup] Setup of domain datetime took 0.00 seconds
2024-11-06 01:30:31.488 INFO (MainThread) [homeassistant.components.datetime] Setting up mypyllant.datetime
2024-11-06 01:30:31.490 INFO (MainThread) [homeassistant.components.number] Setting up mypyllant.number
2024-11-06 01:30:31.491 ERROR (MainThread) [homeassistant.components.number] Error adding entity number.myvaillant_circuit_0_heat_demand_limited_by_outside_temperature for domain number with platform mypyllant
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 595, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 909, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 359, in state
    return self.value
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 398, in value
    if (native_value := self.native_value) is None:
                        ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mypyllant/number.py", line 232, in native_value
    return self.circuit.heat_demand_limited_by_outside_temperature
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Circuit' object has no attribute 'heat_demand_limited_by_outside_temperature'

2024-11-06 01:30:31.495 INFO (MainThread) [homeassistant.components.sensor] Setting up mypyllant.sensor
2024-11-06 01:30:31.495 DEBUG (MainThread) [custom_components.mypyllant.sensor] Creating system sensors for [ ... 'heat_demand_limited_by_outside_temperature': 20.0, ... ]
2024-11-06 01:30:31.498 DEBUG (MainThread) [custom_components.mypyllant.sensor] Creating SystemDevice sensors for Device(...)
2024-11-06 01:30:31.499 DEBUG (MainThread) [custom_components.mypyllant.sensor] Creating SystemDevice sensors for Device(...)
2024-11-06 01:30:31.499 DEBUG (MainThread) [custom_components.mypyllant.sensor] Creating SystemDevice sensors for Device(...)
2024-11-06 01:30:31.499 DEBUG (MainThread) [custom_components.mypyllant.sensor] Creating Zone sensors for Zone( ... 'heat_demand_limited_by_outside_temperature': 20.0, ... )
2024-11-06 01:30:31.500 DEBUG (MainThread) [custom_components.mypyllant.sensor] Creating Circuit sensors for Circuit( ... 'heat_demand_limited_by_outside_temperature': 20.0, ... )
2024-11-06 01:30:31.501 DEBUG (MainThread) [custom_components.mypyllant.sensor] Creating Domestic Hot Water sensors for DomesticHotWater(...)
2024-11-06 01:30:31.502 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.vaillant_api_request_count for domain sensor with platform mypyllant
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 595, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 909, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 542, in state
    value = self.native_value
            ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mypyllant/sensor.py", line 1121, in native_value
    return self.coordinator.api.aiohttp_session.request_count
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ClientSession' object has no attribute 'request_count'. Did you mean: '_request_class'?
@signalkraft
Copy link
Owner

It seems your installation is broken, because in the latest verison of the integration the underlying library definitely has the heat_demand_limited_by_outside_temperature attribute. Could you try reinstalling? If that doesn't help, there should be a debug log after startup that prints out the versions of the intergation, its library, and some of the core 3rd party libraries being used. Searching for "version" should hopefully be enough. Please post that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants