<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Looking back at the old thread "Vehicle is idling": A new “Feature”, I don’t think we ever properly finished this. We did add the aux12v standard metric, and we have the charging12v one. But we never renames ‘awake’ to ‘accessory’ to avoid the confusion.<div class=""><br class=""></div><div class="">The alternative suggested would be one single enumerated metric to reflect all the possible states. Something like:<br class=""><br class=""><ul class="MailOutline"><li class="">off</li><li class="">deepsleep</li><li class="">lightsleep</li><li class="">awake</li><li class="">accessory</li><li class="">starting</li><li class="">on</li></ul><br class="">I’m ok either way. But really depends on how the other vehicle types fit into the model.<br class=""><div><br class=""></div><div>Regards, Mark.</div><div><br class=""><blockquote type="cite" class=""><div class="">On 16 Jan 2021, at 10:20 PM, Michael Balzer <<a href="mailto:dexter@expeedo.de" class="">dexter@expeedo.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="content-isolator__container"><div class="protected-part"><div class="protected-title">Signed PGP part</div><div class="protected-content">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
<div class="">
Steve,<br class="">
<br class="">
"awake" = vehicle has been switched on by the user<br class="">
"on" = vehicle is in drive mode ("ignited")<br class="">
<br class="">
The point is, "charging" is not "being awake". The idle alert checks
if the car is awake but not moving.<br class="">
<br class="">
If you cannot tell if the user switched on the vehicle, assume it
isn't when you detect charge mode.<br class="">
<br class="">
Another option is to implement your own idle alert handling, e.g. by
overriding OvmsVehicle::NotifyVehicleIdling().<br class="">
<br class="">
The <font face="monospace" class="">vehicle.charge.state</font> event is
bound to changes of the "v.c.state" metric. Charge state is meant to
only cover main battery charge states, it's defined & assumed to
be one of…<br class="">
<br class="">
<font face="monospace" class="">// charging, topoff, done, prepare,
timerwait, heating, stopped</font><br class="">
<br class="">
…or empty (unknown). There's currently no "idle" state, it's meant
to keep the last charge state.<br class="">
<br class="">
Regards,<br class="">
Michael<br class="">
<br class="">
<br class="">
<div class="moz-cite-prefix">Am 16.01.21 um 14:52 schrieb Steve
Davies:<br class="">
</div>
<blockquote type="cite" cite="mid:CABFTEGVzs2UeE6T7woFQMFxa0XoZvrMBn-hnN9rCCDVbikdKww@mail.gmail.com" class="">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
<div dir="ltr" class="">
<div class="">Hi Michael,</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, 16 Jan 2021 at
14:53, Michael Balzer <<a href="mailto:dexter@expeedo.de" moz-do-not-send="true" class="">dexter@expeedo.de</a>> wrote:<br class="">
</div>
<div class=""> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div class="">To avoid the "idling" alert, don't set the awake state
during charges. "Awake" represents the vehicle being
switched on, not automatic activity.<br class="">
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">Help me understand "v.e.awake" vs "v.e.on"?</div>
<div class=""><br class="">
</div>
<div class="">I'm currently setting "awake" when I'm getting data from
the OBD-II, ie the car is responsive ("awake"). I'm not
sure how to tell if that happened by user action or
automatically.</div>
<div class=""><br class="">
</div>
<div class="">I set "v.e.on" when the car is actually ready to drive
(at the moment I detect that the power steering ECU is
responsive since that only comes on when the car is
"READY").</div>
<div class=""><br class="">
</div>
<div class="">If "awake" is supposed to mean ready to drive, what does
"on" mean?</div>
<div class=""><br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div class=""><br class="">
Also, if distinguishable, you should only set
"charging12v" in that case, as "charging" is meant for the
main battery.<br class="">
<br class="">
</div>
</blockquote>
<div class=""> </div>
<div class="">As for the charge.state event - it should generally have
a value like idle, charging etc. In this case though the
value was empty - this is because OVMS rebooted at 01:25UTC
and had not been able to talk to the car since then since
the car was asleep. </div>
<div class=""><br class="">
</div>
<div class="">Here all the relevant events and metric changes:</div>
<div class=""><br class="">
</div>
<div class=""><font face="monospace" class="">2021-01-16T01:25:06+0000
ovms/CAA5060/metric/v/c/state #
OVMS rebooted. v.c.state initialised empty.</font></div>
<div class=""><font face="monospace" class="">
# and since
we can't talk to the car we never know better<br class="">
2021-01-16T09:25:24+0000 ovms/CAA5060/event
vehicle.charge.state # Vehicle woke, for some
reason mqtt code decided to send the charge.state at this
point<br class="">
2021-01-16T09:25:24+0000 ovms/CAA5060/event
vehicle.charge.12v.start # 12v charging detected
by current flow into 12v battery.</font></div>
<div class=""><font face="monospace" class="">2021-01-16T09:26:42+0000
ovms/CAA5060/metric/v/c/state idle #
Since car is now alive we get the "idle" charge state.
BUT WHERE IS THE charge.state EVENT?<br class="">
2021-01-16T10:25:33+0000 ovms/CAA5060/event
vehicle.charge.12v.stop # Car decides to stop
charging the 12v.<br class="">
</font></div>
<div class=""><font face="monospace" class=""><br class="">
</font></div>
<div class="">I'm not clear why another "vehicle.charge.state" event
was not sent with "idle".</div>
<div class=""><br class="">
</div>
<div class="">I did not implement GetNotifyChargeStateDelay in my
vehicle module - so I wonder if it ended up suppressed.</div>
<div class=""><br class="">
</div>
<div class="">Alternatively - at 09:26:42 the module was sending all
metrics to MQTT. This implies that it had lost and
re-established MQTT session. I wonder if that interfered
with the MetricChanged logic.</div>
<div class=""><br class="">
</div>
<div class="">Unfortunately my log doesn't have metrics trace enabled
so I can't see exactly.</div>
<div class=""><br class="">
</div>
<div class="">Steve</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br class="">
<pre class="moz-signature" cols="72">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26</pre>
</div>
</div></div><br class=""><iframe class="content-isolator__isolated-content" sandbox="allow-scripts" scrolling="auto" width="200" height="10" style="border:none;display:block;overflow:auto;" data-src="data:text/html;charset=UTF-8;base64,PGlmcmFtZS1jb250ZW50IGRhdGEtaWZyYW1lLWhlaWdodD0idHJ1ZSI+X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX188QlI+T3Ztc0RldiBtYWlsaW5nIGxpc3Q8QlI+T3Ztc0RldkBsaXN0cy5vcGVudmVoaWNsZXMuY29tPEJSPmh0dHA6Ly9saXN0cy5vcGVudmVoaWNsZXMuY29tL21haWxtYW4vbGlzdGluZm8vb3Ztc2RldjxCUj48L2lmcmFtZS1jb250ZW50Pg=="></iframe></div></div></blockquote></div><br class=""></div></body></html>