Steve,

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.

V3 has a mapper for these, you can extend for custom vehicle features:

class OvmsVehicle …
    virtual bool SetFeature(int key, const char* value);
    virtual const std::string GetFeature(int key);


We only support a few V2 standard features by default in V3, the streaming mode is one of them.

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.

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.

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.

The way MQTT works is outlined in the list archive and by an example script:

- Topic structure: http://lists.openvehicles.com/pipermail/ovmsdev/2018-July/005354.html
- Command shell example: https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/blob/master/client/ovms_v3shell.pl

…and all this really needs documentation…

Regards,
Michael


Am 14.01.21 um 16:53 schrieb Steve Davies:


On Thu, 14 Jan 2021 at 09:23, Michael Balzer <dexter@expeedo.de> wrote:
 
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).

Thanks! 

Is there documentation that I failed to find?  IE "feature #8" - seems like from a list somewhere?

I'm working at the moment with the MQTT server.

In the mqtt server code I found "m_streaming" and it looks like I need "config set vehicle stream 1"

If I understand correctly this will result in metrics being published to mqtt as soon as they change.

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.

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).

Clients can also send commands too: <prefix>/client/<clientid>/command

Am I on the right track?

Thanks,
Steve

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26