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

[BUG][v4.5.5] New Car type sensors breaks the integration for some vehicles #589

Closed
3 tasks done
Robindeko opened this issue Feb 28, 2024 · 16 comments
Closed
3 tasks done
Labels
acknowledged Bug acknowledged by the developer bug Something isn't working

Comments

@Robindeko
Copy link

Robindeko commented Feb 28, 2024

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

  • 1.) Can you login using the smartphone app We Connect (not We Connect ID or We Connect GO) and interact with your car?
  • 2.) Please make sure that you can login into https://vwid.vwgroup.io/ and make sure that any "Terms and Conditions" are all checked
  • 3.) I do not have MFA enabled.

Environment

  • Volkswagencarnet release with the issue: 4.5.5
  • Last working homeassistant-volkswagencarnet release (if known): 2 versions earlier (previous also did not work)
  • Home Assistant Core release with the issue: 2024.2.4
  • Operating environment (Home Assistant OS/Supervised/Container/Core/venv): Home Assistant OS
  • Car model and year: Passat GTE (B8) 2020
  • Country where the car was bought: DE
  • Valid We Connect subscription: Yes
  • Have you verified that the We Connect service works via VW´s portal?: Yes

Describe the bug

Steps to Reproduce

Expected behavior

Screenshots

Traceback/Error logs

Debug information - all JSON responses from logfile

Additional context

@Robindeko Robindeko added the bug Something isn't working label Feb 28, 2024
@SaschaWeicht
Copy link

SaschaWeicht commented Feb 28, 2024

I believe some logs would be very helpful for understanding whats (not) going on. Add the following to your configuration.yaml

logger:
    default: info
    logs:
        volkswagencarnet: debug
        dashboard: debug
        custom_components.volkswagencarnet: debug
        custom_components.volkswagencarnet.climate: debug
        custom_components.volkswagencarnet.lock: debug
        custom_components.volkswagencarnet.device_tracker: debug
        custom_components.volkswagencarnet.switch: debug
        custom_components.volkswagencarnet.binary_sensor: debug
        custom_components.volkswagencarnet.sensor: debug

Activate the debug logging for the integration, restart the integration and pull the logs from HA for the developers to have a look.

@stickpin
Copy link
Collaborator

@Robindeko,
It will be helpful if you will provide the logs otherwise this issue is useless and can be closed.

@stickpin
Copy link
Collaborator

Thanks @SaschaWeicht! :))

@Timer2000
Copy link

Here the same Bug

@stickpin
Copy link
Collaborator

@Timer2000 same as which bug? How did you manage to get to this conclusion without any logs? 🤨

@Robindeko
Copy link
Author

Robindeko commented Feb 28, 2024

Home assistant.log

Here is my logfile, after enabling debug log.
Thanks for your help!

@stickpin
Copy link
Collaborator

@Robindeko thanks. i see the problem, i will fix it in the next version.
Roll back to v4.5.4 for the time being...

@stickpin
Copy link
Collaborator

@Robindeko
Just a bit technical details.
Your car is not reporting back the fuelStatus, well technically it's reporting but with an error:

  "fuelStatus": {
    "rangeStatus": {
      "error": {
        "message": "Bad Gateway",
        "errorTimeStamp": "datetime.datetime(2024, 2, 28, 12, 0, 10, tzinfo=datetime.timezone.utc)",
        "info": "Upstream service responded with an unexpected status. If the problem persists, please contact our support.",
        "code": 4007,
        "group": 2,
        "retry": true
      }
    }
  },

So i cannot detect the vehicle type. I have around 15 different vehicles now that I am testing with and i never saw such response.

So in your case carType is coming as part of the measurements:

  "measurements": {
    "fuelLevelStatus": {
      "value": {
        "carCapturedTimestamp": "datetime.datetime(2024, 2, 28, 11, 25, 7, tzinfo=datetime.timezone.utc)",
        "currentFuelLevel_pct": 100,
        "primaryEngineType": "gasoline",
        "secondaryEngineType": "electric",
        "carType": "hybrid"
      }
    }

I will cover such use case in the next version.

@stickpin stickpin changed the title [BUG] Version 4.5.5 doesn't work anymore [BUG][v4.5.5] New Car type sensors breaks the integration for some vehicles Feb 28, 2024
@Timer2000
Copy link

@Timer2000 same as which bug? How did you manage to get to this conclusion without any logs? 🤨

I have start yesterday with the issue, But it was closed without any Feedback. Im a User an not a Developer, so i can help when i have help.

@Robindeko
Copy link
Author

@Robindeko Just a bit technical details. Your car is not reporting back the fuelStatus, well technically it's reporting but with an error:

  "fuelStatus": {
    "rangeStatus": {
      "error": {
        "message": "Bad Gateway",
        "errorTimeStamp": "datetime.datetime(2024, 2, 28, 12, 0, 10, tzinfo=datetime.timezone.utc)",
        "info": "Upstream service responded with an unexpected status. If the problem persists, please contact our support.",
        "code": 4007,
        "group": 2,
        "retry": true
      }
    }
  },

So i cannot detect the vehicle type. I have around 15 different vehicles now that I am testing with and i never saw such response.

So in your case carType is coming as part of the measurements:

  "measurements": {
    "fuelLevelStatus": {
      "value": {
        "carCapturedTimestamp": "datetime.datetime(2024, 2, 28, 11, 25, 7, tzinfo=datetime.timezone.utc)",
        "currentFuelLevel_pct": 100,
        "primaryEngineType": "gasoline",
        "secondaryEngineType": "electric",
        "carType": "hybrid"
      }
    }

I will cover such use case in the next version.

Thanks for investigating!
What I find strange though, is that it used to report the fuelstatus back correctly in HA.
Did the response from VW change then?

@stickpin
Copy link
Collaborator

OFFTOPIC
@Timer2000 Sorry mate, you've got the feedback: #588 but I guess you are not willing to accept the answer. The rate limit might be hit due to misuse of the integration or multiple integrations. If you have debugging logs to share, you can share them in the thread you've opened (#588). Your issue is not related to this issue.

@stickpin
Copy link
Collaborator

@Robindeko Just a bit technical details. Your car is not reporting back the fuelStatus, well technically it's reporting but with an error:

  "fuelStatus": {
    "rangeStatus": {
      "error": {
        "message": "Bad Gateway",
        "errorTimeStamp": "datetime.datetime(2024, 2, 28, 12, 0, 10, tzinfo=datetime.timezone.utc)",
        "info": "Upstream service responded with an unexpected status. If the problem persists, please contact our support.",
        "code": 4007,
        "group": 2,
        "retry": true
      }
    }
  },

So i cannot detect the vehicle type. I have around 15 different vehicles now that I am testing with and i never saw such response.
So in your case carType is coming as part of the measurements:

  "measurements": {
    "fuelLevelStatus": {
      "value": {
        "carCapturedTimestamp": "datetime.datetime(2024, 2, 28, 11, 25, 7, tzinfo=datetime.timezone.utc)",
        "currentFuelLevel_pct": 100,
        "primaryEngineType": "gasoline",
        "secondaryEngineType": "electric",
        "carType": "hybrid"
      }
    }

I will cover such use case in the next version.

Thanks for investigating! What I find strange though, is that it used to report the fuelstatus back correctly in HA. Did the response from VW change then?

Thats correct.
I covered this issue with the fuelstatus sensor as well a few versions ago.
I don't have an explanation yet, why VW replies differently even for the same model of the vehicle.
I have one Passat GTE but 2018 in my cars pool and it's working fine.

@stickpin stickpin added the acknowledged Bug acknowledged by the developer label Feb 28, 2024
@megabyte0469
Copy link

@stickpin: I have a Passat GTE 2021 here and unfortunately it is currently
Climatisation (AuxiliaryClimatisation:auxiliary_climatisation) is not supported.
Apparently there are also differences within the model years

@stickpin
Copy link
Collaborator

@megabyte0469 Yes, I am aware of it.
Unfortunately, VW doesn't have universal APIs for all types of vehicles.
Currently, Auxiliary Heater will work only with combustion (diesel/petrol) vehicles, because that's the only vehicle that I had access to during the development.

For hybrids, it works differently, and now I've got access to one hybrid vehicle with an Auxiliary Heater as well.
My current roadmap is to enable climatisation, climatisation settings, and battery settings on ID models, and then I will come back to Auxiliary Heater for hybrids.

All this research and development process is very time-consuming because obviously, we don't have any documentation from the VW side.

@megabyte0469
Copy link

@stickpin Thanks for the information.
And many thanks for your great work. I know it is unfortunately very time-consuming if there is no proper description of an interface. I am not surprised that the whole thing is so chaotic at VW. The changeover from the old to the new app alone was absolute chaos on the part of VW.

This was referenced Mar 1, 2024
@stickpin
Copy link
Collaborator

stickpin commented Mar 3, 2024

The v4.5.6 is released https://github.com/robinostlund/homeassistant-volkswagencarnet/releases/tag/v4.5.6.
The issue should be resolved.

@stickpin stickpin closed this as completed Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged Bug acknowledged by the developer bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants