3 posts / 0 new
Last post
oskillarribera
Fuel on a v2

Hello! I would like to get the "fuel" value through the server.
I can't find them in L, D, F, W or Y.
There are also others like temperature of the battery modules, but they are not that important to me.
I can only get it through MQTT.

Im asking to the maintainer of Volt/Ampera if is possible the adaption to include that by default.

 Thanks

markwj
markwj's picture
I guess this would require

I guess this would require extensions to both the v2 API and the v2 server code, so unlikely to happen soon. I don't think it is something that the Volt/Ampera developers could do just in that module.

dexter
dexter's picture
Fuel on a v2

Copying in from my previous mail conversation with Oscar:

so that's a custom metric of your car ("xva"). As said, you can send it from a script easily using a "historical" message.

That means essentially doing something like this:

var fuel = OvmsMetrics.Value("xva.v.e.fuel");
OvmsNotify.Raise("data", "xva.stat.fuel", "XVA-ENG-FuelStatus,0,86400," + fuel);


…and for do that e.g. once per minute as long as the car is on. Then you can fetch the "XVA-ENG-FuelStatus" records from the server.

Or you can ask the maintainer of the vehicle adaption to include that by default.

…which he tried to do now via this forum. First of all, to find the maintainer, check out the github commit history for the module…

https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/76fbd4b03d5e9c12cece7005dca036c60dd16fd1

…telling you the developer who submitted the fuel metric is…

https://github.com/kssmll

So you can contact him via github or the email address shown there.

@kssmll: regarding adding the above data notification to the C++ vehicle module, that's about as simple as the javascript version:

MyNotify.NotifyStringf("data", "xva.stat.fuel", "XVA-ENG-FuelStatus,1,86400,%d", mt_fuel_level->AsInt());

…as long as you just want to transport the data via a v2 server. Users can then download this e.g. using my download tool:

https://dexters-web.de/downloadtool?lang=EN

Regards,
Michael

Log in or register to post comments