filcole / pycarwings2

Python library for interacting with the NissanConnect EV (aka CARWINGS) telematics service.
Apache License 2.0
33 stars 20 forks source link

Raising wait time in example from 10 to 30 gives better results? #11

Closed rduivenvoorde closed 5 years ago

rduivenvoorde commented 5 years ago

Hi, thanks for all the work! This works with me here in NL. Trying out the plain examples, my feeling is that in this example: examples/get-leaf-info.py if you raise the wait time from 10 to 30 seconds that you will have a result within 1 minute. While waiting 10 seconds it can run 'forever'. Can others maybe reproduce this?

filcole commented 5 years ago

Hi, I've just tried increasing the timeout from 10 to 30 to 60 and then 240 and don't get any different result back. I'm always getting

DEBUG:urllib3.connectionpool:https://gdcportalgw.its-mo.com:443 "POST /api_v181217_NE/gdc/BatteryStatusCheckResultRequest.php HTTP/1.1" 200 None
DEBUG:pycarwings2.pycarwings2:Response HTTP Status Code: 200
DEBUG:pycarwings2.pycarwings2:Response HTTP Response Body: b'{"status":200,"responseFlag":"0"}'
No update, see latest_battery_status has changed

I do think the initial timeout of 10 seconds is too quick, and will increase to 30 seconds.

filcole commented 5 years ago

Increased timeout to 30 seconds in commit https://github.com/filcole/pycarwings2/commit/5ab6c4a159443d51f98837014a47e4ca8932bb06