gboudreau / LEAF_Carwings_EasyAccess

One-click access to LEAF Carwings remote actions
16 stars 9 forks source link

Connection refused #5

Closed TheWolfenstein closed 6 years ago

TheWolfenstein commented 6 years ago

First of all thanks for this! Been looking forward for this to integrate in my openhab panel! However an error returns:

Error during request to https://gdcportalgw.its-mo.com/gworchest_160803A/gdc/InitialApp.php: Failed to connect to gdcportalgw.its-mo.com port 443: Connection refused

ianshepherd commented 6 years ago

The servers have been swamped this morning with people preheating their cars. I couldn't get on with One-touch LEAF Controls or the official Nissan app. Friends reporting the same with this-party app Leaf Manager

On 7 Feb 2018 11:12 a.m., "L0g4nX0" notifications@github.com wrote:

First of all thanks for this! Been looking forward for this to integrate in my openhab panel! However an error returns:

Error during request to https://gdcportalgw.its-mo. com/gworchest_160803A/gdc/InitialApp.php: Failed to connect to gdcportalgw.its-mo.com port 443: Connection refused

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gboudreau/LEAF_Carwings_EasyAccess/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/AY4TDRaIEkf8Nv_Wbth_5Iqu5UHX4ArDks5tSYUGgaJpZM4R8iTo .

ianshepherd commented 6 years ago

*third-party, sorry

On 7 Feb 2018 11:19 a.m., "Ian Shepherd" theplaybus@gmail.com wrote:

The servers have been swamped this morning with people preheating their cars. I couldn't get on with One-touch LEAF Controls or the official Nissan app. Friends reporting the same with this-party app Leaf Manager

On 7 Feb 2018 11:12 a.m., "L0g4nX0" notifications@github.com wrote:

First of all thanks for this! Been looking forward for this to integrate in my openhab panel! However an error returns:

Error during request to https://gdcportalgw.its-mo.com /gworchest_160803A/gdc/InitialApp.php: Failed to connect to gdcportalgw.its-mo.com port 443: Connection refused

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gboudreau/LEAF_Carwings_EasyAccess/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/AY4TDRaIEkf8Nv_Wbth_5Iqu5UHX4ArDks5tSYUGgaJpZM4R8iTo .

TheWolfenstein commented 6 years ago

Ah! Perhaps that's the thing. Been trying since yesterday :)

TheWolfenstein commented 6 years ago

Actually the Nissan app works fine here, but the connection refused might be something else?

gboudreau commented 6 years ago

Works for me. If you are still having issues, try checking your server can connect to the URL you see in the error message:

curl -v 'https://gdcportalgw.its-mo.com/gworchest_160803A/gdc/InitialApp.php'

I get this:

$ curl -v 'https://gdcportalgw.its-mo.com/gworchest_160803A/gdc/InitialApp.php'
*   Trying 54.199.149.235...
* TCP_NODELAY set
* Connected to gdcportalgw.its-mo.com (54.199.149.235) port 443 (#0)
...
> GET /gworchest_160803A/gdc/InitialApp.php HTTP/1.1
> Host: gdcportalgw.its-mo.com
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Wed, 07 Feb 2018 18:30:09 GMT
< Server: Apache
< Strict-Transport-Security: max-age=15768000
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
< 
* Connection #0 to host gdcportalgw.its-mo.com left intact
{"status":404,"message":"INVALID PARAMS"}
TheWolfenstein commented 6 years ago

Thx for the answer @gboudreau

Uploaded to another server and got another error message:

Request for 'UserLoginRequest.php' failed. Response received: {"status":"-2010","message":"INVALID PARAMS"}

I have curlSSL installed so i don't know if it would cause an issue?

TheWolfenstein commented 6 years ago

Request: POST https://gdcportalgw.its-mo.com/gworchest_160803A/gdc/UserLoginRequest.php {"UserId":"redacted","Password":"redacted","custom_sessionid":"","initial_app_strings":"geORNtsZe5I4lRGjG9GZiA","RegionCode":"NE","lg":"en-US","DCMID":"","VIN":"","tz":"Europe\/Oslo"}

This came from the log

TheWolfenstein commented 6 years ago

and config: `<?php

$cars = array( // To get new GUID numbers, you can use Perl's DATA::UUID Perl module // available online at http://www.somacon.com/p113.php 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' => (object) array( 'username' => 'xxxxxxx@xxx.xxx', 'password' => 'xxxxxxxx', 'country' => NissanConnect::COUNTRY_EU, 'tz' => 'Europe/Oslo' ), );

// Change to TRUE if you can't use openssl_encrypt(). // This will use a remote web service to encrypt your password. $encrypt_using_webservice = FALSE; `

TheWolfenstein commented 6 years ago

Don't know why but it is now working, changed email address to username, created a new GUID and it's all good

gboudreau commented 6 years ago

Pretty sure you can't login with the email address; you need to use the username. Does the example/readme mention using the email address to login?

TheWolfenstein commented 6 years ago

Yes it does in the description

  1. Enter your Nissan Connect username (email address) and password.

and config.inc

'username' => '_your_email_addresshere',

Also, even after changing you need to create a new GUID otherwise error remains.