flobz / psa_car_controller

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

"kinetic" and "last_position" fields are empty #50

Closed jlayec closed 1 year ago

jlayec commented 3 years ago

Describe the bug "kinetic" and "last_position" fields are empty in json answer of get_vehicleinfo/VIN Am I alone?

To Reproduce Steps to reproduce the behavior:

  1. what command did you use ? python3 server.py -l 0.0.0.0 --debug DEBUG
  2. when the bug append ? Everytime with get_vehicleinfo/VIN
  3. Does it persist after restarting the program? Yes

Here is the output of the API

            "type": "Fuel"
        }
    ],
    "environment": null,
    "ignition": null,
    "kinetic": null,
    "last_position": null,
    "preconditionning": {
        "air_conditioning": {
            "failure_cause": null,
            "programs": [
                {
                    "enabled": false,

I confirm that the privacy configuration in vehicle is share data and position (was not changed and was working before).

hurzhurz commented 3 years ago

For me the position was also stuck since the telemaintenance services were activated. Just for fun, I tried to toggle the privacy setting today. The result is that the API now doesn't output any information about the position or its last update. The funny thing is, now psa_car_controller seems to records trips, just without location data. I guess this is because the last update timestamp is missing and it now uses another timestamp in combination with the odometer value. Nice fallback ;)

sbauza commented 3 years ago

Facing the same problem here after deploying psa_car_controller. All works pretty fine and I can see the trips but I don't see any GPS position in the logs. Which MQTT message could provide a new location ?

CalicodesIles commented 3 years ago

Just a little update as this topic issue is quite old now. @dreimer1986 Are there any news regarding your cancellation of the "Télémaintenance" option ?

As far as I am concerned, I got my freshly updated vehicle back from the garage (update of all ECUs requested by Peugeot on a very large number of e208 to solve various problems including the regenerative brake working even at 100% charge, the air conditioning that starts randomly on "Lo", a better charging curve (real improvement) or starting problems when using fast charge ...)

Unfortunately, the GPS position is still not retrieved through the API. I called the customer service again to cancel my subscription and have a try.

Unfortunately, we can't affirm clearly that this is a global issue concerning everyone, or only some of us who have subscribed to the Telemaintenance option.

dreimer1986 commented 3 years ago

I did not cancel it yet as I was told that I need to wait for a update. I look for a update daily though... Did you cancellation fix things?

CalicodesIles commented 3 years ago

My request has been transmitted to a specific service (Connected services) so I have to wait for the moment.

I was never been able to cancel it through phone directly, they always told me that I need to ask my garage to do it because it can not be cancelled without a first alert sent by the BTA with the télémaintenance option activated.

As you, I’m waiting for their update since the end of March… My patience has its own limits for this issue running since 3 months now… :)

dreimer1986 commented 3 years ago

As this is a removal of a feature after I bought the car and this is not very legal to do after such a short period... I fully understand what you are thinking right now. If the removal of Telemaintenance does anything good, please keep us updated.

CalicodesIles commented 3 years ago

Télémaintenance option has been removed about 12 hours ago for my account. No improvement for the moment. Trips are still missing and kinetic values stay the same.

I will check again next day

dreimer1986 commented 3 years ago

Maybe some force is needed? Disabling the position tracking in Security Settings and then reenable it maybe? (No clue how this is called outside of germany, hopefully my explaination on a rough translation was good enough)

CalicodesIles commented 3 years ago

There is some improvement after applying your recommandations (I think you were talking about privacy settings in the car).

image

In the status page I don't see yet the position of the car, but as you can see the trip is now recorded on the dashboard.

image

Before these both actions (option removed + privacy settings), my car was always in "moving" attribute as true, and the last_position was stuck in one coordinate.

I will make a trip in a few hours and see if the position is recorded

hurzhurz commented 3 years ago

@CalicodesIles This is probably the same like what I got after playing with the privacy setting (https://github.com/flobz/psa_car_controller/issues/50#issuecomment-847379848)

Maybe at least one not to short trip (30 minutes?) might be necessary... and maybe also a power cycle or another short trip. At least this is how I think the activation worked.

CalicodesIles commented 3 years ago

Unfortunately there is no change after several trips. They are correctly visible in the dashboard but no GPS data (neither position nor altitude).

FYI in Tronity.io, nothing appears in the trip section.

I won’t be able to go further : my e208 internal charger got broken since yesterday so the car is in the garage for a while…

hueck2342 commented 3 years ago

Since the activation of TELEMAINTENANCE for my e-208 in Germany on 2021-06-12 the trip recording is also broken for me. Should I try to cancel/ let de-activate it? - I think I don't really need it. I was just curious to see what it can do for me.

CalicodesIles commented 3 years ago

@hueck2342 I had a new Peugeot electric car temporarily for a few days that I added to my PSA account. Kinetic information was never OK. I don’t think that it would change anything.

farcorben commented 3 years ago

i can confirm this issue too... since 29.03.2021 there are no updates on last_position values.

... "last_position":{ "type":"Feature", "geometry":{ "coordinates":[ xx.xxxxx, xx.xxxxx, xx ], "type":"Point" }, "properties":{ "heading":null, "signal_quality":9.0, "type":"Aquire", "updated_at":"2021-03-29 14:27:20+00:00" } }, ...

today i made a factory reset at Car board computer with no effect.. Privacy settings at car is are not restricted. I driving a peugeot e208.

At my PSA site there is enabled the "Real Time Traffic" and "e-Remote Control" Service. "TELEMAINTENANCE" is and was never enabled for this car.

dreimer1986 commented 3 years ago

OK, this means that they simply f*cked up the whole API then... Congrats... I wonder if this affects their Emergency call button's functionality too. This would be awesome if the press finds out.

Quite a few of the recent reports sound familiar to me too, wanna bet that their API causes these too? I talk about no wakeup working until I walk to the car and push any button on the key remote and randomly no updates anymore at all without any dropped error.

thennart commented 3 years ago

Hi, What about this: https://developer.groupe-psa.io/webapi/b2c/api-reference/specification/#operation/getCarLastPosition

We can also see references to intersting URL endpoints in the first call to https://api.groupe-psa.com/connectedcar/v4/user/vehicles

psa

Tried to make a call but understood than playing with refresh token is not a good idea ^^

flobz commented 3 years ago

After talking to Peugeot technical support. The problem probably come from a BTA update. (the BTA is a little computer in the car that send car information to psa server). It will explain why the problem didn't appear to everyone in the same time.

CalicodesIles commented 3 years ago

Are you personally concerned by this with your own car @flobz ?

As this issue appeared since March, did they announce that a solution was on its way ?

Thank you.

flobz commented 3 years ago

Yes I have the same problem. Unfortunately not but I will keep calling them until they solve the problem.

CalicodesIles commented 3 years ago

Well there is something illogical with this information coming from PSA technical support.

I’m absolutely sure that trip information was recorded in MyPeugeot app the last year when everything was working correctly (start position, regular GPS position during trip and end position). We were able to zoom on the map and define almost precisely where we went on the road.

Now, if you have a look into your trip history even before the issue began, all these GPS information have disappeared.

hurzhurz commented 3 years ago

Maybe there are news?: https://www.goingelectric.de/forum/viewtopic.php?p=1668429#p1668429

For TRONITY you can supposedly now write an email to the support if you don't get any position data. They will then somehow switch you to some new API.

Any idea what this is about?

flobz commented 3 years ago

That's a good news If we can have the new API... A Tronity.io user can ask them if they can share the API endpoint? Because PSA doesn't respond to me...

xammmue commented 3 years ago

Even though I really hope this is possible, I doubt that PSA will give us access to that API that easily.

It most likely needs to get paid but I am looking forward to what the response will be

flobz commented 3 years ago

Even though I really hope this is possible, I doubt that PSA will give us access to that API that easily.

It most likely needs to get paid but I am looking forward to what the response will be

In the smartphone app we should be able to locate our car. So one day or another, PSA should fix the old API or use the new one. In both case it will be free for us.

CalicodesIles commented 3 years ago

I was in contact with the support team since the beginning of this issue, I confirm that Tronity.io have the solution : I just received my first trip recorded since it was down in March.

They only told me that “they are testing a new API.”

I received 3 times per minute :

It seems to get the same information as before.

I will update this post tomorrow when I will use the car, and @flobz I just sent an email to Tronity asking for this information. I’m not sure that they will be able to answer freely this question as I know that they have a contract with PSA.

EDIT 01/09 : Just got a reply from Tronity.io : “ => This is not a public API. We will be charged from PSA for using this API.”

xammmue commented 3 years ago

In the smartphone app we should be able to locate our car. So one day or another, PSA should fix the old API or use the new one. In both case it will be free for us.

Isn't the app getting the position via Bluetooth? It still show my car at the correct spot from time to time, just as before the APIs position stopped working

dreimer1986 commented 3 years ago

The app got an update this week for me. I am on 1.31.1 now. Maybe the new app already has some interesting information for you @flobz ?

flobz commented 3 years ago

Nothing in the code... :'(

dreimer1986 commented 3 years ago

Almost expected that as I still have no car parking spots in there. Sidenote regarding "Because PSA doesn't respond to me...": Same here. I have two tickets open. One opened by myself and one by my car dealer. Both are on dead silence mode. My dealer even told me that it's no surprise for her that my ticket is still quite untouched/ignored, almost like that's the normal way to go. So you are not alone.

kurim commented 3 years ago

I also get in touch with Tronity.io, based on available APIs and the fact that they have to pay for it. I suspect that they use the B2B Fleet API to get the Data from PSA/Stellantis

flobz commented 3 years ago

In other word if you pay they give you a solution... Please feel free to say your piece here : https://github.com/GroupePSA/groupepsa.github.io/issues/72 PSA doesn't care about their customers so much that they doesn't take the time to answer us! 😡

kurim commented 3 years ago

Based on PSA API info the B2B Fleet API is already alive, so i think this is the only way tronity can get the data. And yes the support from PSA or Sub Company Opel is quite bad, the hotline is dont speak nativ, and just send "default" mails or tell me every time about the app~ yeah we must forward it to PSA France...

dreimer1986 commented 3 years ago

Why do I think that the B2B API is company locked by whatever login method they decided to add there for every paying customer? Anyways.... Please prove otherwise, I would be very happy proven wrong here ^^ (If thats the API Tronity uses at all.)

One new thing from my side. There are some free updates for my e208 for example and I think all cars on the same platform, like the Corsa. I got them installed by my garage today. No clue what they changed at all as I did not notice any difference yet, but OF COURSE they do not fix our lil flaw here... So If they get in contact with someone in here, sure, let them install the new stuff, but don't expect a fix here...

kurim commented 3 years ago

So my tronity also works now, after switching and contact them again. I also got the confirmation that they use the PSA B2B API

kurim commented 2 years ago

@flobz notice: the Opel App got an update again 1.32.0 now it supports send routs to car, may be there is now something new interesting stuff in it for you

Notice: ok only for iOS...

maivorbim commented 2 years ago

@flobz notice: the Opel App got an update again 1.32.0 now it supports send routs to car, may be there is now something new interesting stuff in it for you

Notice: ok only for iOS...

Also for Android here: https://apkcombo.com/fr/mypeugeot-app/com.psa.mym.mypeugeot/

Dario82 commented 2 years ago

@flobz

After your latest version I can view this: ,2021-09-21 15:16:09,977 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VIN b' [CUT] {"heading":999.9999,"latitude":99.9999,"longitude":99.9999,"speed":0,"valid_hdg":true,"valid_lat":true,"valid_lng":true,"valid_spd":true} [CUT] '

That is the real position! From mqtt the gps position is updated!!! But I received my freezed position when I've called your service.

Can you check this?? Thank you.

flobz commented 2 years ago

That's good news! Did you had the issue before? Do you use trionity? For me the issue is still there.

Dario82 commented 2 years ago

Yes, my GPS position is freezed from july. I've updated the psa_car_controller docker image. I've checked that the GPS data in mqtt response is the real data. Bit, if I call your JSON service I have a freezed data.

Can you validate my descover and, if is it ok, Can you get position data for the service from mqtt?

I never used Tronity.

flobz commented 2 years ago

Okay, maybe the BTA in your car got an update... I will wait that to receive possition on mqtt to update the app because otherwise I can't test it. I hope to get have this update soon !

Dario82 commented 2 years ago

Nothing... :( My gps data is freezed, again!

flobz commented 2 years ago

I got some sad update from PSA developer : https://github.com/GroupePSA/groupepsa.github.io/issues/72

dreimer1986 commented 2 years ago

So they wanna stay in their bubble of 90s car manufacturers who fear modern technology? Very sad...

kurim commented 2 years ago

Yes...

The whole system disgne is totaly retro... You have parts in car only the garage can be updated, and will not be done by FOTA for the 10 control units not just controlled by a singe computer system, another thing I don't understand is why the cars only have 2G+3G and not for 4G for example in Germany 3G is turned off so every connected car use 2G/GSM.

Also many Corsa-e get broken by updating...

maivorbim commented 2 years ago

The only way to convince them to reenable location data is to express your dissatisfaction on the topic Flobz mentioned above https://github.com/GroupePSA/groupepsa.github.io/issues/72 If enough people gather together they might change their view.

dreimer1986 commented 2 years ago

All for it, but keep things civil please. We don't wanna cause more trouble than it might help. As you already might have seen, I already tried to do it in a disappoined, but with some remnants of respect left, way.

EDIT: Respect vanished after I re-read the issue. It's just disappointment with a slice of anger now.

aleblack commented 2 years ago

Somehow the 'Last Position' is now updating for me. I suppose it have something to do with the activation of the "Free2Move" services (I've received one year for free).

Now I can even see the car position in ABRP, although the position it's updated once in a while.

dreimer1986 commented 2 years ago

Hm, interesting. Sadly I did not find a code to get things for free, so I patiently wait for more reports ^^

washcroft commented 2 years ago

"Free2Move" services

Somehow the 'Last Position' is now updating for me. I suppose it have something to do with the activation of the "Free2Move" services (I've received one year for free).

Now I can even see the car position in ABRP, although the position it's updated once in a while.

What is Free2Move?

aleblack commented 2 years ago

What is Free2Move?

PSA service for renting a car or charging your car