I'm running the V2 server (API v3) on a VM and I noticed that I no longer have access to the 12V battery history that used to be shown when I used the official public server. Is there an existing way to add this functionality to the self-hosted server or is it something that needs development (or just isn't possible)?
Which public server were you using? The api.openvehicles.com server just uses the standard v3 server code. Are you sure you have setup the database correctly? Historical data should be stored in the OVMS historical data table.
Sorry, I didn't see the notification for your reply, but I've started looking at this again. I was definitely using api.openvehicles.com previously. I do have the ovms_historicalmessages table and it has about 5500 rows.
I'm writing this quite late at night so I hope this is coherent; I was hoping to get this down before I forgot about it.
-Alex
A couple updates now that I'm a bit more caffeinated. With DESCRIBE ovms_historicalmessages;, I get the following columns:
And these are the message types that I see in the table with SELECT DISTINCT h_recordtype FROM ovms_historicalmessages ORDER BY h_recordtype;:
And here's a sample of a D message with sensitive info redacted:
So I think the data is stored properly, but maybe it isn't being grabbed properly by the app?
I have app version 5.2.3 (2025082192) and I'm running FW version 3.3.005-3-g4f3f7688/ota_1_main (build idf v3.3.4-851-gfa4f07fb3b Sep 7 2025 08:02:51)
-Alex
I think I've resolved the issue! Whenever I clicked the refresh button on the 12V graph within the app, I'd see the following on the server side:
Then inside DbDBI.pm I changed line $since='0000-00-00' if (!defined $since); inside functions DbGetHistoricalRecords and DbGetHistoricalSummary to:
and my 12V graph now populates properly within the app after a server reboot. So it looks like a date formatting issue? Does that make sense?
-Alex