Coder Social home page Coder Social logo

Comments (5)

fars-fede-fire avatar fars-fede-fire commented on August 21, 2024 1

@rene-neimann I have created a new issue and closed the other as I do not think they are related.

I think there is a problem on the Volvo server right now but I am not at my computer at the moment so I am unable to test. I will return to you when I have found something out.

from volvoaaos.

rene-neimann avatar rene-neimann commented on August 21, 2024

Both, v1 and v2 connected-vehicle APIs work well from me from Swagger/Postman right now - doesn't seem like problem with Volvo servers (see more below).

Does this part in the error message seem relevant?

pydantic.error_wrappers.ValidationError: 2 validation errors for GetVinModel
status
field required (type=value_error.missing)
operationId
field required (type=value_error.missing)
curl --location 'https://api.volvocars.com/connected-vehicle/v2/vehicles' \
--header 'vcc-api-operationId: <string>' \
--header 'Accept: application/json' \
--header 'vcc-api-key: xxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxx

{
    "data": [
        {
            "vin": "XXXXXXXXXXXXXXX"
        }
    ],
    "pagination": {
        "limit": 1,
        "total": 1,
        "offset": 0
    }
}
curl -X 'GET' \
  'https://api.volvocars.com/connected-vehicle/v1/vehicles' \
  -H 'accept: application/vnd.volvocars.api.connected-vehicle.vehiclelist.v1+json' \
  -H 'vcc-api-key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  -H 'Authorization: Bearer xxxxxxxxxxxxxx

{
  "status": 200,
  "operationId": "2b90210d-b2ee-4543-a12b-ec7fafc592cc",
  "data": [
    {
      "vin": "XXXXXXXXXXXXXXXXXX"
    }
  ],
  "pagination": {
    "limit": 1,
    "total": 1,
    "offset": 0
  }
}

from volvoaaos.

fars-fede-fire avatar fars-fede-fire commented on August 21, 2024

So it seems that Volvo has changed some of the data the APIs return causing some errors. It should be fixed now in this branch: https://github.com/fars-fede-fire/volvoaaos/tree/fix-api-changes.
Would you mind trying(again...)?

from volvoaaos.

rene-neimann avatar rene-neimann commented on August 21, 2024

Seems fixed, I was able to set up the integration successfully now. Enabled debug logging, reloaded integration, restarted HA - all good without any errors in logs.

What's the best practice for pull latest data from API (e.g., for battery charge)? Does the integration poll the API regularly? Or should I do it myself by reloading the integration (manually or via automation).

from volvoaaos.

fars-fede-fire avatar fars-fede-fire commented on August 21, 2024

Perfect!
Data is polled each minute, so you do not have to do anything.

from volvoaaos.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.