flobz / psa_car_controller

Control psa car with connected_car v4 API.
GNU General Public License v3.0
391 stars 199 forks source link

position empty #371

Closed robotfishe closed 2 years ago

robotfishe commented 2 years ago

Trying to migrate from Tronity API over to your code so I can run my own server for this info instead of paying Tronity to use theirs.

Tronity gives me accurate position data, but psa_car_controller doesn't. Here's the data I get from :5000/getvehicleinfo/VIN:

{"embedded": null, "links": {"_self": {"deprecation": null, "href": "https://api.groupe-psa.com/connectedcar/v4/user/vehicles/VEHICLE ID/status", "hreflang": null, "name": null, "profile": null, "templated": null, "title": null, "type": null}, "vehicle": null}, "battery": {"current": 0.0, "voltage": 96.0}, "doors_state": null, "energy": [{"updated_at": "2022-05-24 22:48:15+00:00", "autonomy": 310.0, "battery": null, "charging": {"charging_mode": "No", "charging_rate": 0, "next_delayed_time": "PT1M", "plugged": false, "remaining_time": null, "status": "Disconnected"}, "consumption": null, "level": 93.0, "residual": null, "type": "Electric"}], "environment": null, "ignition": null, "kinetic": {"acceleration": null, "moving": null, "pace": null, "speed": null}, "last_position": {"type": "Feature", "geometry": {"coordinates": [null, null, null], "type": "Point"}, "properties": {"heading": null, "signal_quality": null, "type": null, "updated_at": null}}, "preconditionning": {"air_conditioning": {"failure_cause": null, "programs": null, "status": "Disabled", "updated_at": "2022-05-24 22:48:15+00:00"}}, "privacy": {"state": "None"}, "safety": null, "service": {"type": "Electric", "updated_at": "2022-05-24 22:48:15+00:00"}, "timed_odometer": {"updated_at": null, "mileage": 412.4}}

Everything is as expected and correct/matches what's in the Vauxhall app, except the last position being all "null".

The command I'm running to start the server is:

python3 psa_car_controller -f config.json -r -l 0.0.0.0 -d

Car is a Vauxhall Mokka-E.

dreimer1986 commented 2 years ago

https://github.com/flobz/psa_car_controller/issues/50

robotfishe commented 2 years ago

I did read that thread before posting and my issue is not the same. In my case, unlike as discussed there, Tronity is able to read the location from the PSA API and report it. That means the problem can't be with the PSA API. Could you please reopen this issue?