MartinGris / node-red-contrib-skoda-connect

Simple Node-RED node for interacting with Skoda connect
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Skoda Enyaq iV not working #6

Closed foorschtbar closed 2 years ago

foorschtbar commented 2 years ago

Hey, i got this two erros with my Enyaq iV:

"TypeError: Cannot read property 'vehicle' of null"

"Not able to find vehicle, did you choose the correct type?."

MartinGris commented 2 years ago

Hi. Do you have a detailed exception with the line of code out of the nodered log?

With this information I just can guess. Is your car shown in the MySkoda app?

foorschtbar commented 2 years ago

How stupid of me, of course you need the nodered log, sorry for that.

Yes the Skoda Connect Website and MySkoda App works. tronity.io also.

nodered     | getVehicles
nodered     | 6 Oct 12:04:22 - [error] [skoda-get:Skoda Connect] Not able to find vehicle, did you choose the correct type?.
nodered     | 6 Oct 12:04:22 - [error] [skoda-get:Skoda Connect] TypeError: Cannot read property 'vehicle' of null
nodered     | TypeError: Cannot read property 'vehicle' of null
nodered     |     at Request._callback (/data/node_modules/node-red-contrib-skoda-connect/lib/skoda-library.js:883:60)
nodered     |     at Request.self.callback (/data/node_modules/request/request.js:185:22)
nodered     |     at Request.emit (events.js:400:28)
nodered     |     at Request.<anonymous> (/data/node_modules/request/request.js:1154:10)
nodered     |     at Request.emit (events.js:400:28)
nodered     |     at Gunzip.<anonymous> (/data/node_modules/request/request.js:1076:12)
nodered     |     at Object.onceWrapper (events.js:519:28)
nodered     |     at Gunzip.emit (events.js:400:28)
nodered     |     at endReadableNT (internal/streams/readable.js:1317:12)
nodered     |     at processTicksAndRejections (internal/process/task_queues.js:82:21)
MartinGris commented 2 years ago

Thanks. The request for getting all VINs of the cars in your Skoda account returns an empty list. The error handling in this case is bad, sorry.

The node is working fine for me so there must be something different in your case. This make it hard to find the issue.

I will so my best

foorschtbar commented 2 years ago

Is there anything i could do to help u?

MartinGris commented 2 years ago

you can uncomment the line 881 in lib\skoda-library.js: "console.log(JSON.stringify(body))"

Restart node red and send me what is written to the console

foorschtbar commented 2 years ago
nodered     | parseEmailForm
nodered     | parsePasswordForm
nodered     | Error: Invalid protocol: skodaconnect:
nodered     |     at Request.init (/data/node_modules/request/request.js:458:31)
nodered     |     at Redirect.onResponse (/data/node_modules/request/lib/redirect.js:149:11)
nodered     |     at Request.onRequestResponse (/data/node_modules/request/request.js:986:22)
nodered     |     at ClientRequest.emit (events.js:400:28)
nodered     |     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27)
nodered     |     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
nodered     |     at TLSSocket.socketOnData (_http_client.js:515:22)
nodered     |     at TLSSocket.emit (events.js:400:28)
nodered     |     at addChunk (internal/streams/readable.js:290:12)
nodered     |     at readableAddChunk (internal/streams/readable.js:265:9)
nodered     |     at TLSSocket.Readable.push (internal/streams/readable.js:204:10)
nodered     |     at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
nodered     | getPersonalData
nodered     | getVehicles
nodered     | {"userVehicles":null}
nodered     | 7 Oct 20:07:07 - [error] [skoda-get:Skoda Connect] Not able to find vehicle, did you choose the correct type?.
nodered     | 7 Oct 20:07:07 - [error] [skoda-get:Skoda Connect] TypeError: Cannot read property 'vehicle' of null
nodered     | TypeError: Cannot read property 'vehicle' of null
nodered     |     at Request._callback (/data/node_modules/node-red-contrib-skoda-connect/lib/skoda-library.js:883:60)
nodered     |     at Request.self.callback (/data/node_modules/request/request.js:185:22)
nodered     |     at Request.emit (events.js:400:28)
nodered     |     at Request.<anonymous> (/data/node_modules/request/request.js:1154:10)
nodered     |     at Request.emit (events.js:400:28)
nodered     |     at Gunzip.<anonymous> (/data/node_modules/request/request.js:1076:12)
nodered     |     at Object.onceWrapper (events.js:519:28)
nodered     |     at Gunzip.emit (events.js:400:28)
nodered     |     at endReadableNT (internal/streams/readable.js:1317:12)
nodered     |     at processTicksAndRejections (internal/process/task_queues.js:82:21)
MartinGris commented 2 years ago

Thanks! There is another known exception before the one you described. Have you installed the latest version of the node? At least version 1.2.10?

foorschtbar commented 2 years ago

Yes, i was on 1.2.10. Now i updated to 1.2.11 end enabled all debug outputs:

nodered     | parseEmailForm
nodered     | parsePasswordForm
nodered     | ""
nodered     | Error: Invalid protocol: skodaconnect:
nodered     |     at Request.init (/data/node_modules/request/request.js:458:31)
nodered     |     at Redirect.onResponse (/data/node_modules/request/lib/redirect.js:149:11)
nodered     |     at Request.onRequestResponse (/data/node_modules/request/request.js:986:22)
nodered     |     at ClientRequest.emit (events.js:400:28)
nodered     |     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27)
nodered     |     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
nodered     |     at TLSSocket.socketOnData (_http_client.js:515:22)
nodered     |     at TLSSocket.emit (events.js:400:28)
nodered     |     at addChunk (internal/streams/readable.js:290:12)
nodered     |     at readableAddChunk (internal/streams/readable.js:265:9)
nodered     |     at TLSSocket.Readable.push (internal/streams/readable.js:204:10)
nodered     |     at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
nodered     | getPersonalData
nodered     | getVehicles
nodered     | 8 Oct 15:43:42 - [error] [skoda-get:Skoda Connect] TypeError: Cannot read property 'vehicle' of null
nodered     | TypeError: Cannot read property 'vehicle' of null
nodered     |     at Request._callback (/data/node_modules/node-red-contrib-skoda-connect/lib/skoda-library.js:882:46)
nodered     |     at Request.self.callback (/data/node_modules/request/request.js:185:22)
nodered     |     at Request.emit (events.js:400:28)
nodered     |     at Request.<anonymous> (/data/node_modules/request/request.js:1154:10)
nodered     |     at Request.emit (events.js:400:28)
nodered     |     at Gunzip.<anonymous> (/data/node_modules/request/request.js:1076:12)
nodered     |     at Object.onceWrapper (events.js:519:28)
nodered     |     at Gunzip.emit (events.js:400:28)
nodered     |     at endReadableNT (internal/streams/readable.js:1317:12)
nodered     |     at processTicksAndRejections (internal/process/task_queues.js:82:21)
MartinGris commented 2 years ago

Login is working fine so i did some research. Also other projects struggled with the Enyaq and needed to do some special development to support it because there is another API only for the Enyac. I will try to develop the support for the Enyaq but in the end I will need some help by you because I don't have an Enyaq.

Would you like to support me by testing my code? I will create a development branch for it.

lourdhd commented 2 years ago

Hi, if I can help I have an enyaq too.

foorschtbar commented 2 years ago

Login is working fine so i did some research. Also other projects struggled with the Enyaq and needed to do some special development to support it because there is another API only for the Enyac.

Like this project? https://github.com/lendy007/skodaconnect

Would you like to support me by testing my code? I will create a development branch for it.

Yes, sure!

MartinGris commented 2 years ago

Thanks @lourdhd ! I appreciate that.

Like this project? https://github.com/lendy007/skodaconnect

Yes, or this one: https://github.com/TA2k/ioBroker.vw-connect

Would it be possible for one of you to give me his credentials? Otherwise the programming and testing would be time consuming. You can send me a message in Telegram

MartinGris commented 2 years ago

support for enyaq added with version 1.3.0

foorschtbar commented 2 years ago

Hey @lourdhd, is your Enyaq still working? i got a "No Login Form found. Please check your E-Mail in the app."

MartinGris commented 2 years ago

check the newest version. There was a change in the login mechanism by skoda.

9

foorschtbar commented 2 years ago

Oh sry, I only subscribed for release notifications and didn't see the update