homeassistant-skodaconnect: Bad Gateway / Forbidden error

Hi! I was trying to setup this integration but I can’t get it to work. I keep getting Bad Gateway / Forbidden errors. When I log in to the Skoda Connect portal everything works, so my credentials are correct. This is my config:

I’m running Home Assistant version: 2020.12.0 SkodaConnect integration version: 1.0.27

skodaconnect:
  username: !secret skoda_username
  password: !secret skoda_password
  scandinavian_miles: false
  imperial_units: false
  scan_interval:
    minutes: 5

And this is the errorlog:

Could not fetch tripstatistics, error: 403, message='Forbidden', url=URL('https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/skoda/CZ/vehicles/TMBAP9NE6xxxxxx/tripdata/shortTerm?newest')

Could not fetch StoredVehicleDataResponse, error: 502, message='Bad Gateway', url=URL('https://msg.volkswagen.de/fs-car/bs/vsr/v1/skoda/CZ/vehicles/TMBAP9NE6xxxxxx/status')

Could not fetch position (ClientResponseError), error: 502, message='Bad Gateway', url=URL('https://msg.volkswagen.de/fs-car/bs/cf/v1/skoda/CZ/vehicles/TMBAP9NE6xxxxxx/position')

I tried with and without the S-PIN and also resetted the S-PIN as well as the password for my account. What am I missing?

Thank you in advance!

Jeffrey

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 68

Most upvoted comments

Ventilation and heating works like a charm now, both turning on and off.

All such requests output the following in the log, but still functioning. DEBUG (MainThread) [skodaconnect.connection] Request for parking heater returned with state "unknown",

Great job fixing this. Tack!

@Farfar Attached is anything related to skodaconnect from the log file.

Ps. I´ve installed rc3 through hacs, but manifest.json still says rc2 and so does the log.

skodaconnect.log

Thanks I already see what I think is the culprit. Something errs when the integration tries to auto discover what API endpoints are enabled so most are disabled. I will work on a fix right away.

Nope. Changing to minutes: 1 doesn’t change anything.

OK. I suspect there’s some issue when tokens expire but I haven’t been able to reproduce it myself. The upcoming release will hopefully take care of this issue for you. I will release it ASAP.

Once these requests finished the icon and the toggle both became yellow/active.

Excellent! Then it’s only the pre heater function that doesn’t return a state along with request id. The important thing is that the request id is there so it can check for status and refresh after request is finished.

I now feel confident that it will work when stable version is released. Thank you for testing! Only missing thing now is service to be able to change duration for parking heater.

So, finally managed to access the homeassistant container through ssh in hassio and i edited the file and that seems to solve the check, but then it fails further down on row 383 in set_pheater

2021-01-28 11:21:22 ERROR (MainThread) [skodaconnect.vehicle] Failed to set parking heater to heating
2021-01-28 11:21:22 WARNING (MainThread) [skodaconnect.vehicle] Failed to set parking heater mode to heating - Failed to set parking heater to heating
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/skodaconnect/vehicle.py", line 383, in set_pheater

Ventilation fails in a similar manner 'Vehicle' object has no attribute 'pheater_climatisation'

Thanks!

Would it be an option to invert the sensors for the doors. For example binary_sensor.octavia_door_closed_left_back is off when the window is closed. I would say it’s more logical if it’s on when closed because it says window closed = on (true)

I agree. But the way that the binary sensor door device class works we can’t invert the state. I might rename the sensors though so they make more sense.

GREAT JOB!! As far as i can tell for the moment everything works perfect. Especially the switch.octavia_force_data_refresh entity is huge improvement and works as intended. Thank you for this integration. I will keep testing in the next days and build some automations around it.

@Farfar Attached is anything related to skodaconnect from the log file.

Ps. I´ve installed rc3 through hacs, but manifest.json still says rc2 and so does the log. 😀

skodaconnect.log

It’s the latest release 1.0.27 as provided in HACS. I hoped i could provide more Info with my last post. If not, sorry, just ignore it 😃

No problem, I think I know where the problem lies. I could be wrong though but the new code is so different that all problems that might persist should be as good as new 😉

Just feeling a bit stressed to get next version released as it should fix many issues and help troubleshoot others. It’s stable enough that I think I’ll release it tomorrow.

Model year is 2018. I’m the only user, no guest user. Tomorrow I’ll be getting te new Octavia 2021 model, so I’m not able to continue testing this (unless I get the same errors with the new model). Though I found it useful for other people that might have the same errors to create this issue. I will of course test it with the new car and report back if that works fine or not.