Nissan Leaf Support Request
A user has a raised a ticket: https://www.openvehicles.com/node/2053 <https://www.openvehicles.com/node/2053> I would like to be able to turn my A/C on and off remotely as discussed http://www.arachnon.de/wb/pages/en/nissan-leaf/ovms.php <http://www.arachnon.de/wb/pages/en/nissan-leaf/ovms.php> here. When I use their version of the OVMS app it just crashes repeatedly after I input my car's settings so I can't use it. However when I use the play market version of the app, there is no A/C button but it runs solidly and I can see my car's information (it works). Is there a way to turn the A/C on and off with this version of the app? Also, I'm assuming (perhaps incorrectly) that the latest hardware already has the features built in and no flashing is necessary. Bonus questions: In the app it seems there's an ability to unlock my car and to put it in valet mode but those features need a pin. Where does this pin come from and do the features really work? What is valet mode anyway? What is the 'Features' section of the app for? I see that I need to set my #15 CAN Write to 1 before I can expect the A/C control to work which I've done but is there any info on what the rest of it does? Server: 2.1.1-20121216 Car: 3.1.006 App: 3.12.4 (20180428 Update: The remote A/C worked with homelink 1 and 2 when I got home to charge. I don't have a model with navigation or car wings so I don't think I have the option mentioned about when to allow remote A/C with respect to SOC level. Is it possible that there's a way to set this option with the OVMS? Can a Nissan Leaf developer/expert help out with this? Regards, Mark
On 01/07/18 21:23, Mark Webb-Johnson wrote:
A user has a raised a ticket:
I can't see this link
I would like to be able to turn my A/C on and off remotely as discussed http://www.arachnon.de/wb/pages/en/nissan-leaf/ovms.php here. When I use their version of the OVMS app it just crashes repeatedly after I input my car's settings so I can't use it. However when I use the play market version of the app, there is no A/C button but it runs solidly and I can see my car's information (it works). Is there a way to turn the A/C on and off with this version of the app? Also, I'm assuming (perhaps incorrectly) that the latest hardware already has the features built in and no flashing is necessary.
You want to use the play store version. I'm running 3.12.4 from the Play store and when connected to a Leaf, I see the AC button.
Bonus questions: In the app it seems there's an ability to unlock my car and to put it in valet mode but those features need a pin. Where does this pin come from and do the features really work? What is valet mode anyway?
Not all cars support lock and unlock or valet mode. We have some code that works for lock/unlock on the Leaf but it's not yet finished. There are no plans to support valet mode.
What is the 'Features' section of the app for? I see that I need to set my #15 CAN Write to 1 before I can expect the A/C control to work which I've done but is there any info on what the rest of it does?
You don't need this for OVMS v3.
Server: 2.1.1-20121216 Car: 3.1.006 App: 3.12.4 (20180428 Update: The remote A/C worked with homelink 1 and 2 when I got home to charge. I don't have a model with navigation or car wings so I don't think I have the option mentioned about when to allow remote A/C with respect to SOC level. Is it possible that there's a way to set this option with the OVMS?
We still support climate control with homelink 1 & 2 for old apps. This at least lets use separate your climate control button problem questions about how the AC works. Which model year Leaf do you have? Older than 2013 may require extra hardware to enable climate control when the car is asleep. 2013 through 2015 use a different remote climate control to that of 2016 & 2017. You have to set the module year configuration option to tell the OVMS which car you have. 2018 Leafs are not yet supported. We made a change to how the climate control is switched off recently and this is probably in the latest firmware (which you don't have on your OVMS). We don't have a way way to configure the remote climate control -- the OVMS simply sends the enable command to the car and the car does it's thing.
Thanks Tom, I will relay this on. I have also updated your permissions on the site, to be able to see this and other support tickets. Regards, Mark
On 5 Jul 2018, at 4:34 PM, Tom Parker <tom@carrott.org> wrote:
On 01/07/18 21:23, Mark Webb-Johnson wrote:
A user has a raised a ticket:
https://www.openvehicles.com/node/2053 <https://www.openvehicles.com/node/2053> I can't see this link
I would like to be able to turn my A/C on and off remotely as discussed http://www.arachnon.de/wb/pages/en/nissan-leaf/ovms.php <http://www.arachnon.de/wb/pages/en/nissan-leaf/ovms.php> here. When I use their version of the OVMS app it just crashes repeatedly after I input my car's settings so I can't use it. However when I use the play market version of the app, there is no A/C button but it runs solidly and I can see my car's information (it works). Is there a way to turn the A/C on and off with this version of the app? Also, I'm assuming (perhaps incorrectly) that the latest hardware already has the features built in and no flashing is necessary.
You want to use the play store version. I'm running 3.12.4 from the Play store and when connected to a Leaf, I see the AC button.
Bonus questions: In the app it seems there's an ability to unlock my car and to put it in valet mode but those features need a pin. Where does this pin come from and do the features really work? What is valet mode anyway?
Not all cars support lock and unlock or valet mode. We have some code that works for lock/unlock on the Leaf but it's not yet finished. There are no plans to support valet mode.
What is the 'Features' section of the app for? I see that I need to set my #15 CAN Write to 1 before I can expect the A/C control to work which I've done but is there any info on what the rest of it does?
You don't need this for OVMS v3.
Server: 2.1.1-20121216 Car: 3.1.006 App: 3.12.4 (20180428 Update: The remote A/C worked with homelink 1 and 2 when I got home to charge. I don't have a model with navigation or car wings so I don't think I have the option mentioned about when to allow remote A/C with respect to SOC level. Is it possible that there's a way to set this option with the OVMS? We still support climate control with homelink 1 & 2 for old apps. This at least lets use separate your climate control button problem questions about how the AC works.
Which model year Leaf do you have? Older than 2013 may require extra hardware to enable climate control when the car is asleep. 2013 through 2015 use a different remote climate control to that of 2016 & 2017. You have to set the module year configuration option to tell the OVMS which car you have. 2018 Leafs are not yet supported.
We made a change to how the climate control is switched off recently and this is probably in the latest firmware (which you don't have on your OVMS). We don't have a way way to configure the remote climate control -- the OVMS simply sends the enable command to the car and the car does it's thing.
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
On Thu, Jul 05, 2018 at 08:34:34PM +1200, Tom Parker wrote:
You want to use the play store version. I'm running 3.12.4 from the Play store and when connected to a Leaf, I see the AC button.
I updated the app to 3.12.4.(20180428), but it looks the same as before; I don't see an AC button. What am I missing?
On 11/07/18 23:25, Robin O'Leary wrote:
On Thu, Jul 05, 2018 at 08:34:34PM +1200, Tom Parker wrote:
You want to use the play store version. I'm running 3.12.4 from the Play store and when connected to a Leaf, I see the AC button. I updated the app to 3.12.4.(20180428), but it looks the same as before; I don't see an AC button. What am I missing?
The AC button is controlled by the capabilities message which, it turns out, isn't implemented in OVMS v3. I think the server is sending _my_ clients a capabilities message because, I guess, at one stage I sent one to the server (probably by connecting an OVMS v2 module). In OVMS v2 the Nissan Leaf module has: // Nissan Leaf capabilities: // - CMD_StartCharge (11) // - CMD_Homelink (24) // - CMD_ClimateControl (26) rom char nissanleaf_capabilities[] = "C11,C24,C26"; and reading the code in net_msg.c, it looks like the capabilities message for a Leaf would be MP-0 VC11,C24,C26,C1-6,C40-41,C49 which is what the server sends me when I connect a client to my vehicles. The following untested patch should make it work, but is obviously inappropriate because the capabilities depend on the vehicle. diff --git a/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp b/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp index faa2e6c..6e9d28f 100644 --- a/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp +++ b/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp @@ -1272,6 +1272,7 @@ void OvmsServerV2::TransmitMsgEnvironment(bool always) void OvmsServerV2::TransmitMsgCapabilities(bool always) { m_now_capabilities = false; + Transmit("MP-0 VC11,C24,C26,C1-6,C40-41,C49"); } void OvmsServerV2::TransmitMsgGroup(bool always)
I think the capabilities are useful, but need to be done in a better, more future-proof, way. Relying on protocol v2 commands is limited. Here is what it was in OVMS v2: $ fgrep '_capabilities[' ve* vehicle_kiasoul.c:rom char vehicle_kiasoul_capabilities[] = "C6,C20-24"; vehicle_nissanleaf.c:rom char nissanleaf_capabilities[] = "C11,C24,C26"; vehicle_teslaroadster.c:rom char teslaroadster_capabilities[] = "C10-12,C15-24"; vehicle_twizy.c:rom char vehicle_twizy_capabilities[] = "C6,C20-24,C200-210"; vehicle_twizy.c:rom char vehicle_twizy_capabilities[] = "C6,C20-24,C200-204,C207-210"; vehicle_zoe.c:rom char vehicle_zoe_capabilities[] = ""; The iOS App doesn’t seem to use them at all, but Android App has some support. From what I can see, the Android App stores the capabilities in a boolean array, and then exposes a hasCommand() function to check a particular capability. But a fgrep for hasCommand in the Android App only shows one pCarData.hasCommand(26), which is what is controlling this remote climate control. I don’t think any capability other than C26 is currently used by the standard Apps. Capabilities should probably be published as a metric, with a textual representation of commands supported. We could convert those standard commands quite easily (so for example ‘valet’ would translate to ‘C21,C23’ for protocol vs, and ‘homelink’ to C24, etc). I don’t think we need to handle the non-standard ones like C200-210’ for protocol v2. My suggestion is: Create a standard metric ‘v.capabilities’. Have the vehicle modules set that metric with their capabilities, as a comma-separated list of the commands supported: chargemode chargestart chargestop chargecurrent chargetimer wakeup lock valet homelink cooldown climate x* For server v2, generate a capabilities message (MP-0 V) based on those standardised names (no x* support), mapping names to capability numbers. Server v3 doesn’t need to do anything, as that v.capabilities metric will automatically get propagated. No change to the v2 protocol apps (although future apps should use these). Is that ok? If no objections, I can make these (relatively simple) changes and then the cars themselves can implement. For the current Apps, only C26 is needed anyway, and that is only used by the Nissan Leaf (which would just need to set StandardMetrics.ms_v_capabilities during vehicle module initialisation, or more smartly based on model year, etc). The other vehicles can change at a later time (no hurry), or I can just change them based on the v2 capabilities. Regards, Mark.
On 12 Jul 2018, at 12:26 AM, Tom Parker <tom@carrott.org> wrote:
On 11/07/18 23:25, Robin O'Leary wrote:
On Thu, Jul 05, 2018 at 08:34:34PM +1200, Tom Parker wrote:
You want to use the play store version. I'm running 3.12.4 from the Play store and when connected to a Leaf, I see the AC button. I updated the app to 3.12.4.(20180428), but it looks the same as before; I don't see an AC button. What am I missing?
The AC button is controlled by the capabilities message which, it turns out, isn't implemented in OVMS v3. I think the server is sending _my_ clients a capabilities message because, I guess, at one stage I sent one to the server (probably by connecting an OVMS v2 module).
In OVMS v2 the Nissan Leaf module has:
// Nissan Leaf capabilities: // - CMD_StartCharge (11) // - CMD_Homelink (24) // - CMD_ClimateControl (26) rom char nissanleaf_capabilities[] = "C11,C24,C26";
and reading the code in net_msg.c, it looks like the capabilities message for a Leaf would be
MP-0 VC11,C24,C26,C1-6,C40-41,C49
which is what the server sends me when I connect a client to my vehicles.
The following untested patch should make it work, but is obviously inappropriate because the capabilities depend on the vehicle.
diff --git a/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp b/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp index faa2e6c..6e9d28f 100644 --- a/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp +++ b/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp @@ -1272,6 +1272,7 @@ void OvmsServerV2::TransmitMsgEnvironment(bool always) void OvmsServerV2::TransmitMsgCapabilities(bool always) { m_now_capabilities = false; + Transmit("MP-0 VC11,C24,C26,C1-6,C40-41,C49"); }
void OvmsServerV2::TransmitMsgGroup(bool always)
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
On Thu, Jul 12, 2018 at 08:56:25AM +0800, Mark Webb-Johnson wrote:
I think the capabilities are useful, but need to be done in a better, more future-proof, way. Relying on protocol v2 commands is limited. ... My suggestion is:
Create a standard metric ‘v.capabilities’. Have the vehicle modules set that metric with their capabilities, as a comma-separated list of the commands supported:
Mapping things to strings seems rather roundabout. Would it not be better to have individual boolean capabilities? v.capability.chargemode = yes/no ... v.capability.climate = yes/no
Just seems wasteful to have a dozen metrics for this. Expensive in ram, bandwidth, and mqtt. Every vehicle module would have to set the unused ones to ‘no’ (due to the way mqtt retained topics work). If we add a new capability, all the vehicle modules would have to be changed to set it to ’no'. Your suggestion is cleaner, but more expensive. Regards, Mark.
On 12 Jul 2018, at 5:34 PM, Robin O'Leary <ovmsdev@caederus.org> wrote:
On Thu, Jul 12, 2018 at 08:56:25AM +0800, Mark Webb-Johnson wrote:
I think the capabilities are useful, but need to be done in a better, more future-proof, way. Relying on protocol v2 commands is limited. ... My suggestion is:
Create a standard metric ‘v.capabilities’. Have the vehicle modules set that metric with their capabilities, as a comma-separated list of the commands supported:
Mapping things to strings seems rather roundabout. Would it not be better to have individual boolean capabilities?
v.capability.chargemode = yes/no ... v.capability.climate = yes/no _______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
participants (3)
-
Mark Webb-Johnson -
Robin O'Leary -
Tom Parker