flobz / psa_car_controller

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

Don't open issue #381

Closed markjsmith closed 1 year ago

markjsmith commented 2 years ago

Hi, Can you help with this? As requested, I am posting here. Vauxhall Mokka-e. I originally set this up on my email, and then my wife re registered the car to her email. I am only logging in with her email address but My config shows 2 vin numbers! Only one car? I've tried removing everything, rebooting and reinstalling and still the system shows 2 vehicles. I also get the following errors, not sure if they are linked. I have to restart the add-on to refresh the data.

`Containerised psa_car_controller loading... 2022-06-24 18:51:09,290 :: WARNING :: Can't get car model, please report an issue on github with your car model and first ten letter of your VIN : VXKUPHNKKL 2022-06-24 18:51:10,089 :: WARNING :: Can't get car model, please report an issue on github with your car model and first ten letter of your VIN : VXKUPHNKKL 2022-06-24 18:51:10,090 :: INFO :: ["{'vin': 'VXKUPHNKKLxxxxxx', 'vehicle_id': 'xxxxxxxxxxxxxxx', 'label': 'unknown', 'brand': 'C', 'abrp_name': None, 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 30}", "{'vin': 'VXKUKZKXZMWxxxxxxx', 'vehicle_id': 'xxxxxxxxxxxxx', 'label': 'Mokka-e', 'brand': 'C', 'abrp_name': 'opel:mokkae:20:48', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"] 2022-06-24 18:51:10,784 :: INFO :: save config change 2022-06-24 18:51:10,950 :: INFO :: ask wakeup to VXKUPHNKKLxxxxxxxx 2022-06-24 18:51:10,950 :: INFO :: topic: psa/RemoteServices/from/cid/OV-ACNT200007613307/VehCharge/state: {'action': 'state'} 2022-06-24 18:51:10,961 :: WARNING :: Can't get language 2022-06-24 18:51:11,146 :: INFO :: Connected with result code {'session present': 0} 2022-06-24 18:51:11,147 :: INFO :: subscribe to psa/RemoteServices/to/cid/OV-ACNT200007613307/# 2022-06-24 18:51:11,147 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VXKUPHNKKLxxxxxx 2022-06-24 18:51:11,147 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VXKUKZKXZMWxxxxxx 2022-06-24 18:51:11,379 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/OV-ACNT200007613307/VehCharge/state b'{"resp_date":"2022-06-24T17:51:11Z","vin":"VXKUPHNKKLxxxxx","correlation_id":"xxxxxxxxx","return_code":"400","reason":"[authorization.denied.cvs.response.no.matching.service.key]"}' 2022-06-24 18:51:11,399 :: INFO :: update_data 2022-06-24 18:51:11,400 :: ERROR :: refresh_vehicle_info: Traceback (most recent call last): File "/psa_car_controller/my_psacc.py", line 119, in __refresh_vehicle_info self.get_vehicle_info(car.vin) File "/psa_car_controller/my_psacc.py", line 104, in get_vehicle_info car.status = res File "/psa_car_controller/libs/car.py", line 80, in status self._status.correct() File "/psa_car_controller/libs/car_status.py", line 28, in correct if len(self._energy) == 2 and self._energy[0].type != 'Electric': TypeError: object of type 'NoneType' has no len()

Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) 2022-06-24 18:51:12,112 :: INFO :: save config change 2022-06-24 18:51:12,113 :: WARNING :: last request is send again, token was expired Exception in thread Thread-3: Traceback (most recent call last): File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner self.run() File "/usr/lib/python3.9/threading.py", line 892, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 3452, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 1779, in loop_forever rc = self.loop(timeout, max_packets) File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 1181, in loop rc = self.loop_read(max_packets) File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 1572, in loop_read rc = self._packet_read() File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 2310, in _packet_read rc = self._packet_handle() File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 2936, in _packet_handle return self._handle_publish() File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 3216, in _handle_publish self._handle_on_message(message) File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 3444, in _handle_on_message self.on_message(self, self._userdata, message) File "/psa_car_controller/libs/psa/RemoteClient.py", line 75, in __on_mqtt_message self.publish(last_request, store=False) File "/psa_car_controller/libs/psa/RemoteClient.py", line 132, in publish message = mqtt_request.get_message_to_json(self.remoteCredentials.access_token) AttributeError: 'list' object has no attribute 'get_message_to_json' `

flobz commented 1 year ago

Close as it doesn't follow the bug template

markjsmith commented 1 year ago

How do I get someone to look at this? 4 months and it's just closed??