Code Monkey home page Code Monkey logo

Comments (4)

gboudreau avatar gboudreau commented on June 15, 2024

Works fine for me now. You?

from nissan-connect-php.

jeremyakers avatar jeremyakers commented on June 15, 2024

Nope, now I'm getting:

[2018-06-03 11:32:09] [NissanConnect] Using authToken, VIN and accountID found in local file /tmp/.nissan-connect-storage-67e2ade14f55bbcb1b4c6a2288e8986a.json
[2018-06-03 11:32:09] [NissanConnect] Request: POST https://icm.infinitiusa.com/NissanLeafProd/rest/battery/vehicles/<VIN>/getChargingStatusRequest []
An error occurred: Request for 'battery/vehicles/<VIN>/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>"

I think because "getChargingStatusRequest" should be accessed via GET rather than POST based on my looking at the mitmproxy data from the official app.

However: The official app is still not returning battery data either. It's returning "No content" instead of the expected JSON. I'm starting to think I may need to call Nissan.

from nissan-connect-php.

gboudreau avatar gboudreau commented on June 15, 2024

getChargingStatusRequest is sent via a GET, not a POST; it's just the log that incorrectly logs "POST".
Try the latest version of the class; it will fix the log, and will also retry to log in, when it receives a 405.

from nissan-connect-php.

gboudreau avatar gboudreau commented on June 15, 2024

I went back to the old API, but with an updated base URL, which seems to work just fine.
I kept the work I did for the new api in the new-api branch, in case we need it in the future, but for now, the new base URL should fix the issues we were having when Nissan deprecated the old URL.

from nissan-connect-php.

Related Issues (20)

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.