flobz / psa_car_controller

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

MyOpel - Error "Disconnected with result code 1" but mqtt updates come #113

Closed jacopobac closed 3 years ago

jacopobac commented 3 years ago

Describe the bug

I can get all the data from the car, but I can't push any config to the car, preconditioning or charging stop or everything else. Also the charge page on the webserver is totally emtpy.

To Reproduce Steps to reproduce the behavior:

  1. what command did you use
  2. when the bug append ?
  3. Does it persist after restarting the program?

When I load the program the first time, i get the errors:

ERROR :: can't refresh_remote_token: {'error': 'invalid_grant', 'error_description': 'grant is invalid'} Create a new one WARNING :: Disconnected with result code 1

I tried also to remove the app from my phone and reinstall it, and then remove the otp.bin and redo all the process, but still nothing. All the MQTT messages come, it shows the correct state of charge of the car, the correct position so all the data is pulled from Opel server, but the wakeup calls and all the push requests fail with the "Disconnected with result code 1". Also, when I try to open the Charge page on the webserver, it's blank.

Config file

2021-05-09 10:53:19,009 :: ERROR :: remote_refresh_token isn't defined 2021-05-09 10:53:37,806 :: ERROR :: can't refresh_remote_token: {'error': 'invalid_grant', 'error_description': 'grant is invalid'} Create a new one 2021-05-09 10:53:39,010 :: INFO :: save config change 2021-05-09 10:53:39,173 :: INFO :: ask state to VIN 2021-05-09 10:53:39,313 :: INFO :: Connected with result code {'session present': 0} 2021-05-09 10:53:39,314 :: INFO :: subscribe to psa/RemoteServices/to/cid/OP-ID/# 2021-05-09 10:53:39,315 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VIN 2021-05-09 10:53:39,612 :: INFO :: save config change 2021-05-09 10:53:39,613 :: INFO :: {"access_token": "TOKEN", "customer_id": "OP-ID", "correlation_id": "ID", "req_date": "2021-05-09T10:53:39Z", "vin": "VIN", "req_parameters": {"action": "state"}} 2021-05-09 10:53:39,618 :: WARNING :: Can't get language 2021-05-09 10:53:39,649 :: WARNING :: Disconnected with result code 1 2021-05-09 10:53:40,197 :: INFO :: save config change 2021-05-09 10:53:40,834 :: INFO :: update_data 2021-05-09 10:53:40,839 :: WARNING :: Failed to generate figure, there is probably not enough data yet 2021-05-09 10:53:41,881 :: INFO :: Connected with result code {'session present': 0} 2021-05-09 10:53:41,881 :: INFO :: subscribe to psa/RemoteServices/to/cid/OP-ID/# 2021-05-09 10:53:41,882 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VIN 2021-05-09 10:58:45,896 :: INFO :: server start 2021-05-09 10:58:46,362 :: INFO :: save config change 2021-05-09 10:58:47,521 :: INFO :: ["{'vin': 'VIN', 'vehicle_id': 'VID', 'label': 'corsa-e', 'brand': 'C', 'abrp_name': 'opel:corsae:20:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"] 2021-05-09 10:59:05,661 :: INFO :: save config change 2021-05-09 10:59:06,210 :: INFO :: ask state to VIN 2021-05-09 10:59:06,380 :: INFO :: Connected with result code {'session present': 0} 2021-05-09 10:59:06,381 :: INFO :: subscribe to psa/RemoteServices/to/cid/OP-ID/# 2021-05-09 10:59:06,381 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VIN 2021-05-09 10:59:06,637 :: INFO :: save config change 2021-05-09 10:59:06,638 :: INFO :: {"access_token": "TOKEN", "customer_id": "OP-ID", "correlation_id": "ID", "req_date": "2021-05-09T10:59:06Z", "vin": "VIN", "req_parameters": {"action": "state"}} 2021-05-09 10:59:06,642 :: WARNING :: Can't get language 2021-05-09 10:59:06,673 :: WARNING :: Disconnected with result code 1 2021-05-09 10:59:07,284 :: INFO :: save config change 2021-05-09 10:59:07,964 :: INFO :: update_data 2021-05-09 10:59:07,969 :: WARNING :: Failed to generate figure, there is probably not enough data yet 2021-05-09 10:59:09,098 :: INFO :: Connected with result code {'session present': 0} 2021-05-09 10:59:09,099 :: INFO :: subscribe to psa/RemoteServices/to/cid/OP-ID/# 2021-05-09 10:59:09,099 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VIN 2021-05-09 10:59:19,199 :: WARNING :: charge begin but API isn't updated 2021-05-09 11:00:19,202 :: INFO :: ask wakeup to VIN 2021-05-09 11:00:19,598 :: INFO :: save config change 2021-05-09 11:00:19,598 :: INFO :: {"access_token": "TOKEN", "customer_id": "OP-ID", "correlation_id": "ID", "req_date": "2021-05-09T11:00:19Z", "vin": "VIN", "req_parameters": {"action": "state"}} 2021-05-09 11:00:19,633 :: WARNING :: Disconnected with result code 1 2021-05-09 11:00:20,000 :: INFO :: save config change 2021-05-09 11:00:21,754 :: INFO :: Connected with result code {'session present': 0} 2021-05-09 11:00:21,755 :: INFO :: subscribe to psa/RemoteServices/to/cid/OP-ID/# 2021-05-09 11:00:21,755 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VIN 2021-05-09 11:01:07,256 :: INFO :: new position recorded for VIN 2021-05-09 11:01:07,257 :: INFO :: update_data 2021-05-09 11:01:07,264 :: INFO :: update_data 2021-05-09 11:01:07,266 :: INFO :: charging status of VIN is InProgress, battery level: 79

Environment (please complete the following information):

Additional context Add any other context about the problem here.

flobz commented 3 years ago

Duplicate issue #48