AutoLog - fuel and maintenance logbook as an add-on, one device per vehicle

I’ve had a Fuelly account since 2010. Three vehicles over the years, two of them archived by now, and the van logged fill-up by fill-up since the end of 2015.

Lately I’d just had enough of it. Not because the app is bad, it does the job fine. I wanted everything in one place, and once Home Assistant is already running the whole house, why should the car be the one thing living somewhere else? Electricity, heating, the solar, even the washing machine are all in there. The van: separate app, separate login.

So I wrote an add-on. First thing it did was swallow the export, 171 fill-ups going back to December 2015, without dropping a row.

GitHub - 7hemas7er/autolog-addon: Home Assistant add-on: vehicle fuel-up, running cost and maintenance logbook. Zero dependencies, tank-to-tank fuel economy, MQTT sensors. · GitHub

Everything sits in one SQLite file, and it publishes a device per vehicle over MQTT, so the running costs end up on the same dashboard as the rest of the house.

That import is the part I actually care about. A logbook you start empty is one you give up on by March. It eats Fuelly, Fuelio and Drivvo CSVs, does miles and gallons if you need that, and shows you what it thinks it read before writing anything. Worked first try, which I wasn’t expecting.

Consumption is tank-to-tank, same as Fuelly. That bit has its own test file because it looks trivial and isn’t. The overall average is distance-weighted, not the average of the per-tank numbers (everyone gets this wrong at least once, me included), and a partial fill rolls into the next full tank instead of producing a figure of its own.

Ten sensors per vehicle with state_class set properly, so they land in long-term statistics without any template YAML. There’s a command topic too if you’d rather have an automation log the fill-up. I’ve got an NFC tag stuck on the filler flap, still undecided whether that’s clever or ridiculous.

What it doesn’t do. Single user, so anyone who opens the panel sees every vehicle. There’s no notion of who owns what and adding one later wouldn’t be a small job. English and Italian. amd64 and aarch64 only, because the Node base image isn’t built for armv7. No receipts, no attachments.

If what you want is a proper vehicle management system rather than a logbook, LubeLogger does far more than this and I’d send you there first. The difference is packaging. One add-on that already has the sensors in it, instead of a container plus a HACS integration on top.

Units are metric, US or imperial, and you pick a currency. Database stays metric either way so switching doesn’t rewrite anything.

Install is the usual: Settings → Add-ons → Add-on Store → ⋮ → Repositories, paste the URL. Nothing to configure if you already run Mosquitto.

No npm dependencies, no build step, nothing fetched at runtime. I ended up writing the MQTT client by hand and I’m still not sure that was wise. (There’s a write-up in the repo on why MQTT rather than just POSTing states to the REST API, with actual measurements, if that’s a thing you argue about.)

Anyway. Curious what falls over on someone else’s setup. Only the Fuelly import has ever met a real file; Fuelio and Drivvo are written off their documented column names and nothing more than that. Paste your header row if yours comes out wrong and I’ll sort the mapping.

I cant wait to try this out! Thanks for this