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

Stuck in getData() #24

Open
0rsa opened this issue Oct 3, 2021 · 11 comments
Open

Stuck in getData() #24

0rsa opened this issue Oct 3, 2021 · 11 comments

Comments

@0rsa
Copy link

0rsa commented Oct 3, 2021

Hello,
function getData() never resolves, it is stuck in a loop.
Using .then .catch .finally, three functions are never resolved and I can't get any data.

Using log DEBUG, I can see that my vehicle data I need are correctly retrieved.
I have this error, related to We Charge I do not have:

ERROR: No Login Form found for type: Wc

Can you help me?
Thank you

@nightsha-de
Copy link
Owner

Just to get it right: You have a car (which type do you use?) and no charger at all, is this correct?

@0rsa
Copy link
Author

0rsa commented Oct 4, 2021

I got a Golf 8 GTE (hybrid with charge)
"id" type is the only one working (I can see data retrieved in debug logs) but with a promise never resolved.

I tried vw or vwv2 types and I got directly this error msg with no data:
No Token received.

I also tried python weconnect library, which is working perfectly and I use it for now.

@nightsha-de
Copy link
Owner

Please try if the new option in branch https://github.com/nightsha-de/npm-vwconnectapi/tree/test_ignore_charger_option solves your problem. I'm just guessing, where exactly it does not return. You need to use vwConn.setCheckCharger(false) before calling vwConn.getData().

@0rsa
Copy link
Author

0rsa commented Oct 5, 2021

Thank you. I'll try this as soon as possible and I'll let you know if it is OK or KO.

@jskwalker82
Copy link

I'm also stuck in getData.

No charger - config vwv2 seems to work fine it pulls all my car's details, but also with this branch https://github.com/nightsha-de/npm-vwconnectapi/tree/test_ignore_charger_option is loops infinitely.

Issue is the flag boolFinishIdData which in my case (as I am not using config id) never gets true.

I worked around this for my case by commenting out all the places the flag is used...but this obviously will not work for all configs.

@nightsha-de
Copy link
Owner

I tried to tweak finishedReading() a little more. Can you please test it again?

@vheat
Copy link

vheat commented Dec 28, 2021

Same here, stuck in getData(), it comes down to type.getObject() where the exception gets raised as this function is not available. This is in updateName().
It looks like the basic object implementation from ioBroker is not available within npm-vwconnect?
(Just a bit of background, I'm trying to integrate the Audi-branded Elli Connect Pro into this tool as a prep for ioBroker, first browsing show this to be very similar to ID Charger, just the login and APIs are redirected to Audi, see https://homecharging-audi.apps.emea.vwapps.io/

@nightsha-de
Copy link
Owner

Nothing ioBroker related should be left in the code. It seems I missed two getObject calls which are now removed in the test branch.

@vheat
Copy link

vheat commented Dec 29, 2021

great change, will give it a try.

@vheat
Copy link

vheat commented Dec 29, 2021

Quick test with logs in DEBUG shortened to 60 chars. I'm using the example.js code but I don't reach the "SOC" info there.
It still ends in the contininous print of the flags. I do not get the exceptions anymore.
I had to add two opening brackets at line 152 / 153 in index.js

DEBUG: parseEmailForm
DEBUG: Id: false HomeCharge: false ChargePay: false Stat: false Vehic
DEBUG: credentialsForm
DEBUG: ""
DEBUG: {"date":"Wed, 29 Dec 2021 16:49:09 GMT","content-length":"0","c
DEBUG: Id: false HomeCharge: false ChargePay: false Stat: false Vehic
DEBUG: Error: Invalid URI "myaudi:///#state=0037c07a-d780-4e67-96bf-2e
DEBUG: Login successful
DEBUG: START getPersonalData()
DEBUG: START getVehicles
DEBUG: getVehicles: {"userVehicles":{"vehicle":["WAUZZZxxxxxxxxxx"]}}
DEBUG: START getHomeRegion
DEBUG: Id: false HomeCharge: false ChargePay: false Stat: false Vehic
DEBUG: getHomeRegion vin[WAUZZZxxxxxxxx]: {"homeRegion":{"baseUri":
DEBUG: Set URL to: https://fal-3a.prd.eu.dp.vwg-connect.com
DEBUG: getVehicleStatus: {"destinations":null}
DEBUG: {"error":{"errorCode":"dwap.auth.forbidden","description":"The
DEBUG: {"error":{"errorCode":"RS.security.9007","description":"The ser
DEBUG: getVehicleStatus: {"timer":{"timersAndProfiles":{"timerProfileL
DEBUG: getVehicleStatus: {"climater":{"settings":{"targetTemperature":
DEBUG: getVehicleStatus: {"charger":{"settings":{"maxChargeCurrent":{"
DEBUG: getVehicleStatus: {"findCarResponse":{"Position":{"timestampCar
DEBUG: {"vehicleDataDetail":{"systemId":"XID_APP_AUDI","requestId":"MS
DEBUG: getVehicleStatus: {"StoredVehicleDataResponse":{"vin":"WAUZZZxx
DEBUG: [{"dataId":"0x0101010001","fieldIds":[{"id":"0x0101010001"}]},{
DEBUG: Id: false HomeCharge: false ChargePay: false Stat: false Vehic
DEBUG: Id: false HomeCharge: false ChargePay: false Stat: false Vehic
DEBUG: Id: false HomeCharge: false ChargePay: false Stat: false Vehic

@vheat
Copy link

vheat commented Dec 29, 2021

After removing the checks for the finished, now I get to the SOC print, which fails due to missing data. Looks the "Audi path" does not fill all items.

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

4 participants