flobz / psa_car_controller

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

Can't get preconditioning or charge hour to work #216

Closed DreamT80 closed 3 years ago

DreamT80 commented 3 years ago

I'm trying to use preconditioning and setting charge time. It looks like it works, but nothing happens.

Preconditoning, request and response: http://172.30.33.5:5000/preconditioning/VIN/1 -> Connecting to 172.30.33.5:5000 (172.30.33.5:5000) writing to stdout true

Charge time, request and respons: "http://172.30.33.5:5000/charge_control?vin=VIN&hour=0&minute=30" -> Connecting to 172.30.33.5:5000 (172.30.33.5:5000) writing to stdout {"_next_stop_hour":"Mon, 06 Sep 2021 00:30:00 GMT","_stop_hour":[0,30],"percentage_threshold":100,"retry_count":0,"vin":"VIN"}

The add-on log says nothing more than that the request is made, and that it returned status 200.

I run v2.4.4.

flobz commented 3 years ago

go to /config_otp again and complete the form.

DreamT80 commented 3 years ago

I have tried it several times (although I don’t know how to reach it without uninstalling and reinstalling the plugin). Getting sensor data etc. works, but not preconditioning/charge hours. Could it be because I have the wrong/an unsupported language code? I’m in Sweden, so I’m using SE.

flobz commented 3 years ago

I don't know. You didn't have this issue #192 ?

gino54 commented 3 years ago

Could you check on your config.json file if the remote_refresh_token is set to null ?

DreamT80 commented 3 years ago

@flobz : No, the opt config works. So I guess that the country code is correct.

@gino54: How can I reach the config.json file if I'm running dockerised? I'm running the add-on in Home Assistant OS.

Regarding the refresh_token, I've seen this in the logs, don't know if it's related? Have only seen it after the top setup, though:

AttributeError: 'Config' object has no attribute 'chc' 2021-09-18 08:35:47,398 :: INFO :: save config change 2021-09-18 08:35:47,398 :: INFO :: save config change 2021-09-18 08:35:47,399 :: ERROR :: remote_refresh_token isn't defined 2021-09-18 08:35:47,399 :: ERROR :: remote_refresh_token isn't defined

flobz commented 3 years ago

ERROR :: remote_refresh_token isn't defined Is the problem. Without it no remote control. Please update and redo the /config_otp form

DreamT80 commented 3 years ago

Ok. I’ve redone the otp config many times, and the result has been the same every time - no refresh token. Am I missing something? (I’ve entered all the fields, and the form has succeeded every time).

flobz commented 3 years ago

Did you update?

DreamT80 commented 3 years ago

Version, you mean? Yes, I run 2.4.5 now. I've done a fresh install of it and ran config_otp after that (didn’t solve the refresh_token problem)

DreamT80 commented 3 years ago

@flobz, sorry, I didn’t realize that 2.4.6 was released. I updated to it now, but still get the remote_refresh_token when doing the config.

2021-09-19 18:13:35,113 :: INFO :: save config change 2021-09-19 18:13:35,113 :: INFO :: save config change 2021-09-19 18:13:35,113 :: ERROR :: remote_refresh_token isn't defined 2021-09-19 18:13:35,113 :: ERROR :: remote_refresh_token isn't defined

flobz commented 3 years ago

You didn't had "can't refresh_remote_token: Create a new one " in your log ?

DreamT80 commented 3 years ago

No, I didn't see it. Unfortunately I didn't capture the entire log, but the events around "remote_refresh_token isn't defined" is included. I see 2 exceptions, don't know if they are related.

AttributeError: 'Config' object has no attribute 'myp'

AttributeError: 'Config' object has no attribute 'chc'

Tell me if I should give more info, or help debugging.

Log dump: File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2070, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1515, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/psa_car_controller/web/views.py", line 133, in get_vehicle_info response=json.dumps(CONFIG.myp.get_vehicle_info(vin, from_cache).to_dict(), default=str), AttributeError: 'Config' object has no attribute 'myp' 172.30.32.1 - - [20/Sep/2021 13:24:07] "GET /get_vehicleinfo/VIN?from_cache=1 HTTP/1.1" 500 - 2021-09-20 13:24:07,172 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&%3Falways_check=true' [GET]> Exception on /charge_control [GET] Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2070, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1515, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/psa_car_controller/web/views.py", line 197, in get_charge_control charge_control = CONFIG.chc.get(vin) AttributeError: 'Config' object has no attribute 'chc' 172.30.32.1 - - [20/Sep/2021 13:24:07] "GET /charge_control?vin=VIN&?always_check=true HTTP/1.1" 500 - 172.30.32.1 - - [20/Sep/2021 13:24:08] "GET /_dash-layout HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:24:08] "GET /_dash-dependencies HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:24:08] "POST /_dash-update-component HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:24:08] "GET /config HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:24:08] "GET /assets/clientside.js HTTP/1.1" 304 - 172.30.32.1 - - [20/Sep/2021 13:24:09] "GET /_dash-layout HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:24:09] "GET /_dash-dependencies HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:24:09] "POST /_dash-update-component HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:24:09] "POST /_dash-update-component HTTP/1.1" 200 - 2021-09-20 13:25:15,818 :: INFO :: save config change 2021-09-20 13:25:17,145 :: INFO :: Your vehicles: ["{'vin': 'VIN', 'vehicle_id': 'VEHICLEID', 'label': 'Grandland X Hybrid', 'brand': 'C', 'abrp_name': None, 'battery_power': 13.2, 'fuel_capacity': 43, 'max_elec_consumption': 70, 'max_fuel_consumption': 30}"] 2021-09-20 13:25:17,147 :: INFO :: save config change 2021-09-20 13:25:17,637 :: INFO :: save config change 2021-09-20 13:25:17,637 :: INFO :: save config change 2021-09-20 13:25:18,704 :: INFO :: ["{'vin': 'VIN', 'vehicle_id': 'VEHICLEID', 'label': 'Grandland X Hybrid', 'brand': 'C', 'abrp_name': None, 'battery_power': 13.2, 'fuel_capacity': 43, 'max_elec_consumption': 70, 'max_fuel_consumption': 30}"] 2021-09-20 13:25:18,704 :: INFO :: ["{'vin': 'VIN', 'vehicle_id': 'VEHICLEID', 'label': 'Grandland X Hybrid', 'brand': 'C', 'abrp_name': None, 'battery_power': 13.2, 'fuel_capacity': 43, 'max_elec_consumption': 70, 'max_fuel_consumption': 30}"] 172.30.32.1 - - [20/Sep/2021 13:25:18] "POST /_dash-update-component HTTP/1.1" 200 - 2021-09-20 13:25:19,176 :: INFO :: level_fuel unfixed for VIN 2021-09-20 13:25:19,176 :: INFO :: level_fuel unfixed for VIN 2021-09-20 13:25:19,423 :: INFO :: new position recorded for VIN 2021-09-20 13:25:19,423 :: INFO :: new position recorded for VIN 2021-09-20 13:25:19,426 :: INFO :: update_data 2021-09-20 13:25:19,426 :: INFO :: update_data 172.30.32.1 - - [20/Sep/2021 13:25:20] "GET /get_vehicleinfo/VIN?from_cache=1 HTTP/1.1" 200 - 2021-09-20 13:25:20,449 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&%3Falways_check=true' [GET]> 2021-09-20 13:25:20,449 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&%3Falways_check=true' [GET]> Exception on /charge_control [GET] Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2070, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1515, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/psa_car_controller/web/views.py", line 197, in get_charge_control charge_control = CONFIG.chc.get(vin) AttributeError: 'Config' object has no attribute 'chc' 172.30.32.1 - - [20/Sep/2021 13:25:20] "GET /charge_control?vin=VIN&?always_check=true HTTP/1.1" 500 - 172.30.32.1 - - [20/Sep/2021 13:25:34] "GET /config_otp HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:25:34] "GET /assets/clientside.js HTTP/1.1" 304 - 172.30.32.1 - - [20/Sep/2021 13:25:34] "GET /_dash-layout HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:25:35] "GET /_dash-dependencies HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:25:35] "POST /_dash-update-component HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:25:35] "POST /_dash-update-component HTTP/1.1" 204 - 172.30.32.1 - - [20/Sep/2021 13:25:35] "POST /_dash-update-component HTTP/1.1" 204 - 172.30.32.1 - - [20/Sep/2021 13:25:38] "POST /_dash-update-component HTTP/1.1" 200 - 2021-09-20 13:26:00,716 :: INFO :: save config change 2021-09-20 13:26:00,716 :: INFO :: save config change 2021-09-20 13:26:00,717 :: ERROR :: remote_refresh_token isn't defined 2021-09-20 13:26:00,717 :: ERROR :: remote_refresh_token isn't defined 172.30.32.1 - - [20/Sep/2021 13:26:00] "POST /_dash-update-component HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:04] "GET / HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:04] "GET /assets/clientside.js HTTP/1.1" 304 - 172.30.32.1 - - [20/Sep/2021 13:26:04] "GET /assets/clientside.js HTTP/1.1" 304 - 172.30.32.1 - - [20/Sep/2021 13:26:04] "GET /_dash-layout HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:04] "GET /_dash-dependencies HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:04] "POST /_dash-update-component HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:05] "GET /assets/images/consumption.svg HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:05] "GET /assets/images/pollution.svg HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:05] "GET /assets/images/battery-charge-line.svg HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:05] "GET /assets/images/electricity%20bill.svg HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:05] "POST /_dash-update-component HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:07] "GET /get_vehicleinfo/VIN?from_cache=1 HTTP/1.1" 200 - 2021-09-20 13:26:07,122 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&%3Falways_check=true' [GET]> 2021-09-20 13:26:07,122 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&%3Falways_check=true' [GET]> 2021-09-20 13:26:07,125 :: INFO :: save config change 2021-09-20 13:26:07,125 :: INFO :: save config change 172.30.32.1 - - [20/Sep/2021 13:26:07] "GET /charge_control?vin=VIN&?always_check=true HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:07] "POST /_dash-update-component HTTP/1.1" 200 - 172.30.32.1 - - [20/Sep/2021 13:26:08] "POST /_dash-update-component HTTP/1.1" 200 -

flobz commented 3 years ago

I don't understand, you should have a message "can't refresh_remote_token: Create a new one" with the last version... As you can see in the code, if remote_refresh_token is none then you should have two message: logger.error("remote_refresh_token isn't defined") logger.error("can't refresh_remote_token: %s\n Create a new one", data)

  data = None
        try:
            if self.remote_refresh_token is not None:
                res = self.manager.post(REMOTE_URL + self.client_id,
                                        json={"grant_type": "refresh_token",
                                              "refresh_token": self.remote_refresh_token},
                                        headers=self.headers)
                data = res.json()
                logger.debug("refresh_remote_token: %s", data)
            else:
                logger.error("remote_refresh_token isn't defined")
            if data and "access_token" in data:
                self.remote_access_token = data["access_token"]
                self.remote_refresh_token = data["refresh_token"]
                self.remote_token_last_update = datetime.now()
            else:
                logger.error("can't refresh_remote_token: %s\n Create a new one", data)
                self.remote_token_last_update = datetime.now()
                otp_code = self.get_otp_code()
                res = self.get_remote_access_token(otp_code)
flobz commented 3 years ago

@flobz, sorry, I didn’t realize that 2.4.6

There is a 2.5.0. Please use this one

DreamT80 commented 3 years ago

Hmm, ok. I see that one of the conditions is for remote_refresh_token, the other for access_token. Could it be that I have the access_token but not the remote_refresh_token, for some reason?

DreamT80 commented 3 years ago

Ok, sorry, didn't see your last message. Can you update the repo so that I can get it? I only see 2.4.6 in HA now.

flobz commented 3 years ago

I did it few minutes ago. I think there is a refresh button in homeassistant addons store.

DreamT80 commented 3 years ago

Saw it now, never mind. Installing it now.

DreamT80 commented 3 years ago

Yes, now I got it! Will have to test this when I have access to the car later today.

Got another error now on the opt config page, but it seems that it worked anyway.

'NoneType' object has no attribute 'username_pw_set'

DreamT80 commented 3 years ago

Hi again,

Unfortunately I got this now. Maybe it's related to the username_pw_set issue above?

2021-09-20 14:20:14,920 :: INFO :: preconditioning: {"access_token": "ACCESS_TOKEN", "customer_id": "CUSTOMERID", "correlation_id": "CORRELATION_ID", "req_date": "2021-09-20T12:20:14Z", "vin": "VIN", "req_parameters": {"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}}}} 2021-09-20 14:20:14,920 :: INFO :: preconditioning: {"access_token": "ACCESS_TOKEN", "customer_id": "CUSTOMERID", "correlation_id": "CORRELATION_ID", "req_date": "2021-09-20T12:20:14Z", "vin": "VIN", "req_parameters": {"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}}}} Exception on /preconditioning/VIN/1 [GET] Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2070, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1515, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/psa_car_controller/web/view/views.py", line 171, in preconditioning return jsonify(CONFIG.myp.preconditioning(vin, activate)) File "/psa_car_controller/my_psacc.py", line 440, in preconditioning self.mqtt_client.publish(MQTT_REQ_TOPIC + self.__get_mqtt_customer_id() + "/ThermalPrecond", msg) AttributeError: 'NoneType' object has no attribute 'publish' 172.30.32.1 - - [20/Sep/2021 14:20:14] "GET /preconditioning/VIN/1 HTTP/1.1" 500 -

flobz commented 3 years ago

Restart the container please

DreamT80 commented 3 years ago

I did that. It looks better now. I get some error codes, but they rather seem related to the status of the car. The communication seems to work. Will test later. Thank you so much this far!

172.30.32.1 - - [20/Sep/2021 14:42:31] "GET /preconditioning/VIN/1 HTTP/1.1" 200 - 2021-09-20 14:42:31,881 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/CUST/ThermalPrecond/ProcessManagement b'{"process_date":"2021-09-20T12:42:31Z","vin":"VIN","correlation_id":"CID1","process_code":"900","process_message":"[process.900.request.accepted.key]"}' 2021-09-20 14:42:31,940 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/CUST/ThermalPrecond/ProcessManagement b'{"process_date":"2021-09-20T12:42:31Z","vin":"VIN","correlation_id":"CID1","process_code":"901","process_message":"[process.901.vehicle.asleep.key]"}' 2021-09-20 14:42:44,281 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/CUST/VehCharge/state b'{"resp_date":"2021-09-20T12:42:44Z","vin":"VIN","correlation_id":"CID2","return_code":"300"}' 2021-09-20 14:42:44,282 :: ERROR :: 300 : ? 172.30.32.1 - - [20/Sep/2021 14:43:07] "GET /get_vehicleinfo/VIN?from_cache=1 HTTP/1.1" 200 - 2021-09-20 14:43:07,199 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&%3Falways_check=true' [GET]> 172.30.32.1 - - [20/Sep/2021 14:43:07] "GET /charge_control?vin=VIN&?always_check=true HTTP/1.1" 200 - 2021-09-20 14:43:41,794 :: INFO :: charging status of VIN is Disconnected, battery level: 92 2021-09-20 14:43:43,831 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/CUST/ThermalPrecond b'{"resp_date":"2021-09-20T12:43:43Z","vin":"VIN","correlation_id":"CID1","return_code":"300"}' 2021-09-20 14:43:43,832 :: ERROR :: 300 : ? 172.30.32.1 - - [20/Sep/2021 14:44:07] "GET /get_vehicleinfo/VIN?from_cache=1 HTTP/1.1" 200 - 2021-09-20 14:44:07,198 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&%3Falways_check=true' [GET]> 172.30.32.1 - - [20/Sep/2021 14:44:07] "GET /charge_control?vin=VIN&?always_check=true HTTP/1.1" 200 - 2021-09-20 14:44:36,257 :: INFO :: save config change 2021-09-20 14:44:36,258 :: INFO :: preconditioning: {"access_token": "e314ede8-e5b8-4a59-823f-95a11638af5e", "customer_id": "CUST", "correlation_id": "CID4", "req_date": "2021-09-20T12:44:36Z", "vin": "VIN", "req_parameters": {"asap": "deactivate", "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}}}} 172.30.32.1 - - [20/Sep/2021 14:44:36] "GET /preconditioning/VIN/0 HTTP/1.1" 200 - 2021-09-20 14:44:36,590 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/CUST/ThermalPrecond/ProcessManagement b'{"process_date":"2021-09-20T12:44:36Z","vin":"VIN","correlation_id":"CID4","process_code":"900","process_message":"[process.900.request.accepted.key]"}' 2021-09-20 14:44:36,722 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/CUST/ThermalPrecond/ProcessManagement b'{"process_date":"2021-09-20T12:44:36Z","vin":"VIN","correlation_id":"CID4","process_code":"901","process_message":"[process.901.vehicle.asleep.key]"}'

flobz commented 3 years ago

Well I did a new version. it should fix this problem v2.5.1.

DreamT80 commented 3 years ago

I did a clean reinstall of v2.5.1. Unfortunately I'm not getting it to work. I see a couple of warnings, but really don't know what they mean. Connection issue? Here is an example where I try to set the charge time to 5:00 AM.

`2021-09-21 17:12:54,091 :: WARNING :: charge begin but API isn't updated

2021-09-21 17:12:54,091 :: WARNING :: charge begin but API isn't updated

172.30.32.1 - - [21/Sep/2021 17:13:30] "GET /get_vehicleinfo/VIN?from_cache=1 HTTP/1.1" 200 -

2021-09-21 17:13:30,800 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&%3Falways_check=true' [GET]>

2021-09-21 17:13:30,800 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&%3Falways_check=true' [GET]>

172.30.32.1 - - [21/Sep/2021 17:13:30] "GET /charge_control?vin=VIN&?always_check=true HTTP/1.1" 200 -

2021-09-21 17:13:39,579 :: INFO :: level_fuel unfixed for VIN

2021-09-21 17:13:39,579 :: INFO :: level_fuel unfixed for VIN

2021-09-21 17:13:39,834 :: INFO :: new position recorded for VIN

2021-09-21 17:13:39,834 :: INFO :: new position recorded for VIN

2021-09-21 17:13:39,836 :: INFO :: update_data

2021-09-21 17:13:39,836 :: INFO :: update_data

2021-09-21 17:13:40,193 :: INFO :: charging status of VIN is Disconnected, battery level: 71

2021-09-21 17:13:40,193 :: INFO :: charging status of VIN is Disconnected, battery level: 71

2021-09-21 17:13:44,518 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&hour=5&minute=0' [GET]>

2021-09-21 17:13:44,518 :: INFO :: <Request 'http://172.30.33.5:5000/charge_control?vin=VIN&hour=5&minute=0' [GET]>

2021-09-21 17:13:44,520 :: INFO :: save config change

2021-09-21 17:13:44,520 :: INFO :: save config change

172.30.32.1 - - [21/Sep/2021 17:13:44] "GET /charge_control?vin=VIN&hour=5&minute=0 HTTP/1.1" 200 -

2021-09-21 17:13:54,150 :: INFO :: ask wakeup to VIN

2021-09-21 17:13:54,150 :: INFO :: ask wakeup to VIN

2021-09-21 17:13:54,641 :: INFO :: save config change

2021-09-21 17:13:54,641 :: INFO :: save config change

2021-09-21 17:13:54,642 :: INFO :: {"access_token": "ACCESS_TOKEN", "customer_id": "CUSTOMER_ID", "correlation_id": "CORRELATION_ID", "req_date": "2021-09-21T15:13:54Z", "vin": "VIN", "req_parameters": {"action": "state"}}

2021-09-21 17:13:54,642 :: INFO :: {"access_token": "ACCESS_TOKEN", "customer_id": "CUSTOMER_ID", "correlation_id": "CORRELATION_ID", "req_date": "2021-09-21T15:13:54Z", "vin": "VIN", "req_parameters": {"action": "state"}}

2021-09-21 17:13:54,644 :: WARNING :: Disconnected with result code 1

2021-09-21 17:13:54,644 :: WARNING :: Disconnected with result code 1

2021-09-21 17:13:55,016 :: INFO :: save config change

2021-09-21 17:13:55,016 :: INFO :: save config change

2021-09-21 17:13:56,756 :: INFO :: Connected with result code {'session present': 0}

2021-09-21 17:13:56,756 :: INFO :: Connected with result code {'session present': 0}

2021-09-21 17:13:56,757 :: INFO :: subscribe to psa/RemoteServices/to/cid/CUSTOMER_ID/#

2021-09-21 17:13:56,757 :: INFO :: subscribe to psa/RemoteServices/to/cid/CUSTOMER_ID/#

2021-09-21 17:13:56,758 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VIN

2021-09-21 17:13:56,758 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VIN`

I see some other errors in the log as well, but I think that they're concerning the UI rather than the above.

Traceback (most recent call last): File "/psa_car_controller/web/view/control.py", line 33, in get_control_tabs value=str(int(car.status.timed_odometer.mileage)))], TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' 2021-09-21 17:19:43,924 :: ERROR :: get_control_tabs: Traceback (most recent call last): File "/psa_car_controller/web/view/control.py", line 33, in get_control_tabs value=str(int(car.status.timed_odometer.mileage)))], TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' 172.30.32.1 - - [21/Sep/2021 17:19:43] "POST /_dash-update-component HTTP/1.1" 200 -

And an older one (probably not related to this either):

AttributeError: 'Config' object has no attribute 'chc'

flobz commented 3 years ago

Close as it doesn't follow the bug template