Comments (8)
Without access to an account that has such a vehicle on file, I can't test anything of that sort.
My guess: they won't be available on the old API, but would be available on the new one.
I have a branch that uses the new API: https://github.com/gboudreau/nissan-connect-php/tree/new-api
Maybe you can try both that branch and master, and just by enabling DEBUG ($nissanConnect->debug = FALSE;
) you should be able to see the response received from the server, and thus see if the info you need is in there (for the indoor temp).
For the commands, searching other LEAF project on Github, you might find an answer to those. Otherwise, someone with a new LEAF on his account would need to use an HTTPS proxy to sniff the traffic of the Nissan Connect app.
from nissan-connect-php.
Thanks for the reaply, the master API works very well with the Gen2. I will enable debut and see what the server gives. And will try to find the command for locking doors ;) And FYI, I'm still using a script from June with URL https://icm.infinitiusa.com/NissanLeafProd/rest/ and it works pretty good! :)
from nissan-connect-php.
This is the response it gets.. Indoor temp would be inc-temp:
{
"batteryRecords": {
"operationResult": "START",
"lastUpdatedDateAndTime": "2019-01-17T18:33:31Z",
"batteryStatus": {
"batteryChargingStatus": "YES",
"batteryCapacity": 100,
"batteryRemainingAmount": 94,
"soc": {
"value": 94
}
},
"pluginState": "CONNECTED",
"cruisingRangeAcOn": 187000,
"cruisingRangeAcOff": 233000,
"timeRequired": null,
"timeRequired200": null,
"timeRequired200_6kW": {
"hourRequiredToFull": 1,
"minutesRequiredToFull": 30
},
"notificationDateAndTime": null
},
"temperatureRecords": {
"operationResult": null,
"operationDateAndTime": null,
"notificationDateAndTime": null,
"inc_temp": "13.5"
},
"noBatteryRecords": null,
"noTemperatureRecords": null,
"status": 200
}
from nissan-connect-php.
For the temperature, this is the page it connects to, to start climate. Notice climateTemp at the end of the querystring... So maybe if we send this it would work:
https://carwings.mynissan.ca/owners/leaf/setHvacMY18?vin=1N4AZ1CP6JCXXXXXX&fan=on&climateTemp=22
from nissan-connect-php.
The HVAC start on the new API is hvac/vehicles/{$this->config->vin}/activateHVAC
; looks pretty different than what you found. Not sure adding a param there would help.
You can try to modify this function:
public function startClimateControl($waitForResult = FALSE, $target_temperature = NULL) {
$this->prepare();
$params = array('executionTime' => date('c'));
if (!empty($target_temperature)) {
$params['climateTemp'] = $target_temperature;
}
$result = $this->sendRequest("hvac/vehicles/{$this->config->vin}/activateHVAC", $params);
return $result;
}
from nissan-connect-php.
Ah, wait. I found some doc about it. I'll commit something in a few seconds.
from nissan-connect-php.
Try the new version from here: https://github.com/gboudreau/nissan-connect-php/tree/new-api
Interior temperature will be in $status->interior_temperature
,
and you can set the target temperature with
$nissan-> startClimateControl(FALSE, 22, 'C');
or
$nissan-> startClimateControl(FALSE, 72, 'F');
from nissan-connect-php.
Remote door lock has been added in the same branch (commit 575f838).
from nissan-connect-php.
Related Issues (20)
- "status":"-2010","message":"INVALID PARAMS" HOT 2
- Find my car function HOT 9
- get-leaf-location example not working HOT 1
- Base URL Changed Again? HOT 3
- Issue with last Commit HOT 6
- Issue with new API -- No battery info? HOT 4
- Intermittent Connexion Issues? HOT 11
- Receiving INVALID PARAMS response HOT 1
- does not work since mid-December 2018 .... HOT 8
- Nissan changed api again HOT 8
- New Leaf 2019 Protocol HOT 15
- New Response since Nov 21st? HOT 2
- Response Authentication error HOT 7
- New fix does not work when changing request source. HOT 2
- API error, NoRecordInDatabase HOT 3
- BlahBlah?? HOT 10
- The return of the BlahBlah code :( HOT 4
- Here we go again! :) HOT 4
- Still getting Unauthorized response after last update HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nissan-connect-php.