On Tue, Feb 26, 2019 at 10:54:23AM +0000, Robin O'Leary wrote:
On Tue, Feb 26, 2019 at 05:29:18AM +0000, Anko Hanse wrote:
Bad news: the xnl.v.c.duration.range still are at 4095min for me, even though the SOC has now dropped below 80%. This is on a Dec-2015 30kwh model. ...I'll add a check to ignore '4095' as an invalid value ...
I have added this check so such values are ignored. As Mark commented, having 6 different charge duration estimates seemed a bit unwieldy, so I have combined them in to a vector "xnl.v.c.duration" with 6 elements (which are labelled in the corresponding string vector "xnl.v.c.duration.label"). I noticed some other interesting things about 0x5bc: The multiplex contains an extra value in index 0 while quick charge is in progress. I added this as new metric "xnl.v.c.quick". It seems more complicated than a simple estimate of minutes like the others; I haven't exactly figured it out yet. It looks like Gen1 and Gen1 batteries report the charge duration estimates using different multiplex index values. I had the idea that we could use this to identify the battery type, which I report in a new metric "xnl.v.b.type": 0 Gen1 24kWh 1 Gen2 24kWh 2 Gen2 30kWh The size comes from the length of the PollReply_Battery() active request, so that only works when the car is on (ready to drive). Another value present in 0x5bc is the SOC% value which we currently report as soc.instrument and default to showing as the standard SOC metric. However, this value is not present on earlier models. Looking for an alternative, there is another SOC%-like value in 0x5bb, which I have added as new metric "xnl.v.b.soc.nominal". On my 2015 24kWh, soc.nominal is more erratic than soc.instrument, and can be different by a couple of percentage points, e.g. often showing 97% when soc.instrument shows 100% at the end of a charge. Even so, the two are usually pretty close, and soc.nominal may be a better choice if it works for all models, so feedback would be welcome. These changes are in branch: https://github.com/caederus-ovms/Open-Vehicle-Monitoring-System-3/tree/leaf-... Could people with older/newer/different capacity batteries let me know if these metrics seem correct, and if not, collect some logs? Thanks.