<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Steve,<br>
<br>
not your fault, missing V3 documentation. These are features ported
from V2, which was configured by a fixed array of "features" &
"parameters". You can find info on these in the V2 documentation.
Setting features & parameters is still supported by the Apps,
and is more convenient for users than learning a config command. For
complex features, adding an editor to the Apps is recommended, but
simple configuration values can be integrated easily this way.<br>
<br>
V3 has a mapper for these, you can extend for custom vehicle
features:<br>
<br>
<font face="monospace">class OvmsVehicle …<br>
virtual bool SetFeature(int key, const char* value);<br>
virtual const std::string GetFeature(int key);</font><br>
<br>
We only support a few V2 standard features by default in V3, the
streaming mode is one of them.<br>
<br>
V2 only uses the streaming mode for the location message, and
additionally requires the vehicle to be on and some client to be
connected. It also supports not only enabling the streaming mode,
but also configuring the interval (seconds) by the feature / config.<br>
<br>
The V3 / MQTT server is still experimental, the implementation may
change and be changed by you. It currently apparently only supports
enabling/disabling the streaming mode and, you're right, if enabled
applies this to all metrics without any interval. I suppose that was
an initial, very simple implementation of streaming mode. I think it
isn't very useful, as you may have metrics that change a hundred
times per second, and the V3 server will try to transmit every
single change with streaming enabled. It looks like the interval
support is prepared in the Ticker1() method though, the same way as
in the V2 server.<br>
<br>
The V3 server needs further development from actual users like you.
I don't use MQTT because of the protocol overhead. So go ahead,
refine it.<br>
<br>
The way MQTT works is outlined in the list archive and by an example
script:<br>
<br>
- Topic structure:
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/pipermail/ovmsdev/2018-July/005354.html">http://lists.openvehicles.com/pipermail/ovmsdev/2018-July/005354.html</a><br>
- Command shell example:
<a class="moz-txt-link-freetext" href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/blob/master/client/ovms_v3shell.pl">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/blob/master/client/ovms_v3shell.pl</a><br>
<br>
…and all this really needs documentation…<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 14.01.21 um 16:53 schrieb Steve
Davies:<br>
</div>
<blockquote type="cite"
cite="mid:CABFTEGVZTcce6vGT4effg2RjA=1Mvsou951HsaOT+-c=ydWrvA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, 14 Jan 2021 at
09:23, Michael Balzer <<a href="mailto:dexter@expeedo.de"
moz-do-not-send="true">dexter@expeedo.de</a>> wrote:<br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>Both are historical records, i.e. kept on the server
until deletion or expiry. If you're looking for a GPS log,
we've already got that in form of the "L" messages. These
are kept for 24 hours, and the log frequency adapts to
user choice and App connection state ("streaming mode",
feature #8 / config vehicle stream).<br>
</div>
</blockquote>
<div><br>
</div>
<div>Thanks! </div>
<div><br>
</div>
<div>Is there documentation that I failed to find? IE
"feature #8" - seems like from a list somewhere?</div>
<div><br>
</div>
<div>I'm working at the moment with the MQTT server.</div>
<div><br>
</div>
<div>In the mqtt server code I found "m_streaming" and it
looks like I need "config set vehicle stream 1"</div>
<div><br>
</div>
<div>If I understand correctly this will result in metrics
being published to mqtt as soon as they change.</div>
<div><br>
</div>
<div>Looking at the code I'm also trying to understand what
exactly a "client" is. Here's how it looks to me: a client
sends a message with topic
<prefix>/client/<clientid>/active with the
payload being non-0 to "connect" and 0 or empty to
disconnect. Must send that at least once every 120 seconds
to stay connected.</div>
<div><br>
</div>
<div>With a client "connected" the MQTT server will send
metrics at the updatetime.connected rate rather than the
idle rate (nowithstanding that with "stream 1" they are sent
immediately).</div>
<div><br>
</div>
<div>Clients can also send commands too:
<prefix>/client/<clientid>/command</div>
<div><br>
</div>
<div>Am I on the right track?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Steve</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26</pre>
</body>
</html>