robinostlund / homeassistant-volkswagencarnet

Volkswagen Carnet Component for home assistant
GNU General Public License v3.0
342 stars 63 forks source link

[BUG] Cannot turn off aux heater/ventilation #343

Closed odelma closed 2 years ago

odelma commented 3 years ago

Before you post a new issue - you must first check the following (and check the boxes with an "X" below)

Environment

Describe the bug

Turning on the auxiliary heater works fine, but turning it off gives an error. Turn off for auxiliary heater is possible via the WeConnect app.

Steps to Reproduce

Flip switch on, auxiliary heater turns on. Flip switch off, get the error.

Expected behavior

Turn off would be possible.

Screenshots

image

Traceback/Error logs

2021-11-13 14:18:24 WARNING (MainThread) [vw_vehicle] Failed to set parking heater mode to off - Invalid or no response
2021-11-13 14:18:24 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1724246072] Pre-heater action failed
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 667, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 863, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 704, in _handle_entity_call
    await result
  File "/config/custom_components/volkswagencarnet/switch.py", line 57, in async_turn_off
    await self.instrument.turn_off()
  File "/usr/local/lib/python3.9/site-packages/vw_dashboard.py", line 561, in turn_off
    await self.vehicle.set_pheater(mode='off', spin=self.spin)
  File "/usr/local/lib/python3.9/site-packages/vw_vehicle.py", line 461, in set_pheater
    raise Exception('Pre-heater action failed')
Exception: Pre-heater action failed
2021-11-13 14:18:36 WARNING (MainThread) [custom_components.vwid.sensor] {'data': {'batteryStatus': {'carCapturedTimestamp': '2021-11-13T07:44:15Z', 'currentSOC_pct': 96, 'cruisingRangeElectric_km': 329}, 'chargingStatus': {'carCapturedTimestamp': '2021-11-13T07:44:15Z', 'remainingChargingTimeToComplete_min': 0, 'chargingState': 'readyForCharging', 'chargeMode': 'manual', 'chargePower_kW': 0, 'chargeRate_kmph': 0}, 'chargingSettings': {'carCapturedTimestamp': '2021-11-13T07:44:15Z', 'maxChargeCurrentAC': 'maximum', 'autoUnlockPlugWhenCharged': 'off', 'targetSOC_pct': 100}, 'chargeMode': {'preferredChargeMode': 'manual', 'availableChargeModes': ['invalid']}, 'plugStatus': {'carCapturedTimestamp': '2021-11-13T07:44:14Z', 'plugConnectionState': 'disconnected', 'plugLockState': 'unlocked'}, 'climatisationStatus': {'carCapturedTimestamp': '2021-11-13T07:44:13Z', 'remainingClimatisationTime_min': 0, 'climatisationState': 'off'}, 'climatisationSettings': {'carCapturedTimestamp': '2021-11-13T07:44:13Z', 'targetTemperature_C': 20, 'targetTemperature_F': 68, 'unitInCar': 'celsius', 'climatisationWithoutExternalPower': True, 'climatizationAtUnlock': True, 'windowHeatingEnabled': True, 'zoneFrontLeftEnabled': True, 'zoneFrontRightEnabled': False, 'targetTemperature_K': 293.15}, 'climatisationTimer': {'timers': [{'id': 1, 'enabled': True, 'recurringTimer': {'startTime': '05:50', 'recurringOn': {'mondays': False, 'tuesdays': False, 'wednesdays': True, 'thursdays': False, 'fridays': False, 'saturdays': False, 'sundays': False}}}, {'id': 2, 'enabled': False, 'singleTimer': {'startDateTime': '2021-10-29T22:00:00Z'}}], 'carCapturedTimestamp': '2021-11-13T07:44:10.844Z', 'timeInCar': '2021-11-13T09:44:10+02:00'}, 'windowHeatingStatus': {'carCapturedTimestamp': '2021-11-13T07:44:12Z', 'windowHeatingStatus': [{'windowLocation': 'front', 'windowHeatingState': 'off'}, {'windowLocation': 'rear', 'windowHeatingState': 'off'}]}, 'rangeStatus': {'carCapturedTimestamp': '2021-11-13T07:44:15Z', 'carType': 'electric', 'primaryEngine': {'type': 'electric', 'currentSOC_pct': 96, 'remainingRange_km': 329}, 'totalRange_km': 329}, 'capabilityStatus': {'capabilities': [{'id': 'automation', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'batteryColdWarning', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'batterySupport', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'cdisDigitalKey', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'charging', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'chargingStations', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'climatisation', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'dealerAppointment', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'destinations', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'fuelStatus', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': False}, {'id': 'ignition', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': False}, {'id': 'mapUpdate', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'measurements', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'onlineSpeech', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'parkingBrake', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'parkingInformation', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'parkingPosition', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'personalizationOnline', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'plugAndCharge', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'poiSearch', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'privateEmergencyCall', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'readiness', 'userDisablingAllowed': False}, {'id': 'roadExperienceManagementLocalization', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'roadExperienceManagementLocalizationUpload', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'roadsideAssistant', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'routing', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'state', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'trafficInformation', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'vehicleHealth', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'vehicleHealthInspection', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'vehicleHealthWarnings', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'vehicleLights', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'vehicleWakeUpTrigger', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'webRadio', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}]}}, 'error': {'lvBatteryStatus': {'code': 4112, 'message': 'The capability for the requested operation is missing', 'group': 2, 'info': 'Internal error, please try again later. If the problem persists, please contact our support.'}}}
2021-11-13 14:19:06 WARNING (MainThread) [custom_components.vwid.sensor] {'data': {'batteryStatus': {'carCapturedTimestamp': '2021-11-13T07:44:15Z', 'currentSOC_pct': 96, 'cruisingRangeElectric_km': 329}, 'chargingStatus': {'carCapturedTimestamp': '2021-11-13T07:44:15Z', 'remainingChargingTimeToComplete_min': 0, 'chargingState': 'readyForCharging', 'chargeMode': 'manual', 'chargePower_kW': 0, 'chargeRate_kmph': 0}, 'chargingSettings': {'carCapturedTimestamp': '2021-11-13T07:44:15Z', 'maxChargeCurrentAC': 'maximum', 'autoUnlockPlugWhenCharged': 'off', 'targetSOC_pct': 100}, 'chargeMode': {'preferredChargeMode': 'manual', 'availableChargeModes': ['invalid']}, 'plugStatus': {'carCapturedTimestamp': '2021-11-13T07:44:14Z', 'plugConnectionState': 'disconnected', 'plugLockState': 'unlocked'}, 'climatisationStatus': {'carCapturedTimestamp': '2021-11-13T07:44:13Z', 'remainingClimatisationTime_min': 0, 'climatisationState': 'off'}, 'climatisationSettings': {'carCapturedTimestamp': '2021-11-13T07:44:13Z', 'targetTemperature_C': 20, 'targetTemperature_F': 68, 'unitInCar': 'celsius', 'climatisationWithoutExternalPower': True, 'climatizationAtUnlock': True, 'windowHeatingEnabled': True, 'zoneFrontLeftEnabled': True, 'zoneFrontRightEnabled': False, 'targetTemperature_K': 293.15}, 'climatisationTimer': {'timers': [{'id': 1, 'enabled': True, 'recurringTimer': {'startTime': '05:50', 'recurringOn': {'mondays': False, 'tuesdays': False, 'wednesdays': True, 'thursdays': False, 'fridays': False, 'saturdays': False, 'sundays': False}}}, {'id': 2, 'enabled': False, 'singleTimer': {'startDateTime': '2021-10-29T22:00:00Z'}}], 'carCapturedTimestamp': '2021-11-13T07:44:10.844Z', 'timeInCar': '2021-11-13T09:44:10+02:00'}, 'windowHeatingStatus': {'carCapturedTimestamp': '2021-11-13T07:44:12Z', 'windowHeatingStatus': [{'windowLocation': 'front', 'windowHeatingState': 'off'}, {'windowLocation': 'rear', 'windowHeatingState': 'off'}]}, 'rangeStatus': {'carCapturedTimestamp': '2021-11-13T07:44:15Z', 'carType': 'electric', 'primaryEngine': {'type': 'electric', 'currentSOC_pct': 96, 'remainingRange_km': 329}, 'totalRange_km': 329}, 'capabilityStatus': {'capabilities': [{'id': 'automation', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'batteryColdWarning', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'batterySupport', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'cdisDigitalKey', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'charging', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'chargingStations', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'climatisation', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'dealerAppointment', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'destinations', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'fuelStatus', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': False}, {'id': 'ignition', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': False}, {'id': 'mapUpdate', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'measurements', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'onlineSpeech', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'parkingBrake', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'parkingInformation', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'parkingPosition', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'personalizationOnline', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'plugAndCharge', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'poiSearch', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'privateEmergencyCall', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'readiness', 'userDisablingAllowed': False}, {'id': 'roadExperienceManagementLocalization', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'roadExperienceManagementLocalizationUpload', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'roadsideAssistant', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'routing', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'state', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'trafficInformation', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}, {'id': 'vehicleHealth', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'vehicleHealthInspection', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'vehicleHealthWarnings', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'vehicleLights', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'vehicleWakeUpTrigger', 'status': [1008], 'userDisablingAllowed': False}, {'id': 'webRadio', 'expirationDate': '2024-07-06T00:00:00Z', 'userDisablingAllowed': True}]}}, 'error': {'lvBatteryStatus': {'code': 4112, 'message': 'The capability for the requested operation is missing', 'group': 2, 'info': 'Internal error, please try again later. If the problem persists, please contact our support.'}}}

Debug information - all JSON responses from logfile

Additional context

Fresh install of home assistant, not sure if it should work like I describe in expected behavior section or not.

edit. sorry forgot to add title and seems I cannot update that anymore....

hcw70 commented 3 years ago

Affects me too

milkboy commented 2 years ago

Duplicate of #325 ?

odelma commented 2 years ago

Yeah, indeed seems to be duplicate of #325 - will close this.