Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get remote refresh token error #851

Closed
vineethktpla opened this issue Apr 15, 2024 · 121 comments · Fixed by #880
Closed

Cannot get remote refresh token error #851

vineethktpla opened this issue Apr 15, 2024 · 121 comments · Fixed by #880

Comments

@vineethktpla
Copy link

Error : 2024-04-15 11:02:36,058 :: ERROR :: Can't refresh remote token 'refresh_token'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token
self.remoteCredentials.refresh_token = data["refresh_token"]
KeyError: 'refresh_token'

Platform: home assistant.

I tried to redo the authentication with --web-conf and once I did the authentication, I tried to restart the ad-on with -f config.json -c charge_config.json -r parameter gives me this error.

Sometimes, restarting the homeassistant fixes this issue sometimes not.

@kasper-coding
Copy link

Same issue here! I run it a separate app.

@mj1985
Copy link

mj1985 commented Apr 15, 2024

Looks like a PSA Server issue, I also got the message including rate limit exceeded, but I didn't forced updates or something like that.
Since a 15 minutes the servers are working fine again.

@zazazouthecat
Copy link

zazazouthecat commented Apr 16, 2024

Same error too here.
Can't auth now

2024-04-16 07:58:34,646 :: INFO :: 
Your vehicles: ["{'vin': 'VRXXXXXXXXXXXXXX', 'vehicle_id': '111b60eb6155acb9971053634c735ec544ae85eb52665b2e1cc60909a7f1979616ad01d7e531038903ac44b41db3cee3738756cb51a493176325fe32d03e19feff5ce9850cf4013eaec48ee2a234f0a9cb69f8f13366a418ac6ba6552', 'label': 'e-208', 'brand': 'Peugeot', 'abrp_name': 'peugeot:e208:20:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2024-04-16 07:58:34,647 :: INFO :: save config change
2024-04-16 07:58:34,647 :: INFO :: App version 3.5.0
2024-04-16 07:58:34,649 :: ERROR :: finish_oauth:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/view/config_oauth.py", line 56, in finish_oauth
    config_views.INITIAL_SETUP.connect(code)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 134, in connect
    app.load_app()
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/car_controller.py", line 102, in load_app
    self.is_good = self.myp.manager.refresh_token_now()
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 23, in wrapper
    raise RateLimitException
psa_car_controller.common.utils.RateLimitException
2024-04-16 07:58:34,649 :: INFO :: 172.30.32.1 - - [16/Apr/2024 07:58:34] "POST /_dash-update-component HTTP/1.1" 200 -

@zazazouthecat
Copy link

more log for debug maybe...
Retry new setup connection 12:03

2024-04-16 12:03:16,490 :: INFO :: Initial setup...
2024-04-16 12:03:22,891 :: INFO :: 172.30.32.1 - - [16/Apr/2024 12:03:22] "POST /_dash-update-component HTTP/1.1" 200 -
2024-04-16 12:03:24,881 :: INFO :: 172.30.32.1 - - [16/Apr/2024 12:03:24] "GET /config_connect?url=https://idpcvs.peugeot.com/am/oauth2/authorize?client_id%3D1eebc2d5-5df3-459b-a624-20abfcf82530%26redirect_uri%3Dmymap%253A%252F%252Foauth2redirect%252Ffr%26response_type%3Dcode%26scope%3Dopenid%2520profile%26state%3DoZbpnr6wvgBNktls_0WMOg%26code_challenge%3DfFinxenXcmrtXPpCloW82MtkwDXPbHdyKcnIVk1oDIU%26code_challenge_method%3DS256 HTTP/1.1" 200 -
2024-04-16 12:03:25,069 :: INFO :: 172.30.32.1 - - [16/Apr/2024 12:03:25] "GET /_dash-layout HTTP/1.1" 200 -
2024-04-16 12:03:25,070 :: INFO :: 172.30.32.1 - - [16/Apr/2024 12:03:25] "GET /_dash-dependencies HTTP/1.1" 200 -
2024-04-16 12:03:25,105 :: INFO :: 172.30.32.1 - - [16/Apr/2024 12:03:25] "POST /_dash-update-component HTTP/1.1" 200 -
2024-04-16 12:03:25,138 :: INFO :: 172.30.32.1 - - [16/Apr/2024 12:03:25] "POST /_dash-update-component HTTP/1.1" 204 -
2024-04-16 12:04:00,295 :: ERROR :: Exception on /get_vehicleinfo/VRXXXXXXXXXXXXXX [GET]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/view/api.py", line 48, in get_vehicle_info
    response=json.dumps(APP.myp.get_vehicle_info(vin, from_cache).to_dict(), default=str),
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 107, in get_vehicle_info
    res = self.api().get_vehicle_status(car.vehicle_id)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1229, in get_vehicle_status
    (data) = self.get_vehicle_status_with_http_info(id, **kwargs)  # noqa: E501
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1293, in get_vehicle_status_with_http_info
    return self.api_client.call_api(
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/oauth.py", line 107, in call_api
    return self._ApiClient__call_api(resource_path, method,
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 147, in __call_api
    self.update_params_for_auth(header_params, query_params, auth_settings)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 504, in update_params_for_auth
    auth_setting = self.configuration.auth_settings().get(auth)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/configuration.py", line 241, in auth_settings
    'value': 'Bearer ' + self.access_token
TypeError: can only concatenate str (not "NoneType") to str
2024-04-16 12:04:00,296 :: INFO :: 172.30.32.1 - - [16/Apr/2024 12:04:00] "GET /get_vehicleinfo/VRXXXXXXXXXXXXXX?from_cache=1 HTTP/1.1" 500 -
2024-04-16 12:04:00,296 :: INFO :: <Request 'http://localhost:5000/charge_control?vin=VRXXXXXXXXXXXXXX' [GET]>
2024-04-16 12:04:00,297 :: INFO :: 172.30.32.1 - - [16/Apr/2024 12:04:00] "GET /charge_control?vin=VRXXXXXXXXXXXXXX HTTP/1.1" 200 -
2024-04-16 12:04:00,301 :: INFO :: 172.30.32.1 - - [16/Apr/2024 12:04:00] "GET /battery/soh/VRXXXXXXXXXXXXXX HTTP/1.1" 200 -
2024-04-16 12:04:09,431 :: INFO :: save config change
2024-04-16 12:04:09,798 :: INFO :: 
Your vehicles: ["{'vin': 'VRXXXXXXXXXXXXXX', 'vehicle_id': '111eb6155acb9971053634c7351544ae85eb52665b2e1cc69a7f1979616ad01d7e531038ed903ac44b41db3cee8756cb51a493176325fe32d09fefff5ce9850cf4013eaec4f8ee2a234f0b69f8f13366a418ac6ba326552', 'label': 'e-208', 'brand': 'Peugeot', 'abrp_name': 'peugeot:e208:20:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2024-04-16 12:04:09,799 :: INFO :: save config change
2024-04-16 12:04:09,799 :: INFO :: App version 3.5.0
2024-04-16 12:04:10,445 :: INFO :: ["{'vin': 'VRXXXXXXXXXXXXXX', 'vehicle_id': '111eb6155acb9971053634c7351544ae85eb52665b2e1cc69a7f1979616ad01d7e531038ed903ac44b41db3cee8756cb51a493176325fe32d09fefff5ce9850cf4013eaec4f8ee2a234f0b69f8f13366a418ac6ba326552', 'label': 'e-208', 'brand': 'Peugeot', 'abrp_name': 'peugeot:e208:20:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2024-04-16 12:04:10,773 :: ERROR :: remote_refresh_token isn't defined
2024-04-16 12:04:11,170 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2024-04-16 12:04:11,429 :: ERROR :: Can't refresh remote token 'access_token'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 174, in _refresh_remote_token
    self._get_remote_access_token(otp_code)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 206, in _get_remote_access_token
    self.remoteCredentials.access_token = data["access_token"]
KeyError: 'access_token'
2024-04-16 12:04:15,597 :: INFO :: save config change

@vineethktpla
Copy link
Author

vineethktpla commented Apr 16, 2024

After multiple retries I managed to run the ad-on, but this is what happens when i try to wakeup using rest command

2024-04-16 13:26:15,920 :: INFO :: ask wakeup to VR3UKZKXmmmmm
2024-04-16 13:26:15,922 :: INFO :: topic: psa/RemoteServices/from/cid/AP-ACNT200008710854/VehCharge/state: {'action': 'state'}
2024-04-16 13:26:16,995 :: ERROR :: Can't refresh remote token 'refresh_token'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token
    self.remoteCredentials.refresh_token = data["refresh_token"]
KeyError: 'refresh_token'
2024-04-16 13:26:34,655 :: INFO :: save config change

After this the adon crashed.
Issue persists after restart of home assistant. did redo the authentication, but still not able to start the ad-on without multiple retries. Issue started from yesterday

@GewoonJaap
Copy link
Contributor

GewoonJaap commented Apr 16, 2024

Also experiencing the same issue since this weekend. It retrieves data just fine, but I am unable to start the pre-condtioning or do a wakeup call for example. Getting the same errors as everyone else ^^

charging status of VIN is InProgress, battery level: 31
2024-04-16 15:49:02,106 :: ERROR :: force_update:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/charge_control.py", line 70, in force_update
    self.psacc.remote_client.wakeup(self.vin)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 23, in wrapper
    raise RateLimitException
psa_car_controller.common.utils.RateLimitException
ask wakeup to VIN
2024-04-16 15:37:02,185 :: INFO :: topic: psa/RemoteServices/from/cid/AP-XXXXXX/VehCharge/state: {'action': 'state'}
2024-04-16 15:37:02,185 :: ERROR :: Can't refresh remote token 
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 155, in _refresh_remote_token
    self.manager.refresh_token_now()
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 23, in wrapper
    raise RateLimitException
psa_car_controller.common.utils.RateLimitException

I also tried to re-authenticate this weekend, when entering the GUID from the oauth redirect, the loading bar kept spinning forever after clicking the Submit button in the webapp

@vineethktpla
Copy link
Author

vineethktpla commented Apr 16, 2024

Screenshot_20240416-165017

Now control shows this.

And all my entities in HA is unavailable now !!

Please someone help me fix this

@ikbensuper
Copy link

I Also have the exact same issue:
2024-04-16 17:21:47,641 :: ERROR :: Error during activation: {'newversion': None, 'newversionurl': None, 'err': 'NOK:MAXNBTOOLS'}
2024-04-16 17:21:48,332 :: ERROR :: remote_refresh_token isn't defined
2024-04-16 17:21:48,771 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2024-04-16 17:21:50,406 :: ERROR :: Can't refresh remote token 'access_token'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 174, in _refresh_remote_token
self._get_remote_access_token(otp_code)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 206, in _get_remote_access_token
self.remoteCredentials.access_token = data["access_token"]
KeyError: 'access_token'

Started with the info not being available in Home Assistant. Restarted the docker container. And saw the token wasn't valid anymore. When trying to Re-activat.. The above error occurs

@vineethktpla
Copy link
Author

I Also have the exact same issue: 2024-04-16 17:21:47,641 :: ERROR :: Error during activation: {'newversion': None, 'newversionurl': None, 'err': 'NOK:MAXNBTOOLS'} 2024-04-16 17:21:48,332 :: ERROR :: remote_refresh_token isn't defined 2024-04-16 17:21:48,771 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'} 2024-04-16 17:21:50,406 :: ERROR :: Can't refresh remote token 'access_token' Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 174, in _refresh_remote_token self._get_remote_access_token(otp_code) File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 206, in _get_remote_access_token self.remoteCredentials.access_token = data["access_token"] KeyError: 'access_token'

Started with the info not being available in Home Assistant. Restarted the docker container. And saw the token wasn't valid anymore. When trying to Re-activat.. The above error occurs

Since you are getting {'err': 'NOK:FORBIDDEN'} error, I think you exceeded the limit of sms activations set by the psa server. To fix this, install mypeugeot app from the play/apple store ( uninstall and reinstall if already installed ), login then try to turn on the climate control. The app now ask you to reset your pin and send sms. once you do this, this error will be fixed.

This is explained here
https://github.com/flobz/psa_car_controller/blob/master/FAQ.md#2-error-during-activation-newversion-200-newversionurl-httpminwebocom-err-nokforbidden

@vineethktpla
Copy link
Author

vineethktpla commented Apr 17, 2024

Datas are retrieving now after multple reinstallations and tries but no remote commands are working

2024-04-17 10:12:37,847 :: INFO :: Preconditioning: topic: psa/RemoteServices/from/cid/AP-ACNT20000871xxx4/ThermalPrecond: {'asap': 'activate', 'programs': {'program1': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program2': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program3': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program4': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}}}
2024-04-17 10:12:38,652 :: ERROR :: Can't refresh remote token 'refresh_token'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token
    self.remoteCredentials.refresh_token = data["refresh_token"]
KeyError: 'refresh_token'
2024-04-17 10:12:56,886 :: INFO :: save config change

This is what happens with a climate control call

@weirdo1971
Copy link

weirdo1971 commented Apr 17, 2024

same issue with app (docker) and /or HA add-on

2024-04-17 11:14:30,858 :: WARNING :: Disconnected with result code 1
2024-04-17 11:14:31,354 :: ERROR :: Can't refresh remote token 'refresh_token'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token
self.remoteCredentials.refresh_token = data["refresh_token"]
KeyError: 'refresh_token'
2024-04-17 11:14:32,192 :: INFO :: save config change

@jwolansk
Copy link

Peugeot app is also unable to retrieve current data, so it looks like the PSA server issues.
But the psacc app could certainly do better when handling the error, by not crashing 🙂

@vineethktpla
Copy link
Author

Screenshot_20240417-133643

Official app also cannot do the preconditioning but other datas are updating properly

@mj1985
Copy link

mj1985 commented Apr 17, 2024

The myOpel App is working fine, including precondition, data sync of SOC etc.

@mdkeil
Copy link
Contributor

mdkeil commented Apr 17, 2024

same issue with app (docker) and /or HA add-on

2024-04-17 11:14:30,858 :: WARNING :: Disconnected with result code 1 2024-04-17 11:14:31,354 :: ERROR :: Can't refresh remote token 'refresh_token' Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token self.remoteCredentials.refresh_token = data["refresh_token"] KeyError: 'refresh_token' 2024-04-17 11:14:32,192 :: INFO :: save config change

+1 same to me I think for two days..

@JaySea77
Copy link

JaySea77 commented Apr 17, 2024

Can't refresh token anymore and no commands work. Has been like this for a couple of days.
Otp config not responding either.

@jwolansk
Copy link

I think, MyPeugeot app hit the same rate limit exception as psacc in my case.

@vineethktpla
Copy link
Author

I can now confirm that my peugeot app works just fine from today morning.
I can refresh soc while charging, and it updates properly. Climate control also works fine.
But same issue with psacc unfortunately. No luck so far with remote commands like wake up or climate control or stop/start charge

@christophe-heidet
Copy link

I have exactly the same issue with each remote command to a e208
with this common result:

 Create a new one
2024-04-18 09:11:18,022 :: ERROR :: Can't refresh remote token 
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 173, in _refresh_remote_token
    otp_code = self.get_otp_code()
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 23, in wrapper
    raise RateLimitException
psa_car_controller.common.utils.RateLimitException

@vineethktpla
Copy link
Author

vineethktpla commented Apr 18, 2024

Update again:
Mypeugeot app stopped responding again !!
Such dumb servers !!

@maximumstruggle
Copy link

Had the same issue yesterday :

  • No update during the AC charging session (psacc and Peugeot app)
  • I could stop the charge from the Peugeot app
  • Stopping the charge from the time set did not work, can't refresh remote token error.

It looks like the same behaviour from a few weeks ago. I wonder if the SoC update is working during a DC charge, could be interesting to know

@sod75
Copy link

sod75 commented Apr 18, 2024

Just want to add just in case.
I was seeing the error couple days ago as well but it has gone away since yesterday... I still received position, SOC data, etc throughout.

I just tried preconditioning and that triggers the Refresh token error.

2024-04-18 21:12:32,563 :: INFO :: Preconditioning: topic: psa/RemoteServices/from/cid/AP-ACNT200008553362/ThermalPrecond: {'asap': 'activate', 'programs': {'program1': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program2': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program3': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program4': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}}}
2024-04-18 21:12:33,244 :: ERROR :: can't refresh_remote_token: {'error_description': 'grant is invalid', 'error': 'invalid_grant'}
 Create a new one
2024-04-18 21:12:35,093 :: INFO :: save config change

@GewoonJaap
Copy link
Contributor

Just want to add just in case. I was seeing the error couple days ago as well but it has gone away since yesterday... I still received position, SOC data, etc throughout.

I just tried preconditioning and that triggers the Refresh token error.

2024-04-18 21:12:32,563 :: INFO :: Preconditioning: topic: psa/RemoteServices/from/cid/AP-ACNT200008553362/ThermalPrecond: {'asap': 'activate', 'programs': {'program1': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program2': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program3': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program4': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}}}
2024-04-18 21:12:33,244 :: ERROR :: can't refresh_remote_token: {'error_description': 'grant is invalid', 'error': 'invalid_grant'}
 Create a new one
2024-04-18 21:12:35,093 :: INFO :: save config change

Data is indeed still being received but all actions from this app to the Peugeot servers are giving the token error

@vineethktpla
Copy link
Author

I still get the data as well. It updates odometer, battery level and everything during trip and other times. The issue is we cannot manually force a remote command like precondition or wakeup call which will give this error. The battery level is not updating during charging. I have to manually go to car and unlock it to get the data in the app. So obviously charge control won't work.

@fre4242
Copy link

fre4242 commented Apr 19, 2024

I have the same 'can't refresh_remote_token' problem.
But also the myOpel smartphone app isn't able to wakeup and get more actual values. It presents old values when forcing to refresh.

@vineethktpla
Copy link
Author

MyPeugeot app works now, but still issue persists with psacc
Uploading Screenshot_20240419-145447~2.png…

@Waxolunist
Copy link

Now my battery is at 100% and I will sit here till tomorrow on it. This is frustrating.

flobz added a commit that referenced this issue May 16, 2024
…n-error

fix: Cannot get remote refresh token error #851
@flobz
Copy link
Owner

flobz commented May 16, 2024

Can you tell me if it's fixed for you ?

@bobmorane06
Copy link

How can we get your last commit, via git or is it reflected in pip3 install ?

@flobz
Copy link
Owner

flobz commented May 16, 2024

Both should work

@vineethktpla
Copy link
Author

Will I get an update on HA adon?

@tger977
Copy link

tger977 commented May 16, 2024

Hi @flobz, thanks very much for this update. I did the complete authentification process once again and updated the docker container to the latest version from today and it WORKED PERFECTLY. Thanks!

@JaySea77
Copy link

Now we have to wait for the update on HA and we can use the app again :)

@mj1985
Copy link

mj1985 commented May 16, 2024

Now we have to wait for the update on HA and we can use the app again :)

The last time I created my own repository, so I don't have to wait 😉
https://github.com/mj1985/psacc-ha

Thanks @flobz works like charm

@JaySea77
Copy link

Can I change to your repository without removing all data?

@mj1985
Copy link

mj1985 commented May 16, 2024

Make a backup of your data and restore it later or just wait (keeping a backup is always a good idea)

@JaySea77
Copy link

How can I add addons from a github that is not on homeassistant addons?

@mj1985
Copy link

mj1985 commented May 16, 2024

Addon-Store three dots upper right, Repositories. Add the URL.

@JaySea77
Copy link

I feel stupid now >.< thanks

@vineethktpla
Copy link
Author

Why HA adon is not showing any updates eventhough there is a release tag v3.5.1

@mj1985
Copy link

mj1985 commented May 17, 2024

Did you click the reload button on the top right corner, it's located on the Add-On page. Flobz's home assistant add-on is still linking to 3.5.0.

@vineethktpla
Copy link
Author

Did you click the reload button on the top right corner, it's located on the Add-On page. Flobz's home assistant add-on is still linking to 3.5.0.

Im still sticking to flobz add-on. Created a pull request for version bump there.

@maximumstruggle
Copy link

Still not working for me. Update psacc done, OTP config done, still the same error. SoC level isn't updating in the Peugeot app either so maybe something is wrong with my account / car. I have contacted Peugeot to check it.

@chrisJhearn
Copy link

Did you click the reload button on the top right corner, it's located on the Add-On page. Flobz's home assistant add-on is still linking to 3.5.0.

Im still sticking to flobz add-on. Created a pull request for version bump there.

I am still not seeing the 3.5.1 update in HA yet.
How long does it normally take?

@JaySea77
Copy link

Depends on when the owner decides to change the psacc-ha github. It isn't automated.

@vineethktpla
Copy link
Author

vineethktpla commented May 18, 2024

Depends on when the owner decides to change the psacc-ha github. It isn't automated.

I already created a pull request for version bump but not yet merged by @flobz

@vineethktpla
Copy link
Author

Depends on when the owner decides to change the psacc-ha github. It isn't automated.

I already created a pull request for version bump but not yet merged by @flobz

It's merged now

@Waxolunist
Copy link

Hi @flobz, you are unusally quite even though the recent changes of Stellantis makes your great piece of software partly useless. Shall we try to make some noise at the support hotlines and see if a bigger crowd might make some difference?

Not at all useless. Having just one UI and analysing the data e.g. within grafana makes it 100x more valuable than just another app. There's so much more than just limiting the charge.
Also controlling the charge in combination with solar is only possible with this controler.

@JaySea77
Copy link

Hi @flobz, you are unusally quite even though the recent changes of Stellantis makes your great piece of software partly useless. Shall we try to make some noise at the support hotlines and see if a bigger crowd might make some difference?

Not at all useless. Having just one UI and analysing the data e.g. within grafana makes it 100x more valuable than just another app. There's so much more than just limiting the charge.

Also controlling the charge in combination with solar is only possible with this controler.

Well that was the thing. Controlling the car with this wasn't working and no new info was coming up at all unless you triggered it with other software.

@chrisJhearn
Copy link

Depends on when the owner decides to change the psacc-ha github. It isn't automated.

I already created a pull request for version bump but not yet merged by @flobz

It's merged now

I have done the update and gone through the login and otp again but I still can't wake the car?
Have you had any luck?

@JaySea77
Copy link

JaySea77 commented May 18, 2024

Now that you mention it. The car still doesn't respond to any action.
I didn't do login though, but that part seems to be a lot more complicated than before. Never had to use devtools before. And the Citroen site it opens for me in French for some reason.

Edit: did the login again, but still no deal.
It says'Can't refresh remote token, please redo too procedure' which I did seconds before the error.

Edit2: Redid OTP anyways and the token still doesn't refresh. I get an extra ratelimmiterror now:
2024-05-18 20:23:51,712 :: INFO :: ask wakeup to XXXXXXXXXXXXXXX
2024-05-18 20:23:51,713 :: INFO :: topic: psa/RemoteServices/from/cid/AC-ACNT200006117509/VehCharge/state: {'action': 'state'}
2024-05-18 20:23:52,560 :: ERROR :: can't refresh_remote_token: {'error_description': 'grant is invalid', 'error': 'invalid_grant'}
Create a new one
2024-05-18 20:23:52,561 :: ERROR :: Can't refresh remote token, please redo otp procedure
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 176, in _refresh_remote_token
otp_code = self.get_otp_code()
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 23, in wrapper
raise RateLimitException
psa_car_controller.common.utils.RateLimitException
2024-05-18 20:23:52,563 :: INFO :: 172.30.32.1 - - [18/May/2024 20:23:52] "�[37mPOST /_dash-update-component HTTP/1.1�[0m" 200 -

Edit3: I restarted and now the wake up command works

@chrisJhearn
Copy link

I did a restart this morning and was still seeing refresh token errors but after some time it seems to have settled down with no more errors. Will see if I can use wake up this evening with my intelligent Octopus charging ( the main reason I use this car controller )

@chrisJhearn
Copy link

I did a restart this morning and was still seeing refresh token errors but after some time it seems to have settled down with no more errors. Will see if I can use wake up this evening with my intelligent Octopus charging ( the main reason I use this car controller )

Worked perfectly last night - thanks everyone

@maximumstruggle
Copy link

I did a complete reinstall of the container and it worked last night. Whereas the offical application couldn't refresh the SoC.

@Bushrider
Copy link

Bushrider commented May 21, 2024

Everything’s ok for me now, but the soh doesn’t update
Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.