<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=""><blockquote type="cite" class=""><div text="#000000" bgcolor="#FFFFFF" class="">The auto init settings that Michael implemented are for when you plug the module in, so I'm thinking it would probably be good to turn the ext12v on so you can see the HUD device come alive. Key on then off would put the HUD to sleep with the scripts, completing the product installation checkout. This is what I had in my system.start script, which has been replaced by the auto init process.</div></blockquote><div class=""><br class=""></div><div class="">The problem would be that would also happen if module was rebooted.</div><div class=""><br class=""></div><div class="">I think it is fine if the ‘auto’ control only copes with the basic use cases. Anything more sophisticated, and it should be turned off and manual scripts used.</div><div class=""><br class=""></div><div class="">Simplest ‘auto’ solution is to turn on and off, with the car.</div><div class=""><br class=""></div><div class="">Regards, Mark</div><div><br class=""><blockquote type="cite" class=""><div class="">On 4 Mar 2018, at 1:11 PM, Greg D. <<a href="mailto:gregd2350@gmail.com" class="">gregd2350@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
Right. Forgot I have 1-line event scripts for vehicle.on and
vehicle.off to do the runtime control of ext12v. This works very
well with a HUD-type device, but not so much if you're driving the
SyncUp Drive dongle (Wifi hotspot), as you would want it on when the
car is awake but not on, e.g. while charging. I have not figured
out a good algorithm for the dongle, as not all of the useful
triggers appear to be connected. vehicle.asleep isn't for the
Roadster, for example, so it never turns off. This means that
there's no way to implement an automatic ext12v power control. The
best solution may be hardware (electrical) instead of software, by
driving the 12v into the OBDII connector from the 12v accessory port
instead of from the OBMS module, as on the Roadster it's on whenever
the car is awake (including charging). The OVMS module would remain
powered from the diagnostic connector, which has 12v on
continuously.<br class="">
<br class="">
The auto init settings that Michael implemented are for when you
plug the module in, so I'm thinking it would probably be good to
turn the ext12v on so you can see the HUD device come alive. Key on
then off would put the HUD to sleep with the scripts, completing the
product installation checkout. This is what I had in my
system.start script, which has been replaced by the auto init
process.<br class="">
<br class="">
Greg<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<div class="moz-cite-prefix">Mark Webb-Johnson wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:F45ECDC4-8D61-4FD5-B609-1C4848812650@webb-johnson.net" class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
For the ext12v auto, I suggest it would be best to control this
from the CarOn metric (v.e.on). Turn on ext12v when the car is
switched on, and turn it off when the car is switched off.
<div class=""><br class="">
</div>
<div class="">Regards, Mark.</div>
<div class=""><br class="">
<div class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 4 Mar 2018, at 11:47 AM, Greg D. <<a href="mailto:gregd2350@gmail.com" class="" moz-do-not-send="true">gregd2350@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> Hi
Michael,<br class="">
<br class="">
Looks good! <br class="">
<br class="">
The order for starting the obdii ecu task and the
vehicle it draws data from isn't critical; nothing bad
will happen if by some chance the OBDII device starts
requesting information before the vehicle task makes
it available. I suppose, the "most correct" sequence
would start the vehicle task, then the obdii ecu task,
then enable the ext12v power last, but in practice and
by design there is no issue with starting any of them
in pretty much any order. Worst case, the device it
would get zeros if it wins the race, but I catch those
internally and prevent the apparent lack of a running
ICE engine from causing the device to shut down by
supplying dummy information.<br class="">
<br class="">
The only thing missing in the web server, I suppose,
would be a way to customize the PID-to-Metric
mapping. I supply a default for the most common ones,
but there are many more possible if you are using,
say, an ELM 327 dongle with Torque-like application.
Changing the mapping is easily done through the shell
(unless you want to tackle that with the web server
too). 'config set obd2ecu.map <pid>
<metric>' to set the mapping, and 'obdii ecu
list' to display the mapping and current values.<br class="">
<br class="">
Thanks for doing this!<br class="">
<br class="">
Greg<br class="">
<br class="">
<br class="">
<div class="moz-cite-prefix">Michael Balzer wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:3910604d-9c23-0cf5-5960-461c3f555b58@expeedo.de" class="">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" class="">
Greg,<br class="">
<br class="">
I've just added ext12v and obd2ecu to the auto init
system & web config.<br class="">
<br class="">
So except for the metric set command, you should now
be able to start your module without a script.<br class="">
<br class="">
The autostart sequence is slightly different from
yours, the obd2ecu init is done after the vehicle
module init, as I see the vehicle module as the data
provider for the obd2ecu module -- correct me if I'm
wrong.<br class="">
<br class="">
Can you please verify the start sequence is working
as expected?<br class="">
<br class="">
Regards,<br class="">
Michael<br class="">
<br class="">
<br class="">
<div class="moz-cite-prefix">Am 25.02.2018 um 22:08
schrieb Greg D.:<br class="">
</div>
<blockquote type="cite" cite="mid:2e10a9a9-d3b1-66c5-314e-a643b0574af7@gmail.com" class=""><br class="">
Here's my system.start event file:<br class="">
<blockquote class=""><tt class="">OVMS > vfs
cat /store/events/system.start/mystartup</tt><br class="">
<tt class="">obdii ecu start can3</tt><br class="">
<tt class="">power ext12v on</tt><br class="">
<tt class="">wifi mode client gregnet3</tt><br class="">
<tt class=""># power simcom on</tt><br class="">
<tt class="">vehicle module TR</tt><br class="">
<tt class="">server v2 start</tt><br class="">
<tt class="">metric set v.b.soc 55</tt><br class="">
<tt class="">OVMS > </tt><br class="">
</blockquote>
(Before you ask, the setting of the soc metric is
so that I can see the server is actually talking
to the module, when the module's on the bench.)<br class="">
</blockquote>
<br class="">
<pre class="moz-signature" cols="160">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<br class="">
<pre class="" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk" moz-do-not-send="true">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br class="">
</div>
_______________________________________________<br class="">
OvmsDev mailing list<br class="">
<a href="mailto:OvmsDev@lists.teslaclub.hk" class="" moz-do-not-send="true">OvmsDev@lists.teslaclub.hk</a><br class="">
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<br class="">
<pre wrap="" class="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br class="">
</div>
_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></body></html>