<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:SV;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="SV" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Michael.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Back when I had a Kia Niro I did some measurements on power draw.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">It’s not the poll itself that causes the power drain, it prevents the car from going to deep sleep. So I don’t think polling less frequently will have much effect. I didn’t find any
 way on the Kia to detect if it’s on without additional hardware involved, e.g. to check if there was power on the radio fuse.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/275">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/275</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:navy">Best Regards</span></b><span lang="EN-US" style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:navy"> </span><span lang="EN-US" style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:black">TIMO PENTTILÄ</span></b><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> OvmsDev <ovmsdev-bounces@lists.openvehicles.com>
<b>On Behalf Of </b>Michael Geddes<br>
<b>Sent:</b> den 28 september 2022 04:31<br>
<b>To:</b> OVMS Developers <ovmsdev@lists.openvehicles.com><br>
<b>Subject:</b> Re: [Ovmsdev] OVMS Power Drain?<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Yeah, I'm beginning to see that continuous polls are Bad(tm).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">With my latest changes, the 2 polls that are always done are for detecting On and Unlock which are on different module addresses. Setting the Car Type to NONE (and rebooting) certainly confirms that the battery drain goes away. Crap.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Is there a better way of detecting 'On', 'unlock' and possibly 'alarm'? Anything else could be checked much less frequently anyway.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> Maybe I could use internal battery test changes to trigger checks... A bit dodgy though. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Should I expect to see _any_ messages floating around on the bus without being requested? I'm not seeing any..  Presumably if I send 'Tester Present' it will keep the module powered (and back to square 1), or is there some kind of bus switch
 that is not letting me see messages? I'm coming into Can messages as a complete noon. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
Maybe Peter could help me on this, and we could put some of my changes back to kia/Kona or the common class when I'm done. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'll certainly look at using the wakeup. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">BTW for  updating images I have set a SSH pubkey and am using<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">scp <<image>> <a href="mailto:admin@ovms.lan:/sd">admin@ovms.lan:/sd</a> && ssh
<a href="mailto:admin@ovms.lan">admin@ovms.lan</a> "module reset" <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Which works like a charm! <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Michael <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, 27 Sept 2022, 3:55 pm Michael Balzer, <<a href="mailto:dexter@expeedo.de" target="_blank">dexter@expeedo.de</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Michael,<br>
<br>
it's generally a bad idea to have polls running just based on the client connection status. Clients may be connected all the time, e.g. if users attach some API pollers or set the App to persistent background operation (which is necessary for widgets or tasker
 scripting for example).<br>
<br>
You should only enable polling when actually necessary to perform some user requested action, or to monitor a drive / charge session of course.<br>
<br>
We've got an explicit "wakeup" command users can call to tell the module to wake up the car. That needs to implement some timeout to put the car back to sleep if it doesn't do so by itself.<br>
<br>
Regards,<br>
Michael<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">Am 27.09.22 um 09:41 schrieb Michael Geddes:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Thanks Michael,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I rang the Hyundai service centre, and apparently, my BMS should not need any updates (build date 2021 vs 2020 cars with the problem apparently), but I'm putting it in for a checkup of the battery.  Apparently, the BMS update was the subject
 of a recall for those cars affected. I'm going to take it in anyway in case.  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">It seems, according to the OVMS, that the 12V is going from 13v down to 12v over about 3hours before (generally) being recharged.  Looking at that link you shared with me (and related
<a href="https://www.youtube.com/watch?v=lr3Z_z1C0Uk&t=965s" target="_blank">https://www.youtube.com/watch?v=lr3Z_z1C0Uk&t=965s</a>), it should be more like 24 hours.   It still should be triggering a charge cycle - and obviously in this case it seems to miss
 one and then it just goes downhill from there - so maybe the BMS still has a bug; not helped by being forced to trigger about 4x more frequently than normal!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Assuming nothing is wrong with the car (which unless I install some kind of external battery monitor like that youtube clip), I can only assume that the 3hr drain is because my Ioniq 5 module is polling too much (which, seeing I copied
 the vehicle_kianiroev/src/ as my base, would mean THAT polls too much as well).  I still have the  PollSetPidList() called with the same data (albeit a copy) as the Kia.  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So in drafting this email I think I've hit on the problem, which is when the car is off, but a V2 or V3 client is connected (like the android app in 'background' mode), then it uses the 'Charging' pollstate element.  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">It has {OFF, Charging, ON} at the moment, which means there's space for a 4th which I will assign to 'off, not-charging and clients connected'.  I'll see what I can do to drop that right down in polling frequency and the number of modules
 being addressed.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">At some point soon it might be worth me pushing up to a fork in case anybody else wants to jump in!  For example, the Lock module that the kia has is not present in the Australian version, but I suspect US ones with key-card ability might
 have it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">//.ichael<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, 23 Sept 2022 at 17:03, Michael Balzer <<a href="mailto:dexter@expeedo.de" target="_blank">dexter@expeedo.de</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Michael,<br>
<br>
while the OVMS draws some power, unless you actually keep the car alive <br>
by polling, that's normally no issue. The 12V battery will be recharged <br>
automatically from the main battery by the car.<br>
<br>
The Ioniq 5 though has a history of issues with the 12V battery. <br>
According to Andrew Till, a BMS update has fixed his issues:<br>
<a href="https://www.youtube.com/watch?v=YmfkvL_O1IA" target="_blank">https://www.youtube.com/watch?v=YmfkvL_O1IA</a><br>
<br>
Also see his previous posts on that topic.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
Am 23.09.22 um 09:55 schrieb Michael Geddes:<br>
> Hi All,<br>
><br>
> I have just had a bit of a painful experience with my 12V being <br>
> drained (twice).  I'm guessing it's related to OVMS, but also <br>
> something seems to have happened as it was running file for a week!<br>
><br>
> For some reason, the 12V battery graphs aren't working in the <br>
> (android) App.. which means I'm not quite sure of the timelines, <br>
> however it was most likely overnight.  This morning my 12V was <br>
> severely depleted (like 6v!). (Oh, it could be because I don't have <br>
> the app running in the background).<br>
><br>
> I'm assuming it's likely not to be the direct drain of the device <br>
> itself, but maybe something it is querying on the CAN busses or <br>
> something that is then causing a consequential power drain?<br>
><br>
> I got road-side assist out and they got me going, but then 20mins <br>
> later it was flat again! (I did see an alert in the APP and so was <br>
> quick to go out, but was unsuccessful in getting the car going before <br>
> it died!).<br>
><br>
> I'm going to unplug it and see if that stops the card from dying.  <br>
> Also, I might leave the car on for a bit longer.. but still I have <br>
> concerns!<br>
><br>
> Also I haven't started using 'write' commands yet. Any ideas?<br>
><br>
> //.ichael<br>
><br>
<br>
-- <br>
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal<br>
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26<br>
<br>
_______________________________________________<br>
OvmsDev mailing list<br>
<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank">OvmsDev@lists.openvehicles.com</a><br>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>OvmsDev mailing list<o:p></o:p></pre>
<pre><a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank">OvmsDev@lists.openvehicles.com</a><o:p></o:p></pre>
<pre><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal<o:p></o:p></pre>
<pre>Fon 02333 / 833 5735 * Handy 0176 / 206 989 26<o:p></o:p></pre>
</div>
<p class="MsoNormal">_______________________________________________<br>
OvmsDev mailing list<br>
<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank">OvmsDev@lists.openvehicles.com</a><br>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>