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

Return status if on error #264

Open
cheick66 opened this issue Sep 12, 2023 · 5 comments
Open

Return status if on error #264

cheick66 opened this issue Sep 12, 2023 · 5 comments

Comments

@cheick66
Copy link

Dear all,
would it be possible to get a return code back, if the connection to Kia is failing?
For example, if the maximum ammount if logins per day is achieved there is a smale message "error" inside of node-red,
but no payload.
Or is it maybe possible to catch these messages bei node-red and send it out?

Best regards
Christian

@Hacksore
Copy link
Owner

Indeed would be nice to have the error code from the API. hopefully someone has time to work on a PR 😅

@cheick66
Copy link
Author

Okay,
You are only doing the node-red implementation or can you route this request to bluelinky?

@Hacksore
Copy link
Owner

@cheick66 this is the bluelinky repo, I will review if someone sends a pull request.

@cheick66
Copy link
Author

Do I have to do something on that? What is a pull request?

@PierreLevres
Copy link
Contributor

PierreLevres commented Sep 17, 2023

Dear all, would it be possible to get a return code back, if the connection to Kia is failing? For example, if the maximum ammount if logins per day is achieved there is a smale message "error" inside of node-red, but no payload. Or is it maybe possible to catch these messages bei node-red and send it out?

For example yesterday evening:

2023/09/16 21:49:39 DEBUG Cached status because of timer
2023/09/16 21:49:39 INFO  Error requesting cached status  ManagedBluelinkyError: @EuropeVehicle.fullStatus: [401] Unauthorized on [GET] https://prd.eu-ccapi.kia.com:8080/api/v2/spa/vehicles/*****/status/latest - {"retCode":"F","resCode":"4017","resMsg":"Invalid request value - Invalid Application Id. - -15254044017.197","msgId":"10f8d270-4b92-46c4-9744-78d382ed77ce"}  
2023/09/16 21:49:39 DEBUG Logon after a faulty status

In my node-red flows after a call to a bluelinky I check the output (in this example i check of the key odometer is set in the output), and if it is not, I need to do something.
image
In my case i just trap the error and do a re-logon, and log a bunch of stuff to a log-file.
image

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

3 participants