Git Product home page Git Product logo

nissan-connect-php's People

Contributors

carestad avatar cedric222 avatar gboudreau avatar grothkopp avatar linuscorin avatar mrpjevans avatar raiden38 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nissan-connect-php's Issues

Don't wait for results when sending "Charge On"

Is there a way to send the startCharge function without waiting for an answer, just like the Climate Control? Just to avoid timeouts?

Perhaps that would make sense?

public function startCharge($waitForResult=FALSE) {
    $this->prepare();
    $result = $this->sendRequest('BatteryRemoteChargingRequest.php');
    if ($waitForResult) {
        // Wait until it completes
        return $result;
    }
}

Thanks!

Nissan changed api again

It looks like Nissan changed their API (or API URL) again. Within the European Nissan EV app they are now stating that a new version of the app is available and the old app has stopped working by July 29th.

Does anyone know the new API configuration so this PHP class can be updated as well?

Here we go again! :)

It's this time of year where they change everything and it does not work anymore! So any request will result in a Unauthorised request. I guess they changed the API authentification process or key... Anyways, if you can update your api with the new authentification code, if available, would be awesome!

Thanks again!

Steven

Response Authentication error

I got this message since last 2 days:

Request for 'GET https://icm.infinitiusa.com/NissanLeafProd/rest/battery/vehicles/1N4AZ1CP6XXXXXXXX/getChargingStatusRequest' failed. Response received: "<html><head><title>JBoss Web\/7.4.10.Final-redhat-1 - JBWEB000064: Error report<\/title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--><\/style> <\/head><body><h1>JBWEB000065: HTTP Status 401 - Unauthorized<\/h1><HR size=\"1\" noshade=\"noshade\"><p><b>JBWEB000309: type<\/b> JBWEB000067: Status report<\/p><p><b>JBWEB000068: message<\/b> <u>Unauthorized<\/u><\/p><p><b>JBWEB000069: description<\/b> <u>JBWEB000121: This request requires HTTP authentication.<\/u><\/p><HR size=\"1\" noshade=\"noshade\"><h3>JBoss Web\/7.4.10.Final-redhat-1<\/h3><\/body><\/html>"

Getting more information from Carwings

Hi!
This is not an issue.

When you use Nissan Connect, you can get alot of stats from the car (driving km, consumption, etc etc.). Do you think there would be a way to get this information? This way, we could automaticaly builld our own stats page. Thanks!

New Leaf 2019 Protocol

Hi,

I replace my old leaf 2016, with a very new 2019, and the new apps is "Nissan Connect Services" and no more "Nissan Connect EV".
Unfortunately, I have now a http 408 error with nissan-connect-php... do you know if someone already try to reverse engineering this new apps ?

thanks

cedric

New fix does not work when changing request source.

First, let me thank you for posting a new fix on Oct 24th, I am sooo happy to be able to use my custom webpage again! The issue I am having is that when you change source, or after a delay, the script does not work anymore. In the issue page, you mention to delete the json cache from the server. When I do that, it works fine on my PC. Then I check the page on my iphone, and it does not work anymore. I go back on my pc browser (that was working) and it's not working anymore. If I delete back that json file, it works again, until I try from another source.

Do you think we could remove that file save/reading? Can it maybe delete the file after sending the request?

Missing RemoteACRecords

Since April 4th, I get this error when pulling status: Missing 'RemoteACRecords' in response received in call to 'RemoteACRecordsRequest.php': {"status":200}

Error getting information

Hello,

I'm trying to use your example code but I got this error:
An error occurred: Request for 'RemoteACRecordsRequest.php' failed. Response received: {"status":400,"message":"\u8981\u6c42\u30a8\u30e9\u30fc","OperationDateAndTime":""}

The authentication should be ok because I got a different error if I specify fake user or password.

Thanks for your help

Receiving INVALID PARAMS response

Using the password that I log into the CarWings website with, and using a copy of the example app, I just get an INVALID PARAMS response:

$ php getStatus.php
[2018-08-04 23:08:44] [NissanConnect] Request: POST https://gdcportalgw.its-mo.com/gworchest_160803EC/gdc/InitialApp.php {"custom_sessionid":"","initial_app_strings":"geORNtsZe5I4lRGjG9GZiA","RegionCode":"NE","lg":"en-US","DCMID":"","VIN":"","tz":"Europe\/Dublin"}
[2018-08-04 23:08:45] [NissanConnect] Response: {"status":200,"message":"success","baseprm":"uyI5Dj9g8VCOFDnBRUbr3g"}
[2018-08-04 23:08:45] [NissanConnect] Request: POST https://gdcportalgw.its-mo.com/gworchest_160803EC/gdc/UserLoginRequest.php {"UserId":"[email protected]","Password":"XXXXXXXXXXXX","custom_sessionid":"","initial_app_strings":"geORNtsZe5I4lRGjG9GZiA","RegionCode":"NE","lg":"en-US","DCMID":"","VIN":"","tz":"Europe\/Dublin"}
An error occurred: Request for 'UserLoginRequest.php' failed. Response received: {"status":"-2010","message":"INVALID PARAMS"}

I see the same error using the github.com/joeshaw/carwings code, so this isn't PHP specific - just frustrating :-/

Thanks,
Andrew McMillan.

Issue with last Commit

With the last update, I get this issue: Request for 'battery/vehicles/1N4AZ0CP8FC30XXXX/getChargingStatusRequest' failed. Response received: "<html><head><title>JBoss Web\/7.4.10.Final-redhat-1 - JBWEB000064: Error report<\/title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--><\/style> <\/head><body><h1>JBWEB000065: HTTP Status 405 - <\/h1><HR size=\"1\" noshade=\"noshade\"><p><b>JBWEB000309: type<\/b> JBWEB000067: Status report<\/p><p><b>JBWEB000068: message<\/b> <u><\/u><\/p><p><b>JBWEB000069: description<\/b> <u>JBWEB000125: The specified HTTP method is not allowed for the requested resource.<\/u><\/p><HR size=\"1\" noshade=\"noshade\"><h3>JBoss Web\/7.4.10.Final-redhat-1<\/h3><\/body><\/html>"

New Response since Nov 21st?

Seems I have been getting a new formatted response to the pull inquiry:

[03-Dec-2019 21:02:48 Canada/Eastern] [2019-12-03 21:02:48] [NissanConnect] Response: {"status":200,"VoltLabel":{"HighVolt":"240","LowVolt":"120"},"BatteryStatusRecords":{"OperationResult":"START","OperationDateAndTime":"Dec 3, 2019 08:50 PM","BatteryStatus":{"BatteryChargingStatus":"NOT_CHARGING","BatteryCapacity":"240","BatteryRemainingAmount":"74","BatteryRemainingAmountWH":"11600","BatteryRemainingAmountkWH":"","SOC":{"Value":"31"}},"PluginState":"NOT_CONNECTED","CruisingRangeAcOn":"64000","CruisingRangeAcOff":"75000","TimeRequiredToFull":{"HourRequiredToFull":"24","MinutesRequiredToFull":"0"},"TimeRequiredToFull200":{"HourRequiredToFull":"9","MinutesRequiredToFull":"30"},"TimeRequiredToFull200_6kW":{"HourRequiredToFull":"5","MinutesRequiredToFull":"30"},"NotificationDateAndTime":"2019/12/04 01:50","TargetDate":"2019/12/04 01:50"}}

Not quite sure if it's a new way of getting the data or just my car that is causing some troubles… The nissan connect app always tells me that it cannot contact my car but the website, seems to work fine. Did you notice any changes on your side?

BlahBlah??

F1FC5888-1FE7-4BF7-B62B-047E331351C9
Since Sept 9, I get a Non-JSON response: BlahBlah! This is very weird. Any other have the issue? Maybe the URL have changed? On Nissan got hacked? Lol

Issue with new API -- No battery info?

I don't think this is an issue with the nissan-connect-php class, but I wanted to raise it just in case.

I'm no longer getting updated battery info after the switch to the new API (Was working fine until May 27 when the old API shut down) It also updates fine on the Nissan Owners Portal, so this issue is specific to the new API:

php test.php 
[2018-05-31 09:43:31] [NissanConnect] Request: POST https://icm.infinitiusa.com/NissanLeafProd/rest/auth/authenticationForAAS {"authenticate":{"userid":"[email protected]","password":"MyPassword","brand-s":"N","language-s":"en","country":"US"}}
[2018-05-31 09:43:41] [NissanConnect] Response: {"vehicles":[{"uvi":"<MyVIN>","brands":"N","modelcode":"17216","modelname":"LEAF","modelyear":"2016","extcolor":"PEARL WHITE","nickname":"2016 Leaf","pinAndPassword":null,"batteryRecords":null,"interiorTempRecords":null,"subcriptionList":null,"genType":null,"deviceId":null,"svlStatus":null,"accountId":null,"contactId":null,"subscriberType":null,"subscriptionId":null,"firstName":null,"lastName":null,"rdlRequestId":null,"rdulRequestId":null,"accountStatus":null,"productSpecificationCode":null,"remoteStartReqId":null,"remoteStopReqId":null,"enrollmentCompleted":true}],"authenticationInfo":{"pinConfigured":false,"securityQuestions":null},"displayMessage":"BatteryStatusRecords not available for the user","displayNoTemperatureMessage":"InteriorTemperature Records are  not available for the VIN","accountID":"<accountID>","authToken":"<authToken>","status":200}
[2018-05-31 09:43:41] [NissanConnect] Saving authToken, VIN and accountID into local file /tmp/.nissan-connect-storage-<redacted>.json
[2018-05-31 09:43:41] [NissanConnect] Request: POST https://icm.infinitiusa.com/NissanLeafProd/rest/battery/vehicles/<MyVIN>/getChargingStatusRequest []
An error occurred: Non-JSON response received for request to 'battery/vehicles/<MyVIN>/getChargingStatusRequest'. Response received: ""

I checked the app itself with mitmproxy, and the official Nissan App has the same issue. I just have never noticed because I never use the official app anymore.

Any thoughts on how to resolve this? Everything else in the new API seems to work. HVAC start/stop, driving and electricity records, etc. Everything is fine except for battery status updates.

Call to 'RemoteACRecordsRequest.php' results in an error

When I try to get the status of my vehicle, I receive the error below. I am using the latest code. I see that you encountered this error previously and fixed it so a similar change may need to be made. Thanks

An error occurred: Invalid 'OperationResult' received in call to 'RemoteACRecordsRequest.php': ELECTRIC_WAVE_ABNORMAL

"status":"-2010","message":"INVALID PARAMS"

I have a Problem with the User-Login:
An error occurred: Request for 'UserLoginRequest.php' failed. Response received: {"status":"-2010","message":"INVALID PARAMS"}
I have a Modelyear 2014 Leaf made for Austria.
Maybe there is a general Issue?

Still getting Unauthorized response after last update

Salut!!!

Even with the fix that you have done a few days ago (thanks for that btw!!), I still get this error message:

Request for 'POST https://icm.infinitiusa.com/NissanConnectEVProd/rest/auth/authenticationForAAS' failed. Response received: <title>Error</title>Unauthorized

I am not quite sure what might be the issue, as I just overwrited the class with the new content, just like I do normally.

Error_Log:

[01-Feb-2022 22:45:25 Canada/Eastern] [2022-02-01 22:45:25] [NissanConnect] Request: POST https://icm.infinitiusa.com/NissanConnectEVProd/rest/auth/authenticationForAAS {"authenticate":{"userid":"XXXXXXXXXXXXXX","password":"XXXXXXXXXXXXXX","brand-s":"N","language-s":"en","country":"CA"}}
[01-Feb-2022 22:45:25 Canada/Eastern] [2022-02-01 22:45:25] [NissanConnect] Request for 'POST https://icm.infinitiusa.com/NissanConnectEVProd/rest/auth/authenticationForAAS' failed. Response received: <html><head><title>Error</title></head><body>Unauthorized</body></html>. Will retry.
[01-Feb-2022 22:45:25 Canada/Eastern] [2022-02-01 22:45:25] [NissanConnect] Request: POST https://icm.infinitiusa.com/NissanConnectEVProd/rest/auth/authenticationForAAS {"authenticate":{"userid":"XXXXXXXXXXXXXX","password":"XXXXXXXXXXXXXX","brand-s":"N","language-s":"en","country":"CA"}}

Any ideas?

API error, NoRecordInDatabase

This isn't really an issue with nissan-connect-php as such, but since I lack a better place to discuss it, I'm bringing it up here.

I can update the battery status, from PHP, from the NissanConnect web site, and even with the official Android app.

However, I cannot start climate control. It sends the command via https://gdcportalgw.its-mo.com/api_v190426_NE/gdc/ACRemoteRequest.php, but then gets an error message when looking for the result via ACRemoteResult.php.

Response received: {"status":"-6004","ErrorCode":"-6004","ErrorMessage":"NoRecordInDatabase"}
Does anyone else have the same problem? I've tried with Nissan customer service, but they have no idea, and I think the customer service people don't even have a way of passing the issue on to someone who has enough access/knowledge to be able to troubleshoot.

Find my car function

Is it possible to implement the find my car function as well to get the latitude and longitude of the car?

new api url's?

Hi,

Thanks for you work, I've used it to create a small 'batterystatus' cli for myself last months.

Recently it stopped working (as the Android 'Leaf Manager' app), raising a 404....

BUT the 'leaf manager' app apparently started working again:

I see the author of the app talking here:

http://www.mynissanleaf.com/viewtopic.php?f=31&t=2214&sid=0735bb59ec930c8b6f2e95cb6f308e3b&start=120

fyi, the app I mean; https://play.google.com/store/apps/details?id=no.darkspawns.leafmanager

this python api also fixed stuff apparently: https://github.com/jdhorne/pycarwings2/commits/master

If I find time, i'll see if I can have a look into this too, but my php is a little rusty :-)

get-leaf-location example not working

thanks for the library!

the get location example doesn't seem to work for some reason. the other tests run fine.

here's the error:

Prepare Session
Login...
request_location
ERROR:pycarwings2.pycarwings2:carwings error -5256: [MyCarFinder] API call error
Traceback (most recent call last):
  File "get-leaf-location.py", line 32, in <module>
    result_key = l.request_location()
  File "C:\Python27\lib\site-packages\pycarwings2\pycarwings2.py", line 415, in request_location
    "UserId": self.session.gdc_user_id, # this userid is the 'gdc' userid
  File "C:\Python27\lib\site-packages\pycarwings2\pycarwings2.py", line 101, in _request_with_retry
    ret = self._request(endpoint, params)
  File "C:\Python27\lib\site-packages\pycarwings2\pycarwings2.py", line 141, in _request
    raise CarwingsError
pycarwings2.pycarwings2.CarwingsError

Leaf Gen2

Enhancement - Not an Issue

With the new Leaf's gen2 available, can you check if we can get the folowing (they are available in Nissan Connect app):

  • While retreiving data: indoor temperature
  • Send Door Lock command (Not unlock, for security reasons)
  • Send Temperature requested when sending climate on

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.