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

Returning HTTP status 201 Created is considered as an error by EVCC tesla client #19

Closed
FraBoCH opened this issue Jun 30, 2024 · 2 comments

Comments

@FraBoCH
Copy link

FraBoCH commented Jun 30, 2024

I-m experiencing another issue when using this proxy with evcc standard tesla client (see evcc-io/evcc#14616).

It looks like the proxy is returning HTTP status 201 created to every command which is considered as an error by EVCC which logs are thus filled with errors like [lp-1 ] ERROR 2024/06/30 22:21:37 max charge current 1A: 201 Created.

Strangely enough, this doesn’t happen when using a custom vehicle.

Anyway, I strongly suggest simply returning the classic http statut « 200 OK ».

Waiting for a new release to continue testing ;-) Looks like we are almost there!

@wimaha
Copy link
Owner

wimaha commented Jun 30, 2024

ok ... fully correct would be http status 202 😉
For now I changed the status code to 200 to match the Tesla API. But I think the implementation in evcc is not correct. Instead of the http status code the bool value in Result should be used.

Fixed with 1.0.5 (#20)

@wimaha wimaha closed this as completed Jun 30, 2024
@FraBoCH
Copy link
Author

FraBoCH commented Jul 1, 2024

I agree with 202, but I will let you play to see if evcc like it too or not ;-)
Anyway I confirm everything now works flawlessly with evcc nightly now. Nice !

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

2 participants