3 posts / 0 new
Last post
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.


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'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…


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


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:



Log in or register to post comments