Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos
MIT License
127 stars 25 forks source link

Battery level and others stopped reporting? #120

Closed chrismelba closed 7 months ago

chrismelba commented 8 months ago

Describe the bug A clear and concise description of what the bug is.

The addon is running, some information such as odo and average speed is working, but the bulk of info including battery %, distance to service and door states are not being scraped

To Reproduce:
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior:
A clear and concise description of what you expected to happen.

Screenshots:
If applicable, add screenshots to help explain your problem.

Version info:
The version you are using and the method you are using (Docker container/HA Addon/Cloned repo)

Haos Latest haos.

Logs:
Enable the debug option and upload your logfile here.
If you are using the HA Addon the log location is \\<Your HA Host IP>\addons\volvo2mqtt\log\volvo2mqtt.log

chrismelba commented 8 months ago

Hmmm, so the entire cell network in Australia is out. It's probably related to that. Closing

chrismelba commented 8 months ago

reopening because the car is back online, but things still arent' reporting.

I'm too stupid to copy the logs from nano, but it's successfully calling connected vehicle on:

odometer statistics diagnostics

But it doesn't seem to even be attempting to call the energy API? There are no auth failures I can see anywhere.

chrismelba commented 8 months ago

Found the logs.. As you can see, things seem to be running successfully, but there is no mention of EV battery% in anything returned

Nov 08 19:48:42 volvo2mqtt [106] - INFO: Sending mqtt update... Nov 08 19:48:42 volvo2mqtt [106] - DEBUG: Starting GET call against https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/odometer Nov 08 19:48:42 volvo2mqtt [106] - DEBUG: Response status code: 200 Nov 08 19:48:42 volvo2mqtt [106] - DEBUG: { "data" : { "odometer" : { "value" : 9940, "unit" : "km", "timestamp" : "2023-11-08T02:50:49.784Z" } } } Nov 08 19:48:42 volvo2mqtt [106] - DEBUG: Starting GET call against https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/statistics Nov 08 19:48:43 volvo2mqtt [106] - DEBUG: Response status code: 200 Nov 08 19:48:43 volvo2mqtt [106] - DEBUG: { "data" : { "averageFuelConsumption" : { "value" : 0.0, "unit" : "L/100km", "timestamp" : "2023-11-08T02:50:49.784Z" }, "averageSpeed" : { "value" : 75, "unit" : "km/h", "timestamp" : "2023-11-08T02:50:49.784Z" }, "tripMeterManual" : { "value" : 583.0, "unit" : "km", "timestamp" : "2023-11-08T02:50:49.784Z" }, "tripMeterAutomatic" : { "value" : 39.1, "unit" : "km", "timestamp" : "2023-11-08T02:50:49.784Z" }, "distanceToEmpty" : { "value" : 0, "unit" : "km", "timestamp" : "2023-11-08T02:50:49.784Z" } } } Nov 08 19:48:43 volvo2mqtt [106] - DEBUG: Starting GET call against https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/diagnostics Nov 08 19:48:43 volvo2mqtt [106] - DEBUG: Response status code: 200 Nov 08 19:48:43 volvo2mqtt [106] - DEBUG: { "data" : { "serviceWarning" : { "value" : "NO_WARNING", "timestamp" : "2023-11-08T02:50:49.784Z" }, "serviceTrigger" : { "value" : "", "timestamp" : "2023-11-08T02:50:49.784Z" }, "engineHoursToService" : { "value" : 1055, "unit" : "h", "timestamp" : "2023-11-08T02:50:49.784Z" }, "distanceToService" : { "value" : 20076, "unit" : "km", "timestamp" : "2023-11-08T02:50:49.784Z" }, "washerFluidLevelWarning" : { "value" : "NO_WARNING", "timestamp" : "2023-11-08T02:50:49.784Z" }, "timeToService" : { "value" : 16, "unit" : "months", "timestamp" : "2023-11-08T02:50:49.784Z" } } } Nov 08 19:48:43 volvo2mqtt [106] - INFO: Mqtt update done. Next run in 300 seconds.

Dielee commented 8 months ago

This is the same as #115 and #117.. we have to wait until Volvo fixes the API.

jasonatepaint commented 7 months ago

This just started for me too. Didn't realize it until I plugged in and noticed the SOC was not changing.

Does the Volvo app use a different API? Because the phone app seems to be working correctly.

I see this issue is marked can't fix for now. If there is any debug/testing you'd like, please let me know and I can provide logs/etc.... but sounds like it's a waiting game on Volvo.

On a side note, thank you for building this integration... way better experience than using the actual Volvo app. :-)

Dielee commented 7 months ago

Yes, unfortunately the app is using another API. I tried to intercept the connection between the app and the Volvo servers, but without success. If you are able to do so, this would be very nice. If not, we have to wait....

chrismelba commented 7 months ago

Well if things are that broken then hopefully someone actually fixes it. I was worried that they were just deliberately limiting access

On Thu, 9 Nov 2023 at 11:47, walts22 @.***> wrote:

Same here.

Something really wrong at Volvo's end! I can't even log onto the Volvo Developer site anymore.

— Reply to this email directly, view it on GitHub https://github.com/Dielee/volvo2mqtt/issues/120#issuecomment-1802989380, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHW5SLRTC7M27Y7ZWWJSJDYDQR3DAVCNFSM6AAAAAA7B63JESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBSHE4DSMZYGA . You are receiving this because you modified the open/close state.Message ID: @.***>

walts22 commented 7 months ago

Well if things are that broken then hopefully someone actually fixes it. I was worried that they were just deliberately limiting access

I was in the same boat yesterday, thinking it was an Optus network issue.

But definitely looks like Volvo's end. Hopefully they don't cancel the API access entirely and it comes back online soon.

thomasddn commented 7 months ago

EDIT: The issue I'm having is #121

~I noticed that this app is using v2 of the Volvo Connected API, which is in beta. On Volvo's developer portal I see that the current version is v1 and that v2 is actual in beta.~

~> There is a beta version of this API with new functionality. Download version 2 here.~

~That is probably why the API is down once in a while. When using v1 in Postman, I can get all information needed.~

~Btw, battery levels etc for the Volvo Recharge are still working fine in my case, since that is using v1 of the Volvo Energy API.~

eduspina commented 7 months ago

Yes, unfortunately the app is using another API. I tried to intercept the connection between the app and the Volvo servers, but without success. If you are able to do so, this would be very nice. If not, we have to wait....

If this is helpful, those are the domains resolved when I opened the app (here in Brazil the HA add-on stopped working yesterday): volvoid.eu.volvocars.com cnepmob.volvocars.com cepmob.eu.prod.c3.volvocars.com cepmobsig.eu.c3.volvocars.com

Dielee commented 7 months ago

I noticed that this app is using v2 of the Volvo Connected API, which is in beta. On Volvo's developer portal I see that the current version is v1 and that v2 is actual in beta.

There is a beta version of this API with new functionality. Download version 2 here.

That is probably why the API is down once in a while. When using v1 in Postman, I can get all information needed.

Btw, battery levels etc for the Volvo Recharge are still working fine in my case, since that is using v1 of the Volvo Energy API.

Not completely right. The mentioned battery state and charging state isn't working over the connected API, so there isn't a beta endpoint available. This works over the energy endpoint.

igregorysky commented 7 months ago

I noticed that the URL for the battery state in const.py uses the v2 connected vehicle API. However, the OpenAPI spec doc for the v2 connected vehicle API doesn't include an endpoint for battery charge state. (it's linked part way down this page)

Should this be switched to the v1 API?

chrismelba commented 7 months ago

Is there any way i can change this locally to test?

On Fri, 10 Nov 2023 at 03:51, igregorysky @.***> wrote:

I noticed that the URL for the battery state in const.py https://github.com/Dielee/volvo2mqtt/blob/d7a79f84a41e0c1f2a03c7b27e7c57b449703947/src/const.py#L19 uses the v2 connected vehicle API. However, the OpenAPI spec doc for the v2 connected vehicle API doesn't include an endpoint for battery charge state. (it's linked part way down this page https://developer.volvocars.com/apis/connected-vehicle/v1/specification/ )

Should this be switched to the v1 API?

— Reply to this email directly, view it on GitHub https://github.com/Dielee/volvo2mqtt/issues/120#issuecomment-1804194673, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHW5SPSQJAR4WG5JEFOATLYDUCY7AVCNFSM6AAAAAA7B63JESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBUGE4TINRXGM . You are receiving this because you modified the open/close state.Message ID: @.***>

macjuju commented 7 months ago

Okay. my setup did not work well after Nov 8. Upgrade to v1.8.9 make some Windows/Engine Status back.

But still Current Battery was absent, still.

MY24 at Hong Kong, Asia

albatorsk commented 7 months ago

Wouldn't it be possible to add a fallback to the v1 API for Battery Charge Level? The Energy API seems to not work for a lot of people, judging by the messages here and in the HA forums.

Dielee commented 7 months ago

Wouldn't it be possible to add a fallback to the v1 API for Battery Charge Level? The Energy API seems to not work for a lot of people, judging by the messages here and in the HA forums.

Not without massive changes, as the responses from V2 are different from V1.

albatorsk commented 7 months ago

Ok, I understand. I have found that combining your add-on with https://github.com/fars-fede-fire/volvoaaos gives me back the functionality I was missing.

Dielee commented 7 months ago

Wouldn't it be possible to add a fallback to the v1 API for Battery Charge Level? The Energy API seems to not work for a lot of people, judging by the messages here and in the HA forums.

I changed the battery level sensor, and only the battery level sensor, back to v1! Please try v1.8.11.

albatorsk commented 7 months ago

I changed the battery level sensor, and only the battery level sensor, back to v1! Please try v1.8.11.

Thank you, it works perfectly. Thanks for all you hard work on this add-on.

I really hope Volvo will allow more cars to work with their Energy API before disabling the v1 API, which I would assume will happen when the v2 API is stable.

macjuju commented 7 months ago

Ok, I understand. I have found that combining your add-on with https://github.com/fars-fede-fire/volvoaaos gives me back the functionality I was missing.

Lucky you! For my case i tried to install that via HACS and seems that aaos addon could pop up my VIN successfully. But it did not work further. :-(

Dielee commented 7 months ago

Ok, I understand. I have found that combining your add-on with https://github.com/fars-fede-fire/volvoaaos gives me back the functionality I was missing.

Lucky you! For my case i tried to install that via HACS and seems that aaos addon could pop up my VIN successfully. But it did not work further. :-(

Please do not hijack this thread for other components, thanks!

chrismelba commented 7 months ago

Thank you so much! Fixed my battery % which is the main thing I use this for. Your hard work is very much appreciated

On Fri, 10 Nov 2023 at 7:38 pm, Linus Dietz @.***> wrote:

Ok, I understand. I have found that combining your add-on with https://github.com/fars-fede-fire/volvoaaos gives me back the functionality I was missing.

Lucky you! For my case i tried to install that via HACS and seems that aaos addon could pop up my VIN successfully. But it did not work further. :-(

Please do not hijack this thread for other components, thanks!

— Reply to this email directly, view it on GitHub https://github.com/Dielee/volvo2mqtt/issues/120#issuecomment-1805311478, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHW5SNVDEDC5NLZRWVI5TDYDXRWZAVCNFSM6AAAAAA7B63JESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBVGMYTCNBXHA . You are receiving this because you modified the open/close state.Message ID: @.***>

Dielee commented 7 months ago

Issue solved ? Ticked can be closed ?

chrismelba commented 7 months ago

Yes thank you. Closing now