New binding for Groupe PSA (Peugeot, Citroen, DS, Opel, Vauxhall) cars

How did you add the car? Via automatic scan? If manually, you need a long web api vehicle identification string, not your license plate or VIN.

I added the car via automatic scan.

thanks - yes that works, excellent great work!

I can see that quite a few of the channels are not yet getting data from the connection. Is this a problem with the binding or are you expecting Peugeot to add these later?

It could be that it is different for different car models. I am not certain. Which channels are you missing?

@Rickytr Strange. I don’t know like this, perhaps if you can provide the logs, maybe I can get some clues from it. (via PM, welcome to replace privacy sensitive info, but make certain to use a unique replacement when you replace something, like XX1XX, XX2XX, etc)

@arjanmels Could you please check if the PSA API has been changed in any way? I keep getting the error message “Rest call failed: statusCode=-1, message=Unable to authenticate: Client service is closed” However, it seems like everything gets updated anyway. Only the location data doesn’t.

There might be a problem with the API, as many Opel and Peugeot users write that even the official apps are not working properly at the moment.

Update: I have tried getting the car’s position via the API. I get a 40400 response: “Not Found: Position not found”

This does not seem to work with latest 3.0.1 openhab version. Can you please check? I added it into the addons folder but it is not recognized.

Yeah I also noticed that. Since I’m still waiting for my car I didn’t bother to investigate further but it seems to be related to this report:

@arjanmels could you please check and build a new version with latest openhab version?

I compiled new versions. Both for OH2 and OH3: Release v1.4.0 of Groupe PSA (Opel, Peugeot, Citroen, DS and Vauxhall) binding · arjanmels/openhab2-addons (github.com)

They contain some small bug fixes.

I notice that the lastPosition is often empty. Do other have experience with this?
(The position in the MyOpel app is also not correct, so I assume it is a problem at PSA side, not in my binding, but would like feedback).

Hi,
thanks for the Binding!! :smiley:

I used the latest v1.4.0 for an OH3.2.0M1 Installation.
I get the following log:
psa.log (20.3 KB)

I think I can’t log in!?
In the IOS App the same credentials are working. I’m using the Citroen tab.

Thanks for your suggestions and help!

br. Christian

Hi,

I have set the selector in the bridge to Citroen but the authentication is sent to idpcvs.opel.com!

2021-08-16 14:00:23.286 [ERROR] [oauth2client.internal.OAuthConnector] - grant type refresh_token to URL https://idpcvs.opel.com/am/oauth2/access_token failed with error code invalid_grant, description grant is invalid

br. Christian

Thanks for this addon Arjan.
So far it is working with my car.

But there is one thing that I don’t understand but that is probably caused by PSA: e.g the battery of the car is at 25%, both MyPeugeot app and openhab show that. Now I start charging. When I look at Mypeugeot and openhab hours later, they still show 25%. Only when I press the little reload icon in MyPeugeot it shows an updated SoC. The interesting thing is that now the addon will get the correct value from PSAs API.

Seems like car/app is only sending current data to PSA servers when I do something in the app. That’s not what I would expect from a “connected car”.

Can others confirm this behaviour?

Yes, it is definitely like that. A “refresh” is lacking in PSA’s API, and the app does something outside of the API to trigger it. I’m afraid we just have to wait until PSA finally releases its full API.

@emerich Thanks for catching this; this is a bug.

I fixed it, please see updated version at: Release v1.5.0 of Groupe PSA (Opel, Peugeot, Citroen, DS and Vauxhall) binding · arjanmels/openhab2-addons (github.com)

@SimiWest & @dr.gonzo Indeed via the app you can trigger a refresh. I have found a project which also is able to do this: flobz/psa_car_controller. When I find time I might try to implement this.

(Also I get random periods that even this refresh doesn’t work and/or that the PSA api is down: overall it is not the most stable system.)

1 Like

In fact I’ve tried out this project already, but I wasn’t able to reliably trigger the refresh.

@dr.gonzo Thanks for trying, that is a pitty.