zivillian / ora2mqtt

GWM ORA Funky Cat to MQTT Bridge
14 stars 2 forks source link

Error 500 #19

Closed SvenAbels closed 3 months ago

SvenAbels commented 5 months ago

Since about 2 days I get an error 500 in the logs and the programm terminates:

Access token expired (Login Token has expired). Trying to refresh token...
System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at libgwmapi.GwmApiClient.GetResponseAsync[T](HttpResponseMessage response, CancellationToken cancellationToken) in /app/libgwmapi/GwmApiClient.cs:line 116
   at libgwmapi.GwmApiClient.PostH5Async[TIn,TOut](String url, TIn body, CancellationToken cancellationToken) in /app/libgwmapi/GwmApiClient.cs:line 92
   at ora2mqtt.RunCommand.RefreshTokenAsync(GwmApiClient client, Ora2MqttOptions options, CancellationToken cancellationToken) in /app/ora2mqtt/RunCommand.cs:line 102
   at ora2mqtt.RunCommand.Run(CancellationToken cancellationToken) in /app/ora2mqtt/RunCommand.cs:line 40
   at Program.<Main>$(String[] args) in /app/ora2mqtt/Program.cs:line 23

Does anyone have the same error?

zivillian commented 5 months ago

I had the same error a few weeks ago and the only way I found to fix this was to create new tokens by running configure again and logging in using the email and code.

daemonenstall commented 3 months ago

I also had this error and running configure again fixed it. Today it happened again, but now it's not working anymore. Any ideas?

System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at libgwmapi.GwmApiClient.GetResponseAsync[T](HttpResponseMessage response, CancellationToken cancellationToken) in /home/runner/work/ora2mqtt/ora2mqtt/libgwmapi/GwmApiClient.cs:line 116
   at libgwmapi.GwmApiClient.PostH5Async[TIn,TOut](String url, TIn body, CancellationToken cancellationToken) in /home/runner/work/ora2mqtt/ora2mqtt/libgwmapi/GwmApiClient.cs:line 92
   at ora2mqtt.ConfigureCommand.LoginAsync(GwmApiClient client, Ora2MqttOptions options, CancellationToken cancellationToken) in /home/runner/work/ora2mqtt/ora2mqtt/ora2mqtt/ConfigureCommand.cs:line 110
   at ora2mqtt.ConfigureCommand.Run(CancellationToken cancellationToken) in /home/runner/work/ora2mqtt/ora2mqtt/ora2mqtt/ConfigureCommand.cs:line 41
   at Program.<Main>$(String[] args) in /home/runner/work/ora2mqtt/ora2mqtt/ora2mqtt/Program.cs:line 23
cram-89 commented 3 months ago

@zivillian auch mit der neuen v0.0.3 bekomme ich bei der win64 Version weiterhin den 500 Fehler nach E-Mail- und Passwort-Eingabe

holger1414 commented 3 months ago

The same error here.

Kontakt cram-89 @.***>) kirjutas kuupäeval T, 6. august 2024 kell 21:57:

@zivillian https://github.com/zivillian auch mit der neuen v0.0.3 bekomme ich bei der win64 Version weiterhin den 500 Fehler nach E-Mail- und Passwort-Eingabe

— Reply to this email directly, view it on GitHub https://github.com/zivillian/ora2mqtt/issues/19#issuecomment-2271943181, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATVFNVENACG7K54PCLFZHRLZQEMA7AVCNFSM6AAAAABJJ7IFSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZRHE2DGMJYGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

zivillian commented 3 months ago

can you try the binaries from #22?

daemonenstall commented 3 months ago

I have just tried the fresh binaries and error 500 is gone. Mille grazie :)

gratefulUser1 commented 3 months ago

So do you get the SOC and range values again in MQTT? For me,I still have the issue, that even the My GWM app does not show these values ...

EDIT: @zivillian: Thx for fixing the two issues. I never had the Error 500 so far, but nevertheless I don't get the SOC and range values anymore. But as I said, it's not in the HTML response and also not in the app so I suppose there is an issue on the server or vehicle side. The app says, the last update received from vehicle side was on 29th of July ...

Here is what I get in MQTT, which totally corresponds to the HTML/JSON response:

GWM/VID/status/AcquisitionTime 1722271899000
GWM/VID/status/UpdateTime 1722272795888
GWM/VID/status/Latitude XXX
GWM/VID/status/Longitude XXX
GWM/VID/status/items/2310001/value 1
GWM/VID/status/items/2310001/unit (null)
GWM/VID/status/items/2042082/value 0
GWM/VID/status/items/2013023/value 0
holger1414 commented 3 months ago

Everything working very well. Thank you!

daemonenstall commented 3 months ago

Everything is working.