filcole / pycarwings2

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

API version used doesn't exist anymore. #34

Closed DBMandrake closed 2 years ago

DBMandrake commented 3 years ago

Hi,

For some time now, not sure how exactly how long as I haven't used pycarwings2 for a while, (but at least a few weeks) the API version used by pycarwings2 for the UK (api_v190426_NE) has been removed by Nissan: (404 not found)

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): gdcportalgw.its-mo.com:443
DEBUG:urllib3.connectionpool:https://gdcportalgw.its-mo.com:443 "POST /api_v190426_NE/gdc/InitialApp_v2.php HTTP/1.1" 404 234
DEBUG:pycarwings2.pycarwings2:Response HTTP Status Code: 404
DEBUG:pycarwings2.pycarwings2:Response HTTP Response Body: b'<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The requested URL /api_v190426_NE/gdc/InitialApp_v2.php was not found on this server.</p>\n</body></html>\n'

Also in addition to this problem a heads up - it looks like the API version used for version 3.6.0 of the iOS app (which was the most recent version until a few days ago when 3.6.1 was released) is also going to be removed by Nissan on the 11th of November as I received this warning on updating the app:

image

I think the wording is pretty clear that the API used by version 3.6.0 of the app will be removed in November as the previous versions of the API already have been and 3.6.1 is already using a new API version we haven't seen before... so I guess someone needs to trace version 3.6.1 of the app to find out what the new API URL is and whether there have been any significant changes, or whether tweaking the URL is enough to get it working again.

jason-kates-informa commented 3 years ago

It could be an issue with my config or a change to API's. I am getting 200 results instead of 404's. DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): gdcportalgw.its-mo.com:443 DEBUG:urllib3.connectionpool:https://gdcportalgw.its-mo.com:443 "POST /api_v210707_NE/gdc/UserLoginRequest.php HTTP/1.1" 200 None DEBUG:pycarwings2.pycarwings2:Response HTTP Status Code: 200 DEBUG:pycarwings2.pycarwings2:Response HTTP Response Body: b'{"status":"-2010","message":"INVALID PARAMS"}' ERROR:pycarwings2.pycarwings2:carwings error INVALID PARAMS: -2010 Traceback (most recent call last): File "/home/jkates/repos/github/pycarwings2/examples/./get-leaf-info.py", line 61, in leaf = s.get_leaf() File "/home/jkates/python3/lib64/python3.9/site-packages/pycarwings2/pycarwings2.py", line 217, in get_leaf self.connect() File "/home/jkates/python3/lib64/python3.9/site-packages/pycarwings2/pycarwings2.py", line 188, in connect response = self._request("UserLoginRequest.php", { File "/home/jkates/python3/lib64/python3.9/site-packages/pycarwings2/pycarwings2.py", line 165, in _request raise CarwingsError("INVALID PARAMS") pycarwings2.pycarwings2.CarwingsError: INVALID PARAMS

filcole commented 2 years ago

Are you still getting this?

gr0mit1 commented 2 years ago

Hi I'm also seeing issues - see debug log below: INFO:root:Prepare Session INFO:root:Login... INFO:root:Connected to MQTT host localhost with result code 0 INFO:root:Start update time: 2021-12-28 16:38:53 INFO:root:Suscribing to leaf control topic: emon/leaf/control DEBUG:pycarwings2.pycarwings2:invoking carwings API: https://gdcportalgw.its-mo.com/api_v190426_NE/gdc/InitialApp.php INFO:root:Publishing to leaf status topic: emon/openevse DEBUG:pycarwings2.pycarwings2:params: { "RegionCode": "NE", "custom_sessionid": "", "initial_app_strings": "geORNtsZe5I4lRGjG9GZiA", "lg": "en-US" } DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): gdcportalgw.its-mo.com:443 DEBUG:urllib3.connectionpool:https://gdcportalgw.its-mo.com:443 "POST /api_v190426_NE/gdc/InitialApp.php HTTP/1.1" 404 231 DEBUG:pycarwings2.pycarwings2:Response HTTP Status Code: 404 DEBUG:pycarwings2.pycarwings2:Response HTTP Response Body: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

404 Not Found

Not Found

The requested URL /api_v190426_NE/gdc/InitialApp.php was not found on this server.

ERROR:root:CarWings API error INFO:root:Schedule API update every 15min

Has anything changed? Cheers!

Ez2517-Git commented 2 years ago

api_v190426 is outdated, the current version of pycarwings2 uses api_v210707.

filcole commented 2 years ago

Closing.